@eui/mcp 22.0.0-alpha.7 → 22.0.0-alpha.70

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/main.js CHANGED
@@ -1,39 +1,100 @@
1
1
  #!/usr/bin/env node
2
- var gx=Object.create;var La=Object.defineProperty;var yx=Object.getOwnPropertyDescriptor;var _x=Object.getOwnPropertyNames;var vx=Object.getPrototypeOf,bx=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},df=(t,e)=>{for(var r in e)La(t,r,{get:e[r],enumerable:!0})},wx=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of _x(e))!bx.call(t,o)&&o!==r&&La(t,o,{get:()=>e[o],enumerable:!(n=yx(e,o))||n.enumerable});return t};var gt=(t,e,r)=>(r=t!=null?gx(vx(t)):{},wx(e||!t||!t.__esModule?La(r,"default",{value:t,enumerable:!0}):r,t));var sc=$((J1,Gf)=>{"use strict";var ao=t=>t&&typeof t.message=="string",oc=t=>{if(!t)return;let e=t.cause;if(typeof e=="function"){let r=t.cause();return ao(r)?r:void 0}else return ao(e)?e:void 0},Hf=(t,e)=>{if(!ao(t))return"";let r=t.stack||"";if(e.has(t))return r+`
3
- causes have become circular...`;let n=oc(t);return n?(e.add(t),r+`
4
- caused by: `+Hf(n,e)):r},oS=t=>Hf(t,new Set),Wf=(t,e,r)=>{if(!ao(t))return"";let n=r?"":t.message||"";if(e.has(t))return n+": ...";let o=oc(t);if(o){e.add(t);let s=typeof t.cause=="function";return n+(s?"":": ")+Wf(o,e,s)}else return n},sS=t=>Wf(t,new Set);Gf.exports={isErrorLike:ao,getErrorCause:oc,stackWithCauses:oS,messageWithCauses:sS}});var ic=$((K1,Kf)=>{"use strict";var iS=Symbol("circular-ref-tag"),qs=Symbol("pino-raw-err-ref"),Jf=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[qs]},set:function(t){this[qs]=t}}});Object.defineProperty(Jf,qs,{writable:!0,value:{}});Kf.exports={pinoErrProto:Jf,pinoErrorSymbols:{seen:iS,rawSymbol:qs}}});var Xf=$((Y1,Qf)=>{"use strict";Qf.exports=cc;var{messageWithCauses:aS,stackWithCauses:cS,isErrorLike:Yf}=sc(),{pinoErrProto:uS,pinoErrorSymbols:lS}=ic(),{seen:ac}=lS,{toString:dS}=Object.prototype;function cc(t){if(!Yf(t))return t;t[ac]=void 0;let e=Object.create(uS);e.type=dS.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=aS(t),e.stack=cS(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(r=>cc(r)));for(let r in t)if(e[r]===void 0){let n=t[r];Yf(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,ac)&&(e[r]=cc(n)):e[r]=n}return delete t[ac],e.raw=t,e}});var tp=$((Q1,ep)=>{"use strict";ep.exports=Us;var{isErrorLike:uc}=sc(),{pinoErrProto:fS,pinoErrorSymbols:pS}=ic(),{seen:Fs}=pS,{toString:mS}=Object.prototype;function Us(t){if(!uc(t))return t;t[Fs]=void 0;let e=Object.create(fS);e.type=mS.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(r=>Us(r))),uc(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,Fs)&&(e.cause=Us(t.cause));for(let r in t)if(e[r]===void 0){let n=t[r];uc(n)?Object.prototype.hasOwnProperty.call(n,Fs)||(e[r]=Us(n)):e[r]=n}return delete t[Fs],e.raw=t,e}});var sp=$((X1,op)=>{"use strict";op.exports={mapHttpRequest:hS,reqSerializer:np};var lc=Symbol("pino-raw-req-ref"),rp=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[lc]},set:function(t){this[lc]=t}}});Object.defineProperty(rp,lc,{writable:!0,value:{}});function np(t){let e=t.info||t.socket,r=Object.create(rp);if(r.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),r.method=t.method,t.originalUrl)r.url=t.originalUrl;else{let n=t.path;r.url=typeof n=="string"?n:t.url?t.url.path||t.url:void 0}return t.query&&(r.query=t.query),t.params&&(r.params=t.params),r.headers=t.headers,r.remoteAddress=e&&e.remoteAddress,r.remotePort=e&&e.remotePort,r.raw=t.raw||t,r}function hS(t){return{req:np(t)}}});var up=$((ej,cp)=>{"use strict";cp.exports={mapHttpResponse:gS,resSerializer:ap};var dc=Symbol("pino-raw-res-ref"),ip=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[dc]},set:function(t){this[dc]=t}}});Object.defineProperty(ip,dc,{writable:!0,value:{}});function ap(t){let e=Object.create(ip);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function gS(t){return{res:ap(t)}}});var pc=$((tj,lp)=>{"use strict";var fc=Xf(),yS=tp(),Vs=sp(),Bs=up();lp.exports={err:fc,errWithCause:yS,mapHttpRequest:Vs.mapHttpRequest,mapHttpResponse:Bs.mapHttpResponse,req:Vs.reqSerializer,res:Bs.resSerializer,wrapErrorSerializer:function(e){return e===fc?e:function(n){return e(fc(n))}},wrapRequestSerializer:function(e){return e===Vs.reqSerializer?e:function(n){return e(Vs.reqSerializer(n))}},wrapResponseSerializer:function(e){return e===Bs.resSerializer?e:function(n){return e(Bs.resSerializer(n))}}}});var mc=$((rj,dp)=>{"use strict";function _S(t,e){return e}dp.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=_S;let r=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(r))return;let n=r.slice(2),o=[];for(let s of n)s&&o.push(s.getFileName());return o}});var yp=$((nj,gp)=>{"use strict";function hc(t){if(t===null||typeof t!="object")return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){let e=[];for(let r=0;r<t.length;r++)e[r]=hc(t[r]);return e}if(typeof t=="object"){let e=Object.create(Object.getPrototypeOf(t));for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=hc(t[r]));return e}return t}function fp(t){let e=[],r="",n=!1,o=!1,s="";for(let i=0;i<t.length;i++){let a=t[i];!n&&a==="."?r&&(e.push(r),r=""):a==="["?(r&&(e.push(r),r=""),n=!0):a==="]"&&n?(e.push(r),r="",n=!1,o=!1):(a==='"'||a==="'")&&n?o?a===s?(o=!1,s=""):r+=a:(o=!0,s=a):r+=a}return r&&e.push(r),e}function pp(t,e,r){let n=t;for(let s=0;s<e.length-1;s++){let i=e[s];if(typeof n!="object"||n===null||!(i in n)||typeof n[i]!="object"||n[i]===null)return!1;n=n[i]}let o=e[e.length-1];if(o==="*"){if(Array.isArray(n))for(let s=0;s<n.length;s++)n[s]=r;else if(typeof n=="object"&&n!==null)for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&(n[s]=r)}else typeof n=="object"&&n!==null&&o in n&&Object.prototype.hasOwnProperty.call(n,o)&&(n[o]=r);return!0}function mp(t,e){let r=t;for(let o=0;o<e.length-1;o++){let s=e[o];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let n=e[e.length-1];if(n==="*"){if(Array.isArray(r))for(let o=0;o<r.length;o++)r[o]=void 0;else if(typeof r=="object"&&r!==null)for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]}else typeof r=="object"&&r!==null&&n in r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];return!0}var Hs=Symbol("PATH_NOT_FOUND");function vS(t,e){let r=t;for(let n of e){if(r==null||typeof r!="object"||r===null||!(n in r))return Hs;r=r[n]}return r}function bS(t,e){let r=t;for(let n of e){if(r==null||typeof r!="object"||r===null)return;r=r[n]}return r}function wS(t,e,r,n=!1){for(let o of e){let s=fp(o);if(s.includes("*"))hp(t,s,r,o,n);else if(n)mp(t,s);else{let i=vS(t,s);if(i===Hs)continue;let a=typeof r=="function"?r(i,s):r;pp(t,s,a)}}}function hp(t,e,r,n,o=!1){let s=e.indexOf("*");if(s===e.length-1){let i=e.slice(0,-1),a=t;for(let c of i){if(a==null||typeof a!="object"||a===null)return;a=a[c]}if(Array.isArray(a))if(o)for(let c=0;c<a.length;c++)a[c]=void 0;else for(let c=0;c<a.length;c++){let u=[...i,c.toString()],l=typeof r=="function"?r(a[c],u):r;a[c]=l}else if(typeof a=="object"&&a!==null)if(o){let c=[];for(let u in a)Object.prototype.hasOwnProperty.call(a,u)&&c.push(u);for(let u of c)delete a[u]}else for(let c in a){let u=[...i,c],l=typeof r=="function"?r(a[c],u):r;a[c]=l}}else xS(t,e,r,s,n,o)}function xS(t,e,r,n,o,s=!1){let i=e.slice(0,n),a=e.slice(n+1),c=[];function u(l,d){if(d===i.length){if(Array.isArray(l))for(let p=0;p<l.length;p++)c[d]=p.toString(),u(l[p],d+1);else if(typeof l=="object"&&l!==null)for(let p in l)c[d]=p,u(l[p],d+1)}else if(d<i.length){let p=i[d];l&&typeof l=="object"&&l!==null&&p in l&&(c[d]=p,u(l[p],d+1))}else if(a.includes("*"))hp(l,a,typeof r=="function"?(m,f)=>{let h=[...c.slice(0,d),...f];return r(m,h)}:r,o,s);else if(s)mp(l,a);else{let p=typeof r=="function"?r(bS(l,a),[...c.slice(0,d),...a]):r;pp(l,a,p)}}if(i.length===0)u(t,0);else{let l=t;for(let d=0;d<i.length;d++){let p=i[d];if(l==null||typeof l!="object"||l===null)return;l=l[p],c[d]=p}l!=null&&u(l,i.length)}}function SS(t){if(t.length===0)return null;let e=new Map;for(let r of t){let n=fp(r),o=e;for(let s=0;s<n.length;s++){let i=n[s];o.has(i)||o.set(i,new Map),o=o.get(i)}}return e}function $S(t,e){if(!e)return t;function r(n,o,s=0){if(!o||o.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let a=[];for(let c=0;c<n.length;c++){let u=c.toString();o.has(u)||o.has("*")?a[c]=r(n[c],o.get(u)||o.get("*")):a[c]=n[c]}return a}let i=Object.create(Object.getPrototypeOf(n));for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(o.has(a)||o.has("*")?i[a]=r(n[a],o.get(a)||o.get("*")):i[a]=n[a]);return i}return r(t,e)}function kS(t){if(typeof t!="string")throw new Error("Paths must be (non-empty) strings");if(t==="")throw new Error("Invalid redaction path ()");if(t.includes(".."))throw new Error(`Invalid redaction path (${t})`);if(t.includes(","))throw new Error(`Invalid redaction path (${t})`);let e=0,r=!1,n="";for(let o=0;o<t.length;o++){let s=t[o];if((s==='"'||s==="'")&&e>0)r?s===n&&(r=!1,n=""):(r=!0,n=s);else if(s==="["&&!r)e++;else if(s==="]"&&!r&&(e--,e<0))throw new Error(`Invalid redaction path (${t})`)}if(e!==0)throw new Error(`Invalid redaction path (${t})`)}function ES(t){if(!Array.isArray(t))throw new TypeError("paths must be an array");for(let e of t)kS(e)}function zS(t={}){let{paths:e=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:o=!0,remove:s=!1}=t;ES(e);let i=SS(e);return function(c){if(o&&(c===null||typeof c!="object")&&(c==null||typeof c!="object"))return n?n(c):c;let u=$S(c,i),l=c,d=r;return typeof r=="function"&&(d=r),wS(u,e,d,s),n===!1?(u.restore=function(){return hc(l)},u):typeof n=="function"?n(u):JSON.stringify(u)}}gp.exports=zS});var dn=$((oj,_p)=>{"use strict";var PS=Symbol("pino.setLevel"),TS=Symbol("pino.getLevel"),CS=Symbol("pino.levelVal"),OS=Symbol("pino.levelComp"),IS=Symbol("pino.useLevelLabels"),RS=Symbol("pino.useOnlyCustomLevels"),DS=Symbol("pino.mixin"),NS=Symbol("pino.lsCache"),AS=Symbol("pino.chindings"),jS=Symbol("pino.asJson"),MS=Symbol("pino.write"),ZS=Symbol("pino.redactFmt"),LS=Symbol("pino.time"),qS=Symbol("pino.timeSliceIndex"),FS=Symbol("pino.stream"),US=Symbol("pino.stringify"),VS=Symbol("pino.stringifySafe"),BS=Symbol("pino.stringifiers"),HS=Symbol("pino.end"),WS=Symbol("pino.formatOpts"),GS=Symbol("pino.messageKey"),JS=Symbol("pino.errorKey"),KS=Symbol("pino.nestedKey"),YS=Symbol("pino.nestedKeyStr"),QS=Symbol("pino.mixinMergeStrategy"),XS=Symbol("pino.msgPrefix"),e$=Symbol("pino.wildcardFirst"),t$=Symbol.for("pino.serializers"),r$=Symbol.for("pino.formatters"),n$=Symbol.for("pino.hooks"),o$=Symbol.for("pino.metadata");_p.exports={setLevelSym:PS,getLevelSym:TS,levelValSym:CS,levelCompSym:OS,useLevelLabelsSym:IS,mixinSym:DS,lsCacheSym:NS,chindingsSym:AS,asJsonSym:jS,writeSym:MS,serializersSym:t$,redactFmtSym:ZS,timeSym:LS,timeSliceIndexSym:qS,streamSym:FS,stringifySym:US,stringifySafeSym:VS,stringifiersSym:BS,endSym:HS,formatOptsSym:WS,messageKeySym:GS,errorKeySym:JS,nestedKeySym:KS,wildcardFirstSym:e$,needsMetadataGsym:o$,useOnlyCustomLevelsSym:RS,formattersSym:r$,hooksSym:n$,nestedKeyStrSym:YS,mixinMergeStrategySym:QS,msgPrefixSym:XS}});var yc=$((sj,xp)=>{"use strict";var vp=yp(),{redactFmtSym:s$,wildcardFirstSym:Ws}=dn(),gc=/[^.[\]]+|\[([^[\]]*?)\]/g,bp="[Redacted]",wp=!1;function i$(t,e){let{paths:r,censor:n,remove:o}=a$(t),s=r.reduce((c,u)=>{gc.lastIndex=0;let l=gc.exec(u),d=gc.exec(u),p=l[1]!==void 0?l[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):l[0];if(p==="*"&&(p=Ws),d===null)return c[p]=null,c;if(c[p]===null)return c;let{index:m}=d,f=`${u.substr(m,u.length-1)}`;return c[p]=c[p]||[],p!==Ws&&c[p].length===0&&c[p].push(...c[Ws]||[]),p===Ws&&Object.keys(c).forEach(function(h){c[h]&&c[h].push(f)}),c[p].push(f),c},{}),i={[s$]:vp({paths:r,censor:n,serialize:e,strict:wp,remove:o})},a=(...c)=>e(typeof n=="function"?n(...c):n);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((c,u)=>{if(s[u]===null)c[u]=l=>a(l,[u]);else{let l=typeof n=="function"?(d,p)=>n(d,[u,...p]):n;c[u]=vp({paths:s[u],censor:l,serialize:e,strict:wp,remove:o})}return c},i)}function a$(t){if(Array.isArray(t))return t={paths:t,censor:bp},t;let{paths:e,censor:r=bp,remove:n}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),{paths:e,censor:r,remove:n}}xp.exports=i$});var kp=$((ij,$p)=>{"use strict";var c$=()=>"",u$=()=>`,"time":${Date.now()}`,l$=()=>`,"time":${Math.round(Date.now()/1e3)}`,d$=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,f$=1000000n,Sp=1000000000n,p$=BigInt(Date.now())*f$,m$=process.hrtime.bigint(),h$=()=>{let t=process.hrtime.bigint()-m$,e=p$+t,r=e/Sp,n=e%Sp,o=Number(r*1000n+n/1000000n),s=new Date(o),i=s.getUTCFullYear(),a=(s.getUTCMonth()+1).toString().padStart(2,"0"),c=s.getUTCDate().toString().padStart(2,"0"),u=s.getUTCHours().toString().padStart(2,"0"),l=s.getUTCMinutes().toString().padStart(2,"0"),d=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${i}-${a}-${c}T${u}:${l}:${d}.${n.toString().padStart(9,"0")}Z"`};$p.exports={nullTime:c$,epochTime:u$,unixTime:l$,isoTime:d$,isoTimeNano:h$}});var zp=$((aj,Ep)=>{"use strict";function g$(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}Ep.exports=y$;function y$(t,e,r){var n=r&&r.stringify||g$,o=1;if(typeof t=="object"&&t!==null){var s=e.length+o;if(s===1)return t;var i=new Array(s);i[0]=n(t);for(var a=1;a<s;a++)i[a]=n(e[a]);return i.join(" ")}if(typeof t!="string")return t;var c=e.length;if(c===0)return t;for(var u="",l=1-o,d=-1,p=t&&t.length||0,m=0;m<p;){if(t.charCodeAt(m)===37&&m+1<p){switch(d=d>-1?d:0,t.charCodeAt(m+1)){case 100:case 102:if(l>=c||e[l]==null)break;d<m&&(u+=t.slice(d,m)),u+=Number(e[l]),d=m+2,m++;break;case 105:if(l>=c||e[l]==null)break;d<m&&(u+=t.slice(d,m)),u+=Math.floor(Number(e[l])),d=m+2,m++;break;case 79:case 111:case 106:if(l>=c||e[l]===void 0)break;d<m&&(u+=t.slice(d,m));var f=typeof e[l];if(f==="string"){u+="'"+e[l]+"'",d=m+2,m++;break}if(f==="function"){u+=e[l].name||"<anonymous>",d=m+2,m++;break}u+=n(e[l]),d=m+2,m++;break;case 115:if(l>=c)break;d<m&&(u+=t.slice(d,m)),u+=String(e[l]),d=m+2,m++;break;case 37:d<m&&(u+=t.slice(d,m)),u+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?t:(d<p&&(u+=t.slice(d)),u)}});var vc=$((cj,_c)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let e=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(t,0,0,Number(r))},t=new Int32Array(new SharedArrayBuffer(4));_c.exports=e}else{let t=function(e){if((e>0&&e<1/0)===!1)throw typeof e!="number"&&typeof e!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(e);for(;n>Date.now(););};_c.exports=t}});var Np=$((uj,Dp)=>{"use strict";var ue=require("fs"),_$=require("events"),v$=require("util").inherits,Pp=require("path"),wc=vc(),b$=require("assert"),Gs=100,Js=Buffer.allocUnsafe(0),w$=16*1024,Tp="buffer",Cp="utf8",[x$,S$]=(process.versions.node||"0.0").split(".").map(Number),$$=x$>=22&&S$>=7;function Op(t,e){e._opening=!0,e._writing=!0,e._asyncDrainScheduled=!1;function r(s,i){if(s){e._reopening=!1,e._writing=!1,e._opening=!1,e.sync?process.nextTick(()=>{e.listenerCount("error")>0&&e.emit("error",s)}):e.emit("error",s);return}let a=e._reopening;e.fd=i,e.file=t,e._reopening=!1,e._opening=!1,e._writing=!1,e.sync?process.nextTick(()=>e.emit("ready")):e.emit("ready"),!e.destroyed&&(!e._writing&&e._len>e.minLength||e._flushPending?e._actualWrite():a&&process.nextTick(()=>e.emit("drain")))}let n=e.append?"a":"w",o=e.mode;if(e.sync)try{e.mkdir&&ue.mkdirSync(Pp.dirname(t),{recursive:!0});let s=ue.openSync(t,n,o);r(null,s)}catch(s){throw r(s),s}else e.mkdir?ue.mkdir(Pp.dirname(t),{recursive:!0},s=>{if(s)return r(s);ue.open(t,n,o,r)}):ue.open(t,n,o,r)}function wt(t){if(!(this instanceof wt))return new wt(t);let{fd:e,dest:r,minLength:n,maxLength:o,maxWrite:s,periodicFlush:i,sync:a,append:c=!0,mkdir:u,retryEAGAIN:l,fsync:d,contentMode:p,mode:m}=t||{};e=e||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=o||0,this.maxWrite=s||w$,this._periodicFlush=i||0,this._periodicFlushTimer=void 0,this.sync=a||!1,this.writable=!0,this._fsync=d||!1,this.append=c||!1,this.mode=m,this.retryEAGAIN=l||(()=>!0),this.mkdir=u||!1;let f,h;if(p===Tp)this._writingBuf=Js,this.write=z$,this.flush=T$,this.flushSync=O$,this._actualWrite=R$,f=()=>ue.writeSync(this.fd,this._writingBuf),h=()=>ue.write(this.fd,this._writingBuf,this.release);else if(p===void 0||p===Cp)this._writingBuf="",this.write=E$,this.flush=P$,this.flushSync=C$,this._actualWrite=I$,f=()=>Buffer.isBuffer(this._writingBuf)?ue.writeSync(this.fd,this._writingBuf):ue.writeSync(this.fd,this._writingBuf,"utf8"),h=()=>Buffer.isBuffer(this._writingBuf)?ue.write(this.fd,this._writingBuf,this.release):ue.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Cp}" and "${Tp}", but passed ${p}`);if(typeof e=="number")this.fd=e,process.nextTick(()=>this.emit("ready"));else if(typeof e=="string")Op(e,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(g,_)=>{if(g){if((g.code==="EAGAIN"||g.code==="EBUSY")&&this.retryEAGAIN(g,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{wc(Gs),this.release(void 0,0)}catch(S){this.release(S)}else setTimeout(h,Gs);else this._writing=!1,this.emit("error",g);return}this.emit("write",_);let x=bc(this._writingBuf,this._len,_);if(this._len=x.len,this._writingBuf=x.writingBuf,this._writingBuf.length){if(!this.sync){h();return}try{do{let S=f(),k=bc(this._writingBuf,this._len,S);this._len=k.len,this._writingBuf=k.writingBuf}while(this._writingBuf.length)}catch(S){this.release(S);return}}this._fsync&&ue.fsyncSync(this.fd);let w=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):w>this.minLength?this._actualWrite():this._ending?w>0?this._actualWrite():(this._writing=!1,Ks(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(k$,this)):this.emit("drain"))},this.on("newListener",function(g){g==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function bc(t,e,r){return typeof t=="string"&&(t=Buffer.from(t)),e=Math.max(e-r,0),t=t.subarray(r),{writingBuf:t,len:e}}function k$(t){t.listenerCount("drain")>0&&(t._asyncDrainScheduled=!1,t.emit("drain"))}v$(wt,_$);function Ip(t,e){return t.length===0?Js:t.length===1?t[0]:Buffer.concat(t,e)}function E$(t){if(this.destroyed)throw new Error("SonicBoom destroyed");t=""+t;let e=Buffer.byteLength(t),r=this._len+e,n=this._bufs;return this.maxLength&&r>this.maxLength?(this.emit("drop",t),this._len<this._hwm):(n.length===0||Buffer.byteLength(n[n.length-1])+e>this.maxWrite?n.push(t):n[n.length-1]+=t,this._len=r,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function z$(t){if(this.destroyed)throw new Error("SonicBoom destroyed");let e=this._len+t.length,r=this._bufs,n=this._lens;return this.maxLength&&e>this.maxLength?(this.emit("drop",t),this._len<this._hwm):(r.length===0||n[n.length-1]+t.length>this.maxWrite?(r.push([t]),n.push(t.length)):(r[r.length-1].push(t),n[n.length-1]+=t.length),this._len=e,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Rp(t){this._flushPending=!0;let e=()=>{if(this._fsync)this._flushPending=!1,t();else try{ue.fsync(this.fd,n=>{this._flushPending=!1,t(n)})}catch(n){t(n)}this.off("error",r)},r=n=>{this._flushPending=!1,t(n),this.off("drain",e)};this.once("drain",e),this.once("error",r)}function P$(t){if(t!=null&&typeof t!="function")throw new Error("flush cb must be a function");if(this.destroyed){let e=new Error("SonicBoom destroyed");if(t){t(e);return}throw e}if(this.minLength<=0){t?.();return}t&&Rp.call(this,t),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function T$(t){if(t!=null&&typeof t!="function")throw new Error("flush cb must be a function");if(this.destroyed){let e=new Error("SonicBoom destroyed");if(t){t(e);return}throw e}if(this.minLength<=0){t?.();return}t&&Rp.call(this,t),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}wt.prototype.reopen=function(t){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(t)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(t&&(this.file=t),this._reopening=!0,this._writing)return;let e=this.fd;this.once("ready",()=>{e!==this.fd&&ue.close(e,r=>{if(r)return this.emit("error",r)})}),Op(this.file,this)};wt.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Ks(this)))};function C$(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let t="";for(;this._bufs.length||t.length;){t.length<=0&&(t=this._bufs[0]);try{let e=Buffer.isBuffer(t)?ue.writeSync(this.fd,t):ue.writeSync(this.fd,t,"utf8"),r=bc(t,this._len,e);t=r.writingBuf,this._len=r.len,t.length<=0&&this._bufs.shift()}catch(e){if((e.code==="EAGAIN"||e.code==="EBUSY")&&!this.retryEAGAIN(e,t.length,this._len-t.length))throw e;wc(Gs)}}try{ue.fsyncSync(this.fd)}catch{}}function O$(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=Js);let t=Js;for(;this._bufs.length||t.length;){t.length<=0&&(t=Ip(this._bufs[0],this._lens[0]));try{let e=ue.writeSync(this.fd,t);t=t.subarray(e),this._len=Math.max(this._len-e,0),t.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(e){if((e.code==="EAGAIN"||e.code==="EBUSY")&&!this.retryEAGAIN(e,t.length,this._len-t.length))throw e;wc(Gs)}}}wt.prototype.destroy=function(){this.destroyed||Ks(this)};function I$(){let t=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let e=Buffer.isBuffer(this._writingBuf)?ue.writeSync(this.fd,this._writingBuf):ue.writeSync(this.fd,this._writingBuf,"utf8");t(null,e)}catch(e){t(e)}else ue.write(this.fd,this._writingBuf,t)}function R$(){let t=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Ip(this._bufs.shift(),this._lens.shift()),this.sync)try{let e=ue.writeSync(this.fd,this._writingBuf);t(null,e)}catch(e){t(e)}else $$&&(this._writingBuf=Buffer.from(this._writingBuf)),ue.write(this.fd,this._writingBuf,t)}function Ks(t){if(t.fd===-1){t.once("ready",Ks.bind(null,t));return}t._periodicFlushTimer!==void 0&&clearInterval(t._periodicFlushTimer),t.destroyed=!0,t._bufs=[],t._lens=[],b$(typeof t.fd=="number",`sonic.fd must be a number, got ${typeof t.fd}`);try{ue.fsync(t.fd,e)}catch{}function e(){t.fd!==1&&t.fd!==2?ue.close(t.fd,r):r()}function r(n){if(n){t.emit("error",n);return}t._ending&&!t._writing&&t.emit("finish"),t.emit("close")}}wt.SonicBoom=wt;wt.default=wt;Dp.exports=wt});var xc=$((lj,Lp)=>{"use strict";var xt={exit:[],beforeExit:[]},Ap={exit:A$,beforeExit:j$},fn;function D$(){fn===void 0&&(fn=new FinalizationRegistry(M$))}function N$(t){xt[t].length>0||process.on(t,Ap[t])}function jp(t){xt[t].length>0||(process.removeListener(t,Ap[t]),xt.exit.length===0&&xt.beforeExit.length===0&&(fn=void 0))}function A$(){Mp("exit")}function j$(){Mp("beforeExit")}function Mp(t){for(let e of xt[t]){let r=e.deref(),n=e.fn;r!==void 0&&n(r,t)}xt[t]=[]}function M$(t){for(let e of["exit","beforeExit"]){let r=xt[e].indexOf(t);xt[e].splice(r,r+1),jp(e)}}function Zp(t,e,r){if(e===void 0)throw new Error("the object can't be undefined");N$(t);let n=new WeakRef(e);n.fn=r,D$(),fn.register(e,n),xt[t].push(n)}function Z$(t,e){Zp("exit",t,e)}function L$(t,e){Zp("beforeExit",t,e)}function q$(t){if(fn!==void 0){fn.unregister(t);for(let e of["exit","beforeExit"])xt[e]=xt[e].filter(r=>{let n=r.deref();return n&&n!==t}),jp(e)}}Lp.exports={register:Z$,registerBeforeExit:L$,unregister:q$}});var qp=$((dj,F$)=>{F$.exports={name:"thread-stream",version:"4.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",engines:{node:">=20"},dependencies:{"real-require":"^1.0.0"},devDependencies:{"@types/node":"^25.0.2","@yao-pkg/pkg":"^6.0.0",borp:"^1.0.0",desm:"^1.3.0",eslint:"^9.39.1",fastbench:"^1.0.1",neostandard:"^0.13.0","pino-elasticsearch":"^9.0.0","sonic-boom":"^5.0.0","ts-node":"^10.8.0",typescript:"~5.7.3"},scripts:{build:"tsc --noEmit",lint:"eslint",test:'npm run lint && npm run build && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:ci":'npm run lint && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:yarn":'npm run transpile && borp --pattern "test/*.test.js"',transpile:"sh ./test/ts/transpile.sh"},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Up=$((fj,Fp)=>{"use strict";function U$(t,e,r,n,o){let s=n===1/0?1/0:Date.now()+n,i=()=>{let a=Atomics.load(t,e);if(a===r){o(null,"ok");return}if(s!==1/0&&Date.now()>s){o(null,"timed-out");return}let c=s===1/0?1e4:Math.min(1e4,Math.max(1,s-Date.now())),u=Atomics.waitAsync(t,e,a,c);u.async?u.value.then(i):setImmediate(i)};i()}function V$(t,e,r,n,o){let s=n===1/0?1/0:Date.now()+n,i=()=>{if(Atomics.load(t,e)!==r){o(null,"ok");return}if(s!==1/0&&Date.now()>s){o(null,"timed-out");return}let c=s===1/0?1e4:Math.min(1e4,Math.max(1,s-Date.now())),u=Atomics.waitAsync(t,e,r,c);u.async?u.value.then(l=>{if(l==="ok"){o(null,"ok");return}i()}):setImmediate(i)};i()}Fp.exports={wait:U$,waitDiff:V$}});var Bp=$((pj,Vp)=>{"use strict";Vp.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var nm=$((mj,rm)=>{"use strict";var{version:B$}=qp(),{EventEmitter:H$}=require("events"),{Worker:W$}=require("worker_threads"),{join:G$}=require("path"),{pathToFileURL:J$}=require("url"),{wait:K$}=Up(),{WRITE_INDEX:qt,READ_INDEX:Nr,SEQ_INDEX:Sc}=Bp(),Y$=require("buffer"),Q$=require("assert"),b=Symbol("kImpl"),X$=Y$.constants.MAX_STRING_LENGTH;function Hp(){}function zc(t,e){Atomics.add(t[b].state,Sc,1),e(),Atomics.add(t[b].state,Sc,1),Atomics.notify(t[b].state,Sc)}function Wp(t){zc(t,()=>{Atomics.store(t[b].state,Nr,0),Atomics.store(t[b].state,qt,0)})}var co=class{constructor(e){this._value=e}deref(){return this._value}},Ys=class{register(){}unregister(){}},ek=process.env.NODE_V8_COVERAGE?Ys:global.FinalizationRegistry||Ys,tk=process.env.NODE_V8_COVERAGE?co:global.WeakRef||co,Gp=new ek(t=>{t.exited||t.terminate()});function rk(t,e){let{filename:r,workerData:n}=e,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||G$(__dirname,"lib","worker.js"),i=new W$(s,{...e.workerOpts,name:e.workerOpts?.name||"thread-stream",trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:J$(r).href,dataBuf:t[b].dataBuf,stateBuf:t[b].stateBuf,workerData:{$context:{threadStreamVersion:B$},...n}}});return i.stream=new co(t),i.on("message",nk),i.on("exit",Yp),Gp.register(t,i),i}function Jp(t){Q$(!t[b].sync),t[b].needDrain&&(t[b].needDrain=!1,t.emit("drain"))}function Kp(t){for(;;){let e=Atomics.load(t[b].state,qt),r=t[b].data.length-e;if(r>0){if(t[b].bufLen===0){t[b].flushing=!1,t[b].ending?Pc(t):t[b].needDrain&&process.nextTick(Jp,t);return}em(t,r,Hp);continue}if(r===0){if(e===0&&t[b].bufLen===0)return;Qs(t,()=>{t.destroyed||(Wp(t),Kp(t))});return}it(t,new Error("overwritten"));return}}function nk(t){let e=this.stream.deref();if(e===void 0){this.exited=!0,this.terminate();return}if(t?.code!=null)switch(t.code){case"READY":this.stream=new tk(e),Qs(e,()=>{e[b].ready=!0,e.emit("ready")});break;case"ERROR":it(e,t.err);break;case"EVENT":Array.isArray(t.args)?e.emit(t.name,...t.args):e.emit(t.name,t.args);break;case"FLUSHED":{if(t.context!=="thread-stream"){it(e,new Error("this should not happen: "+t.code));break}let r=e[b].flushCallbacks.get(t.id);r&&(e[b].flushCallbacks.delete(t.id),process.nextTick(r));break}case"WARNING":process.emitWarning(t.err);break;default:it(e,new Error("this should not happen: "+t.code))}}function Yp(t){let e=this.stream.deref();e!==void 0&&(Gp.unregister(e),e.worker.exited=!0,e.worker.off("exit",Yp),it(e,t!==0?new Error("the worker thread exited"):null))}var kc=class extends H${constructor(e={}){if(super(),e.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[b]={},this[b].stateBuf=new SharedArrayBuffer(128),this[b].state=new Int32Array(this[b].stateBuf),this[b].dataBuf=new SharedArrayBuffer(e.bufferSize||4*1024*1024),this[b].data=Buffer.from(this[b].dataBuf),this[b].sync=e.sync||!1,this[b].ending=!1,this[b].ended=!1,this[b].needDrain=!1,this[b].destroyed=!1,this[b].flushing=!1,this[b].ready=!1,this[b].finished=!1,this[b].errored=null,this[b].closed=!1,this[b].buf=[],this[b].bufHead=0,this[b].bufLen=0,this[b].flushCallbacks=new Map,this[b].nextFlushId=0,this.worker=rk(this,e),this.on("message",(r,n)=>{this.worker.postMessage(r,n)})}write(e){let r=Buffer.isBuffer(e)?e:Buffer.from(e);if(this[b].destroyed)return Ec(this,new Error("the worker has exited")),!1;if(this[b].ending)return Ec(this,new Error("the worker is ending")),!1;if(this[b].flushing&&this[b].bufLen+r.length>=X$)try{$c(this),this[b].flushing=!0}catch(n){return it(this,n),!1}if(this[b].buf.push(r),this[b].bufLen+=r.length,this[b].sync)try{return $c(this),!0}catch(n){return it(this,n),!1}return this[b].flushing||(this[b].flushing=!0,setImmediate(Kp,this)),this[b].needDrain=this[b].data.length-this[b].bufLen-Atomics.load(this[b].state,qt)<=0,!this[b].needDrain}end(){this[b].destroyed||(this[b].ending=!0,Pc(this))}flush(e){e=typeof e=="function"?e:Hp,Qp(this,r=>{if(r){process.nextTick(e,r);return}Xp(this,e)})}flushSync(){this[b].destroyed||($c(this),tm(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[b].ready}get destroyed(){return this[b].destroyed}get closed(){return this[b].closed}get writable(){return!this[b].destroyed&&!this[b].ending}get writableEnded(){return this[b].ending}get writableFinished(){return this[b].finished}get writableNeedDrain(){return this[b].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[b].errored}};function Qp(t,e){if(t[b].destroyed){process.nextTick(e,new Error("the worker has exited"));return}if(!t[b].sync&&(t[b].flushing||t[b].bufLen>0)){setImmediate(Qp,t,e);return}Qs(t,e)}function Qs(t,e){let r=Atomics.load(t[b].state,qt);K$(t[b].state,Nr,r,1/0,(n,o)=>{if(n){it(t,n),e(n);return}if(o!=="ok"){Qs(t,e);return}e()})}function Xp(t,e){if(t[b].destroyed){process.nextTick(e,new Error("the worker has exited"));return}if(!t[b].ready){let n=()=>{s(),Xp(t,e)},o=()=>{s(),process.nextTick(e,new Error("the worker has exited"))},s=()=>{t.off("ready",n),t.off("close",o)};t.once("ready",n),t.once("close",o);return}let r=++t[b].nextFlushId;t[b].flushCallbacks.set(r,e);try{t.worker.postMessage({code:"FLUSH",context:"thread-stream",id:r})}catch(n){t[b].flushCallbacks.delete(r),it(t,n),process.nextTick(e,n)}}function ok(t,e){let r=t[b].flushCallbacks;if(r.size===0)return;let n=e||new Error("the worker has exited");for(let o of r.values())process.nextTick(o,n);r.clear()}function Ec(t,e){setImmediate(()=>{t.emit("error",e)})}function it(t,e){t[b].destroyed||(t[b].destroyed=!0,ok(t,e),e&&(t[b].errored=e,Ec(t,e)),t.worker.exited?setImmediate(()=>{t[b].closed=!0,t.emit("close")}):t.worker.terminate().catch(()=>{}).then(()=>{t[b].closed=!0,t.emit("close")}))}function em(t,e,r){let o=Atomics.load(t[b].state,qt),s=e;for(;s>0&&t[b].bufLen!==0;){let i=t[b].bufHead,a=t[b].buf[i];if(a.length<=s){a.copy(t[b].data,o),o+=a.length,s-=a.length,t[b].bufLen-=a.length,t[b].bufHead=i+1,t[b].bufHead===t[b].buf.length?(t[b].buf.length=0,t[b].bufHead=0):t[b].bufHead>=1024&&t[b].bufHead*2>=t[b].buf.length&&(t[b].buf.splice(0,t[b].bufHead),t[b].bufHead=0);continue}a.copy(t[b].data,o,0,s),t[b].buf[i]=a.subarray(s),t[b].bufLen-=s,o+=s,s=0}return zc(t,()=>{Atomics.store(t[b].state,qt,o)}),r(),!0}function Pc(t){if(!(t[b].ended||!t[b].ending||t[b].flushing)){t[b].ended=!0;try{t.flushSync();let e=Atomics.load(t[b].state,Nr);zc(t,()=>{Atomics.store(t[b].state,qt,-1)});let r=0;for(;e!==-1;){if(Atomics.wait(t[b].state,Nr,e,1e3),e=Atomics.load(t[b].state,Nr),e===-2){it(t,new Error("end() failed"));return}if(++r===10){it(t,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{t[b].finished=!0,t.emit("finish")})}catch(e){it(t,e)}}}function $c(t){let e=()=>{t[b].ending?Pc(t):t[b].needDrain&&process.nextTick(Jp,t)};for(t[b].flushing=!1;t[b].bufLen!==0;){let r=Atomics.load(t[b].state,qt),n=t[b].data.length-r;if(n===0){tm(t),Wp(t);continue}else if(n<0)throw new Error("overwritten");em(t,n,e)}}function tm(t){if(t[b].flushing)throw new Error("unable to flush while flushing");let e=Atomics.load(t[b].state,qt),r=0;for(;;){let n=Atomics.load(t[b].state,Nr);if(n===-2)throw Error("_flushSync failed");if(n!==e)Atomics.wait(t[b].state,Nr,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}rm.exports=kc});var Oc=$((hj,im)=>{"use strict";var{createRequire:sk}=require("module"),{existsSync:ik}=require("node:fs"),ak=mc(),{join:Tc,isAbsolute:sm,sep:ck}=require("node:path"),{fileURLToPath:uk}=require("node:url"),lk=vc(),Cc=xc(),dk=nm();function fk(t){Cc.register(t,yk),Cc.registerBeforeExit(t,_k),t.on("close",function(){Cc.unregister(t)})}function pk(){let t=process.execArgv;for(let e=0;e<t.length;e++){let r=t[e];if(r==="--import"||r==="--require"||r==="-r"||r.startsWith("--import=")||r.startsWith("--require=")||r.startsWith("-r="))return!0}return!1}function mk(t){let e=t.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);if(!e)return t;let r=[],n=!1;for(let o=0;o<e.length;o++){let s=e[o];if(s==="--require"||s==="-r"||s==="--import"){let i=e[o+1];if(i&&om(i)){n=!0,o++;continue}r.push(s),i&&(r.push(i),o++);continue}if(s.startsWith("--require=")||s.startsWith("-r=")||s.startsWith("--import=")){let i=s.slice(s.indexOf("=")+1);if(om(i)){n=!0;continue}}r.push(s)}return n?r.join(" "):t}function om(t){let e=hk(t);if(!e)return!1;let r=e;if(r.startsWith("file://"))try{r=uk(r)}catch{return!1}return sm(r)&&!ik(r)}function hk(t){let e=t[0],r=t[t.length-1];return e==='"'&&r==='"'||e==="'"&&r==="'"?t.slice(1,-1):t}function gk(t,e,r,n,o){if(!r.execArgv&&pk()&&require.main===void 0&&(r={...r,execArgv:[]}),!r.env&&process.env.NODE_OPTIONS){let c=mk(process.env.NODE_OPTIONS);c!==process.env.NODE_OPTIONS&&(r={...r,env:{...process.env,NODE_OPTIONS:c}})}r={...r,name:o};let s=new dk({filename:t,workerData:e,workerOpts:r,sync:n});s.on("ready",i),s.on("close",function(){process.removeListener("exit",a)}),process.on("exit",a);function i(){process.removeListener("exit",a),s.unref(),r.autoEnd!==!1&&fk(s)}function a(){s.closed||(s.flushSync(),lk(100),s.end())}return s}function yk(t){t.ref(),t.flushSync(),t.end(),t.once("close",function(){t.unref()})}function _k(t){t.flushSync()}function vk(t){let{pipeline:e,targets:r,levels:n,dedupe:o,worker:s={},caller:i=ak(),sync:a=!1}=t,c={...t.options},u=typeof i=="string"?[i]:i,l=typeof globalThis=="object"&&Object.prototype.hasOwnProperty.call(globalThis,"__bundlerPathsOverrides")&&globalThis.__bundlerPathsOverrides&&typeof globalThis.__bundlerPathsOverrides=="object"?globalThis.__bundlerPathsOverrides:Object.create(null),d=t.target;if(d&&r)throw new Error("only one of target or targets can be specified");r?(d=l["pino-worker"]||Tc(__dirname,"worker.js"),c.targets=r.filter(f=>f.target).map(f=>({...f,target:m(f.target)})),c.pipelines=r.filter(f=>f.pipeline).map(f=>f.pipeline.map(h=>({...h,level:f.level,target:m(h.target)})))):e&&(d=l["pino-worker"]||Tc(__dirname,"worker.js"),c.pipelines=[e.map(f=>({...f,target:m(f.target)}))]),n&&(c.levels=n),o&&(c.dedupe=o),c.pinoWillSendConfig=!0;let p=r||e?"pino.transport":d;return gk(m(d),c,s,a,p);function m(f){if(f=l[f]||f,sm(f)||f.indexOf("file://")===0)return f;if(f==="pino/file")return Tc(__dirname,"..","file.js");let h;for(let g of u)try{let _=g==="node:repl"?process.cwd()+ck:g;h=sk(_).resolve(f);break}catch{continue}if(!h)throw new Error(`unable to determine transport target for "${f}"`);return h}}im.exports=vk});var ti=$((gj,vm)=>{"use strict";var bk=require("node:diagnostics_channel"),am=zp(),{mapHttpRequest:wk,mapHttpResponse:xk}=pc(),Rc=Np(),cm=xc(),{lsCacheSym:Sk,chindingsSym:pm,writeSym:um,serializersSym:mm,formatOptsSym:lm,endSym:$k,stringifiersSym:hm,stringifySym:gm,stringifySafeSym:Dc,wildcardFirstSym:ym,nestedKeySym:kk,formattersSym:_m,messageKeySym:Ek,errorKeySym:zk,nestedKeyStrSym:Pk,msgPrefixSym:Xs}=dn(),{isMainThread:Tk}=require("worker_threads"),Ck=Oc(),[Ok]=process.versions.node.split(".").map(t=>Number(t)),dm=bk.tracingChannel("pino_asJson"),Ic=Ok>=25?t=>JSON.stringify(t):Rk;function pn(){}function Ik(t,e){if(!e)return r;return function(...o){e.call(this,o,r,t)};function r(n,...o){if(typeof n=="object"){let s=n;n!==null&&(n.method&&n.headers&&n.socket?n=wk(n):typeof n.setHeader=="function"&&(n=xk(n)));let i;s===null&&o.length===0?i=[null]:(s=o.shift(),i=o),typeof this[Xs]=="string"&&s!==void 0&&s!==null&&(s=this[Xs]+s),this[um](n,am(s,i,this[lm]),t)}else{let s=n===void 0?o.shift():n;typeof this[Xs]=="string"&&s!==void 0&&s!==null&&(s=this[Xs]+s),this[um](null,am(s,o,this[lm]),t)}}}function Rk(t){let e="",r=0,n=!1,o=255,s=t.length;if(s>100)return JSON.stringify(t);for(var i=0;i<s&&o>=32;i++)o=t.charCodeAt(i),(o===34||o===92)&&(e+=t.slice(r,i)+"\\",r=i,n=!0);return n?e+=t.slice(r):e=t,o<32?JSON.stringify(t):'"'+e+'"'}function Dk(t,e,r,n){if(dm.hasSubscribers===!1)return fm.call(this,t,e,r,n);let o={instance:this,arguments};return dm.traceSync(fm,o,this,t,e,r,n)}function fm(t,e,r,n){let o=this[gm],s=this[Dc],i=this[hm],a=this[$k],c=this[pm],u=this[mm],l=this[_m],d=this[Ek],p=this[zk],m=this[Sk][r]+n;m=m+c;let f;l.log&&(t=l.log(t));let h=i[ym],g="";for(let x in t)if(f=t[x],Object.prototype.hasOwnProperty.call(t,x)&&f!==void 0){u[x]?f=u[x](f):x===p&&u.err&&(f=u.err(f));let w=i[x]||h;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":w&&(f=w(f));break;case"string":f=(w||Ic)(f);break;default:f=(w||o)(f,s)}if(f===void 0)continue;let S=Ic(x);g+=","+S+":"+f}let _="";if(e!==void 0){f=u[d]?u[d](e):e;let x=i[d]||h;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":x&&(f=x(f)),_=',"'+d+'":'+f;break;case"string":f=(x||Ic)(f),_=',"'+d+'":'+f;break;default:f=(x||o)(f,s),_=',"'+d+'":'+f}}return this[kk]&&g?m+this[Pk]+g.slice(1)+"}"+_+a:m+g+_+a}function Nk(t,e){let r,n=t[pm],o=t[gm],s=t[Dc],i=t[hm],a=i[ym],c=t[mm],u=t[_m].bindings;e=u(e);for(let l in e)if(r=e[l],((l.length<5||l!=="level"&&l!=="serializers"&&l!=="formatters"&&l!=="customLevels")&&e.hasOwnProperty(l)&&r!==void 0)===!0){if(r=c[l]?c[l](r):r,r=(i[l]||a||o)(r,s),r===void 0)continue;n+=',"'+l+'":'+r}return n}function Ak(t){return t.write!==t.constructor.prototype.write}function ei(t){let e=new Rc(t);return e.on("error",r),!t.sync&&Tk&&(cm.register(e,jk),e.on("close",function(){cm.unregister(e)})),e;function r(n){if(n.code==="EPIPE"){e.write=pn,e.end=pn,e.flushSync=pn,e.destroy=pn;return}e.removeListener("error",r),e.emit("error",n)}}function jk(t,e){t.destroyed||(e==="beforeExit"?(t.flush(),t.on("drain",function(){t.end()})):t.flushSync())}function Mk(t){return function(r,n,o={},s){if(typeof o=="string")s=ei({dest:o}),o={};else if(typeof s=="string"){if(o&&o.transport)throw Error("only one of option.transport or stream can be specified");s=ei({dest:s})}else if(o instanceof Rc||o.writable||o._writableState)s=o,o={};else if(o.transport){if(o.transport instanceof Rc||o.transport.writable||o.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(o.transport.targets&&o.transport.targets.length&&o.formatters&&typeof o.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let c;o.customLevels&&(c=o.useOnlyCustomLevels?o.customLevels:Object.assign({},o.levels,o.customLevels)),s=Ck({caller:n,...o.transport,levels:c})}if(o=Object.assign({},t,o),o.serializers=Object.assign({},t.serializers,o.serializers),o.formatters=Object.assign({},t.formatters,o.formatters),o.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:i,onChild:a}=o;return i===!1&&(o.level="silent"),a||(o.onChild=pn),s||(Ak(process.stdout)?s=process.stdout:s=ei({fd:process.stdout.fd||1})),{opts:o,stream:s}}}function Zk(t,e){try{return JSON.stringify(t)}catch{try{return(e||this[Dc])(t)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Lk(t,e,r){return{level:t,bindings:e,log:r}}function qk(t){let e=Number(t);return typeof t=="string"&&Number.isFinite(e)?e:t===void 0?1:t}vm.exports={noop:pn,buildSafeSonicBoom:ei,asChindings:Nk,asJson:Dk,genLog:Ik,createArgsNormalizer:Mk,stringify:Zk,buildFormatters:Lk,normalizeDestFileDescriptor:qk}});var ri=$((yj,bm)=>{var Fk={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Uk={ASC:"ASC",DESC:"DESC"};bm.exports={DEFAULT_LEVELS:Fk,SORTING_ORDER:Uk}});var jc=$((_j,$m)=>{"use strict";var{lsCacheSym:Vk,levelValSym:Nc,useOnlyCustomLevelsSym:Bk,streamSym:Hk,formattersSym:Wk,hooksSym:Gk,levelCompSym:wm}=dn(),{noop:Jk,genLog:Ar}=ti(),{DEFAULT_LEVELS:Ct,SORTING_ORDER:xm}=ri(),Sm={fatal:t=>{let e=Ar(Ct.fatal,t);return function(...r){let n=this[Hk];if(e.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:t=>Ar(Ct.error,t),warn:t=>Ar(Ct.warn,t),info:t=>Ar(Ct.info,t),debug:t=>Ar(Ct.debug,t),trace:t=>Ar(Ct.trace,t)},Ac=Object.keys(Ct).reduce((t,e)=>(t[Ct[e]]=e,t),{}),Kk=Object.keys(Ac).reduce((t,e)=>(t[e]='{"level":'+Number(e),t),{});function Yk(t){let e=t[Wk].level,{labels:r}=t.levels,n={};for(let o in r){let s=e(r[o],Number(o));n[o]=JSON.stringify(s).slice(0,-1)}return t[Vk]=n,t}function Qk(t,e){if(e)return!1;switch(t){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function Xk(t){let{labels:e,values:r}=this.levels;if(typeof t=="number"){if(e[t]===void 0)throw Error("unknown level value"+t);t=e[t]}if(r[t]===void 0)throw Error("unknown level "+t);let n=this[Nc],o=this[Nc]=r[t],s=this[Bk],i=this[wm],a=this[Gk].logMethod;for(let c in r){if(i(r[c],o)===!1){this[c]=Jk;continue}this[c]=Qk(c,s)?Sm[c](a):Ar(r[c],a)}this.emit("level-change",t,o,e[n],n,this)}function eE(t){let{levels:e,levelVal:r}=this;return e&&e.labels?e.labels[r]:""}function tE(t){let{values:e}=this.levels,r=e[t];return r!==void 0&&this[wm](r,this[Nc])}function rE(t,e,r){return t===xm.DESC?e<=r:e>=r}function nE(t){return typeof t=="string"?rE.bind(null,t):t}function oE(t=null,e=!1){let r=t?Object.keys(t).reduce((s,i)=>(s[t[i]]=i,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),e?null:Ac,r),o=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),e?null:Ct,t);return{labels:n,values:o}}function sE(t,e,r){if(typeof t=="number"){if(![].concat(Object.keys(e||{}).map(s=>e[s]),r?[]:Object.keys(Ac).map(s=>+s),1/0).includes(t))throw Error(`default level:${t} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:Ct,e);if(!(t in n))throw Error(`default level:${t} must be included in custom levels`)}function iE(t,e){let{labels:r,values:n}=t;for(let o in e){if(o in n)throw Error("levels cannot be overridden");if(e[o]in r)throw Error("pre-existing level values cannot be used for new levels")}}function aE(t){if(typeof t!="function"&&!(typeof t=="string"&&Object.values(xm).includes(t)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}$m.exports={initialLsCache:Kk,genLsCache:Yk,levelMethods:Sm,getLevel:eE,setLevel:Xk,isLevelEnabled:tE,mappings:oE,assertNoLevelCollisions:iE,assertDefaultLevelFound:sE,genLevelComparison:nE,assertLevelComparison:aE}});var Mc=$((vj,km)=>{"use strict";km.exports={version:"10.3.1"}});var Rm=$((wj,Im)=>{"use strict";var{EventEmitter:cE}=require("node:events"),{lsCacheSym:uE,levelValSym:lE,setLevelSym:Lc,getLevelSym:Em,chindingsSym:oi,mixinSym:dE,asJsonSym:Pm,writeSym:fE,mixinMergeStrategySym:pE,timeSym:mE,timeSliceIndexSym:hE,streamSym:Tm,serializersSym:jr,formattersSym:uo,errorKeySym:gE,messageKeySym:yE,useOnlyCustomLevelsSym:_E,needsMetadataGsym:vE,redactFmtSym:bE,stringifySym:wE,formatOptsSym:xE,stringifiersSym:SE,msgPrefixSym:qc,hooksSym:$E}=dn(),{getLevel:kE,setLevel:EE,isLevelEnabled:zE,mappings:PE,initialLsCache:TE,genLsCache:CE,assertNoLevelCollisions:OE}=jc(),{asChindings:Fc,asJson:IE,buildFormatters:Zc,stringify:zm,noop:Cm}=ti(),{version:RE}=Mc(),DE=yc(),NE=class{},Om={constructor:NE,child:AE,bindings:jE,setBindings:ME,flush:qE,isLevelEnabled:zE,version:RE,get level(){return this[Em]()},set level(t){this[Lc](t)},get levelVal(){return this[lE]},set levelVal(t){throw Error("levelVal is read-only")},get msgPrefix(){return this[qc]},get[Symbol.toStringTag](){return"Pino"},[uE]:TE,[fE]:LE,[Pm]:IE,[Em]:kE,[Lc]:EE};Object.setPrototypeOf(Om,cE.prototype);Im.exports=function(){return Object.create(Om)};var ni=t=>t;function AE(t,e){if(!t)throw Error("missing bindings for child Pino");let r=this[jr],n=this[uo],o=Object.create(this);if(e==null)return o[uo].bindings!==ni&&(o[uo]=Zc(n.level,ni,n.log)),o[oi]=Fc(o,t),this.onChild!==Cm&&this.onChild(o),o;if(e.hasOwnProperty("serializers")===!0){o[jr]=Object.create(null);for(let u in r)o[jr][u]=r[u];let a=Object.getOwnPropertySymbols(r);for(var s=0;s<a.length;s++){let u=a[s];o[jr][u]=r[u]}for(let u in e.serializers)o[jr][u]=e.serializers[u];let c=Object.getOwnPropertySymbols(e.serializers);for(var i=0;i<c.length;i++){let u=c[i];o[jr][u]=e.serializers[u]}}else o[jr]=r;if(e.hasOwnProperty("formatters")){let{level:a,bindings:c,log:u}=e.formatters;o[uo]=Zc(a||n.level,c||ni,u||n.log)}else o[uo]=Zc(n.level,ni,n.log);if(e.hasOwnProperty("customLevels")===!0&&(OE(this.levels,e.customLevels),o.levels=PE(e.customLevels,o[_E]),CE(o)),typeof e.redact=="object"&&e.redact!==null||Array.isArray(e.redact)){o.redact=e.redact;let a=DE(o.redact,zm),c={stringify:a[bE]};o[wE]=zm,o[SE]=a,o[xE]=c}if(typeof e.msgPrefix=="string"&&(o[qc]=(this[qc]||"")+e.msgPrefix),o[oi]=Fc(o,t),e.level!==void 0&&e.level!==this.level||e.hasOwnProperty("customLevels")){let a=e.level||this.level;o[Lc](a)}return this.onChild(o),o}function jE(){let e=`{${this[oi].substr(1)}}`,r=JSON.parse(e);return delete r.pid,delete r.hostname,r}function ME(t){let e=Fc(this,t);this[oi]=e}function ZE(t,e){return Object.assign(e,t)}function LE(t,e,r){let n=this[mE](),o=this[dE],s=this[gE],i=this[yE],a=this[pE]||ZE,c,u=this[$E].streamWrite;t==null?c={}:t instanceof Error?(c={[s]:t},e===void 0&&(e=t.message)):(c=t,e===void 0&&t[i]===void 0&&t[s]&&(e=t[s].message)),o&&(c=a(c,o(c,r,this)));let l=this[Pm](c,e,r,n),d=this[Tm];d[vE]===!0&&(d.lastLevel=r,d.lastObj=c,d.lastMsg=e,d.lastTime=n.slice(this[hE]),d.lastLogger=this),d.write(u?u(l):l)}function qE(t){if(t!=null&&typeof t!="function")throw Error("callback must be a function");let e=this[Tm];typeof e.flush=="function"?e.flush(t||Cm):t&&t()}});var jm=$((Hc,Am)=>{"use strict";var{hasOwnProperty:lo}=Object.prototype,Zr=Bc();Zr.configure=Bc;Zr.stringify=Zr;Zr.default=Zr;Hc.stringify=Zr;Hc.configure=Bc;Am.exports=Zr;var FE=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function tr(t){return t.length<5e3&&!FE.test(t)?`"${t}"`:JSON.stringify(t)}function Uc(t,e){if(t.length>200||e)return t.sort(e);for(let r=1;r<t.length;r++){let n=t[r],o=r;for(;o!==0&&t[o-1]>n;)t[o]=t[o-1],o--;t[o]=n}return t}var UE=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Vc(t){return UE.call(t)!==void 0&&t.length!==0}function Dm(t,e,r){t.length<r&&(r=t.length);let n=e===","?"":" ",o=`"0":${n}${t[0]}`;for(let s=1;s<r;s++)o+=`${e}"${s}":${n}${t[s]}`;return o}function VE(t){if(lo.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return`"${e}"`;if(e==null)return e;if(e===Error||e===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function BE(t){let e;if(lo.call(t,"deterministic")&&(e=t.deterministic,typeof e!="boolean"&&typeof e!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return e===void 0?!0:e}function HE(t,e){let r;if(lo.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?!0:r}function Nm(t,e){let r;if(lo.call(t,e)){if(r=t[e],typeof r!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${e}" argument must be an integer`);if(r<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return r===void 0?1/0:r}function Mr(t){return t===1?"1 item":`${t} items`}function WE(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function GE(t){if(lo.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Bc(t){t={...t};let e=GE(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=VE(t),n=HE(t,"bigint"),o=BE(t),s=typeof o=="function"?o:void 0,i=Nm(t,"maximumDepth"),a=Nm(t,"maximumBreadth");function c(m,f,h,g,_,x){let w=f[m];switch(typeof w=="object"&&w!==null&&typeof w.toJSON=="function"&&(w=w.toJSON(m)),w=g.call(f,m,w),typeof w){case"string":return tr(w);case"object":{if(w===null)return"null";if(h.indexOf(w)!==-1)return r;let S="",k=",",W=x;if(Array.isArray(w)){if(w.length===0)return"[]";if(i<h.length+1)return'"[Array]"';h.push(w),_!==""&&(x+=_,S+=`
5
- ${x}`,k=`,
6
- ${x}`);let xe=Math.min(w.length,a),Ze=0;for(;Ze<xe-1;Ze++){let _r=c(String(Ze),w,h,g,_,x);S+=_r!==void 0?_r:"null",S+=k}let Be=c(String(Ze),w,h,g,_,x);if(S+=Be!==void 0?Be:"null",w.length-1>a){let _r=w.length-a-1;S+=`${k}"... ${Mr(_r)} not stringified"`}return _!==""&&(S+=`
7
- ${W}`),h.pop(),`[${S}]`}let Z=Object.keys(w),re=Z.length;if(re===0)return"{}";if(i<h.length+1)return'"[Object]"';let U="",me="";_!==""&&(x+=_,k=`,
8
- ${x}`,U=" ");let Ee=Math.min(re,a);o&&!Vc(w)&&(Z=Uc(Z,s)),h.push(w);for(let xe=0;xe<Ee;xe++){let Ze=Z[xe],Be=c(Ze,w,h,g,_,x);Be!==void 0&&(S+=`${me}${tr(Ze)}:${U}${Be}`,me=k)}if(re>a){let xe=re-a;S+=`${me}"...":${U}"${Mr(xe)} not stringified"`,me=k}return _!==""&&me.length>1&&(S=`
9
- ${x}${S}
10
- ${W}`),h.pop(),`{${S}}`}case"number":return isFinite(w)?String(w):e?e(w):"null";case"boolean":return w===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(w);default:return e?e(w):void 0}}function u(m,f,h,g,_,x){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(m)),typeof f){case"string":return tr(f);case"object":{if(f===null)return"null";if(h.indexOf(f)!==-1)return r;let w=x,S="",k=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(i<h.length+1)return'"[Array]"';h.push(f),_!==""&&(x+=_,S+=`
11
- ${x}`,k=`,
12
- ${x}`);let re=Math.min(f.length,a),U=0;for(;U<re-1;U++){let Ee=u(String(U),f[U],h,g,_,x);S+=Ee!==void 0?Ee:"null",S+=k}let me=u(String(U),f[U],h,g,_,x);if(S+=me!==void 0?me:"null",f.length-1>a){let Ee=f.length-a-1;S+=`${k}"... ${Mr(Ee)} not stringified"`}return _!==""&&(S+=`
13
- ${w}`),h.pop(),`[${S}]`}h.push(f);let W="";_!==""&&(x+=_,k=`,
14
- ${x}`,W=" ");let Z="";for(let re of g){let U=u(re,f[re],h,g,_,x);U!==void 0&&(S+=`${Z}${tr(re)}:${W}${U}`,Z=k)}return _!==""&&Z.length>1&&(S=`
15
- ${x}${S}
16
- ${w}`),h.pop(),`{${S}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function l(m,f,h,g,_){switch(typeof f){case"string":return tr(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(m),typeof f!="object")return l(m,f,h,g,_);if(f===null)return"null"}if(h.indexOf(f)!==-1)return r;let x=_;if(Array.isArray(f)){if(f.length===0)return"[]";if(i<h.length+1)return'"[Array]"';h.push(f),_+=g;let U=`
17
- ${_}`,me=`,
18
- ${_}`,Ee=Math.min(f.length,a),xe=0;for(;xe<Ee-1;xe++){let Be=l(String(xe),f[xe],h,g,_);U+=Be!==void 0?Be:"null",U+=me}let Ze=l(String(xe),f[xe],h,g,_);if(U+=Ze!==void 0?Ze:"null",f.length-1>a){let Be=f.length-a-1;U+=`${me}"... ${Mr(Be)} not stringified"`}return U+=`
19
- ${x}`,h.pop(),`[${U}]`}let w=Object.keys(f),S=w.length;if(S===0)return"{}";if(i<h.length+1)return'"[Object]"';_+=g;let k=`,
20
- ${_}`,W="",Z="",re=Math.min(S,a);Vc(f)&&(W+=Dm(f,k,a),w=w.slice(f.length),re-=f.length,Z=k),o&&(w=Uc(w,s)),h.push(f);for(let U=0;U<re;U++){let me=w[U],Ee=l(me,f[me],h,g,_);Ee!==void 0&&(W+=`${Z}${tr(me)}: ${Ee}`,Z=k)}if(S>a){let U=S-a;W+=`${Z}"...": "${Mr(U)} not stringified"`,Z=k}return Z!==""&&(W=`
21
- ${_}${W}
22
- ${x}`),h.pop(),`{${W}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function d(m,f,h){switch(typeof f){case"string":return tr(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(m),typeof f!="object")return d(m,f,h);if(f===null)return"null"}if(h.indexOf(f)!==-1)return r;let g="",_=f.length!==void 0;if(_&&Array.isArray(f)){if(f.length===0)return"[]";if(i<h.length+1)return'"[Array]"';h.push(f);let W=Math.min(f.length,a),Z=0;for(;Z<W-1;Z++){let U=d(String(Z),f[Z],h);g+=U!==void 0?U:"null",g+=","}let re=d(String(Z),f[Z],h);if(g+=re!==void 0?re:"null",f.length-1>a){let U=f.length-a-1;g+=`,"... ${Mr(U)} not stringified"`}return h.pop(),`[${g}]`}let x=Object.keys(f),w=x.length;if(w===0)return"{}";if(i<h.length+1)return'"[Object]"';let S="",k=Math.min(w,a);_&&Vc(f)&&(g+=Dm(f,",",a),x=x.slice(f.length),k-=f.length,S=","),o&&(x=Uc(x,s)),h.push(f);for(let W=0;W<k;W++){let Z=x[W],re=d(Z,f[Z],h);re!==void 0&&(g+=`${S}${tr(Z)}:${re}`,S=",")}if(w>a){let W=w-a;g+=`${S}"...":"${Mr(W)} not stringified"`}return h.pop(),`{${g}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function p(m,f,h){if(arguments.length>1){let g="";if(typeof h=="number"?g=" ".repeat(Math.min(h,10)):typeof h=="string"&&(g=h.slice(0,10)),f!=null){if(typeof f=="function")return c("",{"":m},[],f,g,"");if(Array.isArray(f))return u("",m,[],WE(f),g,"")}if(g.length!==0)return l("",m,[],g,"")}return d("",m,[])}return p}});var qm=$((xj,Lm)=>{"use strict";var Wc=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Zm}=ri(),JE=Zm.info;function KE(t,e){t=t||[],e=e||{dedupe:!1};let r=Object.create(Zm);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(d=>{r[d]=e.levels[d]});let n={write:o,add:a,remove:c,emit:s,flushSync:i,end:u,minLevel:0,lastId:0,streams:[],clone:l,[Wc]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,n):a.call(n,t),t=null,n;function o(d){let p,m=this.lastLevel,{streams:f}=this,h=0,g;for(let _=YE(f.length,e.dedupe);XE(_,f.length,e.dedupe);_=QE(_,e.dedupe))if(p=f[_],p.level<=m){if(h!==0&&h!==p.level)break;if(g=p.stream,g[Wc]){let{lastTime:x,lastMsg:w,lastObj:S,lastLogger:k}=this;g.lastLevel=m,g.lastTime=x,g.lastMsg=w,g.lastObj=S,g.lastLogger=k}g.write(d),e.dedupe&&(h=p.level)}else if(!e.dedupe)break}function s(...d){for(let{stream:p}of this.streams)typeof p.emit=="function"&&p.emit(...d)}function i(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync()}function a(d){if(!d)return n;let p=typeof d.write=="function"||d.stream,m=d.write?d:d.stream;if(!p)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:h}=this,g;typeof d.levelVal=="number"?g=d.levelVal:typeof d.level=="string"?g=h[d.level]:typeof d.level=="number"?g=d.level:g=JE;let _={stream:m,level:g,levelVal:void 0,id:++n.lastId};return f.unshift(_),f.sort(Mm),this.minLevel=f[0].level,n}function c(d){let{streams:p}=this,m=p.findIndex(f=>f.id===d);return m>=0&&(p.splice(m,1),p.sort(Mm),this.minLevel=p.length>0?p[0].level:-1),n}function u(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync(),d.end()}function l(d){let p=new Array(this.streams.length);for(let m=0;m<p.length;m++)p[m]={level:d,stream:this.streams[m].stream};return{write:o,add:a,remove:c,minLevel:d,streams:p,clone:l,emit:s,flushSync:i,[Wc]:!0}}}function Mm(t,e){return t.level-e.level}function YE(t,e){return e?t-1:0}function QE(t,e){return e?t-1:t+1}function XE(t,e,r){return r?t>=0:t<e}Lm.exports=KE});var th=$((Sj,at)=>{"use strict";var ez=require("node:os"),Jm=pc(),tz=mc(),rz=yc(),Km=kp(),nz=Rm(),Ym=dn(),{configure:oz}=jm(),{assertDefaultLevelFound:sz,mappings:Qm,genLsCache:iz,genLevelComparison:az,assertLevelComparison:cz}=jc(),{DEFAULT_LEVELS:Xm,SORTING_ORDER:uz}=ri(),{createArgsNormalizer:lz,asChindings:dz,buildSafeSonicBoom:Fm,buildFormatters:fz,stringify:Gc,normalizeDestFileDescriptor:Um,noop:pz}=ti(),{version:mz}=Mc(),{chindingsSym:Vm,redactFmtSym:hz,serializersSym:Bm,timeSym:gz,timeSliceIndexSym:yz,streamSym:_z,stringifySym:Hm,stringifySafeSym:Jc,stringifiersSym:Wm,setLevelSym:vz,endSym:bz,formatOptsSym:wz,messageKeySym:xz,errorKeySym:Sz,nestedKeySym:$z,mixinSym:kz,levelCompSym:Ez,useOnlyCustomLevelsSym:zz,formattersSym:Gm,hooksSym:Pz,nestedKeyStrSym:Tz,mixinMergeStrategySym:Cz,msgPrefixSym:Oz}=Ym,{epochTime:eh,nullTime:Iz}=Km,{pid:Rz}=process,Dz=ez.hostname(),Nz=Jm.err,Az={level:"info",levelComparison:uz.ASC,levels:Xm,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Rz,hostname:Dz},serializers:Object.assign(Object.create(null),{err:Nz}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:eh,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},jz=lz(Az),Mz=Object.assign(Object.create(null),Jm);function Kc(...t){let e={},{opts:r,stream:n}=jz(e,tz(),...t);r.level&&typeof r.level=="string"&&Xm[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:o,crlf:s,serializers:i,timestamp:a,messageKey:c,errorKey:u,nestedKey:l,base:d,name:p,level:m,customLevels:f,levelComparison:h,mixin:g,mixinMergeStrategy:_,useOnlyCustomLevels:x,formatters:w,hooks:S,depthLimit:k,edgeLimit:W,onChild:Z,msgPrefix:re}=r,U=oz({maximumDepth:k,maximumBreadth:W}),me=fz(w.level,w.bindings,w.log),Ee=Gc.bind({[Jc]:U}),xe=o?rz(o,Ee):{},Ze=o?{stringify:xe[hz]}:{stringify:Ee},Be="}"+(s?`\r
2
+ var yD=Object.create;var Id=Object.defineProperty;var vD=Object.getOwnPropertyDescriptor;var bD=Object.getOwnPropertyNames;var _D=Object.getPrototypeOf,$D=Object.prototype.hasOwnProperty;var T=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},nr=(t,e)=>{for(var n in e)Id(t,n,{get:e[n],enumerable:!0})},wD=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of bD(e))!$D.call(t,r)&&r!==n&&Id(t,r,{get:()=>e[r],enumerable:!(i=vD(e,r))||i.enumerable});return t};var rt=(t,e,n)=>(n=t!=null?yD(_D(t)):{},wD(e||!t||!t.__esModule?Id(n,"default",{value:t,enumerable:!0}):n,t));var py=T((UJ,Pk)=>{"use strict";var ba=t=>t&&typeof t.message=="string",fy=t=>{if(!t)return;let e=t.cause;if(typeof e=="function"){let n=t.cause();return ba(n)?n:void 0}else return ba(e)?e:void 0},kk=(t,e)=>{if(!ba(t))return"";let n=t.stack||"";if(e.has(t))return n+`
3
+ causes have become circular...`;let i=fy(t);return i?(e.add(t),n+`
4
+ caused by: `+kk(i,e)):n},QN=t=>kk(t,new Set),Ik=(t,e,n)=>{if(!ba(t))return"";let i=n?"":t.message||"";if(e.has(t))return i+": ...";let r=fy(t);if(r){e.add(t);let o=typeof t.cause=="function";return i+(o?"":": ")+Ik(r,e,o)}else return i},ej=t=>Ik(t,new Set);Pk.exports={isErrorLike:ba,getErrorCause:fy,stackWithCauses:QN,messageWithCauses:ej}});var my=T((LJ,Ek)=>{"use strict";var tj=Symbol("circular-ref-tag"),Uu=Symbol("pino-raw-err-ref"),zk=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[Uu]},set:function(t){this[Uu]=t}}});Object.defineProperty(zk,Uu,{writable:!0,value:{}});Ek.exports={pinoErrProto:zk,pinoErrorSymbols:{seen:tj,rawSymbol:Uu}}});var Tk=T((MJ,Ok)=>{"use strict";Ok.exports=gy;var{messageWithCauses:rj,stackWithCauses:nj,isErrorLike:Dk}=py(),{pinoErrProto:ij,pinoErrorSymbols:oj}=my(),{seen:hy}=oj,{toString:aj}=Object.prototype;function gy(t){if(!Dk(t))return t;t[hy]=void 0;let e=Object.create(ij);e.type=aj.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=rj(t),e.stack=nj(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>gy(n)));for(let n in t)if(e[n]===void 0){let i=t[n];Dk(i)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(i,hy)&&(e[n]=gy(i)):e[n]=i}return delete t[hy],e.raw=t,e}});var Ak=T((FJ,Ck)=>{"use strict";Ck.exports=Mu;var{isErrorLike:yy}=py(),{pinoErrProto:sj,pinoErrorSymbols:cj}=my(),{seen:Lu}=cj,{toString:uj}=Object.prototype;function Mu(t){if(!yy(t))return t;t[Lu]=void 0;let e=Object.create(sj);e.type=uj.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Mu(n))),yy(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,Lu)&&(e.cause=Mu(t.cause));for(let n in t)if(e[n]===void 0){let i=t[n];yy(i)?Object.prototype.hasOwnProperty.call(i,Lu)||(e[n]=Mu(i)):e[n]=i}return delete t[Lu],e.raw=t,e}});var Uk=T((ZJ,Rk)=>{"use strict";Rk.exports={mapHttpRequest:lj,reqSerializer:jk};var vy=Symbol("pino-raw-req-ref"),Nk=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[vy]},set:function(t){this[vy]=t}}});Object.defineProperty(Nk,vy,{writable:!0,value:{}});function jk(t){let e=t.info||t.socket,n=Object.create(Nk);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let i=t.path;n.url=typeof i=="string"?i:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function lj(t){return{req:jk(t)}}});var Zk=T((qJ,Fk)=>{"use strict";Fk.exports={mapHttpResponse:dj,resSerializer:Mk};var by=Symbol("pino-raw-res-ref"),Lk=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[by]},set:function(t){this[by]=t}}});Object.defineProperty(Lk,by,{writable:!0,value:{}});function Mk(t){let e=Object.create(Lk);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function dj(t){return{res:Mk(t)}}});var $y=T((VJ,qk)=>{"use strict";var _y=Tk(),fj=Ak(),Fu=Uk(),Zu=Zk();qk.exports={err:_y,errWithCause:fj,mapHttpRequest:Fu.mapHttpRequest,mapHttpResponse:Zu.mapHttpResponse,req:Fu.reqSerializer,res:Zu.resSerializer,wrapErrorSerializer:function(e){return e===_y?e:function(i){return e(_y(i))}},wrapRequestSerializer:function(e){return e===Fu.reqSerializer?e:function(i){return e(Fu.reqSerializer(i))}},wrapResponseSerializer:function(e){return e===Zu.resSerializer?e:function(i){return e(Zu.resSerializer(i))}}}});var wy=T((BJ,Hk)=>{"use strict";var Vk=require("node:util"),Bk=Vk.getCallSites??Vk.getCallSite;function pj(t,e){return e}Hk.exports=function(){if(Bk)return Bk().slice(2).map(o=>o.scriptName);let e=Error.prepareStackTrace;Error.prepareStackTrace=pj;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let i=n.slice(2),r=[];for(let o of i)o&&r.push(o.getFileName());return r}});var Yk=T((HJ,Xk)=>{"use strict";function xy(t){if(t===null||typeof t!="object")return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){let e=[];for(let n=0;n<t.length;n++)e[n]=xy(t[n]);return e}if(typeof t=="object"){let e=Object.create(Object.getPrototypeOf(t));for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=xy(t[n]));return e}return t}function Gk(t){let e=[],n="",i=!1,r=!1,o="";for(let a=0;a<t.length;a++){let s=t[a];!i&&s==="."?n&&(e.push(n),n=""):s==="["?(n&&(e.push(n),n=""),i=!0):s==="]"&&i?(e.push(n),n="",i=!1,r=!1):(s==='"'||s==="'")&&i?r?s===o?(r=!1,o=""):n+=s:(r=!0,o=s):n+=s}return n&&e.push(n),e}function Jk(t,e,n){let i=t;for(let o=0;o<e.length-1;o++){let a=e[o];if(typeof i!="object"||i===null||!(a in i)||typeof i[a]!="object"||i[a]===null)return!1;i=i[a]}let r=e[e.length-1];if(r==="*"){if(Array.isArray(i))for(let o=0;o<i.length;o++)i[o]=n;else if(typeof i=="object"&&i!==null)for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&(i[o]=n)}else typeof i=="object"&&i!==null&&r in i&&Object.prototype.hasOwnProperty.call(i,r)&&(i[r]=n);return!0}function Kk(t,e){let n=t;for(let r=0;r<e.length-1;r++){let o=e[r];if(typeof n!="object"||n===null||!(o in n)||typeof n[o]!="object"||n[o]===null)return!1;n=n[o]}let i=e[e.length-1];if(i==="*"){if(Array.isArray(n))for(let r=0;r<n.length;r++)n[r]=void 0;else if(typeof n=="object"&&n!==null)for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&delete n[r]}else typeof n=="object"&&n!==null&&i in n&&Object.prototype.hasOwnProperty.call(n,i)&&delete n[i];return!0}var qu=Symbol("PATH_NOT_FOUND");function mj(t,e){let n=t;for(let i of e){if(n==null||typeof n!="object"||n===null||!(i in n))return qu;n=n[i]}return n}function hj(t,e){let n=t;for(let i of e){if(n==null||typeof n!="object"||n===null)return;n=n[i]}return n}function gj(t,e,n,i=!1){for(let r of e){let o=Gk(r);if(o.includes("*"))Wk(t,o,n,r,i);else if(i)Kk(t,o);else{let a=mj(t,o);if(a===qu)continue;let s=typeof n=="function"?n(a,o):n;Jk(t,o,s)}}}function Wk(t,e,n,i,r=!1){let o=e.indexOf("*");if(o===e.length-1){let a=e.slice(0,-1),s=t;for(let c of a){if(s==null||typeof s!="object"||s===null)return;s=s[c]}if(Array.isArray(s))if(r)for(let c=0;c<s.length;c++)s[c]=void 0;else for(let c=0;c<s.length;c++){let u=[...a,c.toString()],l=typeof n=="function"?n(s[c],u):n;s[c]=l}else if(typeof s=="object"&&s!==null)if(r){let c=[];for(let u in s)Object.prototype.hasOwnProperty.call(s,u)&&c.push(u);for(let u of c)delete s[u]}else for(let c in s){let u=[...a,c],l=typeof n=="function"?n(s[c],u):n;s[c]=l}}else yj(t,e,n,o,i,r)}function yj(t,e,n,i,r,o=!1){let a=e.slice(0,i),s=e.slice(i+1),c=[];function u(l,d){if(d===a.length){if(Array.isArray(l))for(let p=0;p<l.length;p++)c[d]=p.toString(),u(l[p],d+1);else if(typeof l=="object"&&l!==null)for(let p in l)c[d]=p,u(l[p],d+1)}else if(d<a.length){let p=a[d];l&&typeof l=="object"&&l!==null&&p in l&&(c[d]=p,u(l[p],d+1))}else if(s.includes("*"))Wk(l,s,typeof n=="function"?(m,f)=>{let h=[...c.slice(0,d),...f];return n(m,h)}:n,r,o);else if(o)Kk(l,s);else{let p=typeof n=="function"?n(hj(l,s),[...c.slice(0,d),...s]):n;Jk(l,s,p)}}if(a.length===0)u(t,0);else{let l=t;for(let d=0;d<a.length;d++){let p=a[d];if(l==null||typeof l!="object"||l===null)return;l=l[p],c[d]=p}l!=null&&u(l,a.length)}}function vj(t){if(t.length===0)return null;let e=new Map;for(let n of t){let i=Gk(n),r=e;for(let o=0;o<i.length;o++){let a=i[o];r.has(a)||r.set(a,new Map),r=r.get(a)}}return e}function bj(t,e){if(!e)return t;function n(i,r,o=0){if(!r||r.size===0||i===null||typeof i!="object")return i;if(i instanceof Date)return new Date(i.getTime());if(Array.isArray(i)){let s=[];for(let c=0;c<i.length;c++){let u=c.toString();r.has(u)||r.has("*")?s[c]=n(i[c],r.get(u)||r.get("*")):s[c]=i[c]}return s}let a=Object.create(Object.getPrototypeOf(i));for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r.has(s)||r.has("*")?a[s]=n(i[s],r.get(s)||r.get("*")):a[s]=i[s]);return a}return n(t,e)}function _j(t){if(typeof t!="string")throw new Error("Paths must be (non-empty) strings");if(t==="")throw new Error("Invalid redaction path ()");if(t.includes(".."))throw new Error(`Invalid redaction path (${t})`);if(t.includes(","))throw new Error(`Invalid redaction path (${t})`);let e=0,n=!1,i="";for(let r=0;r<t.length;r++){let o=t[r];if((o==='"'||o==="'")&&e>0)n?o===i&&(n=!1,i=""):(n=!0,i=o);else if(o==="["&&!n)e++;else if(o==="]"&&!n&&(e--,e<0))throw new Error(`Invalid redaction path (${t})`)}if(e!==0)throw new Error(`Invalid redaction path (${t})`)}function $j(t){if(!Array.isArray(t))throw new TypeError("paths must be an array");for(let e of t)_j(e)}function wj(t={}){let{paths:e=[],censor:n="[REDACTED]",serialize:i=JSON.stringify,strict:r=!0,remove:o=!1}=t;$j(e);let a=vj(e);return function(c){if(r&&(c===null||typeof c!="object")&&(c==null||typeof c!="object"))return i?i(c):c;let u=bj(c,a),l=c,d=n;return typeof n=="function"&&(d=n),gj(u,e,d,o),i===!1?(u.restore=function(){return xy(l)},u):typeof i=="function"?i(u):JSON.stringify(u)}}Xk.exports=wj});var yn=T((GJ,Qk)=>{"use strict";var xj=Symbol("pino.setLevel"),Sj=Symbol("pino.getLevel"),kj=Symbol("pino.levelVal"),Ij=Symbol("pino.levelComp"),Pj=Symbol("pino.useLevelLabels"),zj=Symbol("pino.useOnlyCustomLevels"),Ej=Symbol("pino.mixin"),Dj=Symbol("pino.lsCache"),Oj=Symbol("pino.chindings"),Tj=Symbol("pino.asJson"),Cj=Symbol("pino.write"),Aj=Symbol("pino.redactFmt"),Nj=Symbol("pino.time"),jj=Symbol("pino.timeSliceIndex"),Rj=Symbol("pino.stream"),Uj=Symbol("pino.stringify"),Lj=Symbol("pino.stringifySafe"),Mj=Symbol("pino.stringifiers"),Fj=Symbol("pino.end"),Zj=Symbol("pino.formatOpts"),qj=Symbol("pino.messageKey"),Vj=Symbol("pino.errorKey"),Bj=Symbol("pino.nestedKey"),Hj=Symbol("pino.nestedKeyStr"),Gj=Symbol("pino.mixinMergeStrategy"),Jj=Symbol("pino.msgPrefix"),Kj=Symbol("pino.wildcardFirst"),Wj=Symbol.for("pino.serializers"),Xj=Symbol.for("pino.formatters"),Yj=Symbol.for("pino.hooks"),Qj=Symbol.for("pino.metadata"),eR=Symbol.for("pino.transport.usesMultistream");Qk.exports={setLevelSym:xj,getLevelSym:Sj,levelValSym:kj,levelCompSym:Ij,useLevelLabelsSym:Pj,mixinSym:Ej,lsCacheSym:Dj,chindingsSym:Oj,asJsonSym:Tj,writeSym:Cj,serializersSym:Wj,redactFmtSym:Aj,timeSym:Nj,timeSliceIndexSym:jj,streamSym:Rj,stringifySym:Uj,stringifySafeSym:Lj,stringifiersSym:Mj,endSym:Fj,formatOptsSym:Zj,messageKeySym:qj,errorKeySym:Vj,nestedKeySym:Bj,wildcardFirstSym:Kj,needsMetadataGsym:Qj,useOnlyCustomLevelsSym:zj,formattersSym:Xj,hooksSym:Yj,nestedKeyStrSym:Hj,mixinMergeStrategySym:Gj,msgPrefixSym:Jj,transportUsesMultistreamSym:eR}});var ky=T((JJ,n0)=>{"use strict";var e0=Yk(),{redactFmtSym:tR,wildcardFirstSym:Vu}=yn(),Sy=/[^.[\]]+|\[([^[\]]*?)\]/g,t0="[Redacted]",r0=!1;function rR(t,e){let{paths:n,censor:i,remove:r}=nR(t),o=n.reduce((c,u)=>{Sy.lastIndex=0;let l=Sy.exec(u),d=Sy.exec(u),p=l[1]!==void 0?l[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):l[0];if(p==="*"&&(p=Vu),d===null)return c[p]=null,c;if(c[p]===null)return c;let{index:m}=d,f=`${u.substr(m,u.length-1)}`;return c[p]=c[p]||[],p!==Vu&&c[p].length===0&&c[p].push(...c[Vu]||[]),p===Vu&&Object.keys(c).forEach(function(h){c[h]&&c[h].push(f)}),c[p].push(f),c},Object.create(null)),a=Object.assign(Object.create(null),{[tR]:e0({paths:n,censor:i,serialize:e,strict:r0,remove:r})}),s=(...c)=>e(typeof i=="function"?i(...c):i);return[...Object.keys(o),...Object.getOwnPropertySymbols(o)].reduce((c,u)=>{if(o[u]===null)c[u]=l=>s(l,[u]);else{let l=typeof i=="function"?(d,p)=>i(d,[u,...p]):i;c[u]=e0({paths:o[u],censor:l,serialize:e,strict:r0,remove:r})}return c},a)}function nR(t){if(Array.isArray(t))return t={paths:t,censor:t0},t;let{paths:e,censor:n=t0,remove:i}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(n=void 0),{paths:e,censor:n,remove:i}}n0.exports=rR});var a0=T((KJ,o0)=>{"use strict";var iR=()=>"",oR=()=>`,"time":${Date.now()}`,aR=()=>`,"time":${Math.round(Date.now()/1e3)}`,sR=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,cR=1000000n,i0=1000000000n,uR=BigInt(Date.now())*cR,lR=process.hrtime.bigint(),dR=()=>{let t=process.hrtime.bigint()-lR,e=uR+t,n=e/i0,i=e%i0,r=Number(n*1000n+i/1000000n),o=new Date(r),a=o.getUTCFullYear(),s=(o.getUTCMonth()+1).toString().padStart(2,"0"),c=o.getUTCDate().toString().padStart(2,"0"),u=o.getUTCHours().toString().padStart(2,"0"),l=o.getUTCMinutes().toString().padStart(2,"0"),d=o.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${a}-${s}-${c}T${u}:${l}:${d}.${i.toString().padStart(9,"0")}Z"`};o0.exports={nullTime:iR,epochTime:oR,unixTime:aR,isoTime:sR,isoTimeNano:dR}});var c0=T((WJ,s0)=>{"use strict";function fR(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}s0.exports=pR;function pR(t,e,n){var i=n&&n.stringify||fR,r=1;if(typeof t=="object"&&t!==null){var o=e.length+r;if(o===1)return t;var a=new Array(o);a[0]=i(t);for(var s=1;s<o;s++)a[s]=i(e[s]);return a.join(" ")}if(typeof t!="string")return t;var c=e.length;if(c===0)return t;for(var u="",l=1-r,d=-1,p=t&&t.length||0,m=0;m<p;){if(t.charCodeAt(m)===37&&m+1<p){switch(d=d>-1?d:0,t.charCodeAt(m+1)){case 100:case 102:if(l>=c||e[l]==null)break;d<m&&(u+=t.slice(d,m)),u+=Number(e[l]),d=m+2,m++;break;case 105:if(l>=c||e[l]==null)break;d<m&&(u+=t.slice(d,m)),u+=Math.floor(Number(e[l])),d=m+2,m++;break;case 79:case 111:case 106:if(l>=c||e[l]===void 0)break;d<m&&(u+=t.slice(d,m));var f=typeof e[l];if(f==="string"){u+="'"+e[l]+"'",d=m+2,m++;break}if(f==="function"){u+=e[l].name||"<anonymous>",d=m+2,m++;break}u+=i(e[l]),d=m+2,m++;break;case 115:if(l>=c)break;d<m&&(u+=t.slice(d,m)),u+=String(e[l]),d=m+2,m++;break;case 37:d<m&&(u+=t.slice(d,m)),u+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?t:(d<p&&(u+=t.slice(d)),u)}});var Py=T((XJ,Iy)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let e=function(n){if((n>0&&n<1/0)===!1)throw typeof n!="number"&&typeof n!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(t,0,0,Number(n))},t=new Int32Array(new SharedArrayBuffer(4));Iy.exports=e}else{let t=function(e){if((e>0&&e<1/0)===!1)throw typeof e!="number"&&typeof e!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(e);for(;i>Date.now(););};Iy.exports=t}});var g0=T((YJ,h0)=>{"use strict";var $e=require("fs"),mR=require("events"),hR=require("util").inherits,u0=require("path"),Ey=Py(),gR=require("assert"),Bu=100,Hu=Buffer.allocUnsafe(0),yR=16*1024,l0="buffer",d0="utf8",[vR,bR]=(process.versions.node||"0.0").split(".").map(Number),_R=vR>=22&&bR>=7;function f0(t,e){e._opening=!0,e._writing=!0,e._asyncDrainScheduled=!1;function n(o,a){if(o){e._reopening=!1,e._writing=!1,e._opening=!1,e.sync?process.nextTick(()=>{e.listenerCount("error")>0&&e.emit("error",o)}):e.emit("error",o);return}let s=e._reopening;e.fd=a,e.file=t,e._reopening=!1,e._opening=!1,e._writing=!1,e.sync?process.nextTick(()=>e.emit("ready")):e.emit("ready"),!e.destroyed&&(!e._writing&&e._len>e.minLength||e._flushPending?e._actualWrite():s&&process.nextTick(()=>e.emit("drain")))}let i=e.append?"a":"w",r=e.mode;if(e.sync)try{e.mkdir&&$e.mkdirSync(u0.dirname(t),{recursive:!0});let o=$e.openSync(t,i,r);n(null,o)}catch(o){throw n(o),o}else e.mkdir?$e.mkdir(u0.dirname(t),{recursive:!0},o=>{if(o)return n(o);$e.open(t,i,r,n)}):$e.open(t,i,r,n)}function Mt(t){if(!(this instanceof Mt))return new Mt(t);let{fd:e,dest:n,minLength:i,maxLength:r,maxWrite:o,periodicFlush:a,sync:s,append:c=!0,mkdir:u,retryEAGAIN:l,fsync:d,contentMode:p,mode:m}=t||{};e=e||n,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=r||0,this.maxWrite=o||yR,this._periodicFlush=a||0,this._periodicFlushTimer=void 0,this.sync=s||!1,this.writable=!0,this._fsync=d||!1,this.append=c||!1,this.mode=m,this.retryEAGAIN=l||(()=>!0),this.mkdir=u||!1;let f,h;if(p===l0)this._writingBuf=Hu,this.write=xR,this.flush=kR,this.flushSync=PR,this._actualWrite=ER,f=()=>$e.writeSync(this.fd,this._writingBuf),h=()=>$e.write(this.fd,this._writingBuf,this.release);else if(p===void 0||p===d0)this._writingBuf="",this.write=wR,this.flush=SR,this.flushSync=IR,this._actualWrite=zR,f=()=>Buffer.isBuffer(this._writingBuf)?$e.writeSync(this.fd,this._writingBuf):$e.writeSync(this.fd,this._writingBuf,"utf8"),h=()=>Buffer.isBuffer(this._writingBuf)?$e.write(this.fd,this._writingBuf,this.release):$e.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${d0}" and "${l0}", but passed ${p}`);if(typeof e=="number")this.fd=e,process.nextTick(()=>this.emit("ready"));else if(typeof e=="string")f0(e,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(g,y)=>{if(g){if((g.code==="EAGAIN"||g.code==="EBUSY")&&this.retryEAGAIN(g,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Ey(Bu),this.release(void 0,0)}catch(_){this.release(_)}else setTimeout(h,Bu);else this._writing=!1,this.emit("error",g);return}this.emit("write",y);let v=zy(this._writingBuf,this._len,y);if(this._len=v.len,this._writingBuf=v.writingBuf,this._writingBuf.length){if(!this.sync){h();return}try{do{let _=f(),x=zy(this._writingBuf,this._len,_);this._len=x.len,this._writingBuf=x.writingBuf}while(this._writingBuf.length)}catch(_){this.release(_);return}}this._fsync&&$e.fsyncSync(this.fd);let b=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):b>this.minLength?this._actualWrite():this._ending?b>0?this._actualWrite():(this._writing=!1,Gu(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick($R,this)):this.emit("drain"))},this.on("newListener",function(g){g==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function zy(t,e,n){return typeof t=="string"&&(t=Buffer.from(t)),e=Math.max(e-n,0),t=t.subarray(n),{writingBuf:t,len:e}}function $R(t){t.listenerCount("drain")>0&&(t._asyncDrainScheduled=!1,t.emit("drain"))}hR(Mt,mR);function p0(t,e){return t.length===0?Hu:t.length===1?t[0]:Buffer.concat(t,e)}function wR(t){if(this.destroyed)throw new Error("SonicBoom destroyed");t=""+t;let e=Buffer.byteLength(t),n=this._len+e,i=this._bufs;return this.maxLength&&n>this.maxLength?(this.emit("drop",t),this._len<this._hwm):(i.length===0||Buffer.byteLength(i[i.length-1])+e>this.maxWrite?i.push(t):i[i.length-1]+=t,this._len=n,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function xR(t){if(this.destroyed)throw new Error("SonicBoom destroyed");let e=this._len+t.length,n=this._bufs,i=this._lens;return this.maxLength&&e>this.maxLength?(this.emit("drop",t),this._len<this._hwm):(n.length===0||i[i.length-1]+t.length>this.maxWrite?(n.push([t]),i.push(t.length)):(n[n.length-1].push(t),i[i.length-1]+=t.length),this._len=e,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function m0(t){this._flushPending=!0;let e=()=>{if(this._fsync)this._flushPending=!1,t();else try{$e.fsync(this.fd,i=>{this._flushPending=!1,t(i)})}catch(i){t(i)}this.off("error",n)},n=i=>{this._flushPending=!1,t(i),this.off("drain",e)};this.once("drain",e),this.once("error",n)}function SR(t){if(t!=null&&typeof t!="function")throw new Error("flush cb must be a function");if(this.destroyed){let e=new Error("SonicBoom destroyed");if(t){t(e);return}throw e}if(this.minLength<=0){t?.();return}t&&m0.call(this,t),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function kR(t){if(t!=null&&typeof t!="function")throw new Error("flush cb must be a function");if(this.destroyed){let e=new Error("SonicBoom destroyed");if(t){t(e);return}throw e}if(this.minLength<=0){t?.();return}t&&m0.call(this,t),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}Mt.prototype.reopen=function(t){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(t)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(t&&(this.file=t),this._reopening=!0,this._writing)return;let e=this.fd;this.once("ready",()=>{e!==this.fd&&$e.close(e,n=>{if(n)return this.emit("error",n)})}),f0(this.file,this)};Mt.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Gu(this)))};function IR(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let t="";for(;this._bufs.length||t.length;){t.length<=0&&(t=this._bufs[0]);try{let e=Buffer.isBuffer(t)?$e.writeSync(this.fd,t):$e.writeSync(this.fd,t,"utf8"),n=zy(t,this._len,e);t=n.writingBuf,this._len=n.len,t.length<=0&&this._bufs.shift()}catch(e){if((e.code==="EAGAIN"||e.code==="EBUSY")&&!this.retryEAGAIN(e,t.length,this._len-t.length))throw e;Ey(Bu)}}try{$e.fsyncSync(this.fd)}catch{}}function PR(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=Hu);let t=Hu;for(;this._bufs.length||t.length;){t.length<=0&&(t=p0(this._bufs[0],this._lens[0]));try{let e=$e.writeSync(this.fd,t);t=t.subarray(e),this._len=Math.max(this._len-e,0),t.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(e){if((e.code==="EAGAIN"||e.code==="EBUSY")&&!this.retryEAGAIN(e,t.length,this._len-t.length))throw e;Ey(Bu)}}}Mt.prototype.destroy=function(){this.destroyed||Gu(this)};function zR(){let t=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let e=Buffer.isBuffer(this._writingBuf)?$e.writeSync(this.fd,this._writingBuf):$e.writeSync(this.fd,this._writingBuf,"utf8");t(null,e)}catch(e){t(e)}else $e.write(this.fd,this._writingBuf,t)}function ER(){let t=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:p0(this._bufs.shift(),this._lens.shift()),this.sync)try{let e=$e.writeSync(this.fd,this._writingBuf);t(null,e)}catch(e){t(e)}else _R&&(this._writingBuf=Buffer.from(this._writingBuf)),$e.write(this.fd,this._writingBuf,t)}function Gu(t){if(t.fd===-1){t.once("ready",Gu.bind(null,t));return}t._periodicFlushTimer!==void 0&&clearInterval(t._periodicFlushTimer),t.destroyed=!0,t._bufs=[],t._lens=[],gR(typeof t.fd=="number",`sonic.fd must be a number, got ${typeof t.fd}`);try{$e.fsync(t.fd,e)}catch{}function e(){t.fd!==1&&t.fd!==2?$e.close(t.fd,n):n()}function n(i){if(i){t.emit("error",i);return}t._ending&&!t._writing&&t.emit("finish"),t.emit("close")}}Mt.SonicBoom=Mt;Mt.default=Mt;h0.exports=Mt});var Dy=T((QJ,$0)=>{"use strict";var Ft={exit:[],beforeExit:[]},y0={exit:TR,beforeExit:CR},Pi;function DR(){Pi===void 0&&(Pi=new FinalizationRegistry(AR))}function OR(t){Ft[t].length>0||process.on(t,y0[t])}function v0(t){Ft[t].length>0||(process.removeListener(t,y0[t]),Ft.exit.length===0&&Ft.beforeExit.length===0&&(Pi=void 0))}function TR(){b0("exit")}function CR(){b0("beforeExit")}function b0(t){for(let e of Ft[t]){let n=e.deref(),i=e.fn;n!==void 0&&i(n,t)}Ft[t]=[]}function AR(t){for(let e of["exit","beforeExit"]){let n=Ft[e].indexOf(t);Ft[e].splice(n,n+1),v0(e)}}function _0(t,e,n){if(e===void 0)throw new Error("the object can't be undefined");OR(t);let i=new WeakRef(e);i.fn=n,DR(),Pi.register(e,i),Ft[t].push(i)}function NR(t,e){_0("exit",t,e)}function jR(t,e){_0("beforeExit",t,e)}function RR(t){if(Pi!==void 0){Pi.unregister(t);for(let e of["exit","beforeExit"])Ft[e]=Ft[e].filter(n=>{let i=n.deref();return i&&i!==t}),v0(e)}}$0.exports={register:NR,registerBeforeExit:jR,unregister:RR}});var w0=T((eK,UR)=>{UR.exports={name:"thread-stream",version:"4.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",engines:{node:">=20"},dependencies:{"real-require":"^1.0.0"},devDependencies:{"@types/node":"^25.0.2","@yao-pkg/pkg":"^6.0.0",borp:"^1.0.0",desm:"^1.3.0",eslint:"^9.39.1",fastbench:"^1.0.1",neostandard:"^0.13.0","pino-elasticsearch":"^9.0.0","sonic-boom":"^5.0.0","ts-node":"^10.8.0",typescript:"~5.7.3"},scripts:{build:"tsc --noEmit",lint:"eslint",test:'npm run lint && npm run build && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:ci":'npm run lint && npm run transpile && borp --pattern "test/*.test.{js,mjs}"',"test:yarn":'npm run transpile && borp --pattern "test/*.test.js"',transpile:"sh ./test/ts/transpile.sh"},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var S0=T((tK,x0)=>{"use strict";function LR(t,e,n,i,r){let o=i===1/0?1/0:Date.now()+i,a=()=>{let s=Atomics.load(t,e);if(s===n){r(null,"ok");return}if(o!==1/0&&Date.now()>o){r(null,"timed-out");return}let c=o===1/0?1e4:Math.min(1e4,Math.max(1,o-Date.now())),u=Atomics.waitAsync(t,e,s,c);u.async?u.value.then(a):setImmediate(a)};a()}function MR(t,e,n,i,r){let o=i===1/0?1/0:Date.now()+i,a=()=>{if(Atomics.load(t,e)!==n){r(null,"ok");return}if(o!==1/0&&Date.now()>o){r(null,"timed-out");return}let c=o===1/0?1e4:Math.min(1e4,Math.max(1,o-Date.now())),u=Atomics.waitAsync(t,e,n,c);u.async?u.value.then(l=>{if(l==="ok"){r(null,"ok");return}a()}):setImmediate(a)};a()}x0.exports={wait:LR,waitDiff:MR}});var I0=T((rK,k0)=>{"use strict";k0.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var U0=T((nK,R0)=>{"use strict";var{version:FR}=w0(),{EventEmitter:ZR}=require("events"),{Worker:qR}=require("worker_threads"),{join:VR}=require("path"),{pathToFileURL:BR}=require("url"),{wait:HR}=S0(),{WRITE_INDEX:pr,READ_INDEX:vn,SEQ_INDEX:Oy}=I0(),GR=require("buffer"),JR=require("assert"),P=Symbol("kImpl"),KR=GR.constants.MAX_STRING_LENGTH;function P0(){}function Ny(t,e){Atomics.add(t[P].state,Oy,1),e(),Atomics.add(t[P].state,Oy,1),Atomics.notify(t[P].state,Oy)}function z0(t){Ny(t,()=>{Atomics.store(t[P].state,vn,0),Atomics.store(t[P].state,pr,0)})}var _a=class{constructor(e){this._value=e}deref(){return this._value}},Ju=class{register(){}unregister(){}},WR=process.env.NODE_V8_COVERAGE?Ju:global.FinalizationRegistry||Ju,XR=process.env.NODE_V8_COVERAGE?_a:global.WeakRef||_a,E0=new WR(t=>{t.exited||t.terminate()});function YR(t,e){let{filename:n,workerData:i}=e,o=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||VR(__dirname,"lib","worker.js"),a=new qR(o,{...e.workerOpts,name:e.workerOpts?.name||"thread-stream",trackUnmanagedFds:!1,workerData:{filename:n.indexOf("file://")===0?n:BR(n).href,dataBuf:t[P].dataBuf,stateBuf:t[P].stateBuf,workerData:{$context:{threadStreamVersion:FR},...i}}});return a.stream=new _a(t),a.on("message",QR),a.on("exit",T0),E0.register(t,a),a}function D0(t){JR(!t[P].sync),t[P].needDrain&&(t[P].needDrain=!1,t.emit("drain"))}function O0(t){for(;;){let e=Atomics.load(t[P].state,pr),n=t[P].data.length-e;if(n>0){if(t[P].bufLen===0){t[P].flushing=!1,t[P].ending?jy(t):t[P].needDrain&&process.nextTick(D0,t);return}N0(t,n,P0);continue}if(n===0){if(e===0&&t[P].bufLen===0)return;Ku(t,()=>{t.destroyed||(z0(t),O0(t))});return}Et(t,new Error("overwritten"));return}}function QR(t){let e=this.stream.deref();if(e===void 0){this.exited=!0,this.terminate();return}if(t?.code!=null)switch(t.code){case"READY":this.stream=new XR(e),Ku(e,()=>{e[P].ready=!0,e.emit("ready")});break;case"ERROR":Et(e,t.err);break;case"EVENT":Array.isArray(t.args)?e.emit(t.name,...t.args):e.emit(t.name,t.args);break;case"FLUSHED":{if(t.context!=="thread-stream"){Et(e,new Error("this should not happen: "+t.code));break}let n=e[P].flushCallbacks.get(t.id);n&&(e[P].flushCallbacks.delete(t.id),process.nextTick(n));break}case"WARNING":process.emitWarning(t.err);break;default:Et(e,new Error("this should not happen: "+t.code))}}function T0(t){let e=this.stream.deref();e!==void 0&&(E0.unregister(e),e.worker.exited=!0,e.worker.off("exit",T0),Et(e,t!==0?new Error("the worker thread exited"):null))}var Cy=class extends ZR{constructor(e={}){if(super(),e.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[P]={},this[P].stateBuf=new SharedArrayBuffer(128),this[P].state=new Int32Array(this[P].stateBuf),this[P].dataBuf=new SharedArrayBuffer(e.bufferSize||4*1024*1024),this[P].data=Buffer.from(this[P].dataBuf),this[P].sync=e.sync||!1,this[P].ending=!1,this[P].ended=!1,this[P].needDrain=!1,this[P].destroyed=!1,this[P].flushing=!1,this[P].ready=!1,this[P].finished=!1,this[P].errored=null,this[P].closed=!1,this[P].buf=[],this[P].bufHead=0,this[P].bufLen=0,this[P].flushCallbacks=new Map,this[P].nextFlushId=0,this.worker=YR(this,e),this.on("message",(n,i)=>{this.worker.postMessage(n,i)})}write(e){let n=Buffer.isBuffer(e)?e:Buffer.from(e);if(this[P].destroyed)return Ay(this,new Error("the worker has exited")),!1;if(this[P].ending)return Ay(this,new Error("the worker is ending")),!1;if(this[P].flushing&&this[P].bufLen+n.length>=KR)try{Ty(this),this[P].flushing=!0}catch(i){return Et(this,i),!1}if(this[P].buf.push(n),this[P].bufLen+=n.length,this[P].sync)try{return Ty(this),!0}catch(i){return Et(this,i),!1}return this[P].flushing||(this[P].flushing=!0,setImmediate(O0,this)),this[P].needDrain=this[P].data.length-this[P].bufLen-Atomics.load(this[P].state,pr)<=0,!this[P].needDrain}end(){this[P].destroyed||(this[P].ending=!0,jy(this))}flush(e){e=typeof e=="function"?e:P0,C0(this,n=>{if(n){process.nextTick(e,n);return}A0(this,e)})}flushSync(){this[P].destroyed||(Ty(this),j0(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[P].ready}get destroyed(){return this[P].destroyed}get closed(){return this[P].closed}get writable(){return!this[P].destroyed&&!this[P].ending}get writableEnded(){return this[P].ending}get writableFinished(){return this[P].finished}get writableNeedDrain(){return this[P].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[P].errored}};function C0(t,e){if(t[P].destroyed){process.nextTick(e,new Error("the worker has exited"));return}if(!t[P].sync&&(t[P].flushing||t[P].bufLen>0)){setImmediate(C0,t,e);return}Ku(t,e)}function Ku(t,e){let n=Atomics.load(t[P].state,pr);HR(t[P].state,vn,n,1/0,(i,r)=>{if(i){Et(t,i),e(i);return}if(r!=="ok"){Ku(t,e);return}e()})}function A0(t,e){if(t[P].destroyed){process.nextTick(e,new Error("the worker has exited"));return}if(!t[P].ready){let i=()=>{o(),A0(t,e)},r=()=>{o(),process.nextTick(e,new Error("the worker has exited"))},o=()=>{t.off("ready",i),t.off("close",r)};t.once("ready",i),t.once("close",r);return}let n=++t[P].nextFlushId;t[P].flushCallbacks.set(n,e);try{t.worker.postMessage({code:"FLUSH",context:"thread-stream",id:n})}catch(i){t[P].flushCallbacks.delete(n),Et(t,i),process.nextTick(e,i)}}function e1(t,e){let n=t[P].flushCallbacks;if(n.size===0)return;let i=e||new Error("the worker has exited");for(let r of n.values())process.nextTick(r,i);n.clear()}function Ay(t,e){setImmediate(()=>{t.emit("error",e)})}function Et(t,e){t[P].destroyed||(t[P].destroyed=!0,e1(t,e),e&&(t[P].errored=e,Ay(t,e)),t.worker.exited?setImmediate(()=>{t[P].closed=!0,t.emit("close")}):t.worker.terminate().catch(()=>{}).then(()=>{t[P].closed=!0,t.emit("close")}))}function N0(t,e,n){let r=Atomics.load(t[P].state,pr),o=e;for(;o>0&&t[P].bufLen!==0;){let a=t[P].bufHead,s=t[P].buf[a];if(s.length<=o){s.copy(t[P].data,r),r+=s.length,o-=s.length,t[P].bufLen-=s.length,t[P].bufHead=a+1,t[P].bufHead===t[P].buf.length?(t[P].buf.length=0,t[P].bufHead=0):t[P].bufHead>=1024&&t[P].bufHead*2>=t[P].buf.length&&(t[P].buf.splice(0,t[P].bufHead),t[P].bufHead=0);continue}s.copy(t[P].data,r,0,o),t[P].buf[a]=s.subarray(o),t[P].bufLen-=o,r+=o,o=0}return Ny(t,()=>{Atomics.store(t[P].state,pr,r)}),n(),!0}function jy(t){if(!(t[P].ended||!t[P].ending||t[P].flushing)){t[P].ended=!0;try{t.flushSync();let e=Atomics.load(t[P].state,vn);Ny(t,()=>{Atomics.store(t[P].state,pr,-1)});let n=0;for(;e!==-1;){if(Atomics.wait(t[P].state,vn,e,1e3),e=Atomics.load(t[P].state,vn),e===-2){Et(t,new Error("end() failed"));return}if(++n===10){Et(t,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{t[P].finished=!0,t.emit("finish")})}catch(e){Et(t,e)}}}function Ty(t){let e=()=>{t[P].ending?jy(t):t[P].needDrain&&process.nextTick(D0,t)};for(t[P].flushing=!1;t[P].bufLen!==0;){let n=Atomics.load(t[P].state,pr),i=t[P].data.length-n;if(i===0){j0(t),z0(t);continue}else if(i<0)throw new Error("overwritten");N0(t,i,e)}}function j0(t){if(t[P].flushing)throw new Error("unable to flush while flushing");let e=Atomics.load(t[P].state,pr),n=0;for(;;){let i=Atomics.load(t[P].state,vn);if(i===-2)throw Error("_flushSync failed");if(i!==e)Atomics.wait(t[P].state,vn,i,1e3);else break;if(++n===10)throw new Error("_flushSync took too long (10s)")}}R0.exports=Cy});var Ly=T((iK,F0)=>{"use strict";var{createRequire:t1}=require("module"),{existsSync:r1}=require("node:fs"),n1=wy(),{join:Ry,isAbsolute:M0,sep:i1}=require("node:path"),{fileURLToPath:o1}=require("node:url"),a1=Py(),Uy=Dy(),s1=U0(),{transportUsesMultistreamSym:c1}=yn();function u1(t){Uy.register(t,m1),Uy.registerBeforeExit(t,h1),t.on("close",function(){Uy.unregister(t)})}function l1(){let t=process.execArgv;for(let e=0;e<t.length;e++){let n=t[e];if(n==="--import"||n==="--require"||n==="-r"||n.startsWith("--import=")||n.startsWith("--require=")||n.startsWith("-r="))return!0}return!1}function d1(t){let e=t.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);if(!e)return t;let n=[],i=!1;for(let r=0;r<e.length;r++){let o=e[r];if(o==="--require"||o==="-r"||o==="--import"){let a=e[r+1];if(a&&L0(a)){i=!0,r++;continue}n.push(o),a&&(n.push(a),r++);continue}if(o.startsWith("--require=")||o.startsWith("-r=")||o.startsWith("--import=")){let a=o.slice(o.indexOf("=")+1);if(L0(a)){i=!0;continue}}n.push(o)}return i?n.join(" "):t}function L0(t){let e=f1(t);if(!e)return!1;let n=e;if(n.startsWith("file://"))try{n=o1(n)}catch{return!1}return M0(n)&&!r1(n)}function f1(t){let e=t[0],n=t[t.length-1];return e==='"'&&n==='"'||e==="'"&&n==="'"?t.slice(1,-1):t}function p1(t,e,n,i,r){if(!n.execArgv&&l1()&&require.main===void 0&&(n={...n,execArgv:[]}),!n.env&&process.env.NODE_OPTIONS){let c=d1(process.env.NODE_OPTIONS);c!==process.env.NODE_OPTIONS&&(n={...n,env:{...process.env,NODE_OPTIONS:c}})}n={...n,name:r};let o=new s1({filename:t,workerData:e,workerOpts:n,sync:i});o.on("ready",a),o.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function a(){process.removeListener("exit",s),o.unref(),n.autoEnd!==!1&&u1(o)}function s(){o.closed||(o.flushSync(),a1(100),o.end())}return o}function m1(t){t.ref(),t.flushSync(),t.end(),t.once("close",function(){t.unref()})}function h1(t){t.flushSync()}function g1(t){let{pipeline:e,targets:n,levels:i,dedupe:r,worker:o={},caller:a=n1(),sync:s=!1}=t,c={...t.options},u=!1,l=typeof a=="string"?[a]:a,d=typeof globalThis=="object"&&Object.prototype.hasOwnProperty.call(globalThis,"__bundlerPathsOverrides")&&globalThis.__bundlerPathsOverrides&&typeof globalThis.__bundlerPathsOverrides=="object"?globalThis.__bundlerPathsOverrides:Object.create(null),p=t.target;if(p&&n)throw new Error("only one of target or targets can be specified");if(n){p=d["pino-worker"]||Ry(__dirname,"worker.js"),c.targets=n.filter(v=>v.target).map(v=>({...v,target:h(v.target)})),c.pipelines=n.filter(v=>v.pipeline).map(v=>v.pipeline.map(b=>({...b,level:v.level,target:h(b.target)})));let g=c.targets.some(v=>v.level!=null),y=c.pipelines.some(v=>v.some(b=>b.level!=null));u=c.targets.length+c.pipelines.length>1||g||y}else e&&(p=d["pino-worker"]||Ry(__dirname,"worker.js"),c.pipelines=[e.map(g=>({...g,target:h(g.target)}))]);i&&(c.levels=i),r&&(c.dedupe=r),c.pinoWillSendConfig=!0;let m=n||e?"pino.transport":p,f=p1(h(p),c,o,s,m);return u&&(f[c1]=!0),f;function h(g){if(g=d[g]||g,M0(g)||g.indexOf("file://")===0)return g;if(g==="pino/file")return Ry(__dirname,"..","file.js");let y;for(let v of l)try{let b=v==="node:repl"?process.cwd()+i1:v;y=t1(b).resolve(g);break}catch{continue}if(!y)throw new Error(`unable to determine transport target for "${g}"`);return y}}F0.exports=g1});var Qu=T((oK,eI)=>{"use strict";var y1=require("node:diagnostics_channel"),Z0=c0(),{mapHttpRequest:v1,mapHttpResponse:b1}=$y(),My=g0(),q0=Dy(),{lsCacheSym:_1,chindingsSym:J0,writeSym:V0,serializersSym:K0,formatOptsSym:B0,endSym:$1,stringifiersSym:W0,stringifySym:X0,stringifySafeSym:Fy,wildcardFirstSym:Y0,nestedKeySym:w1,formattersSym:Q0,messageKeySym:x1,errorKeySym:S1,nestedKeyStrSym:k1,msgPrefixSym:Wu}=yn(),{isMainThread:I1}=require("worker_threads"),P1=Ly(),[z1]=process.versions.node.split(".").map(t=>Number(t)),H0=y1.tracingChannel("pino_asJson"),Xu=z1>=25?t=>JSON.stringify(t):D1;function zi(){}function E1(t,e){if(!e)return n;return function(...r){e.call(this,r,n,t)};function n(i,...r){if(typeof i=="object"){let o=i;i!==null&&(i.method&&i.headers&&i.socket?i=v1(i):typeof i.setHeader=="function"&&(i=b1(i)));let a;o===null&&r.length===0?a=[null]:(o=r.shift(),a=r),typeof this[Wu]=="string"&&o!==void 0&&o!==null&&(o=this[Wu]+o),this[V0](i,Z0(o,a,this[B0]),t)}else{let o=i===void 0?r.shift():i;typeof this[Wu]=="string"&&o!==void 0&&o!==null&&(o=this[Wu]+o),this[V0](null,Z0(o,r,this[B0]),t)}}}function D1(t){let e="",n=0,i=!1,r=255,o=t.length;if(o>100)return JSON.stringify(t);for(var a=0;a<o&&r>=32;a++)r=t.charCodeAt(a),(r===34||r===92)&&(e+=t.slice(n,a)+"\\",n=a,i=!0);return i?e+=t.slice(n):e=t,r<32?JSON.stringify(t):'"'+e+'"'}function O1(t,e,n,i){if(H0.hasSubscribers===!1)return G0.call(this,t,e,n,i);let r={instance:this,arguments};return H0.traceSync(G0,r,this,t,e,n,i)}function G0(t,e,n,i){let r=this[X0],o=this[Fy],a=this[W0],s=this[$1],c=this[J0],u=this[K0],l=this[Q0],d=this[x1],p=this[S1],m=this[_1][n]+i;m=m+c;let f;l.log&&(t=l.log(t));let h=a[Y0],g="";for(let v in t)if(f=t[v],Object.prototype.hasOwnProperty.call(t,v)&&f!==void 0){u[v]?f=u[v](f):v===p&&u.err&&(f=u.err(f));let b=a[v]||h;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":b&&(f=b(f));break;case"string":f=(b||Xu)(f);break;default:f=(b||r)(f,o)}if(f===void 0)continue;let _=Xu(v);g+=","+_+":"+f}let y="";if(e!==void 0){f=u[d]?u[d](e):e;let v=a[d]||h;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":v&&(f=v(f)),y=',"'+d+'":'+f;break;case"string":f=(v||Xu)(f),y=',"'+d+'":'+f;break;default:f=(v||r)(f,o),y=',"'+d+'":'+f}}return this[w1]&&g?m+this[k1]+g.slice(1)+"}"+y+s:m+g+y+s}function T1(t,e){let n,i=t[J0],r=t[X0],o=t[Fy],a=t[W0],s=a[Y0],c=t[K0],u=t[Q0].bindings;e=u(e);for(let l in e)if(n=e[l],((l.length<5||l!=="level"&&l!=="serializers"&&l!=="formatters"&&l!=="customLevels")&&e.hasOwnProperty(l)&&n!==void 0)===!0){if(n=c[l]?c[l](n):n,n=(a[l]||s||r)(n,o),n===void 0)continue;i+=","+Xu(l)+":"+n}return i}function C1(t){return t.write!==t.constructor.prototype.write}function Yu(t){let e=new My(t);return e.on("error",n),!t.sync&&I1&&(q0.register(e,A1),e.on("close",function(){q0.unregister(e)})),e;function n(i){if(i.code==="EPIPE"){e.write=zi,e.end=zi,e.flushSync=zi,e.destroy=zi;return}e.removeListener("error",n),e.emit("error",i)}}function A1(t,e){t.destroyed||(e==="beforeExit"?(t.flush(),t.on("drain",function(){t.end()})):t.flushSync())}function N1(t){return function(n,i,r={},o){if(typeof r=="string")o=Yu({dest:r}),r={};else if(typeof o=="string"){if(r&&r.transport)throw Error("only one of option.transport or stream can be specified");o=Yu({dest:o})}else if(r instanceof My||r.writable||r._writableState)o=r,r={};else if(r.transport){if(r.transport instanceof My||r.transport.writable||r.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(r.transport.targets&&r.transport.targets.length&&r.formatters&&typeof r.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let c;r.customLevels&&(c=r.useOnlyCustomLevels?r.customLevels:Object.assign({},r.levels,r.customLevels)),o=P1({caller:i,...r.transport,levels:c})}if(r=Object.assign({},t,r),r.serializers=Object.assign(Object.create(null),t.serializers,r.serializers),r.formatters=Object.assign({},t.formatters,r.formatters),r.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:a,onChild:s}=r;return a===!1&&(r.level="silent"),s||(r.onChild=zi),o||(C1(process.stdout)?o=process.stdout:o=Yu({fd:process.stdout.fd||1})),{opts:r,stream:o}}}function j1(t,e){try{return JSON.stringify(t)}catch{try{return(e||this[Fy])(t)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function R1(t,e,n){return{level:t,bindings:e,log:n}}function U1(t){let e=Number(t);return typeof t=="string"&&Number.isFinite(e)?e:t===void 0?1:t}eI.exports={noop:zi,buildSafeSonicBoom:Yu,asChindings:T1,asJson:O1,genLog:E1,createArgsNormalizer:N1,stringify:j1,buildFormatters:R1,normalizeDestFileDescriptor:U1}});var el=T((aK,tI)=>{var L1={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},M1={ASC:"ASC",DESC:"DESC"};tI.exports={DEFAULT_LEVELS:L1,SORTING_ORDER:M1}});var Vy=T((sK,oI)=>{"use strict";var{lsCacheSym:F1,levelValSym:Zy,useOnlyCustomLevelsSym:Z1,streamSym:q1,formattersSym:V1,hooksSym:B1,levelCompSym:rI}=yn(),{noop:H1,genLog:bn}=Qu(),{DEFAULT_LEVELS:Xt,SORTING_ORDER:nI}=el(),iI={fatal:t=>{let e=bn(Xt.fatal,t);return function(...n){let i=this[q1];if(e.call(this,...n),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:t=>bn(Xt.error,t),warn:t=>bn(Xt.warn,t),info:t=>bn(Xt.info,t),debug:t=>bn(Xt.debug,t),trace:t=>bn(Xt.trace,t)},qy=Object.keys(Xt).reduce((t,e)=>(t[Xt[e]]=e,t),{}),G1=Object.keys(qy).reduce((t,e)=>(t[e]='{"level":'+Number(e),t),{});function J1(t){let e=t[V1].level,{labels:n}=t.levels,i={};for(let r in n){let o=e(n[r],Number(r));i[r]=JSON.stringify(o).slice(0,-1)}return t[F1]=i,t}function K1(t,e){if(e)return!1;switch(t){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function W1(t){let{labels:e,values:n}=this.levels;if(typeof t=="number"){if(e[t]===void 0)throw Error("unknown level value"+t);t=e[t]}if(n[t]===void 0)throw Error("unknown level "+t);let i=this[Zy],r=this[Zy]=n[t],o=this[Z1],a=this[rI],s=this[B1].logMethod;for(let c in n){if(a(n[c],r)===!1){this[c]=H1;continue}this[c]=K1(c,o)?iI[c](s):bn(n[c],s)}this.emit("level-change",t,r,e[i],i,this)}function X1(t){let{levels:e,levelVal:n}=this;return e&&e.labels?e.labels[n]:""}function Y1(t){let{values:e}=this.levels,n=e[t];return n!==void 0&&this[rI](n,this[Zy])}function Q1(t,e,n){return t===nI.DESC?e<=n:e>=n}function e4(t){return typeof t=="string"?Q1.bind(null,t):t}function t4(t=null,e=!1){let n=t?Object.keys(t).reduce((o,a)=>(o[t[a]]=a,o),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),e?null:qy,n),r=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),e?null:Xt,t);return{labels:i,values:r}}function r4(t,e,n){if(typeof t=="number"){if(![].concat(Object.keys(e||{}).map(o=>e[o]),n?[]:Object.keys(qy).map(o=>+o),1/0).includes(t))throw Error(`default level:${t} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),n?null:Xt,e);if(!(t in i))throw Error(`default level:${t} must be included in custom levels`)}function n4(t,e){let{labels:n,values:i}=t;for(let r in e){if(r in i)throw Error("levels cannot be overridden");if(e[r]in n)throw Error("pre-existing level values cannot be used for new levels")}}function i4(t){if(typeof t!="function"&&!(typeof t=="string"&&Object.values(nI).includes(t)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}oI.exports={initialLsCache:G1,genLsCache:J1,levelMethods:iI,getLevel:X1,setLevel:W1,isLevelEnabled:Y1,mappings:t4,assertNoLevelCollisions:n4,assertDefaultLevelFound:r4,genLevelComparison:e4,assertLevelComparison:i4}});var By=T((cK,aI)=>{"use strict";aI.exports={version:"10.4.0"}});var mI=T((lK,pI)=>{"use strict";var{EventEmitter:o4}=require("node:events"),{lsCacheSym:a4,levelValSym:s4,setLevelSym:Gy,getLevelSym:sI,chindingsSym:rl,mixinSym:c4,asJsonSym:uI,writeSym:u4,mixinMergeStrategySym:l4,timeSym:d4,timeSliceIndexSym:f4,streamSym:lI,serializersSym:_n,formattersSym:$a,errorKeySym:p4,messageKeySym:m4,useOnlyCustomLevelsSym:h4,needsMetadataGsym:g4,redactFmtSym:y4,stringifySym:v4,formatOptsSym:b4,stringifiersSym:_4,msgPrefixSym:Jy,hooksSym:$4}=yn(),{getLevel:w4,setLevel:x4,isLevelEnabled:S4,mappings:k4,initialLsCache:I4,genLsCache:P4,assertNoLevelCollisions:z4}=Vy(),{asChindings:Ky,asJson:E4,buildFormatters:Hy,stringify:cI,noop:dI}=Qu(),{version:D4}=By(),O4=ky(),T4=class{},fI={constructor:T4,child:C4,bindings:A4,setBindings:N4,flush:U4,isLevelEnabled:S4,version:D4,get level(){return this[sI]()},set level(t){this[Gy](t)},get levelVal(){return this[s4]},set levelVal(t){throw Error("levelVal is read-only")},get msgPrefix(){return this[Jy]},get[Symbol.toStringTag](){return"Pino"},[a4]:I4,[u4]:R4,[uI]:E4,[sI]:w4,[Gy]:x4};Object.setPrototypeOf(fI,o4.prototype);pI.exports=function(){return Object.create(fI)};var tl=t=>t;function C4(t,e){if(!t)throw Error("missing bindings for child Pino");let n=this[_n],i=this[$a],r=Object.create(this);if(e==null)return r[$a].bindings!==tl&&(r[$a]=Hy(i.level,tl,i.log)),r[rl]=Ky(r,t),this.onChild!==dI&&this.onChild(r),r;if(e.hasOwnProperty("serializers")===!0){r[_n]=Object.create(null);for(let u in n)r[_n][u]=n[u];let s=Object.getOwnPropertySymbols(n);for(var o=0;o<s.length;o++){let u=s[o];r[_n][u]=n[u]}for(let u in e.serializers)r[_n][u]=e.serializers[u];let c=Object.getOwnPropertySymbols(e.serializers);for(var a=0;a<c.length;a++){let u=c[a];r[_n][u]=e.serializers[u]}}else r[_n]=n;if(e.hasOwnProperty("formatters")){let{level:s,bindings:c,log:u}=e.formatters;r[$a]=Hy(s||i.level,c||tl,u||i.log)}else r[$a]=Hy(i.level,tl,i.log);if(e.hasOwnProperty("customLevels")===!0&&(z4(this.levels,e.customLevels),r.levels=k4(e.customLevels,r[h4]),P4(r)),typeof e.redact=="object"&&e.redact!==null||Array.isArray(e.redact)){r.redact=e.redact;let s=O4(r.redact,cI),c={stringify:s[y4]};r[v4]=cI,r[_4]=s,r[b4]=c}if(typeof e.msgPrefix=="string"&&(r[Jy]=(this[Jy]||"")+e.msgPrefix),r[rl]=Ky(r,t),e.level!==void 0&&e.level!==this.level||e.hasOwnProperty("customLevels")){let s=e.level||this.level;r[Gy](s)}return this.onChild(r),r}function A4(){let e=`{${this[rl].substr(1)}}`,n=JSON.parse(e);return delete n.pid,delete n.hostname,n}function N4(t){let e=Ky(this,t);this[rl]=e}function j4(t,e){return Object.assign(e,t)}function R4(t,e,n){let i=this[d4](),r=this[c4],o=this[p4],a=this[m4],s=this[l4]||j4,c,u=this[$4].streamWrite;t==null?c={}:t instanceof Error?(c={[o]:t},e===void 0&&(e=t.message)):(c=t,e===void 0&&t[a]===void 0&&t[o]&&(e=t[o].message)),r&&(c=s(c,r(c,n,this)));let l=this[uI](c,e,n,i),d=this[lI];d[g4]===!0&&(d.lastLevel=n,d.lastObj=c,d.lastMsg=e,d.lastTime=i.slice(this[f4]),d.lastLogger=this),d.write(u?u(l):l)}function U4(t){if(t!=null&&typeof t!="function")throw Error("callback must be a function");let e=this[lI];typeof e.flush=="function"?e.flush(t||dI):t&&t()}});var vI=T((Qy,yI)=>{"use strict";var{hasOwnProperty:wa}=Object.prototype,wn=Yy();wn.configure=Yy;wn.stringify=wn;wn.default=wn;Qy.stringify=wn;Qy.configure=Yy;yI.exports=wn;var L4=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Cr(t){return t.length<5e3&&!L4.test(t)?`"${t}"`:JSON.stringify(t)}function Wy(t,e){if(t.length>200||e)return t.sort(e);for(let n=1;n<t.length;n++){let i=t[n],r=n;for(;r!==0&&t[r-1]>i;)t[r]=t[r-1],r--;t[r]=i}return t}var M4=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Xy(t){return M4.call(t)!==void 0&&t.length!==0}function hI(t,e,n){t.length<n&&(n=t.length);let i=e===","?"":" ",r=`"0":${i}${t[0]}`;for(let o=1;o<n;o++)r+=`${e}"${o}":${i}${t[o]}`;return r}function F4(t){if(wa.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return`"${e}"`;if(e==null)return e;if(e===Error||e===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Z4(t){let e;if(wa.call(t,"deterministic")&&(e=t.deterministic,typeof e!="boolean"&&typeof e!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return e===void 0?!0:e}function q4(t,e){let n;if(wa.call(t,e)&&(n=t[e],typeof n!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return n===void 0?!0:n}function gI(t,e){let n;if(wa.call(t,e)){if(n=t[e],typeof n!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(n))throw new TypeError(`The "${e}" argument must be an integer`);if(n<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return n===void 0?1/0:n}function $n(t){return t===1?"1 item":`${t} items`}function V4(t){let e=new Set;for(let n of t)(typeof n=="string"||typeof n=="number")&&e.add(String(n));return e}function B4(t){if(wa.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return n=>{let i=`Object can not safely be stringified. Received type ${typeof n}`;throw typeof n!="function"&&(i+=` (${n.toString()})`),new Error(i)}}}function Yy(t){t={...t};let e=B4(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let n=F4(t),i=q4(t,"bigint"),r=Z4(t),o=typeof r=="function"?r:void 0,a=gI(t,"maximumDepth"),s=gI(t,"maximumBreadth");function c(m,f,h,g,y,v){let b=f[m];switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(m)),b=g.call(f,m,b),typeof b){case"string":return Cr(b);case"object":{if(b===null)return"null";if(h.indexOf(b)!==-1)return n;let _="",x=",",k=v;if(Array.isArray(b)){if(b.length===0)return"[]";if(a<h.length+1)return'"[Array]"';h.push(b),y!==""&&(v+=y,_+=`
5
+ ${v}`,x=`,
6
+ ${v}`);let Ie=Math.min(b.length,s),Me=0;for(;Me<Ie-1;Me++){let Gr=c(String(Me),b,h,g,y,v);_+=Gr!==void 0?Gr:"null",_+=x}let ft=c(String(Me),b,h,g,y,v);if(_+=ft!==void 0?ft:"null",b.length-1>s){let Gr=b.length-s-1;_+=`${x}"... ${$n(Gr)} not stringified"`}return y!==""&&(_+=`
7
+ ${k}`),h.pop(),`[${_}]`}let D=Object.keys(b),A=D.length;if(A===0)return"{}";if(a<h.length+1)return'"[Object]"';let F="",se="";y!==""&&(v+=y,x=`,
8
+ ${v}`,F=" ");let Ee=Math.min(A,s);r&&!Xy(b)&&(D=Wy(D,o)),h.push(b);for(let Ie=0;Ie<Ee;Ie++){let Me=D[Ie],ft=c(Me,b,h,g,y,v);ft!==void 0&&(_+=`${se}${Cr(Me)}:${F}${ft}`,se=x)}if(A>s){let Ie=A-s;_+=`${se}"...":${F}"${$n(Ie)} not stringified"`,se=x}return y!==""&&se.length>1&&(_=`
9
+ ${v}${_}
10
+ ${k}`),h.pop(),`{${_}}`}case"number":return isFinite(b)?String(b):e?e(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return e?e(b):void 0}}function u(m,f,h,g,y,v){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(m)),typeof f){case"string":return Cr(f);case"object":{if(f===null)return"null";if(h.indexOf(f)!==-1)return n;let b=v,_="",x=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(a<h.length+1)return'"[Array]"';h.push(f),y!==""&&(v+=y,_+=`
11
+ ${v}`,x=`,
12
+ ${v}`);let A=Math.min(f.length,s),F=0;for(;F<A-1;F++){let Ee=u(String(F),f[F],h,g,y,v);_+=Ee!==void 0?Ee:"null",_+=x}let se=u(String(F),f[F],h,g,y,v);if(_+=se!==void 0?se:"null",f.length-1>s){let Ee=f.length-s-1;_+=`${x}"... ${$n(Ee)} not stringified"`}return y!==""&&(_+=`
13
+ ${b}`),h.pop(),`[${_}]`}h.push(f);let k="";y!==""&&(v+=y,x=`,
14
+ ${v}`,k=" ");let D="";for(let A of g){let F=u(A,f[A],h,g,y,v);F!==void 0&&(_+=`${D}${Cr(A)}:${k}${F}`,D=x)}return y!==""&&D.length>1&&(_=`
15
+ ${v}${_}
16
+ ${b}`),h.pop(),`{${_}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function l(m,f,h,g,y){switch(typeof f){case"string":return Cr(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(m),typeof f!="object")return l(m,f,h,g,y);if(f===null)return"null"}if(h.indexOf(f)!==-1)return n;let v=y;if(Array.isArray(f)){if(f.length===0)return"[]";if(a<h.length+1)return'"[Array]"';h.push(f),y+=g;let F=`
17
+ ${y}`,se=`,
18
+ ${y}`,Ee=Math.min(f.length,s),Ie=0;for(;Ie<Ee-1;Ie++){let ft=l(String(Ie),f[Ie],h,g,y);F+=ft!==void 0?ft:"null",F+=se}let Me=l(String(Ie),f[Ie],h,g,y);if(F+=Me!==void 0?Me:"null",f.length-1>s){let ft=f.length-s-1;F+=`${se}"... ${$n(ft)} not stringified"`}return F+=`
19
+ ${v}`,h.pop(),`[${F}]`}let b=Object.keys(f),_=b.length;if(_===0)return"{}";if(a<h.length+1)return'"[Object]"';y+=g;let x=`,
20
+ ${y}`,k="",D="",A=Math.min(_,s);Xy(f)&&(k+=hI(f,x,s),b=b.slice(f.length),A-=f.length,D=x),r&&(b=Wy(b,o)),h.push(f);for(let F=0;F<A;F++){let se=b[F],Ee=l(se,f[se],h,g,y);Ee!==void 0&&(k+=`${D}${Cr(se)}: ${Ee}`,D=x)}if(_>s){let F=_-s;k+=`${D}"...": "${$n(F)} not stringified"`,D=x}return D!==""&&(k=`
21
+ ${y}${k}
22
+ ${v}`),h.pop(),`{${k}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function d(m,f,h){switch(typeof f){case"string":return Cr(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(m),typeof f!="object")return d(m,f,h);if(f===null)return"null"}if(h.indexOf(f)!==-1)return n;let g="",y=f.length!==void 0;if(y&&Array.isArray(f)){if(f.length===0)return"[]";if(a<h.length+1)return'"[Array]"';h.push(f);let k=Math.min(f.length,s),D=0;for(;D<k-1;D++){let F=d(String(D),f[D],h);g+=F!==void 0?F:"null",g+=","}let A=d(String(D),f[D],h);if(g+=A!==void 0?A:"null",f.length-1>s){let F=f.length-s-1;g+=`,"... ${$n(F)} not stringified"`}return h.pop(),`[${g}]`}let v=Object.keys(f),b=v.length;if(b===0)return"{}";if(a<h.length+1)return'"[Object]"';let _="",x=Math.min(b,s);y&&Xy(f)&&(g+=hI(f,",",s),v=v.slice(f.length),x-=f.length,_=","),r&&(v=Wy(v,o)),h.push(f);for(let k=0;k<x;k++){let D=v[k],A=d(D,f[D],h);A!==void 0&&(g+=`${_}${Cr(D)}:${A}`,_=",")}if(b>s){let k=b-s;g+=`${_}"...":"${$n(k)} not stringified"`}return h.pop(),`{${g}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function p(m,f,h){if(arguments.length>1){let g="";if(typeof h=="number"?g=" ".repeat(Math.min(h,10)):typeof h=="string"&&(g=h.slice(0,10)),f!=null){if(typeof f=="function")return c("",{"":m},[],f,g,"");if(Array.isArray(f))return u("",m,[],V4(f),g,"")}if(g.length!==0)return l("",m,[],g,"")}return d("",m,[])}return p}});var wI=T((dK,$I)=>{"use strict";var ev=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:_I}=el(),H4=_I.info;function G4(t,e){t=t||[],e=e||{dedupe:!1};let n=Object.create(_I);n.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(d=>{n[d]=e.levels[d]});let i={write:r,add:s,remove:c,emit:o,flushSync:a,end:u,minLevel:0,lastId:0,streams:[],clone:l,[ev]:!0,streamLevels:n};return Array.isArray(t)?t.forEach(s,i):s.call(i,t),t=null,i;function r(d){let p,m=typeof this.lastLevel=="string"?(this.streamLevels||n)[this.lastLevel]:this.lastLevel,{streams:f}=this,h=0,g;for(let y=J4(f.length,e.dedupe);W4(y,f.length,e.dedupe);y=K4(y,e.dedupe))if(p=f[y],p.level<=m){if(h!==0&&h!==p.level)break;if(g=p.stream,g[ev]){let{lastTime:v,lastMsg:b,lastObj:_,lastLogger:x}=this;g.lastLevel=m,g.lastTime=v,g.lastMsg=b,g.lastObj=_,g.lastLogger=x}g.write(d),e.dedupe&&(h=p.level)}else if(!e.dedupe)break}function o(...d){for(let{stream:p}of this.streams)typeof p.emit=="function"&&p.emit(...d)}function a(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync()}function s(d){if(!d)return this;let p=typeof d.write=="function"||d.stream,m=d.write?d:d.stream;if(!p)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:h}=this,g;typeof d.levelVal=="number"?g=d.levelVal:typeof d.level=="string"?g=h[d.level]:typeof d.level=="number"?g=d.level:g=H4;let y={stream:m,level:g,levelVal:void 0,id:++i.lastId};return f.unshift(y),f.sort(bI),this.minLevel=f[0].level,this}function c(d){let{streams:p}=this,m=p.findIndex(f=>f.id===d);return m>=0&&(p.splice(m,1),p.sort(bI),this.minLevel=p.length>0?p[0].level:-1),this}function u(){for(let{stream:d}of this.streams)typeof d.flushSync=="function"&&d.flushSync(),d.end()}function l(d){let p=new Array(this.streams.length);for(let m=0;m<p.length;m++)p[m]={level:d,stream:this.streams[m].stream};return{write:r,add:s,remove:c,emit:o,flushSync:a,end:u,minLevel:d,streams:p,clone:l,[ev]:!0,streamLevels:n}}}function bI(t,e){return t.level-e.level}function J4(t,e){return e?t-1:0}function K4(t,e){return e?t-1:t+1}function W4(t,e,n){return n?t>=0:t<e}$I.exports=G4});var jI=T((fK,Dt)=>{"use strict";var X4=require("node:os"),DI=$y(),Y4=wy(),Q4=ky(),OI=a0(),eU=mI(),TI=yn(),{configure:tU}=vI(),{assertDefaultLevelFound:rU,mappings:CI,genLsCache:nU,genLevelComparison:iU,assertLevelComparison:oU}=Vy(),{DEFAULT_LEVELS:AI,SORTING_ORDER:aU}=el(),{createArgsNormalizer:sU,asChindings:cU,buildSafeSonicBoom:xI,buildFormatters:uU,stringify:tv,normalizeDestFileDescriptor:SI,noop:lU}=Qu(),{version:dU}=By(),{chindingsSym:kI,redactFmtSym:fU,serializersSym:II,timeSym:pU,timeSliceIndexSym:mU,streamSym:hU,stringifySym:PI,stringifySafeSym:rv,stringifiersSym:zI,setLevelSym:gU,endSym:yU,formatOptsSym:vU,messageKeySym:bU,errorKeySym:_U,nestedKeySym:$U,mixinSym:wU,levelCompSym:xU,useOnlyCustomLevelsSym:SU,formattersSym:EI,hooksSym:kU,nestedKeyStrSym:IU,mixinMergeStrategySym:PU,msgPrefixSym:zU,transportUsesMultistreamSym:EU}=TI,{epochTime:NI,nullTime:DU}=OI,{pid:OU}=process,TU=X4.hostname(),CU=DI.err,AU={level:"info",levelComparison:aU.ASC,levels:AI,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:OU,hostname:TU},serializers:Object.assign(Object.create(null),{err:CU}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:NI,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},NU=sU(AU),jU=Object.assign(Object.create(null),DI);function nv(...t){let e={},{opts:n,stream:i}=NU(e,Y4(),...t);n.level&&typeof n.level=="string"&&AI[n.level.toLowerCase()]!==void 0&&(n.level=n.level.toLowerCase());let{redact:r,crlf:o,serializers:a,timestamp:s,messageKey:c,errorKey:u,nestedKey:l,base:d,name:p,level:m,customLevels:f,levelComparison:h,mixin:g,mixinMergeStrategy:y,useOnlyCustomLevels:v,formatters:b,hooks:_,depthLimit:x,edgeLimit:k,onChild:D,msgPrefix:A}=n,F=tU({maximumDepth:x,maximumBreadth:k}),se=uU(b.level,b.bindings,b.log),Ee=tv.bind({[rv]:F}),Ie=r?Object.assign(Object.create(null),Q4(r,Ee)):Object.create(null),Me=r?{stringify:Ie[fU]}:{stringify:Ee},ft="}"+(o?`\r
23
23
  `:`
24
- `),_r=dz.bind(null,{[Vm]:"",[Bm]:i,[Wm]:xe,[Hm]:Gc,[Jc]:U,[Gm]:me}),Za="";d!==null&&(p===void 0?Za=_r(d):Za=_r(Object.assign({},d,{name:p})));let uf=a instanceof Function?a:a?eh:Iz,mx=uf().indexOf(":")+1;if(x&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(g&&typeof g!="function")throw Error(`Unknown mixin type "${typeof g}" - expected "function"`);if(re&&typeof re!="string")throw Error(`Unknown msgPrefix type "${typeof re}" - expected "string"`);sz(m,f,x);let lf=Qm(f,x);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:lf,messageKey:c,errorKey:u}}),cz(h);let hx=az(h);return Object.assign(e,{levels:lf,[Ez]:hx,[zz]:x,[_z]:n,[gz]:uf,[yz]:mx,[Hm]:Gc,[Jc]:U,[Wm]:xe,[bz]:Be,[wz]:Ze,[xz]:c,[Sz]:u,[$z]:l,[Tz]:l?`,${JSON.stringify(l)}:{`:"",[Bm]:i,[kz]:g,[Cz]:_,[Vm]:Za,[Gm]:me,[Pz]:S,silent:pz,onChild:Z,[Oz]:re}),Object.setPrototypeOf(e,nz()),iz(e),e[vz](m),e}at.exports=Kc;at.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=Um(t.dest||process.stdout.fd),Fm(t)):Fm({dest:Um(t),minLength:0});at.exports.transport=Oc();at.exports.multistream=qm();at.exports.levels=Qm();at.exports.stdSerializers=Mz;at.exports.stdTimeFunctions=Object.assign({},Km);at.exports.symbols=Ym;at.exports.version=mz;at.exports.default=Kc;at.exports.pino=Kc});var Wo=$(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.regexpCode=ee.getEsmExportName=ee.getProperty=ee.safeStringify=ee.stringify=ee.strConcat=ee.addCodeArg=ee.str=ee._=ee.nil=ee._Code=ee.Name=ee.IDENTIFIER=ee._CodeOrName=void 0;var Bo=class{};ee._CodeOrName=Bo;ee.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Fr=class extends Bo{constructor(e){if(super(),!ee.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}}};ee.Name=Fr;var dt=class extends Bo{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,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Fr&&(r[n.str]=(r[n.str]||0)+1),r),{})}};ee._Code=dt;ee.nil=new dt("");function _v(t,...e){let r=[t[0]],n=0;for(;n<e.length;)ml(r,e[n]),r.push(t[++n]);return new dt(r)}ee._=_v;var pl=new dt("+");function vv(t,...e){let r=[Ho(t[0])],n=0;for(;n<e.length;)r.push(pl),ml(r,e[n]),r.push(pl,Ho(t[++n]));return uO(r),new dt(r)}ee.str=vv;function ml(t,e){e instanceof dt?t.push(...e._items):e instanceof Fr?t.push(e):t.push(fO(e))}ee.addCodeArg=ml;function uO(t){let e=1;for(;e<t.length-1;){if(t[e]===pl){let r=lO(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function lO(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Fr||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 Fr))return`"${t}${e.slice(1)}`}function dO(t,e){return e.emptyStr()?t:t.emptyStr()?e:vv`${t}${e}`}ee.strConcat=dO;function fO(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Ho(Array.isArray(t)?t.join(","):t)}function pO(t){return new dt(Ho(t))}ee.stringify=pO;function Ho(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ee.safeStringify=Ho;function mO(t){return typeof t=="string"&&ee.IDENTIFIER.test(t)?new dt(`.${t}`):_v`[${t}]`}ee.getProperty=mO;function hO(t){if(typeof t=="string"&&ee.IDENTIFIER.test(t))return new dt(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}ee.getEsmExportName=hO;function gO(t){return new dt(t.toString())}ee.regexpCode=gO});var yl=$(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.ValueScope=Je.ValueScopeName=Je.Scope=Je.varKinds=Je.UsedValueState=void 0;var Ge=Wo(),hl=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Wi;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Wi||(Je.UsedValueState=Wi={}));Je.varKinds={const:new Ge.Name("const"),let:new Ge.Name("let"),var:new Ge.Name("var")};var Gi=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Ge.Name?e:this.name(e)}name(e){return new Ge.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.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}}};Je.Scope=Gi;var Ji=class extends Ge.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Ge._)`.${new Ge.Name(r)}[${n}]`}};Je.ValueScopeName=Ji;var yO=(0,Ge._)`\n`,gl=class extends Gi{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?yO:Ge.nil}}get(){return this._scope}name(e){return new Ji(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:s}=o,i=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let l=a.get(i);if(l)return l}else a=this._values[s]=new Map;a.set(i,o);let c=this._scope[s]||(this._scope[s]=[]),u=c.length;return c[u]=r.ref,o.setValue(r,{property:s,itemIndex:u}),o}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ge._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(e,r,n={},o){let s=Ge.nil;for(let i in e){let a=e[i];if(!a)continue;let c=n[i]=n[i]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,Wi.Started);let l=r(u);if(l){let d=this.opts.es5?Je.varKinds.var:Je.varKinds.const;s=(0,Ge._)`${s}${d} ${u} = ${l};${this.opts._n}`}else if(l=o?.(u))s=(0,Ge._)`${s}${l}${this.opts._n}`;else throw new hl(u);c.set(u,Wi.Completed)})}return s}};Je.ValueScope=gl});var F=$(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.or=V.and=V.not=V.CodeGen=V.operators=V.varKinds=V.ValueScopeName=V.ValueScope=V.Scope=V.Name=V.regexpCode=V.stringify=V.getProperty=V.nil=V.strConcat=V.str=V._=void 0;var K=Wo(),$t=yl(),ur=Wo();Object.defineProperty(V,"_",{enumerable:!0,get:function(){return ur._}});Object.defineProperty(V,"str",{enumerable:!0,get:function(){return ur.str}});Object.defineProperty(V,"strConcat",{enumerable:!0,get:function(){return ur.strConcat}});Object.defineProperty(V,"nil",{enumerable:!0,get:function(){return ur.nil}});Object.defineProperty(V,"getProperty",{enumerable:!0,get:function(){return ur.getProperty}});Object.defineProperty(V,"stringify",{enumerable:!0,get:function(){return ur.stringify}});Object.defineProperty(V,"regexpCode",{enumerable:!0,get:function(){return ur.regexpCode}});Object.defineProperty(V,"Name",{enumerable:!0,get:function(){return ur.Name}});var Xi=yl();Object.defineProperty(V,"Scope",{enumerable:!0,get:function(){return Xi.Scope}});Object.defineProperty(V,"ValueScope",{enumerable:!0,get:function(){return Xi.ValueScope}});Object.defineProperty(V,"ValueScopeName",{enumerable:!0,get:function(){return Xi.ValueScopeName}});Object.defineProperty(V,"varKinds",{enumerable:!0,get:function(){return Xi.varKinds}});V.operators={GT:new K._Code(">"),GTE:new K._Code(">="),LT:new K._Code("<"),LTE:new K._Code("<="),EQ:new K._Code("==="),NEQ:new K._Code("!=="),NOT:new K._Code("!"),OR:new K._Code("||"),AND:new K._Code("&&"),ADD:new K._Code("+")};var Ht=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},_l=class extends Ht{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?$t.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=En(this.rhs,e,r)),this}get names(){return this.rhs instanceof K._CodeOrName?this.rhs.names:{}}},Ki=class extends Ht{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof K.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=En(this.rhs,e,r),this}get names(){let e=this.lhs instanceof K.Name?{}:{...this.lhs.names};return Qi(e,this.rhs)}},vl=class extends Ki{constructor(e,r,n,o){super(e,n,o),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},bl=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},wl=class extends Ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},xl=class extends Ht{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Sl=class extends Ht{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=En(this.code,e,r),this}get names(){return this.code instanceof K._CodeOrName?this.code.names:{}}},Go=class extends Ht{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,o=n.length;for(;o--;){let s=n[o];s.optimizeNames(e,r)||(_O(e,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Br(e,r.names),{})}},Wt=class extends Go{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},$l=class extends Go{},kn=class extends Wt{};kn.kind="else";var Ur=class t extends Wt{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 n=r.optimizeNodes();r=this.else=Array.isArray(n)?new kn(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(bv(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=En(this.condition,e,r),this}get names(){let e=super.names;return Qi(e,this.condition),this.else&&Br(e,this.else.names),e}};Ur.kind="if";var Vr=class extends Wt{};Vr.kind="for";var kl=class extends Vr{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=En(this.iteration,e,r),this}get names(){return Br(super.names,this.iteration.names)}},El=class extends Vr{constructor(e,r,n,o){super(),this.varKind=e,this.name=r,this.from=n,this.to=o}render(e){let r=e.es5?$t.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${r} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Qi(super.names,this.from);return Qi(e,this.to)}},Yi=class extends Vr{constructor(e,r,n,o){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=o}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=En(this.iterable,e,r),this}get names(){return Br(super.names,this.iterable.names)}},Jo=class extends Wt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Jo.kind="func";var Ko=class extends Go{render(e){return"return "+super.render(e)}};Ko.kind="return";var zl=class extends Wt{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 n,o;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(o=this.finally)===null||o===void 0||o.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Br(e,this.catch.names),this.finally&&Br(e,this.finally.names),e}},Yo=class extends Wt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Yo.kind="catch";var Qo=class extends Wt{render(e){return"finally"+super.render(e)}};Qo.kind="finally";var Pl=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
25
- `:""},this._extScope=e,this._scope=new $t.Scope({parent:e}),this._nodes=[new $l]}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 n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}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,n,o){let s=this._scope.toName(r);return n!==void 0&&o&&(this._constants[s.str]=n),this._leafNode(new _l(e,s,n)),s}const(e,r,n){return this._def($t.varKinds.const,e,r,n)}let(e,r,n){return this._def($t.varKinds.let,e,r,n)}var(e,r,n){return this._def($t.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Ki(e,r,n))}add(e,r){return this._leafNode(new vl(e,V.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==K.nil&&this._leafNode(new Sl(e)),this}object(...e){let r=["{"];for(let[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,K.addCodeArg)(r,o));return r.push("}"),new K._Code(r)}if(e,r,n){if(this._blockNode(new Ur(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ur(e))}else(){return this._elseNode(new kn)}endIf(){return this._endBlockNode(Ur,kn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new kl(e),r)}forRange(e,r,n,o,s=this.opts.es5?$t.varKinds.var:$t.varKinds.let){let i=this._scope.toName(e);return this._for(new El(s,i,r,n),()=>o(i))}forOf(e,r,n,o=$t.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=r instanceof K.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,K._)`${i}.length`,a=>{this.var(s,(0,K._)`${i}[${a}]`),n(s)})}return this._for(new Yi("of",o,s,r),()=>n(s))}forIn(e,r,n,o=this.opts.es5?$t.varKinds.var:$t.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,K._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new Yi("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(Vr)}label(e){return this._leafNode(new bl(e))}break(e){return this._leafNode(new wl(e))}return(e){let r=new Ko;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ko)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new zl;if(this._blockNode(o),this.code(e),r){let s=this.name("e");this._currNode=o.catch=new Yo(s),r(s)}return n&&(this._currNode=o.finally=new Qo,this.code(n)),this._endBlockNode(Yo,Qo)}throw(e){return this._leafNode(new xl(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 n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=K.nil,n,o){return this._blockNode(new Jo(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Jo)}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 n=this._currNode;if(n instanceof e||r&&n 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 Ur))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}};V.CodeGen=Pl;function Br(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Qi(t,e){return e instanceof K._CodeOrName?Br(t,e.names):t}function En(t,e,r){if(t instanceof K.Name)return n(t);if(!o(t))return t;return new K._Code(t._items.reduce((s,i)=>(i instanceof K.Name&&(i=n(i)),i instanceof K._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function o(s){return s instanceof K._Code&&s._items.some(i=>i instanceof K.Name&&e[i.str]===1&&r[i.str]!==void 0)}}function _O(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function bv(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,K._)`!${Tl(t)}`}V.not=bv;var vO=wv(V.operators.AND);function bO(...t){return t.reduce(vO)}V.and=bO;var wO=wv(V.operators.OR);function xO(...t){return t.reduce(wO)}V.or=xO;function wv(t){return(e,r)=>e===K.nil?r:r===K.nil?e:(0,K._)`${Tl(e)} ${t} ${Tl(r)}`}function Tl(t){return t instanceof K.Name?t:(0,K._)`(${t})`}});var Q=$(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.checkStrictMode=B.getErrorPath=B.Type=B.useFunc=B.setEvaluated=B.evaluatedPropsToName=B.mergeEvaluated=B.eachItem=B.unescapeJsonPointer=B.escapeJsonPointer=B.escapeFragment=B.unescapeFragment=B.schemaRefOrVal=B.schemaHasRulesButRef=B.schemaHasRules=B.checkUnknownRules=B.alwaysValidSchema=B.toHash=void 0;var ae=F(),SO=Wo();function $O(t){let e={};for(let r of t)e[r]=!0;return e}B.toHash=$O;function kO(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:($v(t,e),!kv(e,t.self.RULES.all))}B.alwaysValidSchema=kO;function $v(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let o=n.RULES.keywords;for(let s in e)o[s]||Pv(t,`unknown keyword: "${s}"`)}B.checkUnknownRules=$v;function kv(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}B.schemaHasRules=kv;function EO(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}B.schemaHasRulesButRef=EO;function zO({topSchemaRef:t,schemaPath:e},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ae._)`${r}`}return(0,ae._)`${t}${e}${(0,ae.getProperty)(n)}`}B.schemaRefOrVal=zO;function PO(t){return Ev(decodeURIComponent(t))}B.unescapeFragment=PO;function TO(t){return encodeURIComponent(Ol(t))}B.escapeFragment=TO;function Ol(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}B.escapeJsonPointer=Ol;function Ev(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}B.unescapeJsonPointer=Ev;function CO(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}B.eachItem=CO;function xv({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let c=i===void 0?s:i instanceof ae.Name?(s instanceof ae.Name?t(o,s,i):e(o,s,i),i):s instanceof ae.Name?(e(o,i,s),s):r(s,i);return a===ae.Name&&!(c instanceof ae.Name)?n(o,c):c}}B.mergeEvaluated={props:xv({mergeNames:(t,e,r)=>t.if((0,ae._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,ae._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,ae._)`${r} || {}`).code((0,ae._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,ae._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,ae._)`${r} || {}`),Il(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:zv}),items:xv({mergeNames:(t,e,r)=>t.if((0,ae._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,ae._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,ae._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,ae._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function zv(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,ae._)`{}`);return e!==void 0&&Il(t,r,e),r}B.evaluatedPropsToName=zv;function Il(t,e,r){Object.keys(r).forEach(n=>t.assign((0,ae._)`${e}${(0,ae.getProperty)(n)}`,!0))}B.setEvaluated=Il;var Sv={};function OO(t,e){return t.scopeValue("func",{ref:e,code:Sv[e.code]||(Sv[e.code]=new SO._Code(e.code))})}B.useFunc=OO;var Cl;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Cl||(B.Type=Cl={}));function IO(t,e,r){if(t instanceof ae.Name){let n=e===Cl.Num;return r?n?(0,ae._)`"[" + ${t} + "]"`:(0,ae._)`"['" + ${t} + "']"`:n?(0,ae._)`"/" + ${t}`:(0,ae._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ae.getProperty)(t).toString():"/"+Ol(t)}B.getErrorPath=IO;function Pv(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}B.checkStrictMode=Pv});var Gt=$(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var Ae=F(),RO={data:new Ae.Name("data"),valCxt:new Ae.Name("valCxt"),instancePath:new Ae.Name("instancePath"),parentData:new Ae.Name("parentData"),parentDataProperty:new Ae.Name("parentDataProperty"),rootData:new Ae.Name("rootData"),dynamicAnchors:new Ae.Name("dynamicAnchors"),vErrors:new Ae.Name("vErrors"),errors:new Ae.Name("errors"),this:new Ae.Name("this"),self:new Ae.Name("self"),scope:new Ae.Name("scope"),json:new Ae.Name("json"),jsonPos:new Ae.Name("jsonPos"),jsonLen:new Ae.Name("jsonLen"),jsonPart:new Ae.Name("jsonPart")};Rl.default=RO});var Xo=$(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.extendErrors=je.resetErrorsCount=je.reportExtraError=je.reportError=je.keyword$DataError=je.keywordError=void 0;var X=F(),ea=Q(),Ue=Gt();je.keywordError={message:({keyword:t})=>(0,X.str)`must pass "${t}" keyword validation`};je.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,X.str)`"${t}" keyword must be ${e} ($data)`:(0,X.str)`"${t}" keyword is invalid ($data)`};function DO(t,e=je.keywordError,r,n){let{it:o}=t,{gen:s,compositeRule:i,allErrors:a}=o,c=Ov(t,e,r);n??(i||a)?Tv(s,c):Cv(o,(0,X._)`[${c}]`)}je.reportError=DO;function NO(t,e=je.keywordError,r){let{it:n}=t,{gen:o,compositeRule:s,allErrors:i}=n,a=Ov(t,e,r);Tv(o,a),s||i||Cv(n,Ue.default.vErrors)}je.reportExtraError=NO;function AO(t,e){t.assign(Ue.default.errors,e),t.if((0,X._)`${Ue.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,X._)`${Ue.default.vErrors}.length`,e),()=>t.assign(Ue.default.vErrors,null)))}je.resetErrorsCount=AO;function jO({gen:t,keyword:e,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw new Error("ajv implementation error");let i=t.name("err");t.forRange("i",o,Ue.default.errors,a=>{t.const(i,(0,X._)`${Ue.default.vErrors}[${a}]`),t.if((0,X._)`${i}.instancePath === undefined`,()=>t.assign((0,X._)`${i}.instancePath`,(0,X.strConcat)(Ue.default.instancePath,s.errorPath))),t.assign((0,X._)`${i}.schemaPath`,(0,X.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,X._)`${i}.schema`,r),t.assign((0,X._)`${i}.data`,n))})}je.extendErrors=jO;function Tv(t,e){let r=t.const("err",e);t.if((0,X._)`${Ue.default.vErrors} === null`,()=>t.assign(Ue.default.vErrors,(0,X._)`[${r}]`),(0,X._)`${Ue.default.vErrors}.push(${r})`),t.code((0,X._)`${Ue.default.errors}++`)}function Cv(t,e){let{gen:r,validateName:n,schemaEnv:o}=t;o.$async?r.throw((0,X._)`new ${t.ValidationError}(${e})`):(r.assign((0,X._)`${n}.errors`,e),r.return(!1))}var Hr={keyword:new X.Name("keyword"),schemaPath:new X.Name("schemaPath"),params:new X.Name("params"),propertyName:new X.Name("propertyName"),message:new X.Name("message"),schema:new X.Name("schema"),parentSchema:new X.Name("parentSchema")};function Ov(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,X._)`{}`:MO(t,e,r)}function MO(t,e,r={}){let{gen:n,it:o}=t,s=[ZO(o,r),LO(t,r)];return qO(t,e,s),n.object(...s)}function ZO({errorPath:t},{instancePath:e}){let r=e?(0,X.str)`${t}${(0,ea.getErrorPath)(e,ea.Type.Str)}`:t;return[Ue.default.instancePath,(0,X.strConcat)(Ue.default.instancePath,r)]}function LO({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let o=n?e:(0,X.str)`${e}/${t}`;return r&&(o=(0,X.str)`${o}${(0,ea.getErrorPath)(r,ea.Type.Str)}`),[Hr.schemaPath,o]}function qO(t,{params:e,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=a;n.push([Hr.keyword,o],[Hr.params,typeof e=="function"?e(t):e||(0,X._)`{}`]),c.messages&&n.push([Hr.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([Hr.schema,i],[Hr.parentSchema,(0,X._)`${l}${d}`],[Ue.default.data,s]),u&&n.push([Hr.propertyName,u])}});var Rv=$(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.boolOrEmptySchema=zn.topBoolOrEmptySchema=void 0;var FO=Xo(),UO=F(),VO=Gt(),BO={message:"boolean schema is false"};function HO(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Iv(t,!1):typeof r=="object"&&r.$async===!0?e.return(VO.default.data):(e.assign((0,UO._)`${n}.errors`,null),e.return(!0))}zn.topBoolOrEmptySchema=HO;function WO(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Iv(t)):r.var(e,!0)}zn.boolOrEmptySchema=WO;function Iv(t,e){let{gen:r,data:n}=t,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,FO.reportError)(o,BO,void 0,e)}});var Dl=$(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.getRules=Pn.isJSONType=void 0;var GO=["string","number","integer","boolean","null","object","array"],JO=new Set(GO);function KO(t){return typeof t=="string"&&JO.has(t)}Pn.isJSONType=KO;function YO(){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:{}}}Pn.getRules=YO});var Nl=$(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.shouldUseRule=lr.shouldUseGroup=lr.schemaHasRulesForType=void 0;function QO({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Dv(t,n)}lr.schemaHasRulesForType=QO;function Dv(t,e){return e.rules.some(r=>Nv(t,r))}lr.shouldUseGroup=Dv;function Nv(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}lr.shouldUseRule=Nv});var es=$(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;var XO=Dl(),eI=Nl(),tI=Xo(),q=F(),Av=Q(),Tn;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Tn||(Me.DataType=Tn={}));function rI(t){let e=jv(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}Me.getSchemaTypes=rI;function jv(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(XO.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Me.getJSONTypes=jv;function nI(t,e){let{gen:r,data:n,opts:o}=t,s=oI(e,o.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,eI.schemaHasRulesForType)(t,e[0]));if(i){let a=jl(e,n,o.strictNumbers,Tn.Wrong);r.if(a,()=>{s.length?sI(t,e,s):Ml(t)})}return i}Me.coerceAndCheckDataType=nI;var Mv=new Set(["string","number","integer","boolean","null"]);function oI(t,e){return e?t.filter(r=>Mv.has(r)||e==="array"&&r==="array"):[]}function sI(t,e,r){let{gen:n,data:o,opts:s}=t,i=n.let("dataType",(0,q._)`typeof ${o}`),a=n.let("coerced",(0,q._)`undefined`);s.coerceTypes==="array"&&n.if((0,q._)`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,q._)`${o}[0]`).assign(i,(0,q._)`typeof ${o}`).if(jl(e,o,s.strictNumbers),()=>n.assign(a,o))),n.if((0,q._)`${a} !== undefined`);for(let u of r)(Mv.has(u)||u==="array"&&s.coerceTypes==="array")&&c(u);n.else(),Ml(t),n.endIf(),n.if((0,q._)`${a} !== undefined`,()=>{n.assign(o,a),iI(t,a)});function c(u){switch(u){case"string":n.elseIf((0,q._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,q._)`"" + ${o}`).elseIf((0,q._)`${o} === null`).assign(a,(0,q._)`""`);return;case"number":n.elseIf((0,q._)`${i} == "boolean" || ${o} === null
26
- || (${i} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,q._)`+${o}`);return;case"integer":n.elseIf((0,q._)`${i} === "boolean" || ${o} === null
27
- || (${i} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,q._)`+${o}`);return;case"boolean":n.elseIf((0,q._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,q._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf((0,q._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf((0,q._)`${i} === "string" || ${i} === "number"
28
- || ${i} === "boolean" || ${o} === null`).assign(a,(0,q._)`[${o}]`)}}}function iI({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,q._)`${e} !== undefined`,()=>t.assign((0,q._)`${e}[${r}]`,n))}function Al(t,e,r,n=Tn.Correct){let o=n===Tn.Correct?q.operators.EQ:q.operators.NEQ,s;switch(t){case"null":return(0,q._)`${e} ${o} null`;case"array":s=(0,q._)`Array.isArray(${e})`;break;case"object":s=(0,q._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,q._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,q._)`typeof ${e} ${o} ${t}`}return n===Tn.Correct?s:(0,q.not)(s);function i(a=q.nil){return(0,q.and)((0,q._)`typeof ${e} == "number"`,a,r?(0,q._)`isFinite(${e})`:q.nil)}}Me.checkDataType=Al;function jl(t,e,r,n){if(t.length===1)return Al(t[0],e,r,n);let o,s=(0,Av.toHash)(t);if(s.array&&s.object){let i=(0,q._)`typeof ${e} != "object"`;o=s.null?i:(0,q._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else o=q.nil;s.number&&delete s.integer;for(let i in s)o=(0,q.and)(o,Al(i,e,r,n));return o}Me.checkDataTypes=jl;var aI={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,q._)`{type: ${t}}`:(0,q._)`{type: ${e}}`};function Ml(t){let e=cI(t);(0,tI.reportError)(e,aI)}Me.reportTypeError=Ml;function cI(t){let{gen:e,data:r,schema:n}=t,o=(0,Av.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:t}}});var Lv=$(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.assignDefaults=void 0;var Cn=F(),uI=Q();function lI(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let o in r)Zv(t,o,r[o].default);else e==="array"&&Array.isArray(n)&&n.forEach((o,s)=>Zv(t,s,o.default))}ta.assignDefaults=lI;function Zv(t,e,r){let{gen:n,compositeRule:o,data:s,opts:i}=t;if(r===void 0)return;let a=(0,Cn._)`${s}${(0,Cn.getProperty)(e)}`;if(o){(0,uI.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,Cn._)`${a} === undefined`;i.useDefaults==="empty"&&(c=(0,Cn._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Cn._)`${a} = ${(0,Cn.stringify)(r)}`)}});var ft=$(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.validateUnion=ie.validateArray=ie.usePattern=ie.callValidateCode=ie.schemaProperties=ie.allSchemaProperties=ie.noPropertyInData=ie.propertyInData=ie.isOwnProperty=ie.hasPropFunc=ie.reportMissingProp=ie.checkMissingProp=ie.checkReportMissingProp=void 0;var fe=F(),Zl=Q(),dr=Gt(),dI=Q();function fI(t,e){let{gen:r,data:n,it:o}=t;r.if(ql(r,n,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,fe._)`${e}`},!0),t.error()})}ie.checkReportMissingProp=fI;function pI({gen:t,data:e,it:{opts:r}},n,o){return(0,fe.or)(...n.map(s=>(0,fe.and)(ql(t,e,s,r.ownProperties),(0,fe._)`${o} = ${s}`)))}ie.checkMissingProp=pI;function mI(t,e){t.setParams({missingProperty:e},!0),t.error()}ie.reportMissingProp=mI;function qv(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,fe._)`Object.prototype.hasOwnProperty`})}ie.hasPropFunc=qv;function Ll(t,e,r){return(0,fe._)`${qv(t)}.call(${e}, ${r})`}ie.isOwnProperty=Ll;function hI(t,e,r,n){let o=(0,fe._)`${e}${(0,fe.getProperty)(r)} !== undefined`;return n?(0,fe._)`${o} && ${Ll(t,e,r)}`:o}ie.propertyInData=hI;function ql(t,e,r,n){let o=(0,fe._)`${e}${(0,fe.getProperty)(r)} === undefined`;return n?(0,fe.or)(o,(0,fe.not)(Ll(t,e,r))):o}ie.noPropertyInData=ql;function Fv(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ie.allSchemaProperties=Fv;function gI(t,e){return Fv(e).filter(r=>!(0,Zl.alwaysValidSchema)(t,e[r]))}ie.schemaProperties=gI;function yI({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,c,u){let l=u?(0,fe._)`${t}, ${e}, ${n}${o}`:e,d=[[dr.default.instancePath,(0,fe.strConcat)(dr.default.instancePath,s)],[dr.default.parentData,i.parentData],[dr.default.parentDataProperty,i.parentDataProperty],[dr.default.rootData,dr.default.rootData]];i.opts.dynamicRef&&d.push([dr.default.dynamicAnchors,dr.default.dynamicAnchors]);let p=(0,fe._)`${l}, ${r.object(...d)}`;return c!==fe.nil?(0,fe._)`${a}.call(${c}, ${p})`:(0,fe._)`${a}(${p})`}ie.callValidateCode=yI;var _I=(0,fe._)`new RegExp`;function vI({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:o}=e.code,s=o(r,n);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,fe._)`${o.code==="new RegExp"?_I:(0,dI.useFunc)(t,o)}(${r}, ${n})`})}ie.usePattern=vI;function bI(t){let{gen:e,data:r,keyword:n,it:o}=t,s=e.name("valid");if(o.allErrors){let a=e.let("valid",!0);return i(()=>e.assign(a,!1)),a}return e.var(s,!0),i(()=>e.break()),s;function i(a){let c=e.const("len",(0,fe._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:Zl.Type.Num},s),e.if((0,fe.not)(s),a)})}}ie.validateArray=bI;function wI(t){let{gen:e,schema:r,keyword:n,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Zl.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let i=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((c,u)=>{let l=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);e.assign(i,(0,fe._)`${i} || ${a}`),t.mergeValidEvaluated(l,a)||e.if((0,fe.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}ie.validateUnion=wI});var Bv=$(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateKeywordUsage=It.validSchemaType=It.funcKeywordCode=It.macroKeywordCode=void 0;var Ve=F(),Wr=Gt(),xI=ft(),SI=Xo();function $I(t,e){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=t,a=e.macro.call(i.self,o,s,i),c=Vv(r,n,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:Ve.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}It.macroKeywordCode=$I;function kI(t,e){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:c}=t;zI(c,e);let u=!a&&e.compile?e.compile.call(c.self,s,i,c):e.validate,l=Vv(n,o,u),d=n.let("valid");t.block$data(d,p),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function p(){if(e.errors===!1)h(),e.modifying&&Uv(t),g(()=>t.error());else{let _=e.async?m():f();e.modifying&&Uv(t),g(()=>EI(t,_))}}function m(){let _=n.let("ruleErrs",null);return n.try(()=>h((0,Ve._)`await `),x=>n.assign(d,!1).if((0,Ve._)`${x} instanceof ${c.ValidationError}`,()=>n.assign(_,(0,Ve._)`${x}.errors`),()=>n.throw(x))),_}function f(){let _=(0,Ve._)`${l}.errors`;return n.assign(_,null),h(Ve.nil),_}function h(_=e.async?(0,Ve._)`await `:Ve.nil){let x=c.opts.passContext?Wr.default.this:Wr.default.self,w=!("compile"in e&&!a||e.schema===!1);n.assign(d,(0,Ve._)`${_}${(0,xI.callValidateCode)(t,l,x,w)}`,e.modifying)}function g(_){var x;n.if((0,Ve.not)((x=e.valid)!==null&&x!==void 0?x:d),_)}}It.funcKeywordCode=kI;function Uv(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Ve._)`${n.parentData}[${n.parentDataProperty}]`))}function EI(t,e){let{gen:r}=t;r.if((0,Ve._)`Array.isArray(${e})`,()=>{r.assign(Wr.default.vErrors,(0,Ve._)`${Wr.default.vErrors} === null ? ${e} : ${Wr.default.vErrors}.concat(${e})`).assign(Wr.default.errors,(0,Ve._)`${Wr.default.vErrors}.length`),(0,SI.extendErrors)(t)},()=>t.error())}function zI({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Vv(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,Ve.stringify)(r)})}function PI(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}It.validSchemaType=PI;function TI({schema:t,opts:e,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");let i=o.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema&&!o.validateSchema(t[s])){let c=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}It.validateKeywordUsage=TI});var Wv=$(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.extendSubschemaMode=fr.extendSubschemaData=fr.getSubschema=void 0;var Rt=F(),Hv=Q();function CI(t,{keyword:e,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(e!==void 0&&n!==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,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Rt._)`${t.schemaPath}${(0,Rt.getProperty)(e)}${(0,Rt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Hv.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}fr.getSubschema=CI;function OI(t,e,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(o!==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,p=a.let("data",(0,Rt._)`${e.data}${(0,Rt.getProperty)(r)}`,!0);c(p),t.errorPath=(0,Rt.str)`${u}${(0,Hv.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Rt._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(o!==void 0){let u=o instanceof Rt.Name?o:a.let("data",o,!0);c(u),i!==void 0&&(t.propertyName=i)}s&&(t.dataTypes=s);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]}}fr.extendSubschemaData=OI;function II(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(t.compositeRule=n),o!==void 0&&(t.createErrors=o),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=r}fr.extendSubschemaMode=II});var Fl=$((w9,Gv)=>{"use strict";Gv.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 n,o,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))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(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}});var Kv=$((x9,Jv)=>{"use strict";var pr=Jv.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};ra(e,n,o,t,"",t)};pr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};pr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};pr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};pr.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 ra(t,e,r,n,o,s,i,a,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,o,s,i,a,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in pr.arrayKeywords)for(var p=0;p<d.length;p++)ra(t,e,r,d[p],o+"/"+l+"/"+p,s,o,l,n,p)}else if(l in pr.propsKeywords){if(d&&typeof d=="object")for(var m in d)ra(t,e,r,d[m],o+"/"+l+"/"+RI(m),s,o,l,n,m)}else(l in pr.keywords||t.allKeys&&!(l in pr.skipKeywords))&&ra(t,e,r,d,o+"/"+l,s,o,l,n)}r(n,o,s,i,a,c,u)}}function RI(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var ts=$(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.getSchemaRefs=Ke.resolveUrl=Ke.normalizeId=Ke._getFullPath=Ke.getFullPath=Ke.inlineRef=void 0;var DI=Q(),NI=Fl(),AI=Kv(),jI=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function MI(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Ul(t):e?Yv(t)<=e:!1}Ke.inlineRef=MI;var ZI=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ul(t){for(let e in t){if(ZI.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Ul)||typeof r=="object"&&Ul(r))return!0}return!1}function Yv(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!jI.has(r)&&(typeof t[r]=="object"&&(0,DI.eachItem)(t[r],n=>e+=Yv(n)),e===1/0))return 1/0}return e}function Qv(t,e="",r){r!==!1&&(e=On(e));let n=t.parse(e);return Xv(t,n)}Ke.getFullPath=Qv;function Xv(t,e){return t.serialize(e).split("#")[0]+"#"}Ke._getFullPath=Xv;var LI=/#\/?$/;function On(t){return t?t.replace(LI,""):""}Ke.normalizeId=On;function qI(t,e,r){return r=On(r),t.resolve(e,r)}Ke.resolveUrl=qI;var FI=/^[a-z_][-a-z0-9._]*$/i;function UI(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=On(t[r]||e),s={"":o},i=Qv(n,o,!1),a={},c=new Set;return AI(t,{allKeys:!0},(d,p,m,f)=>{if(f===void 0)return;let h=i+p,g=s[f];typeof d[r]=="string"&&(g=_.call(this,d[r])),x.call(this,d.$anchor),x.call(this,d.$dynamicAnchor),s[p]=g;function _(w){let S=this.opts.uriResolver.resolve;if(w=On(g?S(g,w):w),c.has(w))throw l(w);c.add(w);let k=this.refs[w];return typeof k=="string"&&(k=this.refs[k]),typeof k=="object"?u(d,k.schema,w):w!==On(h)&&(w[0]==="#"?(u(d,a[w],w),a[w]=d):this.refs[w]=h),w}function x(w){if(typeof w=="string"){if(!FI.test(w))throw new Error(`invalid anchor "${w}"`);_.call(this,`#${w}`)}}}),a;function u(d,p,m){if(p!==void 0&&!NI(d,p))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Ke.getSchemaRefs=UI});var os=$(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.getData=mr.KeywordCxt=mr.validateFunctionCode=void 0;var ob=Rv(),eb=es(),Bl=Nl(),na=es(),VI=Lv(),ns=Bv(),Vl=Wv(),O=F(),N=Gt(),BI=ts(),Jt=Q(),rs=Xo();function HI(t){if(ab(t)&&(cb(t),ib(t))){JI(t);return}sb(t,()=>(0,ob.topBoolOrEmptySchema)(t))}mr.validateFunctionCode=HI;function sb({gen:t,validateName:e,schema:r,schemaEnv:n,opts:o},s){o.code.es5?t.func(e,(0,O._)`${N.default.data}, ${N.default.valCxt}`,n.$async,()=>{t.code((0,O._)`"use strict"; ${tb(r,o)}`),GI(t,o),t.code(s)}):t.func(e,(0,O._)`${N.default.data}, ${WI(o)}`,n.$async,()=>t.code(tb(r,o)).code(s))}function WI(t){return(0,O._)`{${N.default.instancePath}="", ${N.default.parentData}, ${N.default.parentDataProperty}, ${N.default.rootData}=${N.default.data}${t.dynamicRef?(0,O._)`, ${N.default.dynamicAnchors}={}`:O.nil}}={}`}function GI(t,e){t.if(N.default.valCxt,()=>{t.var(N.default.instancePath,(0,O._)`${N.default.valCxt}.${N.default.instancePath}`),t.var(N.default.parentData,(0,O._)`${N.default.valCxt}.${N.default.parentData}`),t.var(N.default.parentDataProperty,(0,O._)`${N.default.valCxt}.${N.default.parentDataProperty}`),t.var(N.default.rootData,(0,O._)`${N.default.valCxt}.${N.default.rootData}`),e.dynamicRef&&t.var(N.default.dynamicAnchors,(0,O._)`${N.default.valCxt}.${N.default.dynamicAnchors}`)},()=>{t.var(N.default.instancePath,(0,O._)`""`),t.var(N.default.parentData,(0,O._)`undefined`),t.var(N.default.parentDataProperty,(0,O._)`undefined`),t.var(N.default.rootData,N.default.data),e.dynamicRef&&t.var(N.default.dynamicAnchors,(0,O._)`{}`)})}function JI(t){let{schema:e,opts:r,gen:n}=t;sb(t,()=>{r.$comment&&e.$comment&&lb(t),eR(t),n.let(N.default.vErrors,null),n.let(N.default.errors,0),r.unevaluated&&KI(t),ub(t),nR(t)})}function KI(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,O._)`${r}.evaluated`),e.if((0,O._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,O._)`${t.evaluated}.props`,(0,O._)`undefined`)),e.if((0,O._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,O._)`${t.evaluated}.items`,(0,O._)`undefined`))}function tb(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,O._)`/*# sourceURL=${r} */`:O.nil}function YI(t,e){if(ab(t)&&(cb(t),ib(t))){QI(t,e);return}(0,ob.boolOrEmptySchema)(t,e)}function ib({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 ab(t){return typeof t.schema!="boolean"}function QI(t,e){let{schema:r,gen:n,opts:o}=t;o.$comment&&r.$comment&&lb(t),tR(t),rR(t);let s=n.const("_errs",N.default.errors);ub(t,s),n.var(e,(0,O._)`${s} === ${N.default.errors}`)}function cb(t){(0,Jt.checkUnknownRules)(t),XI(t)}function ub(t,e){if(t.opts.jtd)return rb(t,[],!1,e);let r=(0,eb.getSchemaTypes)(t.schema),n=(0,eb.coerceAndCheckDataType)(t,r);rb(t,r,!n,e)}function XI(t){let{schema:e,errSchemaPath:r,opts:n,self:o}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Jt.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function eR(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Jt.checkStrictMode)(t,"default is ignored in the schema root")}function tR(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,BI.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function rR(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function lb({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)t.code((0,O._)`${N.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=(0,O.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,O._)`${N.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function nR(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=t;r.$async?e.if((0,O._)`${N.default.errors} === 0`,()=>e.return(N.default.data),()=>e.throw((0,O._)`new ${o}(${N.default.vErrors})`)):(e.assign((0,O._)`${n}.errors`,N.default.vErrors),s.unevaluated&&oR(t),e.return((0,O._)`${N.default.errors} === 0`))}function oR({gen:t,evaluated:e,props:r,items:n}){r instanceof O.Name&&t.assign((0,O._)`${e}.props`,r),n instanceof O.Name&&t.assign((0,O._)`${e}.items`,n)}function rb(t,e,r,n){let{gen:o,schema:s,data:i,allErrors:a,opts:c,self:u}=t,{RULES:l}=u;if(s.$ref&&(c.ignoreKeywordsWithRef||!(0,Jt.schemaHasRulesButRef)(s,l))){o.block(()=>fb(t,"$ref",l.all.$ref.definition));return}c.jtd||sR(t,e),o.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,Bl.shouldUseGroup)(s,p)&&(p.type?(o.if((0,na.checkDataType)(p.type,i,c.strictNumbers)),nb(t,p),e.length===1&&e[0]===p.type&&r&&(o.else(),(0,na.reportTypeError)(t)),o.endIf()):nb(t,p),a||o.if((0,O._)`${N.default.errors} === ${n||0}`))}}function nb(t,e){let{gen:r,schema:n,opts:{useDefaults:o}}=t;o&&(0,VI.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,Bl.shouldUseRule)(n,s)&&fb(t,s.keyword,s.definition,e.type)})}function sR(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(iR(t,e),t.opts.allowUnionTypes||aR(t,e),cR(t,t.dataTypes))}function iR(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{db(t.dataTypes,r)||Hl(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),lR(t,e)}}function aR(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Hl(t,"use allowUnionTypes to allow union type keyword")}function cR(t,e){let r=t.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Bl.shouldUseRule)(t.schema,o)){let{type:s}=o.definition;s.length&&!s.some(i=>uR(e,i))&&Hl(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function uR(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function db(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function lR(t,e){let r=[];for(let n of t.dataTypes)db(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Hl(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Jt.checkStrictMode)(t,e,t.opts.strictTypes)}var oa=class{constructor(e,r,n){if((0,ns.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Jt.schemaRefOrVal)(e,this.schema,n,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",pb(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,ns.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",N.default.errors))}result(e,r,n){this.failResult((0,O.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():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,O.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,O._)`${r} !== undefined && (${(0,O.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?rs.reportExtraError:rs.reportError)(this,this.def.error,r)}$dataError(){(0,rs.reportError)(this,this.def.$dataError||rs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,rs.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,n=O.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=O.nil,r=O.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:i}=this;n.if((0,O.or)((0,O._)`${o} === undefined`,r)),e!==O.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==O.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,O.or)(i(),a());function i(){if(n.length){if(!(r instanceof O.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,O._)`${(0,na.checkDataTypes)(c,r,s.opts.strictNumbers,na.DataType.Wrong)}`}return O.nil}function a(){if(o.validateSchema){let c=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,O._)`!${c}(${r})`}return O.nil}}subschema(e,r){let n=(0,Vl.getSubschema)(this.it,e);(0,Vl.extendSubschemaData)(n,this.it,e),(0,Vl.extendSubschemaMode)(n,e);let o={...this.it,...n,items:void 0,props:void 0};return YI(o,r),o}mergeEvaluated(e,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Jt.mergeEvaluated.props(o,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Jt.mergeEvaluated.items(o,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(e,O.Name)),!0}};mr.KeywordCxt=oa;function fb(t,e,r,n){let o=new oa(t,r,e);"code"in r?r.code(o,n):o.$data&&r.validate?(0,ns.funcKeywordCode)(o,r):"macro"in r?(0,ns.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,ns.funcKeywordCode)(o,r)}var dR=/^\/(?:[^~]|~0|~1)*$/,fR=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pb(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let o,s;if(t==="")return N.default.rootData;if(t[0]==="/"){if(!dR.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,s=N.default.rootData}else{let u=fR.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let l=+u[1];if(o=u[2],o==="#"){if(l>=e)throw new Error(c("property/index",l));return n[e-l]}if(l>e)throw new Error(c("data",l));if(s=r[e-l],!o)return s}let i=s,a=o.split("/");for(let u of a)u&&(s=(0,O._)`${s}${(0,O.getProperty)((0,Jt.unescapeJsonPointer)(u))}`,i=(0,O._)`${i} && ${s}`);return i;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}mr.getData=pb});var sa=$(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var Wl=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Gl.default=Wl});var ss=$(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var Jl=ts(),Kl=class extends Error{constructor(e,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Jl.resolveUrl)(e,r,n),this.missingSchema=(0,Jl.normalizeId)((0,Jl.getFullPath)(e,this.missingRef))}};Yl.default=Kl});var aa=$(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.resolveSchema=pt.getCompilingSchema=pt.resolveRef=pt.compileSchema=pt.SchemaEnv=void 0;var kt=F(),pR=sa(),Gr=Gt(),Et=ts(),mb=Q(),mR=os(),In=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=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,Et.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};pt.SchemaEnv=In;function Xl(t){let e=hb.call(this,t);if(e)return e;let r=(0,Et.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new kt.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;t.$async&&(a=i.scopeValue("Error",{ref:pR.default,code:(0,kt._)`require("ajv/dist/runtime/validation_error").default`}));let c=i.scopeName("validate");t.validateName=c;let u={gen:i,allErrors:this.opts.allErrors,data:Gr.default.data,parentData:Gr.default.parentData,parentDataProperty:Gr.default.parentDataProperty,dataNames:[Gr.default.data],dataPathArr:[kt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,kt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:kt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,kt._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,mR.validateFunctionCode)(u),i.optimize(this.opts.code.optimize);let d=i.toString();l=`${i.scopeRefs(Gr.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let m=new Function(`${Gr.default.self}`,`${Gr.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:i._values}),this.opts.unevaluated){let{props:f,items:h}=u;m.evaluated={props:f instanceof kt.Name?void 0:f,items:h instanceof kt.Name?void 0:h,dynamicProps:f instanceof kt.Name,dynamicItems:h instanceof kt.Name},m.source&&(m.source.evaluated=(0,kt.stringify)(m.evaluated))}return t.validate=m,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=Xl;function hR(t,e,r){var n;r=(0,Et.resolveUrl)(this.opts.uriResolver,e,r);let o=t.refs[r];if(o)return o;let s=_R.call(this,t,r);if(s===void 0){let i=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;i&&(s=new In({schema:i,schemaId:a,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=gR.call(this,s)}pt.resolveRef=hR;function gR(t){return(0,Et.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Xl.call(this,t)}function hb(t){for(let e of this._compilations)if(yR(e,t))return e}pt.getCompilingSchema=hb;function yR(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function _R(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||ia.call(this,t,e)}function ia(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Et._getFullPath)(this.opts.uriResolver,r),o=(0,Et.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===o)return Ql.call(this,r,t);let s=(0,Et.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=ia.call(this,t,i);return typeof a?.schema!="object"?void 0:Ql.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Xl.call(this,i),s===(0,Et.normalizeId)(e)){let{schema:a}=i,{schemaId:c}=this.opts,u=a[c];return u&&(o=(0,Et.resolveUrl)(this.opts.uriResolver,o,u)),new In({schema:a,schemaId:c,root:t,baseId:o})}return Ql.call(this,r,i)}}pt.resolveSchema=ia;var vR=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ql(t,{baseId:e,schema:r,root:n}){var o;if(((o=t.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,mb.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!vR.has(a)&&u&&(e=(0,Et.resolveUrl)(this.opts.uriResolver,e,u))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,mb.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Et.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=ia.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new In({schema:r,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var gb=$((P9,bR)=>{bR.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 nd=$((T9,wb)=>{"use strict";var wR=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),_b=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),ca=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),ed=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),xR=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu),SR=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/?]$/iu);function td(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var $R=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function yb(t){return t.length=0,!0}function kR(t,e,r){if(t.length){let n=td(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function ER(t){let e=0,r={error:!1,address:"",zone:""},n=[],o=[],s=!1,i=!1,a=kR;for(let c=0;c<t.length;c++){let u=t[c];if(!(u==="["||u==="]"))if(u===":"){if(s===!0&&(i=!0),!a(o,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(s=!0),n.push(":");continue}else if(u==="%"){if(!a(o,n,r))break;a=yb}else{o.push(u);continue}}return o.length&&(a===yb?r.zone=o.join(""):i?n.push(o.join("")):n.push(td(o))),r.address=n.join(""),r}function vb(t){if(zR(t,":")<2)return{host:t,isIPV6:!1};let e=ER(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function zR(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function PR(t){let e=t,r=[],n=-1,o=0;for(;o=e.length;){if(o===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(o===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){r.push("/");break}}else if(o===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((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var TR={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},CR=/[@/?#:]/g,OR=/[@/?#]/g;function bb(t,e){let r=e?OR:CR;return r.lastIndex=0,t.replace(r,n=>TR[n])}function IR(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let o=t.slice(n+1,n+3);if(ca(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));e&&ed(i)?r+=i:r+="%"+s,n+=2;continue}}r+=t[n]}return r}var ot=new Array(256);{let t="0123456789ABCDEF";for(let e=0;e<256;e++)ot[e]="%"+t[e>>4]+t[e&15]}function rd(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===42||t===43||t===45||t===46||t===47||t===64||t===95}function mt(t){return t<2048?ot[192|t>>6]+ot[128|t&63]:t<65536?ot[224|t>>12]+ot[128|t>>6&63]+ot[128|t&63]:ot[240|t>>18]+ot[128|t>>12&63]+ot[128|t>>6&63]+ot[128|t&63]}function RR(t){let e="";for(let r=0;r<t.length;r++){let n=t[r];if(n==="%"&&r+2<t.length){let o=t.slice(r+1,r+3);if(ca(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));i!=="."&&ed(i)?e+=i:e+="%"+s,r+=2;continue}}if(xR(n))e+=n;else{let o=t.charCodeAt(r);if(o<128)e+=rd(o)?n:ot[o];else if(o<55296||o>57343)e+=mt(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(e+=mt(65536+(o-55296<<10)+(s-56320)),r++):e+=mt(65533)}else e+=mt(65533)}}return e}function DR(t){let e="";for(let r=0;r<t.length;r++){let n=t[r];if(n==="%"&&r+2<t.length){let o=t.slice(r+1,r+3);if(ca(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));ed(i)?e+=i:e+="%"+s,r+=2;continue}}if(SR(n))e+=n;else{let o=t.charCodeAt(r);if(o<128)e+=rd(o)?n:ot[o];else if(o<55296||o>57343)e+=mt(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(e+=mt(65536+(o-55296<<10)+(s-56320)),r++):e+=mt(65533)}else e+=mt(65533)}}return e}function NR(t){let e="";for(let r=0;r<t.length;r++){let n=t[r];if(n==="%"&&r+2<t.length){let s=t.slice(r+1,r+3);if(ca(s)){e+="%"+s.toUpperCase(),r+=2;continue}}let o=t.charCodeAt(r);if(o<128)e+=rd(o)?n:ot[o];else if(o<55296||o>57343)e+=mt(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(e+=mt(65536+(o-55296<<10)+(s-56320)),r++):e+=mt(65533)}else e+=mt(65533)}return e}function AR(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!_b(r)){let n=vb(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=bb(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}wb.exports={nonSimpleDomain:$R,recomposeAuthority:AR,reescapeHostDelimiters:bb,normalizePercentEncoding:IR,normalizePathEncoding:RR,normalizeQueryFragmentEncoding:DR,escapePreservingEscapes:NR,removeDotSegments:PR,isIPv4:_b,isUUID:wR,normalizeIPv6:vb,stringArrayToHexStripped:td}});var Eb=$((C9,kb)=>{"use strict";var{isUUID:jR}=nd(),MR=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,ZR=["http","https","ws","wss","urn","urn:uuid"];function LR(t){return ZR.indexOf(t)!==-1}function od(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 xb(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Sb(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 qR(t){return t.secure=od(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function FR(t){if((t.port===(od(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 UR(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(MR);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let o=`${n}:${e.nid||t.nid}`,s=sd(o);t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function VR(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),o=`${r}:${e.nid||n}`,s=sd(o);s&&(t=s.serialize(t,e));let i=t,a=t.nss;return i.path=`${n||e.nid}:${a}`,e.skipEscape=!0,i}function BR(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!jR(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function HR(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var $b={scheme:"http",domainHost:!0,parse:xb,serialize:Sb},WR={scheme:"https",domainHost:$b.domainHost,parse:xb,serialize:Sb},ua={scheme:"ws",domainHost:!0,parse:qR,serialize:FR},GR={scheme:"wss",domainHost:ua.domainHost,parse:ua.parse,serialize:ua.serialize},JR={scheme:"urn",parse:UR,serialize:VR,skipNormalize:!0},KR={scheme:"urn:uuid",parse:BR,serialize:HR,skipNormalize:!0},la={http:$b,https:WR,ws:ua,wss:GR,urn:JR,"urn:uuid":KR};Object.setPrototypeOf(la,null);function sd(t){return t&&(la[t]||la[t.toLowerCase()])||void 0}kb.exports={wsIsSecure:od,SCHEMES:la,isValidSchemeName:LR,getSchemeHandler:sd}});var Ib=$((O9,pa)=>{"use strict";var{normalizeIPv6:YR,removeDotSegments:is,recomposeAuthority:QR,normalizePercentEncoding:XR,normalizePathEncoding:eD,normalizeQueryFragmentEncoding:zb,escapePreservingEscapes:tD,reescapeHostDelimiters:rD,isIPv4:nD,nonSimpleDomain:oD}=nd(),{SCHEMES:sD,getSchemeHandler:Tb}=Eb();function iD(t,e){return typeof t=="string"?t=pD(t,e):typeof t=="object"&&(t=fa(Jr(t,e),e)),t}function aD(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:o,malformedAuthorityOrPort:s}=da(t,n),{parsed:i,malformedAuthorityOrPort:a}=da(e,n);if(s||a)throw new Error(o.error||i.error||"URI is malformed.");let c=Cb(o,i,n,!0);return n.skipEscape=!0,Jr(c,n)}function Cb(t,e,r,n){let o={};return n||(t=fa(Jr(t,r),r),e=fa(Jr(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(o.scheme=e.scheme,o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=is(e.path||""),o.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=is(e.path||""),o.query=e.query):(e.path?(e.path[0]==="/"?o.path=is(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?o.path="/"+e.path:t.path?o.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:o.path=e.path,o.path=is(o.path)),o.query=e.query):(o.path=t.path,e.query!==void 0?o.query=e.query:o.query=t.query),o.userinfo=t.userinfo,o.host=t.host,o.port=t.port),o.scheme=t.scheme),o.fragment=e.fragment,o}function cD(t,e,r){let n=Pb(t,r),o=Pb(e,r);return n!==void 0&&o!==void 0&&n.toLowerCase()===o.toLowerCase()}function Jr(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:""},n=Object.assign({},e),o=[],s=Tb(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=XR(r.path):(r.path=tD(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let i=QR(r);if(i!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(i),r.path&&r.path[0]!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=is(a)),i===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var uD=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,lD=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,dD=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function fD(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 da(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1,s=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let i=t.match(lD);i!==null&&i[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",o=!0);let a=t.match(dD);if(a!==null){let u=a[1],l=u.replace(/[\t\n\r]/g,"");l.length>=2&&(l.slice(0,2)!=="//"?(n.error=n.error||"URI authority must not contain a literal backslash.",o=!0):u.length!==l.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",o=!0))}let c=t.match(uD);if(c){n.scheme=c[1]===void 0?void 0:c[1].toLowerCase(),n.userinfo=c[3],n.host=c[4],n.port=parseInt(c[5],10),n.path=c[6]||"",n.query=c[7],n.fragment=c[8],isNaN(n.port)&&(n.port=c[5]);let u=fD(n,c);if(u!==void 0&&(n.error=n.error||u,o=!0),n.host)if(nD(n.host)===!1){let p=YR(n.host);n.host=p.host.toLowerCase(),s=p.isIPV6}else s=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=Tb(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&s===!1&&oD(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(d){n.error=n.error||"Host's domain name can not be converted to ASCII: "+d}(!l||l&&!l.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=rD(unescape(n.host),s))),n.path&&(n.path=eD(n.path)),n.query&&(n.query=zb(n.query)),n.fragment&&(n.fragment=zb(n.fragment))),l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:o}}function fa(t,e){return da(t,e).parsed}function pD(t,e){return Ob(t,e).normalized}function Ob(t,e){let{parsed:r,malformedAuthorityOrPort:n}=da(t,e);return{normalized:n?t:Jr(r,e),malformedAuthorityOrPort:n}}function Pb(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Ob(t,e);return n?void 0:r}if(typeof t=="object")return Jr(t,e)}var id={SCHEMES:sD,normalize:iD,resolve:aD,resolveComponent:Cb,equal:cD,serialize:Jr,parse:fa};pa.exports=id;pa.exports.default=id;pa.exports.fastUri=id});var Db=$(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var Rb=Ib();Rb.code='require("ajv/dist/runtime/uri").default';ad.default=Rb});var Fb=$(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.CodeGen=Re.Name=Re.nil=Re.stringify=Re.str=Re._=Re.KeywordCxt=void 0;var mD=os();Object.defineProperty(Re,"KeywordCxt",{enumerable:!0,get:function(){return mD.KeywordCxt}});var Rn=F();Object.defineProperty(Re,"_",{enumerable:!0,get:function(){return Rn._}});Object.defineProperty(Re,"str",{enumerable:!0,get:function(){return Rn.str}});Object.defineProperty(Re,"stringify",{enumerable:!0,get:function(){return Rn.stringify}});Object.defineProperty(Re,"nil",{enumerable:!0,get:function(){return Rn.nil}});Object.defineProperty(Re,"Name",{enumerable:!0,get:function(){return Rn.Name}});Object.defineProperty(Re,"CodeGen",{enumerable:!0,get:function(){return Rn.CodeGen}});var hD=sa(),Zb=ss(),gD=Dl(),as=aa(),yD=F(),cs=ts(),ma=es(),ud=Q(),Nb=gb(),_D=Db(),Lb=(t,e)=>new RegExp(t,e);Lb.code="new RegExp";var vD=["removeAdditional","useDefaults","coerceTypes"],bD=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),wD={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."},xD={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ab=200;function SD(t){var e,r,n,o,s,i,a,c,u,l,d,p,m,f,h,g,_,x,w,S,k,W,Z,re,U;let me=t.strict,Ee=(e=t.code)===null||e===void 0?void 0:e.optimize,xe=Ee===!0||Ee===void 0?1:Ee||0,Ze=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Lb,Be=(o=t.uriResolver)!==null&&o!==void 0?o:_D.default;return{strictSchema:(i=(s=t.strictSchema)!==null&&s!==void 0?s:me)!==null&&i!==void 0?i:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:me)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:me)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=t.strictTuples)!==null&&d!==void 0?d:me)!==null&&p!==void 0?p:"log",strictRequired:(f=(m=t.strictRequired)!==null&&m!==void 0?m:me)!==null&&f!==void 0?f:!1,code:t.code?{...t.code,optimize:xe,regExp:Ze}:{optimize:xe,regExp:Ze},loopRequired:(h=t.loopRequired)!==null&&h!==void 0?h:Ab,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:Ab,meta:(_=t.meta)!==null&&_!==void 0?_:!0,messages:(x=t.messages)!==null&&x!==void 0?x:!0,inlineRefs:(w=t.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(S=t.schemaId)!==null&&S!==void 0?S:"$id",addUsedSchema:(k=t.addUsedSchema)!==null&&k!==void 0?k:!0,validateSchema:(W=t.validateSchema)!==null&&W!==void 0?W:!0,validateFormats:(Z=t.validateFormats)!==null&&Z!==void 0?Z:!0,unicodeRegExp:(re=t.unicodeRegExp)!==null&&re!==void 0?re:!0,int32range:(U=t.int32range)!==null&&U!==void 0?U:!0,uriResolver:Be}}var us=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,...SD(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new yD.ValueScope({scope:{},prefixes:bD,es5:r,lines:n}),this.logger=TD(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,gD.getRules)(),jb.call(this,wD,e,"NOT SUPPORTED"),jb.call(this,xD,e,"DEPRECATED","warn"),this._metaOpts=zD.call(this),e.formats&&kD.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&ED.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),$D.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,o=Nb;n==="id"&&(o={...Nb},o.id=o.$id,delete o.$id),r&&e&&this.addMetaSchema(o,o[n],!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 n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,e,r);async function o(l,d){await s.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||i.call(this,p)}async function s(l){l&&!this.getSchema(l)&&await o.call(this,{$ref:l},!0)}async function i(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof Zb.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),i.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 s.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]=n(l))}finally{delete this._loading[l]}}}addSchema(e,r,n,o=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,o);return this}let s;if(typeof e=="object"){let{schemaId:i}=this.opts;if(s=e[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return r=(0,cs.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,o,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,e);if(!o&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return o}getSchema(e){let r;for(;typeof(r=Mb.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,o=new as.SchemaEnv({schema:{},schemaId:n});if(r=as.resolveSchema.call(this,o,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=Mb.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 n=e[this.opts.schemaId];return n&&(n=(0,cs.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),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 n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(OD.call(this,n,r),!r)return(0,ud.eachItem)(n,s=>cd.call(this,s)),this;RD.call(this,r);let o={...r,type:(0,ma.getJSONTypes)(r.type),schemaType:(0,ma.getJSONTypes)(r.schemaType)};return(0,ud.eachItem)(n,o.type.length===0?s=>cd.call(this,s,o):s=>o.type.forEach(i=>cd.call(this,s,o,i))),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 n of r.rules){let o=n.rules.findIndex(s=>s.keyword===e);o>=0&&n.rules.splice(o,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:n="data"}={}){return!e||e.length===0?"No errors":e.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,s)=>o+r+s)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let o of r){let s=o.split("/").slice(1),i=e;for(let a of s)i=i[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:u}=c.definition,l=i[a];u&&l&&(i[a]=qb(l))}}return e}_removeAllSchemas(e,r){for(let n in e){let o=e[n];(!r||r.test(n))&&(typeof o=="string"?delete e[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete e[n]))}}_addSchema(e,r,n,o=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof e=="object")i=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;n=(0,cs.normalizeId)(i||n);let u=cs.getSchemaRefs.call(this,e,n);return c=new as.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),o&&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):as.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{as.compileSchema.call(this,e)}finally{this.opts=r}}};us.ValidationError=hD.default;us.MissingRefError=Zb.default;Re.default=us;function jb(t,e,r,n="error"){for(let o in t){let s=o;s in e&&this.logger[n](`${r}: option ${o}. ${t[s]}`)}}function Mb(t){return t=(0,cs.normalizeId)(t),this.schemas[t]||this.refs[t]}function $D(){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 kD(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function ED(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 zD(){let t={...this.opts};for(let e of vD)delete t[e];return t}var PD={log(){},warn(){},error(){}};function TD(t){if(t===!1)return PD;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 CD=/^[a-z_$][a-z0-9_$:-]*$/i;function OD(t,e){let{RULES:r}=this;if((0,ud.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!CD.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function cd(t,e,r){var n;let o=e?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=o?s.post:s.rules.find(({type:c})=>c===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,ma.getJSONTypes)(e.type),schemaType:(0,ma.getJSONTypes)(e.schemaType)}};e.before?ID.call(this,i,a,e.before):i.rules.push(a),s.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function ID(t,e,r){let n=t.rules.findIndex(o=>o.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function RD(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=qb(e)),t.validateSchema=this.compile(e,!0))}var DD={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function qb(t){return{anyOf:[t,DD]}}});var Ub=$(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var ND={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};ld.default=ND});var Wb=$(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.callRef=Kr.getValidate=void 0;var AD=ss(),Vb=ft(),Ye=F(),Dn=Gt(),Bb=aa(),ha=Q(),jD={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:c}=n,{root:u}=s;if((r==="#"||r==="#/")&&o===u.baseId)return d();let l=Bb.resolveRef.call(c,u,o,r);if(l===void 0)throw new AD.default(n.opts.uriResolver,o,r);if(l instanceof Bb.SchemaEnv)return p(l);return m(l);function d(){if(s===u)return ga(t,i,s,s.$async);let f=e.scopeValue("root",{ref:u});return ga(t,(0,Ye._)`${f}.validate`,u,u.$async)}function p(f){let h=Hb(t,f);ga(t,h,f,f.$async)}function m(f){let h=e.scopeValue("schema",a.code.source===!0?{ref:f,code:(0,Ye.stringify)(f)}:{ref:f}),g=e.name("valid"),_=t.subschema({schema:f,dataTypes:[],schemaPath:Ye.nil,topSchemaRef:h,errSchemaPath:r},g);t.mergeEvaluated(_),t.ok(g)}}};function Hb(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ye._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Kr.getValidate=Hb;function ga(t,e,r,n){let{gen:o,it:s}=t,{allErrors:i,schemaEnv:a,opts:c}=s,u=c.passContext?Dn.default.this:Ye.nil;n?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let f=o.let("valid");o.try(()=>{o.code((0,Ye._)`await ${(0,Vb.callValidateCode)(t,e,u)}`),m(e),i||o.assign(f,!0)},h=>{o.if((0,Ye._)`!(${h} instanceof ${s.ValidationError})`,()=>o.throw(h)),p(h),i||o.assign(f,!1)}),t.ok(f)}function d(){t.result((0,Vb.callValidateCode)(t,e,u),()=>m(e),()=>p(e))}function p(f){let h=(0,Ye._)`${f}.errors`;o.assign(Dn.default.vErrors,(0,Ye._)`${Dn.default.vErrors} === null ? ${h} : ${Dn.default.vErrors}.concat(${h})`),o.assign(Dn.default.errors,(0,Ye._)`${Dn.default.vErrors}.length`)}function m(f){var h;if(!s.opts.unevaluated)return;let g=(h=r?.validate)===null||h===void 0?void 0:h.evaluated;if(s.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(s.props=ha.mergeEvaluated.props(o,g.props,s.props));else{let _=o.var("props",(0,Ye._)`${f}.evaluated.props`);s.props=ha.mergeEvaluated.props(o,_,s.props,Ye.Name)}if(s.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(s.items=ha.mergeEvaluated.items(o,g.items,s.items));else{let _=o.var("items",(0,Ye._)`${f}.evaluated.items`);s.items=ha.mergeEvaluated.items(o,_,s.items,Ye.Name)}}}Kr.callRef=ga;Kr.default=jD});var Gb=$(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var MD=Ub(),ZD=Wb(),LD=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",MD.default,ZD.default];dd.default=LD});var Jb=$(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var ya=F(),hr=ya.operators,_a={maximum:{okStr:"<=",ok:hr.LTE,fail:hr.GT},minimum:{okStr:">=",ok:hr.GTE,fail:hr.LT},exclusiveMaximum:{okStr:"<",ok:hr.LT,fail:hr.GTE},exclusiveMinimum:{okStr:">",ok:hr.GT,fail:hr.LTE}},qD={message:({keyword:t,schemaCode:e})=>(0,ya.str)`must be ${_a[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ya._)`{comparison: ${_a[t].okStr}, limit: ${e}}`},FD={keyword:Object.keys(_a),type:"number",schemaType:"number",$data:!0,error:qD,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,ya._)`${r} ${_a[e].fail} ${n} || isNaN(${r})`)}};fd.default=FD});var Kb=$(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var ls=F(),UD={message:({schemaCode:t})=>(0,ls.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ls._)`{multipleOf: ${t}}`},VD={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:UD,code(t){let{gen:e,data:r,schemaCode:n,it:o}=t,s=o.opts.multipleOfPrecision,i=e.let("res"),a=s?(0,ls._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,ls._)`${i} !== parseInt(${i})`;t.fail$data((0,ls._)`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};pd.default=VD});var Qb=$(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});function Yb(t){let e=t.length,r=0,n=0,o;for(;n<e;)r++,o=t.charCodeAt(n++),o>=55296&&o<=56319&&n<e&&(o=t.charCodeAt(n),(o&64512)===56320&&n++);return r}md.default=Yb;Yb.code='require("ajv/dist/runtime/ucs2length").default'});var Xb=$(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var Yr=F(),BD=Q(),HD=Qb(),WD={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Yr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Yr._)`{limit: ${t}}`},GD={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:WD,code(t){let{keyword:e,data:r,schemaCode:n,it:o}=t,s=e==="maxLength"?Yr.operators.GT:Yr.operators.LT,i=o.opts.unicode===!1?(0,Yr._)`${r}.length`:(0,Yr._)`${(0,BD.useFunc)(t.gen,HD.default)}(${r})`;t.fail$data((0,Yr._)`${i} ${s} ${n}`)}};hd.default=GD});var ew=$(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});var JD=ft(),KD=Q(),Nn=F(),YD={message:({schemaCode:t})=>(0,Nn.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Nn._)`{pattern: ${t}}`},QD={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:YD,code(t){let{gen:e,data:r,$data:n,schema:o,schemaCode:s,it:i}=t,a=i.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=i.opts.code,u=c.code==="new RegExp"?(0,Nn._)`new RegExp`:(0,KD.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,Nn._)`${u}(${s}, ${a}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,Nn._)`!${l}`)}else{let c=(0,JD.usePattern)(t,o);t.fail$data((0,Nn._)`!${c}.test(${r})`)}}};gd.default=QD});var tw=$(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var ds=F(),XD={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,ds.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,ds._)`{limit: ${t}}`},eN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:XD,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxProperties"?ds.operators.GT:ds.operators.LT;t.fail$data((0,ds._)`Object.keys(${r}).length ${o} ${n}`)}};yd.default=eN});var rw=$(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var fs=ft(),ps=F(),tN=Q(),rN={message:({params:{missingProperty:t}})=>(0,ps.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,ps._)`{missingProperty: ${t}}`},nN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:rN,code(t){let{gen:e,schema:r,schemaCode:n,data:o,$data:s,it:i}=t,{opts:a}=i;if(!s&&r.length===0)return;let c=r.length>=a.loopRequired;if(i.allErrors?u():l(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:f}=t.it;for(let h of r)if(m?.[h]===void 0&&!f.has(h)){let g=i.schemaEnv.baseId+i.errSchemaPath,_=`required property "${h}" is not defined at "${g}" (strictRequired)`;(0,tN.checkStrictMode)(i,_,i.opts.strictRequired)}}function u(){if(c||s)t.block$data(ps.nil,d);else for(let m of r)(0,fs.checkReportMissingProp)(t,m)}function l(){let m=e.let("missing");if(c||s){let f=e.let("valid",!0);t.block$data(f,()=>p(m,f)),t.ok(f)}else e.if((0,fs.checkMissingProp)(t,r,m)),(0,fs.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,fs.noPropertyInData)(e,o,m,a.ownProperties),()=>t.error())})}function p(m,f){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(f,(0,fs.propertyInData)(e,o,m,a.ownProperties)),e.if((0,ps.not)(f),()=>{t.error(),e.break()})},ps.nil)}}};_d.default=nN});var nw=$(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});var ms=F(),oN={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,ms.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,ms._)`{limit: ${t}}`},sN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:oN,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxItems"?ms.operators.GT:ms.operators.LT;t.fail$data((0,ms._)`${r}.length ${o} ${n}`)}};vd.default=sN});var va=$(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var ow=Fl();ow.code='require("ajv/dist/runtime/equal").default';bd.default=ow});var sw=$(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});var wd=es(),De=F(),iN=Q(),aN=va(),cN={message:({params:{i:t,j:e}})=>(0,De.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,De._)`{i: ${t}, j: ${e}}`},uN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:cN,code(t){let{gen:e,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=t;if(!n&&!o)return;let c=e.let("valid"),u=s.items?(0,wd.getSchemaTypes)(s.items):[];t.block$data(c,l,(0,De._)`${i} === false`),t.ok(c);function l(){let f=e.let("i",(0,De._)`${r}.length`),h=e.let("j");t.setParams({i:f,j:h}),e.assign(c,!0),e.if((0,De._)`${f} > 1`,()=>(d()?p:m)(f,h))}function d(){return u.length>0&&!u.some(f=>f==="object"||f==="array")}function p(f,h){let g=e.name("item"),_=(0,wd.checkDataTypes)(u,g,a.opts.strictNumbers,wd.DataType.Wrong),x=e.const("indices",(0,De._)`{}`);e.for((0,De._)`;${f}--;`,()=>{e.let(g,(0,De._)`${r}[${f}]`),e.if(_,(0,De._)`continue`),u.length>1&&e.if((0,De._)`typeof ${g} == "string"`,(0,De._)`${g} += "_"`),e.if((0,De._)`typeof ${x}[${g}] == "number"`,()=>{e.assign(h,(0,De._)`${x}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,De._)`${x}[${g}] = ${f}`)})}function m(f,h){let g=(0,iN.useFunc)(e,aN.default),_=e.name("outer");e.label(_).for((0,De._)`;${f}--;`,()=>e.for((0,De._)`${h} = ${f}; ${h}--;`,()=>e.if((0,De._)`${g}(${r}[${f}], ${r}[${h}])`,()=>{t.error(),e.assign(c,!1).break(_)})))}}};xd.default=uN});var iw=$($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});var Sd=F(),lN=Q(),dN=va(),fN={message:"must be equal to constant",params:({schemaCode:t})=>(0,Sd._)`{allowedValue: ${t}}`},pN={keyword:"const",$data:!0,error:fN,code(t){let{gen:e,data:r,$data:n,schemaCode:o,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,Sd._)`!${(0,lN.useFunc)(e,dN.default)}(${r}, ${o})`):t.fail((0,Sd._)`${s} !== ${r}`)}};$d.default=pN});var aw=$(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var hs=F(),mN=Q(),hN=va(),gN={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,hs._)`{allowedValues: ${t}}`},yN={keyword:"enum",schemaType:"array",$data:!0,error:gN,code(t){let{gen:e,data:r,$data:n,schema:o,schemaCode:s,it:i}=t;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=i.opts.loopEnum,c,u=()=>c??(c=(0,mN.useFunc)(e,hN.default)),l;if(a||n)l=e.let("valid"),t.block$data(l,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let m=e.const("vSchema",s);l=(0,hs.or)(...o.map((f,h)=>p(m,h)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",s,m=>e.if((0,hs._)`${u()}(${r}, ${m})`,()=>e.assign(l,!0).break()))}function p(m,f){let h=o[f];return typeof h=="object"&&h!==null?(0,hs._)`${u()}(${r}, ${m}[${f}])`:(0,hs._)`${r} === ${h}`}}};kd.default=yN});var cw=$(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});var _N=Jb(),vN=Kb(),bN=Xb(),wN=ew(),xN=tw(),SN=rw(),$N=nw(),kN=sw(),EN=iw(),zN=aw(),PN=[_N.default,vN.default,bN.default,wN.default,xN.default,SN.default,$N.default,kN.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},EN.default,zN.default];Ed.default=PN});var Pd=$(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.validateAdditionalItems=void 0;var Qr=F(),zd=Q(),TN={message:({params:{len:t}})=>(0,Qr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Qr._)`{limit: ${t}}`},CN={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:TN,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,zd.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}uw(t,n)}};function uw(t,e){let{gen:r,schema:n,data:o,keyword:s,it:i}=t;i.items=!0;let a=r.const("len",(0,Qr._)`${o}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Qr._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,zd.alwaysValidSchema)(i,n)){let u=r.var("valid",(0,Qr._)`${a} <= ${e.length}`);r.if((0,Qr.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,a,l=>{t.subschema({keyword:s,dataProp:l,dataPropType:zd.Type.Num},u),i.allErrors||r.if((0,Qr.not)(u),()=>r.break())})}}gs.validateAdditionalItems=uw;gs.default=CN});var Td=$(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.validateTuple=void 0;var lw=F(),ba=Q(),ON=ft(),IN={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return dw(t,"additionalItems",e);r.items=!0,!(0,ba.alwaysValidSchema)(r,e)&&t.ok((0,ON.validateArray)(t))}};function dw(t,e,r=t.schema){let{gen:n,parentSchema:o,data:s,keyword:i,it:a}=t;l(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=ba.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,lw._)`${s}.length`);r.forEach((d,p)=>{(0,ba.alwaysValidSchema)(a,d)||(n.if((0,lw._)`${u} > ${p}`,()=>t.subschema({keyword:i,schemaProp:p,dataProp:p},c)),t.ok(c))});function l(d){let{opts:p,errSchemaPath:m}=a,f=r.length,h=f===d.minItems&&(f===d.maxItems||d[e]===!1);if(p.strictTuples&&!h){let g=`"${i}" is ${f}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,ba.checkStrictMode)(a,g,p.strictTuples)}}}ys.validateTuple=dw;ys.default=IN});var fw=$(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});var RN=Td(),DN={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,RN.validateTuple)(t,"items")};Cd.default=DN});var mw=$(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var pw=F(),NN=Q(),AN=ft(),jN=Pd(),MN={message:({params:{len:t}})=>(0,pw.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,pw._)`{limit: ${t}}`},ZN={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:MN,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:o}=r;n.items=!0,!(0,NN.alwaysValidSchema)(n,e)&&(o?(0,jN.validateAdditionalItems)(t,o):t.ok((0,AN.validateArray)(t)))}};Od.default=ZN});var hw=$(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});var ht=F(),wa=Q(),LN={message:({params:{min:t,max:e}})=>e===void 0?(0,ht.str)`must contain at least ${t} valid item(s)`:(0,ht.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ht._)`{minContains: ${t}}`:(0,ht._)`{minContains: ${t}, maxContains: ${e}}`},qN={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:LN,code(t){let{gen:e,schema:r,parentSchema:n,data:o,it:s}=t,i,a,{minContains:c,maxContains:u}=n;s.opts.next?(i=c===void 0?1:c,a=u):i=1;let l=e.const("len",(0,ht._)`${o}.length`);if(t.setParams({min:i,max:a}),a===void 0&&i===0){(0,wa.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,wa.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,wa.alwaysValidSchema)(s,r)){let h=(0,ht._)`${l} >= ${i}`;a!==void 0&&(h=(0,ht._)`${h} && ${l} <= ${a}`),t.pass(h);return}s.items=!0;let d=e.name("valid");a===void 0&&i===1?m(d,()=>e.if(d,()=>e.break())):i===0?(e.let(d,!0),a!==void 0&&e.if((0,ht._)`${o}.length > 0`,p)):(e.let(d,!1),p()),t.result(d,()=>t.reset());function p(){let h=e.name("_valid"),g=e.let("count",0);m(h,()=>e.if(h,()=>f(g)))}function m(h,g){e.forRange("i",0,l,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:wa.Type.Num,compositeRule:!0},h),g()})}function f(h){e.code((0,ht._)`${h}++`),a===void 0?e.if((0,ht._)`${h} >= ${i}`,()=>e.assign(d,!0).break()):(e.if((0,ht._)`${h} > ${a}`,()=>e.assign(d,!1).break()),i===1?e.assign(d,!0):e.if((0,ht._)`${h} >= ${i}`,()=>e.assign(d,!0)))}}};Id.default=qN});var _w=$(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.validateSchemaDeps=Dt.validatePropertyDeps=Dt.error=void 0;var Rd=F(),FN=Q(),_s=ft();Dt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Rd.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Rd._)`{property: ${t},
29
- missingProperty: ${n},
24
+ `),Gr=cU.bind(null,{[kI]:"",[II]:a,[zI]:Ie,[PI]:tv,[rv]:F,[EI]:se}),xd="";d!==null&&(p===void 0?xd=Gr(d):xd=Gr(Object.assign({},d,{name:p})));let z_=s instanceof Function?s:s?NI:DU,hD=z_().indexOf(":")+1;if(v&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(g&&typeof g!="function")throw Error(`Unknown mixin type "${typeof g}" - expected "function"`);if(A&&typeof A!="string")throw Error(`Unknown msgPrefix type "${typeof A}" - expected "string"`);rU(m,f,v);let uo=CI(f,v);if(i&&i[EU]===!0){let lo=typeof m=="string"?m:void 0;(!lo||uo[lo]===void 0)&&(lo=Object.keys(uo)[0]);let E_=uo[lo],Sd=!1;try{let kd=b.level(lo,E_);Sd=kd&&typeof kd=="object"&&kd.level===E_}catch{Sd=!1}Sd||process.emitWarning('custom formatters.level detected with multiple transport targets/pipelines; ensure logs include a numeric "level" field or they may be dropped',{code:"PINO_TRANSPORT_MULTI_TARGETS_LEVEL_FORMATTER"})}typeof i.emit=="function"&&i.emit("message",{code:"PINO_CONFIG",config:{levels:uo,messageKey:c,errorKey:u}}),oU(h);let gD=iU(h);return Object.assign(e,{levels:uo,[xU]:gD,[SU]:v,[hU]:i,[pU]:z_,[mU]:hD,[PI]:tv,[rv]:F,[zI]:Ie,[yU]:ft,[vU]:Me,[bU]:c,[_U]:u,[$U]:l,[IU]:l?`,${JSON.stringify(l)}:{`:"",[II]:a,[wU]:g,[PU]:y,[kI]:xd,[EI]:se,[kU]:_,silent:lU,onChild:D,[zU]:A}),Object.setPrototypeOf(e,eU()),nU(e),e[gU](m),e}Dt.exports=nv;Dt.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=SI(t.dest||process.stdout.fd),xI(t)):xI({dest:SI(t),minLength:0});Dt.exports.transport=Ly();Dt.exports.multistream=wI();Dt.exports.levels=CI();Dt.exports.stdSerializers=jU;Dt.exports.stdTimeFunctions=Object.assign({},OI);Dt.exports.symbols=TI;Dt.exports.version=dU;Dt.exports.default=nv;Dt.exports.pino=nv});var Va=T(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.regexpCode=ae.getEsmExportName=ae.getProperty=ae.safeStringify=ae.stringify=ae.strConcat=ae.addCodeArg=ae.str=ae._=ae.nil=ae._Code=ae.Name=ae.IDENTIFIER=ae._CodeOrName=void 0;var Za=class{};ae._CodeOrName=Za;ae.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Sn=class extends Za{constructor(e){if(super(),!ae.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}}};ae.Name=Sn;var Ct=class extends Za{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((n,i)=>`${n}${i}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,i)=>(i instanceof Sn&&(n[i.str]=(n[i.str]||0)+1),n),{})}};ae._Code=Ct;ae.nil=new Ct("");function nP(t,...e){let n=[t[0]],i=0;for(;i<e.length;)zv(n,e[i]),n.push(t[++i]);return new Ct(n)}ae._=nP;var Pv=new Ct("+");function iP(t,...e){let n=[qa(t[0])],i=0;for(;i<e.length;)n.push(Pv),zv(n,e[i]),n.push(Pv,qa(t[++i]));return k6(n),new Ct(n)}ae.str=iP;function zv(t,e){e instanceof Ct?t.push(...e._items):e instanceof Sn?t.push(e):t.push(z6(e))}ae.addCodeArg=zv;function k6(t){let e=1;for(;e<t.length-1;){if(t[e]===Pv){let n=I6(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function I6(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Sn||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 Sn))return`"${t}${e.slice(1)}`}function P6(t,e){return e.emptyStr()?t:t.emptyStr()?e:iP`${t}${e}`}ae.strConcat=P6;function z6(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:qa(Array.isArray(t)?t.join(","):t)}function E6(t){return new Ct(qa(t))}ae.stringify=E6;function qa(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ae.safeStringify=qa;function D6(t){return typeof t=="string"&&ae.IDENTIFIER.test(t)?new Ct(`.${t}`):nP`[${t}]`}ae.getProperty=D6;function O6(t){if(typeof t=="string"&&ae.IDENTIFIER.test(t))return new Ct(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}ae.getEsmExportName=O6;function T6(t){return new Ct(t.toString())}ae.regexpCode=T6});var Ov=T(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.ValueScope=bt.ValueScopeName=bt.Scope=bt.varKinds=bt.UsedValueState=void 0;var vt=Va(),Ev=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Il;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Il||(bt.UsedValueState=Il={}));bt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var Pl=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof vt.Name?e:this.name(e)}name(e){return new vt.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,i;if(!((i=(n=this._parent)===null||n===void 0?void 0:n._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}}};bt.Scope=Pl;var zl=class extends vt.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:i}){this.value=e,this.scopePath=(0,vt._)`.${new vt.Name(n)}[${i}]`}};bt.ValueScopeName=zl;var C6=(0,vt._)`\n`,Dv=class extends Pl{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?C6:vt.nil}}get(){return this._scope}name(e){return new zl(e,this._newName(e))}value(e,n){var i;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(e),{prefix:o}=r,a=(i=n.key)!==null&&i!==void 0?i:n.ref,s=this._values[o];if(s){let l=s.get(a);if(l)return l}else s=this._values[o]=new Map;s.set(a,r);let c=this._scope[o]||(this._scope[o]=[]),u=c.length;return c[u]=n.ref,r.setValue(n,{property:o,itemIndex:u}),r}getValue(e,n){let i=this._values[e];if(i)return i.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,vt._)`${e}${i.scopePath}`})}scopeCode(e=this._values,n,i){return this._reduceValues(e,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},n,i)}_reduceValues(e,n,i={},r){let o=vt.nil;for(let a in e){let s=e[a];if(!s)continue;let c=i[a]=i[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,Il.Started);let l=n(u);if(l){let d=this.opts.es5?bt.varKinds.var:bt.varKinds.const;o=(0,vt._)`${o}${d} ${u} = ${l};${this.opts._n}`}else if(l=r?.(u))o=(0,vt._)`${o}${l}${this.opts._n}`;else throw new Ev(u);c.set(u,Il.Completed)})}return o}};bt.ValueScope=Dv});var K=T(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.or=Y.and=Y.not=Y.CodeGen=Y.operators=Y.varKinds=Y.ValueScopeName=Y.ValueScope=Y.Scope=Y.Name=Y.regexpCode=Y.stringify=Y.getProperty=Y.nil=Y.strConcat=Y.str=Y._=void 0;var re=Va(),Zt=Ov(),Rr=Va();Object.defineProperty(Y,"_",{enumerable:!0,get:function(){return Rr._}});Object.defineProperty(Y,"str",{enumerable:!0,get:function(){return Rr.str}});Object.defineProperty(Y,"strConcat",{enumerable:!0,get:function(){return Rr.strConcat}});Object.defineProperty(Y,"nil",{enumerable:!0,get:function(){return Rr.nil}});Object.defineProperty(Y,"getProperty",{enumerable:!0,get:function(){return Rr.getProperty}});Object.defineProperty(Y,"stringify",{enumerable:!0,get:function(){return Rr.stringify}});Object.defineProperty(Y,"regexpCode",{enumerable:!0,get:function(){return Rr.regexpCode}});Object.defineProperty(Y,"Name",{enumerable:!0,get:function(){return Rr.Name}});var Tl=Ov();Object.defineProperty(Y,"Scope",{enumerable:!0,get:function(){return Tl.Scope}});Object.defineProperty(Y,"ValueScope",{enumerable:!0,get:function(){return Tl.ValueScope}});Object.defineProperty(Y,"ValueScopeName",{enumerable:!0,get:function(){return Tl.ValueScopeName}});Object.defineProperty(Y,"varKinds",{enumerable:!0,get:function(){return Tl.varKinds}});Y.operators={GT:new re._Code(">"),GTE:new re._Code(">="),LT:new re._Code("<"),LTE:new re._Code("<="),EQ:new re._Code("==="),NEQ:new re._Code("!=="),NOT:new re._Code("!"),OR:new re._Code("||"),AND:new re._Code("&&"),ADD:new re._Code("+")};var hr=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},Tv=class extends hr{constructor(e,n,i){super(),this.varKind=e,this.name=n,this.rhs=i}render({es5:e,_n:n}){let i=e?Zt.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+n}optimizeNames(e,n){if(e[this.name.str])return this.rhs&&(this.rhs=Ai(this.rhs,e,n)),this}get names(){return this.rhs instanceof re._CodeOrName?this.rhs.names:{}}},El=class extends hr{constructor(e,n,i){super(),this.lhs=e,this.rhs=n,this.sideEffects=i}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof re.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Ai(this.rhs,e,n),this}get names(){let e=this.lhs instanceof re.Name?{}:{...this.lhs.names};return Ol(e,this.rhs)}},Cv=class extends El{constructor(e,n,i,r){super(e,i,r),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Av=class extends hr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Nv=class extends hr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},jv=class extends hr{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Rv=class extends hr{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=Ai(this.code,e,n),this}get names(){return this.code instanceof re._CodeOrName?this.code.names:{}}},Ba=class extends hr{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((n,i)=>n+i.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let i=e[n].optimizeNodes();Array.isArray(i)?e.splice(n,1,...i):i?e[n]=i:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:i}=this,r=i.length;for(;r--;){let o=i[r];o.optimizeNames(e,n)||(A6(e,o.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>Pn(e,n.names),{})}},gr=class extends Ba{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Uv=class extends Ba{},Ci=class extends gr{};Ci.kind="else";var kn=class t extends gr{constructor(e,n){super(n),this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let i=n.optimizeNodes();n=this.else=Array.isArray(i)?new Ci(i):i}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(oP(e),n instanceof t?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=Ai(this.condition,e,n),this}get names(){let e=super.names;return Ol(e,this.condition),this.else&&Pn(e,this.else.names),e}};kn.kind="if";var In=class extends gr{};In.kind="for";var Lv=class extends In{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iteration=Ai(this.iteration,e,n),this}get names(){return Pn(super.names,this.iteration.names)}},Mv=class extends In{constructor(e,n,i,r){super(),this.varKind=e,this.name=n,this.from=i,this.to=r}render(e){let n=e.es5?Zt.varKinds.var:this.varKind,{name:i,from:r,to:o}=this;return`for(${n} ${i}=${r}; ${i}<${o}; ${i}++)`+super.render(e)}get names(){let e=Ol(super.names,this.from);return Ol(e,this.to)}},Dl=class extends In{constructor(e,n,i,r){super(),this.loop=e,this.varKind=n,this.name=i,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iterable=Ai(this.iterable,e,n),this}get names(){return Pn(super.names,this.iterable.names)}},Ha=class extends gr{constructor(e,n,i){super(),this.name=e,this.args=n,this.async=i}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Ha.kind="func";var Ga=class extends Ba{render(e){return"return "+super.render(e)}};Ga.kind="return";var Fv=class extends gr{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var i,r;return super.optimizeNames(e,n),(i=this.catch)===null||i===void 0||i.optimizeNames(e,n),(r=this.finally)===null||r===void 0||r.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&Pn(e,this.catch.names),this.finally&&Pn(e,this.finally.names),e}},Ja=class extends gr{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ja.kind="catch";var Ka=class extends gr{render(e){return"finally"+super.render(e)}};Ka.kind="finally";var Zv=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
25
+ `:""},this._extScope=e,this._scope=new Zt.Scope({parent:e}),this._nodes=[new Uv]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let i=this._extScope.value(e,n);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,i,r){let o=this._scope.toName(n);return i!==void 0&&r&&(this._constants[o.str]=i),this._leafNode(new Tv(e,o,i)),o}const(e,n,i){return this._def(Zt.varKinds.const,e,n,i)}let(e,n,i){return this._def(Zt.varKinds.let,e,n,i)}var(e,n,i){return this._def(Zt.varKinds.var,e,n,i)}assign(e,n,i){return this._leafNode(new El(e,n,i))}add(e,n){return this._leafNode(new Cv(e,Y.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==re.nil&&this._leafNode(new Rv(e)),this}object(...e){let n=["{"];for(let[i,r]of e)n.length>1&&n.push(","),n.push(i),(i!==r||this.opts.es5)&&(n.push(":"),(0,re.addCodeArg)(n,r));return n.push("}"),new re._Code(n)}if(e,n,i){if(this._blockNode(new kn(e)),n&&i)this.code(n).else().code(i).endIf();else if(n)this.code(n).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new kn(e))}else(){return this._elseNode(new Ci)}endIf(){return this._endBlockNode(kn,Ci)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new Lv(e),n)}forRange(e,n,i,r,o=this.opts.es5?Zt.varKinds.var:Zt.varKinds.let){let a=this._scope.toName(e);return this._for(new Mv(o,a,n,i),()=>r(a))}forOf(e,n,i,r=Zt.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=n instanceof re.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,re._)`${a}.length`,s=>{this.var(o,(0,re._)`${a}[${s}]`),i(o)})}return this._for(new Dl("of",r,o,n),()=>i(o))}forIn(e,n,i,r=this.opts.es5?Zt.varKinds.var:Zt.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,re._)`Object.keys(${n})`,i);let o=this._scope.toName(e);return this._for(new Dl("in",r,o,n),()=>i(o))}endFor(){return this._endBlockNode(In)}label(e){return this._leafNode(new Av(e))}break(e){return this._leafNode(new Nv(e))}return(e){let n=new Ga;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ga)}try(e,n,i){if(!n&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Fv;if(this._blockNode(r),this.code(e),n){let o=this.name("e");this._currNode=r.catch=new Ja(o),n(o)}return i&&(this._currNode=r.finally=new Ka,this.code(i)),this._endBlockNode(Ja,Ka)}throw(e){return this._leafNode(new jv(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-n;if(i<0||e!==void 0&&i!==e)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=re.nil,i,r){return this._blockNode(new Ha(e,n,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(Ha)}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,n){let i=this._currNode;if(i instanceof e||n&&i instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof kn))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Y.CodeGen=Zv;function Pn(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Ol(t,e){return e instanceof re._CodeOrName?Pn(t,e.names):t}function Ai(t,e,n){if(t instanceof re.Name)return i(t);if(!r(t))return t;return new re._Code(t._items.reduce((o,a)=>(a instanceof re.Name&&(a=i(a)),a instanceof re._Code?o.push(...a._items):o.push(a),o),[]));function i(o){let a=n[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function r(o){return o instanceof re._Code&&o._items.some(a=>a instanceof re.Name&&e[a.str]===1&&n[a.str]!==void 0)}}function A6(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function oP(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,re._)`!${qv(t)}`}Y.not=oP;var N6=aP(Y.operators.AND);function j6(...t){return t.reduce(N6)}Y.and=j6;var R6=aP(Y.operators.OR);function U6(...t){return t.reduce(R6)}Y.or=U6;function aP(t){return(e,n)=>e===re.nil?n:n===re.nil?e:(0,re._)`${qv(e)} ${t} ${qv(n)}`}function qv(t){return t instanceof re.Name?t:(0,re._)`(${t})`}});var ne=T(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.checkStrictMode=te.getErrorPath=te.Type=te.useFunc=te.setEvaluated=te.evaluatedPropsToName=te.mergeEvaluated=te.eachItem=te.unescapeJsonPointer=te.escapeJsonPointer=te.escapeFragment=te.unescapeFragment=te.schemaRefOrVal=te.schemaHasRulesButRef=te.schemaHasRules=te.checkUnknownRules=te.alwaysValidSchema=te.toHash=void 0;var _e=K(),L6=Va();function M6(t){let e={};for(let n of t)e[n]=!0;return e}te.toHash=M6;function F6(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(uP(t,e),!lP(e,t.self.RULES.all))}te.alwaysValidSchema=F6;function uP(t,e=t.schema){let{opts:n,self:i}=t;if(!n.strictSchema||typeof e=="boolean")return;let r=i.RULES.keywords;for(let o in e)r[o]||pP(t,`unknown keyword: "${o}"`)}te.checkUnknownRules=uP;function lP(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}te.schemaHasRules=lP;function Z6(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}te.schemaHasRulesButRef=Z6;function q6({topSchemaRef:t,schemaPath:e},n,i,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,_e._)`${n}`}return(0,_e._)`${t}${e}${(0,_e.getProperty)(i)}`}te.schemaRefOrVal=q6;function V6(t){return dP(decodeURIComponent(t))}te.unescapeFragment=V6;function B6(t){return encodeURIComponent(Bv(t))}te.escapeFragment=B6;function Bv(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}te.escapeJsonPointer=Bv;function dP(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}te.unescapeJsonPointer=dP;function H6(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}te.eachItem=H6;function sP({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:i}){return(r,o,a,s)=>{let c=a===void 0?o:a instanceof _e.Name?(o instanceof _e.Name?t(r,o,a):e(r,o,a),a):o instanceof _e.Name?(e(r,a,o),o):n(o,a);return s===_e.Name&&!(c instanceof _e.Name)?i(r,c):c}}te.mergeEvaluated={props:sP({mergeNames:(t,e,n)=>t.if((0,_e._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,_e._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,_e._)`${n} || {}`).code((0,_e._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,_e._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,_e._)`${n} || {}`),Hv(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:fP}),items:sP({mergeNames:(t,e,n)=>t.if((0,_e._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,_e._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,_e._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,_e._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function fP(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,_e._)`{}`);return e!==void 0&&Hv(t,n,e),n}te.evaluatedPropsToName=fP;function Hv(t,e,n){Object.keys(n).forEach(i=>t.assign((0,_e._)`${e}${(0,_e.getProperty)(i)}`,!0))}te.setEvaluated=Hv;var cP={};function G6(t,e){return t.scopeValue("func",{ref:e,code:cP[e.code]||(cP[e.code]=new L6._Code(e.code))})}te.useFunc=G6;var Vv;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Vv||(te.Type=Vv={}));function J6(t,e,n){if(t instanceof _e.Name){let i=e===Vv.Num;return n?i?(0,_e._)`"[" + ${t} + "]"`:(0,_e._)`"['" + ${t} + "']"`:i?(0,_e._)`"/" + ${t}`:(0,_e._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,_e.getProperty)(t).toString():"/"+Bv(t)}te.getErrorPath=J6;function pP(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}te.checkStrictMode=pP});var yr=T(Gv=>{"use strict";Object.defineProperty(Gv,"__esModule",{value:!0});var Ye=K(),K6={data:new Ye.Name("data"),valCxt:new Ye.Name("valCxt"),instancePath:new Ye.Name("instancePath"),parentData:new Ye.Name("parentData"),parentDataProperty:new Ye.Name("parentDataProperty"),rootData:new Ye.Name("rootData"),dynamicAnchors:new Ye.Name("dynamicAnchors"),vErrors:new Ye.Name("vErrors"),errors:new Ye.Name("errors"),this:new Ye.Name("this"),self:new Ye.Name("self"),scope:new Ye.Name("scope"),json:new Ye.Name("json"),jsonPos:new Ye.Name("jsonPos"),jsonLen:new Ye.Name("jsonLen"),jsonPart:new Ye.Name("jsonPart")};Gv.default=K6});var Wa=T(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.extendErrors=Qe.resetErrorsCount=Qe.reportExtraError=Qe.reportError=Qe.keyword$DataError=Qe.keywordError=void 0;var ie=K(),Cl=ne(),lt=yr();Qe.keywordError={message:({keyword:t})=>(0,ie.str)`must pass "${t}" keyword validation`};Qe.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ie.str)`"${t}" keyword must be ${e} ($data)`:(0,ie.str)`"${t}" keyword is invalid ($data)`};function W6(t,e=Qe.keywordError,n,i){let{it:r}=t,{gen:o,compositeRule:a,allErrors:s}=r,c=gP(t,e,n);i??(a||s)?mP(o,c):hP(r,(0,ie._)`[${c}]`)}Qe.reportError=W6;function X6(t,e=Qe.keywordError,n){let{it:i}=t,{gen:r,compositeRule:o,allErrors:a}=i,s=gP(t,e,n);mP(r,s),o||a||hP(i,lt.default.vErrors)}Qe.reportExtraError=X6;function Y6(t,e){t.assign(lt.default.errors,e),t.if((0,ie._)`${lt.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ie._)`${lt.default.vErrors}.length`,e),()=>t.assign(lt.default.vErrors,null)))}Qe.resetErrorsCount=Y6;function Q6({gen:t,keyword:e,schemaValue:n,data:i,errsCount:r,it:o}){if(r===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",r,lt.default.errors,s=>{t.const(a,(0,ie._)`${lt.default.vErrors}[${s}]`),t.if((0,ie._)`${a}.instancePath === undefined`,()=>t.assign((0,ie._)`${a}.instancePath`,(0,ie.strConcat)(lt.default.instancePath,o.errorPath))),t.assign((0,ie._)`${a}.schemaPath`,(0,ie.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ie._)`${a}.schema`,n),t.assign((0,ie._)`${a}.data`,i))})}Qe.extendErrors=Q6;function mP(t,e){let n=t.const("err",e);t.if((0,ie._)`${lt.default.vErrors} === null`,()=>t.assign(lt.default.vErrors,(0,ie._)`[${n}]`),(0,ie._)`${lt.default.vErrors}.push(${n})`),t.code((0,ie._)`${lt.default.errors}++`)}function hP(t,e){let{gen:n,validateName:i,schemaEnv:r}=t;r.$async?n.throw((0,ie._)`new ${t.ValidationError}(${e})`):(n.assign((0,ie._)`${i}.errors`,e),n.return(!1))}var zn={keyword:new ie.Name("keyword"),schemaPath:new ie.Name("schemaPath"),params:new ie.Name("params"),propertyName:new ie.Name("propertyName"),message:new ie.Name("message"),schema:new ie.Name("schema"),parentSchema:new ie.Name("parentSchema")};function gP(t,e,n){let{createErrors:i}=t.it;return i===!1?(0,ie._)`{}`:eM(t,e,n)}function eM(t,e,n={}){let{gen:i,it:r}=t,o=[tM(r,n),rM(t,n)];return nM(t,e,o),i.object(...o)}function tM({errorPath:t},{instancePath:e}){let n=e?(0,ie.str)`${t}${(0,Cl.getErrorPath)(e,Cl.Type.Str)}`:t;return[lt.default.instancePath,(0,ie.strConcat)(lt.default.instancePath,n)]}function rM({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:i}){let r=i?e:(0,ie.str)`${e}/${t}`;return n&&(r=(0,ie.str)`${r}${(0,Cl.getErrorPath)(n,Cl.Type.Str)}`),[zn.schemaPath,r]}function nM(t,{params:e,message:n},i){let{keyword:r,data:o,schemaValue:a,it:s}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;i.push([zn.keyword,r],[zn.params,typeof e=="function"?e(t):e||(0,ie._)`{}`]),c.messages&&i.push([zn.message,typeof n=="function"?n(t):n]),c.verbose&&i.push([zn.schema,a],[zn.parentSchema,(0,ie._)`${l}${d}`],[lt.default.data,o]),u&&i.push([zn.propertyName,u])}});var vP=T(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.boolOrEmptySchema=Ni.topBoolOrEmptySchema=void 0;var iM=Wa(),oM=K(),aM=yr(),sM={message:"boolean schema is false"};function cM(t){let{gen:e,schema:n,validateName:i}=t;n===!1?yP(t,!1):typeof n=="object"&&n.$async===!0?e.return(aM.default.data):(e.assign((0,oM._)`${i}.errors`,null),e.return(!0))}Ni.topBoolOrEmptySchema=cM;function uM(t,e){let{gen:n,schema:i}=t;i===!1?(n.var(e,!1),yP(t)):n.var(e,!0)}Ni.boolOrEmptySchema=uM;function yP(t,e){let{gen:n,data:i}=t,r={gen:n,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,iM.reportError)(r,sM,void 0,e)}});var Jv=T(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.getRules=ji.isJSONType=void 0;var lM=["string","number","integer","boolean","null","object","array"],dM=new Set(lM);function fM(t){return typeof t=="string"&&dM.has(t)}ji.isJSONType=fM;function pM(){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:{}}}ji.getRules=pM});var Kv=T(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.shouldUseRule=Ur.shouldUseGroup=Ur.schemaHasRulesForType=void 0;function mM({schema:t,self:e},n){let i=e.RULES.types[n];return i&&i!==!0&&bP(t,i)}Ur.schemaHasRulesForType=mM;function bP(t,e){return e.rules.some(n=>_P(t,n))}Ur.shouldUseGroup=bP;function _P(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(i=>t[i]!==void 0))}Ur.shouldUseRule=_P});var Xa=T(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.reportTypeError=et.checkDataTypes=et.checkDataType=et.coerceAndCheckDataType=et.getJSONTypes=et.getSchemaTypes=et.DataType=void 0;var hM=Jv(),gM=Kv(),yM=Wa(),J=K(),$P=ne(),Ri;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Ri||(et.DataType=Ri={}));function vM(t){let e=wP(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}et.getSchemaTypes=vM;function wP(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(hM.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}et.getJSONTypes=wP;function bM(t,e){let{gen:n,data:i,opts:r}=t,o=_M(e,r.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,gM.schemaHasRulesForType)(t,e[0]));if(a){let s=Xv(e,i,r.strictNumbers,Ri.Wrong);n.if(s,()=>{o.length?$M(t,e,o):Yv(t)})}return a}et.coerceAndCheckDataType=bM;var xP=new Set(["string","number","integer","boolean","null"]);function _M(t,e){return e?t.filter(n=>xP.has(n)||e==="array"&&n==="array"):[]}function $M(t,e,n){let{gen:i,data:r,opts:o}=t,a=i.let("dataType",(0,J._)`typeof ${r}`),s=i.let("coerced",(0,J._)`undefined`);o.coerceTypes==="array"&&i.if((0,J._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>i.assign(r,(0,J._)`${r}[0]`).assign(a,(0,J._)`typeof ${r}`).if(Xv(e,r,o.strictNumbers),()=>i.assign(s,r))),i.if((0,J._)`${s} !== undefined`);for(let u of n)(xP.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);i.else(),Yv(t),i.endIf(),i.if((0,J._)`${s} !== undefined`,()=>{i.assign(r,s),wM(t,s)});function c(u){switch(u){case"string":i.elseIf((0,J._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,J._)`"" + ${r}`).elseIf((0,J._)`${r} === null`).assign(s,(0,J._)`""`);return;case"number":i.elseIf((0,J._)`${a} == "boolean" || ${r} === null
26
+ || (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,(0,J._)`+${r}`);return;case"integer":i.elseIf((0,J._)`${a} === "boolean" || ${r} === null
27
+ || (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(s,(0,J._)`+${r}`);return;case"boolean":i.elseIf((0,J._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(s,!1).elseIf((0,J._)`${r} === "true" || ${r} === 1`).assign(s,!0);return;case"null":i.elseIf((0,J._)`${r} === "" || ${r} === 0 || ${r} === false`),i.assign(s,null);return;case"array":i.elseIf((0,J._)`${a} === "string" || ${a} === "number"
28
+ || ${a} === "boolean" || ${r} === null`).assign(s,(0,J._)`[${r}]`)}}}function wM({gen:t,parentData:e,parentDataProperty:n},i){t.if((0,J._)`${e} !== undefined`,()=>t.assign((0,J._)`${e}[${n}]`,i))}function Wv(t,e,n,i=Ri.Correct){let r=i===Ri.Correct?J.operators.EQ:J.operators.NEQ,o;switch(t){case"null":return(0,J._)`${e} ${r} null`;case"array":o=(0,J._)`Array.isArray(${e})`;break;case"object":o=(0,J._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,J._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,J._)`typeof ${e} ${r} ${t}`}return i===Ri.Correct?o:(0,J.not)(o);function a(s=J.nil){return(0,J.and)((0,J._)`typeof ${e} == "number"`,s,n?(0,J._)`isFinite(${e})`:J.nil)}}et.checkDataType=Wv;function Xv(t,e,n,i){if(t.length===1)return Wv(t[0],e,n,i);let r,o=(0,$P.toHash)(t);if(o.array&&o.object){let a=(0,J._)`typeof ${e} != "object"`;r=o.null?a:(0,J._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else r=J.nil;o.number&&delete o.integer;for(let a in o)r=(0,J.and)(r,Wv(a,e,n,i));return r}et.checkDataTypes=Xv;var xM={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,J._)`{type: ${t}}`:(0,J._)`{type: ${e}}`};function Yv(t){let e=SM(t);(0,yM.reportError)(e,xM)}et.reportTypeError=Yv;function SM(t){let{gen:e,data:n,schema:i}=t,r=(0,$P.schemaRefOrVal)(t,i,"type");return{gen:e,keyword:"type",data:n,schema:i.type,schemaCode:r,schemaValue:r,parentSchema:i,params:{},it:t}}});var kP=T(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.assignDefaults=void 0;var Ui=K(),kM=ne();function IM(t,e){let{properties:n,items:i}=t.schema;if(e==="object"&&n)for(let r in n)SP(t,r,n[r].default);else e==="array"&&Array.isArray(i)&&i.forEach((r,o)=>SP(t,o,r.default))}Al.assignDefaults=IM;function SP(t,e,n){let{gen:i,compositeRule:r,data:o,opts:a}=t;if(n===void 0)return;let s=(0,Ui._)`${o}${(0,Ui.getProperty)(e)}`;if(r){(0,kM.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,Ui._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,Ui._)`${c} || ${s} === null || ${s} === ""`),i.if(c,(0,Ui._)`${s} = ${(0,Ui.stringify)(n)}`)}});var At=T(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.validateUnion=ve.validateArray=ve.usePattern=ve.callValidateCode=ve.schemaProperties=ve.allSchemaProperties=ve.noPropertyInData=ve.propertyInData=ve.isOwnProperty=ve.hasPropFunc=ve.reportMissingProp=ve.checkMissingProp=ve.checkReportMissingProp=void 0;var we=K(),Qv=ne(),Lr=yr(),PM=ne();function zM(t,e){let{gen:n,data:i,it:r}=t;n.if(tb(n,i,e,r.opts.ownProperties),()=>{t.setParams({missingProperty:(0,we._)`${e}`},!0),t.error()})}ve.checkReportMissingProp=zM;function EM({gen:t,data:e,it:{opts:n}},i,r){return(0,we.or)(...i.map(o=>(0,we.and)(tb(t,e,o,n.ownProperties),(0,we._)`${r} = ${o}`)))}ve.checkMissingProp=EM;function DM(t,e){t.setParams({missingProperty:e},!0),t.error()}ve.reportMissingProp=DM;function IP(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,we._)`Object.prototype.hasOwnProperty`})}ve.hasPropFunc=IP;function eb(t,e,n){return(0,we._)`${IP(t)}.call(${e}, ${n})`}ve.isOwnProperty=eb;function OM(t,e,n,i){let r=(0,we._)`${e}${(0,we.getProperty)(n)} !== undefined`;return i?(0,we._)`${r} && ${eb(t,e,n)}`:r}ve.propertyInData=OM;function tb(t,e,n,i){let r=(0,we._)`${e}${(0,we.getProperty)(n)} === undefined`;return i?(0,we.or)(r,(0,we.not)(eb(t,e,n))):r}ve.noPropertyInData=tb;function PP(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ve.allSchemaProperties=PP;function TM(t,e){return PP(e).filter(n=>!(0,Qv.alwaysValidSchema)(t,e[n]))}ve.schemaProperties=TM;function CM({schemaCode:t,data:e,it:{gen:n,topSchemaRef:i,schemaPath:r,errorPath:o},it:a},s,c,u){let l=u?(0,we._)`${t}, ${e}, ${i}${r}`:e,d=[[Lr.default.instancePath,(0,we.strConcat)(Lr.default.instancePath,o)],[Lr.default.parentData,a.parentData],[Lr.default.parentDataProperty,a.parentDataProperty],[Lr.default.rootData,Lr.default.rootData]];a.opts.dynamicRef&&d.push([Lr.default.dynamicAnchors,Lr.default.dynamicAnchors]);let p=(0,we._)`${l}, ${n.object(...d)}`;return c!==we.nil?(0,we._)`${s}.call(${c}, ${p})`:(0,we._)`${s}(${p})`}ve.callValidateCode=CM;var AM=(0,we._)`new RegExp`;function NM({gen:t,it:{opts:e}},n){let i=e.unicodeRegExp?"u":"",{regExp:r}=e.code,o=r(n,i);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,we._)`${r.code==="new RegExp"?AM:(0,PM.useFunc)(t,r)}(${n}, ${i})`})}ve.usePattern=NM;function jM(t){let{gen:e,data:n,keyword:i,it:r}=t,o=e.name("valid");if(r.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(o,!0),a(()=>e.break()),o;function a(s){let c=e.const("len",(0,we._)`${n}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:i,dataProp:u,dataPropType:Qv.Type.Num},o),e.if((0,we.not)(o),s)})}}ve.validateArray=jM;function RM(t){let{gen:e,schema:n,keyword:i,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,Qv.alwaysValidSchema)(r,c))&&!r.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>n.forEach((c,u)=>{let l=t.subschema({keyword:i,schemaProp:u,compositeRule:!0},s);e.assign(a,(0,we._)`${a} || ${s}`),t.mergeValidEvaluated(l,s)||e.if((0,we.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}ve.validateUnion=RM});var DP=T(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.validateKeywordUsage=Yt.validSchemaType=Yt.funcKeywordCode=Yt.macroKeywordCode=void 0;var dt=K(),En=yr(),UM=At(),LM=Wa();function MM(t,e){let{gen:n,keyword:i,schema:r,parentSchema:o,it:a}=t,s=e.macro.call(a.self,r,o,a),c=EP(n,i,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let u=n.name("valid");t.subschema({schema:s,schemaPath:dt.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Yt.macroKeywordCode=MM;function FM(t,e){var n;let{gen:i,keyword:r,schema:o,parentSchema:a,$data:s,it:c}=t;qM(c,e);let u=!s&&e.compile?e.compile.call(c.self,o,a,c):e.validate,l=EP(i,r,u),d=i.let("valid");t.block$data(d,p),t.ok((n=e.valid)!==null&&n!==void 0?n:d);function p(){if(e.errors===!1)h(),e.modifying&&zP(t),g(()=>t.error());else{let y=e.async?m():f();e.modifying&&zP(t),g(()=>ZM(t,y))}}function m(){let y=i.let("ruleErrs",null);return i.try(()=>h((0,dt._)`await `),v=>i.assign(d,!1).if((0,dt._)`${v} instanceof ${c.ValidationError}`,()=>i.assign(y,(0,dt._)`${v}.errors`),()=>i.throw(v))),y}function f(){let y=(0,dt._)`${l}.errors`;return i.assign(y,null),h(dt.nil),y}function h(y=e.async?(0,dt._)`await `:dt.nil){let v=c.opts.passContext?En.default.this:En.default.self,b=!("compile"in e&&!s||e.schema===!1);i.assign(d,(0,dt._)`${y}${(0,UM.callValidateCode)(t,l,v,b)}`,e.modifying)}function g(y){var v;i.if((0,dt.not)((v=e.valid)!==null&&v!==void 0?v:d),y)}}Yt.funcKeywordCode=FM;function zP(t){let{gen:e,data:n,it:i}=t;e.if(i.parentData,()=>e.assign(n,(0,dt._)`${i.parentData}[${i.parentDataProperty}]`))}function ZM(t,e){let{gen:n}=t;n.if((0,dt._)`Array.isArray(${e})`,()=>{n.assign(En.default.vErrors,(0,dt._)`${En.default.vErrors} === null ? ${e} : ${En.default.vErrors}.concat(${e})`).assign(En.default.errors,(0,dt._)`${En.default.vErrors}.length`),(0,LM.extendErrors)(t)},()=>t.error())}function qM({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function EP(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,dt.stringify)(n)})}function VM(t,e,n=!1){return!e.length||e.some(i=>i==="array"?Array.isArray(t):i==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==i||n&&typeof t>"u")}Yt.validSchemaType=VM;function BM({schema:t,opts:e,self:n,errSchemaPath:i},r,o){if(Array.isArray(r.keyword)?!r.keyword.includes(o):r.keyword!==o)throw new Error("ajv implementation error");let a=r.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(r.validateSchema&&!r.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${i}": `+n.errorsText(r.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Yt.validateKeywordUsage=BM});var TP=T(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.extendSubschemaMode=Mr.extendSubschemaData=Mr.getSubschema=void 0;var Qt=K(),OP=ne();function HM(t,{keyword:e,schemaProp:n,schema:i,schemaPath:r,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return n===void 0?{schema:s,schemaPath:(0,Qt._)`${t.schemaPath}${(0,Qt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[n],schemaPath:(0,Qt._)`${t.schemaPath}${(0,Qt.getProperty)(e)}${(0,Qt.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,OP.escapeFragment)(n)}`}}if(i!==void 0){if(r===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:r,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Mr.getSubschema=HM;function GM(t,e,{dataProp:n,dataPropType:i,data:r,dataTypes:o,propertyName:a}){if(r!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(n!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=e,p=s.let("data",(0,Qt._)`${e.data}${(0,Qt.getProperty)(n)}`,!0);c(p),t.errorPath=(0,Qt.str)`${u}${(0,OP.getErrorPath)(n,i,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Qt._)`${n}`,t.dataPathArr=[...l,t.parentDataProperty]}if(r!==void 0){let u=r instanceof Qt.Name?r:s.let("data",r,!0);c(u),a!==void 0&&(t.propertyName=a)}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]}}Mr.extendSubschemaData=GM;function JM(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:i,createErrors:r,allErrors:o}){i!==void 0&&(t.compositeRule=i),r!==void 0&&(t.createErrors=r),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=n}Mr.extendSubschemaMode=JM});var rb=T((X7,CP)=>{"use strict";CP.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;r--!==0;){var a=o[r];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}});var NP=T((Y7,AP)=>{"use strict";var Fr=AP.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var i=typeof n=="function"?n:n.pre||function(){},r=n.post||function(){};Nl(e,i,r,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 Nl(t,e,n,i,r,o,a,s,c,u){if(i&&typeof i=="object"&&!Array.isArray(i)){e(i,r,o,a,s,c,u);for(var l in i){var d=i[l];if(Array.isArray(d)){if(l in Fr.arrayKeywords)for(var p=0;p<d.length;p++)Nl(t,e,n,d[p],r+"/"+l+"/"+p,o,r,l,i,p)}else if(l in Fr.propsKeywords){if(d&&typeof d=="object")for(var m in d)Nl(t,e,n,d[m],r+"/"+l+"/"+KM(m),o,r,l,i,m)}else(l in Fr.keywords||t.allKeys&&!(l in Fr.skipKeywords))&&Nl(t,e,n,d,r+"/"+l,o,r,l,i)}n(i,r,o,a,s,c,u)}}function KM(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ya=T(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.getSchemaRefs=_t.resolveUrl=_t.normalizeId=_t._getFullPath=_t.getFullPath=_t.inlineRef=void 0;var WM=ne(),XM=rb(),YM=NP(),QM=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function eF(t,e=!0){return typeof t=="boolean"?!0:e===!0?!nb(t):e?jP(t)<=e:!1}_t.inlineRef=eF;var tF=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function nb(t){for(let e in t){if(tF.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(nb)||typeof n=="object"&&nb(n))return!0}return!1}function jP(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!QM.has(n)&&(typeof t[n]=="object"&&(0,WM.eachItem)(t[n],i=>e+=jP(i)),e===1/0))return 1/0}return e}function RP(t,e="",n){n!==!1&&(e=Li(e));let i=t.parse(e);return UP(t,i)}_t.getFullPath=RP;function UP(t,e){return t.serialize(e).split("#")[0]+"#"}_t._getFullPath=UP;var rF=/#\/?$/;function Li(t){return t?t.replace(rF,""):""}_t.normalizeId=Li;function nF(t,e,n){return n=Li(n),t.resolve(e,n)}_t.resolveUrl=nF;var iF=/^[a-z_][-a-z0-9._]*$/i;function oF(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:i}=this.opts,r=Li(t[n]||e),o={"":r},a=RP(i,r,!1),s={},c=new Set;return YM(t,{allKeys:!0},(d,p,m,f)=>{if(f===void 0)return;let h=a+p,g=o[f];typeof d[n]=="string"&&(g=y.call(this,d[n])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[p]=g;function y(b){let _=this.opts.uriResolver.resolve;if(b=Li(g?_(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!==Li(h)&&(b[0]==="#"?(u(d,s[b],b),s[b]=d):this.refs[b]=h),b}function v(b){if(typeof b=="string"){if(!iF.test(b))throw new Error(`invalid anchor "${b}"`);y.call(this,`#${b}`)}}}),s;function u(d,p,m){if(p!==void 0&&!XM(d,p))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}_t.getSchemaRefs=oF});var ts=T(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.getData=Zr.KeywordCxt=Zr.validateFunctionCode=void 0;var qP=vP(),LP=Xa(),ob=Kv(),jl=Xa(),aF=kP(),es=DP(),ib=TP(),U=K(),V=yr(),sF=Ya(),vr=ne(),Qa=Wa();function cF(t){if(HP(t)&&(GP(t),BP(t))){dF(t);return}VP(t,()=>(0,qP.topBoolOrEmptySchema)(t))}Zr.validateFunctionCode=cF;function VP({gen:t,validateName:e,schema:n,schemaEnv:i,opts:r},o){r.code.es5?t.func(e,(0,U._)`${V.default.data}, ${V.default.valCxt}`,i.$async,()=>{t.code((0,U._)`"use strict"; ${MP(n,r)}`),lF(t,r),t.code(o)}):t.func(e,(0,U._)`${V.default.data}, ${uF(r)}`,i.$async,()=>t.code(MP(n,r)).code(o))}function uF(t){return(0,U._)`{${V.default.instancePath}="", ${V.default.parentData}, ${V.default.parentDataProperty}, ${V.default.rootData}=${V.default.data}${t.dynamicRef?(0,U._)`, ${V.default.dynamicAnchors}={}`:U.nil}}={}`}function lF(t,e){t.if(V.default.valCxt,()=>{t.var(V.default.instancePath,(0,U._)`${V.default.valCxt}.${V.default.instancePath}`),t.var(V.default.parentData,(0,U._)`${V.default.valCxt}.${V.default.parentData}`),t.var(V.default.parentDataProperty,(0,U._)`${V.default.valCxt}.${V.default.parentDataProperty}`),t.var(V.default.rootData,(0,U._)`${V.default.valCxt}.${V.default.rootData}`),e.dynamicRef&&t.var(V.default.dynamicAnchors,(0,U._)`${V.default.valCxt}.${V.default.dynamicAnchors}`)},()=>{t.var(V.default.instancePath,(0,U._)`""`),t.var(V.default.parentData,(0,U._)`undefined`),t.var(V.default.parentDataProperty,(0,U._)`undefined`),t.var(V.default.rootData,V.default.data),e.dynamicRef&&t.var(V.default.dynamicAnchors,(0,U._)`{}`)})}function dF(t){let{schema:e,opts:n,gen:i}=t;VP(t,()=>{n.$comment&&e.$comment&&KP(t),gF(t),i.let(V.default.vErrors,null),i.let(V.default.errors,0),n.unevaluated&&fF(t),JP(t),bF(t)})}function fF(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,U._)`${n}.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 MP(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,U._)`/*# sourceURL=${n} */`:U.nil}function pF(t,e){if(HP(t)&&(GP(t),BP(t))){mF(t,e);return}(0,qP.boolOrEmptySchema)(t,e)}function BP({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function HP(t){return typeof t.schema!="boolean"}function mF(t,e){let{schema:n,gen:i,opts:r}=t;r.$comment&&n.$comment&&KP(t),yF(t),vF(t);let o=i.const("_errs",V.default.errors);JP(t,o),i.var(e,(0,U._)`${o} === ${V.default.errors}`)}function GP(t){(0,vr.checkUnknownRules)(t),hF(t)}function JP(t,e){if(t.opts.jtd)return FP(t,[],!1,e);let n=(0,LP.getSchemaTypes)(t.schema),i=(0,LP.coerceAndCheckDataType)(t,n);FP(t,n,!i,e)}function hF(t){let{schema:e,errSchemaPath:n,opts:i,self:r}=t;e.$ref&&i.ignoreKeywordsWithRef&&(0,vr.schemaHasRulesButRef)(e,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function gF(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,vr.checkStrictMode)(t,"default is ignored in the schema root")}function yF(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,sF.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function vF(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function KP({gen:t,schemaEnv:e,schema:n,errSchemaPath:i,opts:r}){let o=n.$comment;if(r.$comment===!0)t.code((0,U._)`${V.default.self}.logger.log(${o})`);else if(typeof r.$comment=="function"){let a=(0,U.str)`${i}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,U._)`${V.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function bF(t){let{gen:e,schemaEnv:n,validateName:i,ValidationError:r,opts:o}=t;n.$async?e.if((0,U._)`${V.default.errors} === 0`,()=>e.return(V.default.data),()=>e.throw((0,U._)`new ${r}(${V.default.vErrors})`)):(e.assign((0,U._)`${i}.errors`,V.default.vErrors),o.unevaluated&&_F(t),e.return((0,U._)`${V.default.errors} === 0`))}function _F({gen:t,evaluated:e,props:n,items:i}){n instanceof U.Name&&t.assign((0,U._)`${e}.props`,n),i instanceof U.Name&&t.assign((0,U._)`${e}.items`,i)}function FP(t,e,n,i){let{gen:r,schema:o,data:a,allErrors:s,opts:c,self:u}=t,{RULES:l}=u;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,vr.schemaHasRulesButRef)(o,l))){r.block(()=>XP(t,"$ref",l.all.$ref.definition));return}c.jtd||$F(t,e),r.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,ob.shouldUseGroup)(o,p)&&(p.type?(r.if((0,jl.checkDataType)(p.type,a,c.strictNumbers)),ZP(t,p),e.length===1&&e[0]===p.type&&n&&(r.else(),(0,jl.reportTypeError)(t)),r.endIf()):ZP(t,p),s||r.if((0,U._)`${V.default.errors} === ${i||0}`))}}function ZP(t,e){let{gen:n,schema:i,opts:{useDefaults:r}}=t;r&&(0,aF.assignDefaults)(t,e.type),n.block(()=>{for(let o of e.rules)(0,ob.shouldUseRule)(i,o)&&XP(t,o.keyword,o.definition,e.type)})}function $F(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(wF(t,e),t.opts.allowUnionTypes||xF(t,e),SF(t,t.dataTypes))}function wF(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{WP(t.dataTypes,n)||ab(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),IF(t,e)}}function xF(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&ab(t,"use allowUnionTypes to allow union type keyword")}function SF(t,e){let n=t.self.RULES.all;for(let i in n){let r=n[i];if(typeof r=="object"&&(0,ob.shouldUseRule)(t.schema,r)){let{type:o}=r.definition;o.length&&!o.some(a=>kF(e,a))&&ab(t,`missing type "${o.join(",")}" for keyword "${i}"`)}}}function kF(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function WP(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function IF(t,e){let n=[];for(let i of t.dataTypes)WP(e,i)?n.push(i):e.includes("integer")&&i==="number"&&n.push("integer");t.dataTypes=n}function ab(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,vr.checkStrictMode)(t,e,t.opts.strictTypes)}var Rl=class{constructor(e,n,i){if((0,es.validateKeywordUsage)(e,n,i),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=i,this.data=e.data,this.schema=e.schema[i],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,vr.schemaRefOrVal)(e,this.schema,i,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",YP(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,es.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",V.default.errors))}result(e,n,i){this.failResult((0,U.not)(e),n,i)}failResult(e,n,i){this.gen.if(e),i?i():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,U.not)(e),void 0,n)}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:n}=this;this.fail((0,U._)`${n} !== undefined && (${(0,U.or)(this.invalid$data(),e)})`)}error(e,n,i){if(n){this.setParams(n),this._error(e,i),this.setParams({});return}this._error(e,i)}_error(e,n){(e?Qa.reportExtraError:Qa.reportError)(this,this.def.error,n)}$dataError(){(0,Qa.reportError)(this,this.def.$dataError||Qa.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Qa.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,i=U.nil){this.gen.block(()=>{this.check$data(e,i),n()})}check$data(e=U.nil,n=U.nil){if(!this.$data)return;let{gen:i,schemaCode:r,schemaType:o,def:a}=this;i.if((0,U.or)((0,U._)`${r} === undefined`,n)),e!==U.nil&&i.assign(e,!0),(o.length||a.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),e!==U.nil&&i.assign(e,!1)),i.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:i,def:r,it:o}=this;return(0,U.or)(a(),s());function a(){if(i.length){if(!(n instanceof U.Name))throw new Error("ajv implementation error");let c=Array.isArray(i)?i:[i];return(0,U._)`${(0,jl.checkDataTypes)(c,n,o.opts.strictNumbers,jl.DataType.Wrong)}`}return U.nil}function s(){if(r.validateSchema){let c=e.scopeValue("validate$data",{ref:r.validateSchema});return(0,U._)`!${c}(${n})`}return U.nil}}subschema(e,n){let i=(0,ib.getSubschema)(this.it,e);(0,ib.extendSubschemaData)(i,this.it,e),(0,ib.extendSubschemaMode)(i,e);let r={...this.it,...i,items:void 0,props:void 0};return pF(r,n),r}mergeEvaluated(e,n){let{it:i,gen:r}=this;i.opts.unevaluated&&(i.props!==!0&&e.props!==void 0&&(i.props=vr.mergeEvaluated.props(r,e.props,i.props,n)),i.items!==!0&&e.items!==void 0&&(i.items=vr.mergeEvaluated.items(r,e.items,i.items,n)))}mergeValidEvaluated(e,n){let{it:i,gen:r}=this;if(i.opts.unevaluated&&(i.props!==!0||i.items!==!0))return r.if(n,()=>this.mergeEvaluated(e,U.Name)),!0}};Zr.KeywordCxt=Rl;function XP(t,e,n,i){let r=new Rl(t,n,e);"code"in n?n.code(r,i):r.$data&&n.validate?(0,es.funcKeywordCode)(r,n):"macro"in n?(0,es.macroKeywordCode)(r,n):(n.compile||n.validate)&&(0,es.funcKeywordCode)(r,n)}var PF=/^\/(?:[^~]|~0|~1)*$/,zF=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function YP(t,{dataLevel:e,dataNames:n,dataPathArr:i}){let r,o;if(t==="")return V.default.rootData;if(t[0]==="/"){if(!PF.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);r=t,o=V.default.rootData}else{let u=zF.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let l=+u[1];if(r=u[2],r==="#"){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=n[e-l],!r)return o}let a=o,s=r.split("/");for(let u of s)u&&(o=(0,U._)`${o}${(0,U.getProperty)((0,vr.unescapeJsonPointer)(u))}`,a=(0,U._)`${a} && ${o}`);return a;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}Zr.getData=YP});var Ul=T(cb=>{"use strict";Object.defineProperty(cb,"__esModule",{value:!0});var sb=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};cb.default=sb});var rs=T(db=>{"use strict";Object.defineProperty(db,"__esModule",{value:!0});var ub=Ya(),lb=class extends Error{constructor(e,n,i,r){super(r||`can't resolve reference ${i} from id ${n}`),this.missingRef=(0,ub.resolveUrl)(e,n,i),this.missingSchema=(0,ub.normalizeId)((0,ub.getFullPath)(e,this.missingRef))}};db.default=lb});var Ml=T(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.resolveSchema=Nt.getCompilingSchema=Nt.resolveRef=Nt.compileSchema=Nt.SchemaEnv=void 0;var qt=K(),EF=Ul(),Dn=yr(),Vt=Ya(),QP=ne(),DF=ts(),Mi=class{constructor(e){var n;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=(n=e.baseId)!==null&&n!==void 0?n:(0,Vt.normalizeId)(i?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=i?.$async,this.refs={}}};Nt.SchemaEnv=Mi;function pb(t){let e=ez.call(this,t);if(e)return e;let n=(0,Vt.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:i,lines:r}=this.opts.code,{ownProperties:o}=this.opts,a=new qt.CodeGen(this.scope,{es5:i,lines:r,ownProperties:o}),s;t.$async&&(s=a.scopeValue("Error",{ref:EF.default,code:(0,qt._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");t.validateName=c;let u={gen:a,allErrors:this.opts.allErrors,data:Dn.default.data,parentData:Dn.default.parentData,parentDataProperty:Dn.default.parentDataProperty,dataNames:[Dn.default.data],dataPathArr:[qt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,qt.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:qt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,qt._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,DF.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(Dn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let m=new Function(`${Dn.default.self}`,`${Dn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:f,items:h}=u;m.evaluated={props:f instanceof qt.Name?void 0:f,items:h instanceof qt.Name?void 0:h,dynamicProps:f instanceof qt.Name,dynamicItems:h instanceof qt.Name},m.source&&(m.source.evaluated=(0,qt.stringify)(m.evaluated))}return t.validate=m,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)}}Nt.compileSchema=pb;function OF(t,e,n){var i;n=(0,Vt.resolveUrl)(this.opts.uriResolver,e,n);let r=t.refs[n];if(r)return r;let o=AF.call(this,t,n);if(o===void 0){let a=(i=t.localRefs)===null||i===void 0?void 0:i[n],{schemaId:s}=this.opts;a&&(o=new Mi({schema:a,schemaId:s,root:t,baseId:e}))}if(o!==void 0)return t.refs[n]=TF.call(this,o)}Nt.resolveRef=OF;function TF(t){return(0,Vt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:pb.call(this,t)}function ez(t){for(let e of this._compilations)if(CF(e,t))return e}Nt.getCompilingSchema=ez;function CF(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function AF(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Ll.call(this,t,e)}function Ll(t,e){let n=this.opts.uriResolver.parse(e),i=(0,Vt._getFullPath)(this.opts.uriResolver,n),r=(0,Vt.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return fb.call(this,n,t);let o=(0,Vt.normalizeId)(i),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=Ll.call(this,t,a);return typeof s?.schema!="object"?void 0:fb.call(this,n,s)}if(typeof a?.schema=="object"){if(a.validate||pb.call(this,a),o===(0,Vt.normalizeId)(e)){let{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(r=(0,Vt.resolveUrl)(this.opts.uriResolver,r,u)),new Mi({schema:s,schemaId:c,root:t,baseId:r})}return fb.call(this,n,a)}}Nt.resolveSchema=Ll;var NF=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function fb(t,{baseId:e,schema:n,root:i}){var r;if(((r=t.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,QP.unescapeFragment)(s)];if(c===void 0)return;n=c;let u=typeof n=="object"&&n[this.opts.schemaId];!NF.has(s)&&u&&(e=(0,Vt.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,QP.schemaHasRulesButRef)(n,this.RULES)){let s=(0,Vt.resolveUrl)(this.opts.uriResolver,e,n.$ref);o=Ll.call(this,i,s)}let{schemaId:a}=this.opts;if(o=o||new Mi({schema:n,schemaId:a,root:i,baseId:e}),o.schema!==o.root.schema)return o}});var tz=T((iX,jF)=>{jF.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 vb=T((oX,uz)=>{"use strict";var RF=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),mb=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),UF=RegExp.prototype.test.bind(/^\d*$/u),On=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),hb=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),iz=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),gb=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),LF=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),MF=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=]$/u),FF=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=]*$/u);function ZF(t){let e="",n=0,i=0;for(i=0;i<t.length;i++)if(n=t[i].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[i];break}for(i+=1;i<t.length;i++){if(n=t[i].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[i]}return e}var qF=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),VF=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),BF=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),HF=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),GF=RegExp.prototype.test.bind(/[^\d!"$&'()*+,\-.;=_`a-z{}~]/u),JF=RegExp.prototype.test.bind(/(?:^|\.)\d+$/u);function KF(t){return GF(t)||JF(t)}function WF(t){if(t.length===0)return!1;for(let e=0;e<t.length;e++)if(!BF(t[e])){if(t[e]==="%"&&e+2<t.length&&On(t.slice(e+1,e+3))){e+=2;continue}return!1}return!0}function rz(t){let e=-1,n=0,i=-1,r=0;for(let s=0;s<t.length;s++)t[s]==="0"?(i===-1&&(i=s),r++,r>n&&(n=r,e=i)):(i=-1,r=0);if(n<2)return t.join(":");let o=t.slice(0,e).join(":"),a=t.slice(e+n).join(":");return o+"::"+a}function XF(t){let e=t.indexOf("::");if(e!==-1&&t.indexOf("::",e+1)!==-1)return;let n=e===-1?t.split(":"):t.slice(0,e).split(":"),i=e===-1?[]:t.slice(e+2).split(":");e!==-1&&(n.length===1&&n[0]===""&&(n.length=0),i.length===1&&i[0]===""&&(i.length=0));let r=n.concat(i),o=0;for(let s=0;s<r.length;s++){let c=r[s];if(c==="")return;if(c.indexOf(".")!==-1){if(s!==r.length-1||e!==-1&&i.length===0||!mb(c))return;o+=2;continue}if(!qF(c))return;r[s]=parseInt(c,16).toString(16),o++}if(e===-1)return o!==8?void 0:rz(r);if(o>=8)return;let a=r.slice(0,n.length);for(let s=o;s<8;s++)a.push("0");for(let s=n.length;s<r.length;s++)a.push(r[s]);return rz(a)}function Fl(t){let e=t[0]==="["&&t[t.length-1]==="]";if((t[0]==="["||t[t.length-1]==="]")&&!e)return{host:t,isIPV6:!1,error:!0};let i=e?t.slice(1,-1):t;if(e&&VF(i))return i=i.toLowerCase(),{host:`[${i}]`,escapedHost:i,isIPV6:!1,isIPVFuture:!0};if(YF(i,":")<2)return{host:t,isIPV6:!1,error:e};let r="",o=i.indexOf("%");if(o!==-1){let s=i.slice(o,o+3).toLowerCase()==="%25"?3:1;if(r=i.slice(o+s),!WF(r))return{host:t,isIPV6:!1,error:!0};i=i.slice(0,o)}let a=XF(i);return a===void 0?{host:t,isIPV6:!1,error:!0}:{host:a+(r?"%"+r:""),escapedHost:a+(r?"%25"+r:""),isIPV6:!0}}function YF(t,e){let n=0;for(let i=0;i<t.length;i++)t[i]===e&&n++;return n}function oz(t){let e=t,n=[],i=-1,r=0;for(;r=e.length;){if(r===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.push(e);break}}else if(r===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){n.push("/");break}}else if(r===3&&e==="/.."){n.length!==0&&n.pop(),n.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),n.length!==0&&n.pop();continue}}if((i=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,i)),e=e.slice(i)}return n.join("")}function QF(t){if(t===""||t[0]==="/")return oz(t);let e=t.split("/"),n=e.length-1,i=[],r=!1;for(let o=0;o<=n;o++){let a=e[o];a==="."||a===".."?(a===".."&&(i.length!==0&&i[i.length-1]!==".."?i.pop():i.push("..")),r=o===n):i.push(a)}return r&&i[i.length-1]!==".."&&i.push(""),(i.length===0||i[0]===""||i[0].includes(":"))&&i.unshift("."),i.join("/")}var eZ={"@":"%40","/":"%2F","?":"%3F","#":"%23"},nz=/[@/?#]/g;function az(t,e,n=!1){return e?(nz.lastIndex=0,t.replace(nz,i=>eZ[i])):FF(t)?t:Zl(t,MF,n)}function sz(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let i=0;i<t.length;i++){if(t[i]==="%"&&i+2<t.length){let r=t.slice(i+1,i+3);if(On(r)){let o=r.toUpperCase(),a=String.fromCharCode(parseInt(o,16));e&&hb(a)?n+=a:n+="%"+o,i+=2;continue}}n+=t[i]}return n}var tt=new Array(256);{let t="0123456789ABCDEF";for(let e=0;e<256;e++)tt[e]="%"+t[e>>4]+t[e&15]}function yb(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===42||t===43||t===45||t===46||t===47||t===64||t===95}function Te(t){return t<2048?tt[192|t>>6]+tt[128|t&63]:t<65536?tt[224|t>>12]+tt[128|t>>6&63]+tt[128|t&63]:tt[240|t>>18]+tt[128|t>>12&63]+tt[128|t>>6&63]+tt[128|t&63]}function tZ(t){let e="";for(let n=0;n<t.length;n++){let i=t[n];if(i==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(On(r)){let o=r.toUpperCase(),a=String.fromCharCode(parseInt(o,16));a!=="."&&hb(a)?e+=a:e+="%"+o,n+=2;continue}}if(iz(i))e+=i;else{let r=t.charCodeAt(n);if(r<128)e+=yb(r)?i:tt[r];else if(r<55296||r>57343)e+=Te(r);else if(r<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=Te(65536+(r-55296<<10)+(o-56320)),n++):e+=Te(65533)}else e+=Te(65533)}}return e}function rZ(t,e=!1){let n="",i=e&&t[0]!=="/";for(let r=0;r<t.length;r++){let o=t[r];if(o==="%"&&r+2<t.length){let a=t.slice(r+1,r+3);if(On(a)){n+="%"+a.toUpperCase(),r+=2;continue}}if(o==="/"&&(i=!1),iz(o)&&(o!==":"||!i))n+=o;else{let a=t.charCodeAt(r);if(a<128)n+=tt[a];else if(a<55296||a>57343)n+=Te(a);else if(a<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(n+=Te(65536+(a-55296<<10)+(s-56320)),r++):n+=Te(65533)}else n+=Te(65533)}}return n}function nZ(t){let e="";for(let n=0;n<t.length;n++){let i=t[n];if(i==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(On(r)){let o=r.toUpperCase(),a=String.fromCharCode(parseInt(o,16));hb(a)?e+=a:e+="%"+o,n+=2;continue}}if(gb(i))e+=i;else{let r=t.charCodeAt(n);if(r<128)e+=yb(r)?i:tt[r];else if(r<55296||r>57343)e+=Te(r);else if(r<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=Te(65536+(r-55296<<10)+(o-56320)),n++):e+=Te(65533)}else e+=Te(65533)}}return e}function Zl(t,e,n=!1){let i="";for(let r=0;r<t.length;r++){let o=t[r];if(o==="%"&&r+2<t.length){let a=t.slice(r+1,r+3);if(On(a)){i+="%"+a.toUpperCase(),r+=2;continue}}if(e(o))i+=o;else{let a=t.charCodeAt(r);if(a<128)i+=tt[a];else if(a<55296||a>57343)i+=n?o:Te(a);else if(a<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(i+=n?o+t[r+1]:Te(65536+(a-55296<<10)+(s-56320)),r++):i+=n?"\uFFFD":Te(65533)}else i+=n?"\uFFFD":Te(65533)}}return i}function cz(t){return Zl(t,LF)}function iZ(t){return Zl(t,gb)}function oZ(t){return Zl(t,gb)}function aZ(t){let e="";for(let n=0;n<t.length;n++){let i=t[n];if(i==="%"&&n+2<t.length){let o=t.slice(n+1,n+3);if(On(o)){e+="%"+o.toUpperCase(),n+=2;continue}}let r=t.charCodeAt(n);if(r<128)e+=yb(r)?i:tt[r];else if(r<55296||r>57343)e+=Te(r);else if(r<=56319&&n+1<t.length){let o=t.charCodeAt(n+1);o>=56320&&o<=57343?(e+=Te(65536+(r-55296<<10)+(o-56320)),n++):e+=Te(65533)}else e+=Te(65533)}return e}function sZ(t){let e=t.ipv6Zone;if(e===void 0)return;let n=t.host,i=n.indexOf("%");if(i===-1)return;let o=n.slice(0,i)+"%25"+e,a=Fl("["+o+"]");if(a.isIPV6===!0&&a.host===n)return"["+o+"]"}function cZ(t,e=!1){let n=[];if(t.userinfo!==void 0&&(n.push(cz(t.userinfo)),n.push("@")),t.host!==void 0){let i=t.host;if(!mb(i)){let r=sZ(t);if(r!==void 0)i=r;else{let o=Fl(i);o.isIPV6!==!0&&o.isIPVFuture!==!0&&(i=sz(i,!0),o=Fl(i)),o.isIPV6===!0||o.isIPVFuture===!0?i=`[${o.escapedHost}]`:i=az(i,!1,e)}}n.push(i)}if(typeof t.port=="number"||typeof t.port=="string"){let i=String(t.port);if(!UF(i))throw new TypeError("URI port is malformed.");n.push(":"),n.push(i)}return n.length?n.join(""):void 0}uz.exports={BYTE_HEX:tt,percentEncodeNonAscii:Te,nonSimpleDomain:HF,nonSimpleMailtoDomain:KF,recomposeAuthority:cZ,encodeHost:az,normalizePercentEncoding:sz,normalizePathEncoding:tZ,serializePathEncoding:rZ,normalizeQueryFragmentEncoding:nZ,encodeUserinfo:cz,encodeQuery:iZ,encodeFragment:oZ,escapePreservingEscapes:aZ,removeDotSegments:oz,removeDotSegmentsRelative:QF,isIPv4:mb,isUUID:RF,normalizeIPv6:Fl,stringArrayToHexStripped:ZF}});var bz=T((aX,vz)=>{"use strict";var{isUUID:uZ,BYTE_HEX:lZ,percentEncodeNonAscii:bb,nonSimpleMailtoDomain:dZ}=vb(),fZ=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,pZ=["http","https","ws","wss","urn","urn:uuid","mailto"];function mZ(t){return pZ.indexOf(t)!==-1}function $b(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 fz(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function pz(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 hZ(t){return t.secure=$b(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function gZ(t){if((t.port===($b(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=t.resourceName.indexOf("?"),n=e===-1?t.resourceName:t.resourceName.slice(0,e);t.path=n&&n!=="/"?n:void 0,t.query=e===-1?void 0:t.resourceName.slice(e+1),t.resourceName=void 0}return t.fragment=void 0,t}function yZ(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(fZ);if(n&&n[0]===t.path){let i=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let r=`${i}:${e.nid||t.nid}`,o=wb(r);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function vZ(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",i=t.nid.toLowerCase(),r=`${n}:${e.nid||i}`,o=wb(r);o&&(t=o.serialize(t,e));let a=t,s=t.nss;return a.path=`${i||e.nid}:${s}`,e.skipEscape=!0,a}function bZ(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!uZ(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function _Z(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var mz={scheme:"http",domainHost:!0,parse:fz,serialize:pz},$Z={scheme:"https",domainHost:mz.domainHost,parse:fz,serialize:pz},ql={scheme:"ws",domainHost:!0,parse:hZ,serialize:gZ},wZ={scheme:"wss",domainHost:ql.domainHost,parse:ql.parse,serialize:ql.serialize},xZ={scheme:"urn",parse:yZ,serialize:vZ,skipNormalize:!0,absolutePath:!0},SZ={scheme:"urn:uuid",parse:bZ,serialize:_Z,skipNormalize:!0},kZ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$'()*+=",IZ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$'()*+,;:@",hz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$'()*+;:";function Bl(t,e=!1){let n=new Uint8Array(128);for(let o=0;o<t.length;o++)n[t.charCodeAt(o)]=1;let i=t.replace(/[\\\]^-]/gu,"\\$&"),r=e?`[${i}]|[^\\0-\\x7F\\uD800-\\uDFFF]`:`[${i}]`;return{all:new RegExp(`^(?:${r})*$`,"u"),table:n,allowNonAscii:e}}var PZ=Bl(kZ),gz=Bl(IZ),zZ=Bl(hz),EZ=Bl(hz,!0),DZ=/^[\da-f]{2}$/iu,OZ=/^\[[\x21-\x5A\x5E-\x7E]*\]$/u,_b="URI mailto has an invalid recipient domain.",TZ="URI mailto must not have an authority component.",lz=/[\uD800-\uDFFF]/u;function qr(t){if(typeof t!="string"||t.indexOf("%")===-1)return t;try{return decodeURIComponent(t)}catch{return t}}function dz(t){let e="";for(let n=0;n<t.length;n++){let i=t.charCodeAt(n);if(i>=55296&&i<=56319&&n+1<t.length){let r=t.charCodeAt(n+1);if(r>=56320&&r<=57343){e+=t[n]+t[n+1],n++;continue}}e+=i>=55296&&i<=57343?"\uFFFD":t[n]}return e}function ns(t,e){if(e.all.test(t))return t;let n=e.table,i="";for(let r=0;r<t.length;r++){let o=t.charCodeAt(r);if(o<128){n[o]===1?i+=t[r]:o===37&&r+2<t.length&&DZ.test(t.slice(r+1,r+3))?(i+="%"+t.slice(r+1,r+3).toUpperCase(),r+=2):i+=lZ[o];continue}if(o<55296||o>57343){i+=e.allowNonAscii?t[r]:bb(o);continue}if(o<=56319&&r+1<t.length){let a=t.charCodeAt(r+1);if(a>=56320&&a<=57343){i+=e.allowNonAscii?t[r]+t[r+1]:bb(65536+(o-55296<<10)+(a-56320)),r++;continue}}i+=e.allowNonAscii?"\uFFFD":bb(65533)}return i}function yz(t,e,n){let i=String(t).toLowerCase();if(OZ.test(i)||i!==""&&!dZ(i))return i;try{let r=new URL("http://"+i);if(r.username||r.password||r.port||r.pathname!=="/"||r.search||r.hash||!r.hostname)throw new Error(_b);return e&&e.unicodeSupport?i:r.hostname}catch{return n&&(n.error=n.error||_b),i}}function CZ(t,e){let n=e&&e.unicodeSupport?EZ:zZ;return t.length>1&&t[0]==="["&&t[t.length-1]==="]"?"["+ns(t.slice(1,-1),n)+"]":ns(t,n)}function AZ(t,e){let n=t,i=n.path,r=n.query;i&&lz.test(i)&&(i=dz(i)),r&&lz.test(r)&&(r=dz(r));let o=i?i.indexOf(",")===-1?[i]:i.split(","):[];if(n.path=void 0,r){let a=null,s=0;for(;s<=r.length;){let c=r.indexOf("&",s);c===-1&&(c=r.length);let u=r.slice(s,c);s=c+1;let l=u.indexOf("=");if(l!==u.lastIndexOf("=")){n.error=n.error||"URI mailto has malformed header fields.";continue}let d=qr(l===-1?u:u.slice(0,l)),p=d.toLowerCase(),m=l===-1?"":u.slice(l+1);if(p==="to"){let f=m.split(",");for(let h=0;h<f.length;h++)o.push(f[h]);continue}if(p==="subject"){n.subject=qr(m);continue}if(p==="body"){n.body=qr(m);continue}a===null&&(a=Object.create(null)),a[d]=qr(m)}a!==null&&(n.headers=a)}n.query=void 0,o.length>0&&(n.userinfo!==void 0||n.host!==void 0||n.port!==void 0)&&(n.userinfo=void 0,n.host=void 0,n.port=void 0,n.error=n.error||TZ);for(let a=0;a<o.length;a++){let s=o[a],c=s.lastIndexOf("@");if(c<0){n.error=n.error||_b,o[a]=qr(s);continue}let u=qr(s.slice(0,c)),l=yz(qr(s.slice(c+1)),e,n);o[a]=u+"@"+l}return o.length&&(n.to=o),n}function NZ(t){return ns(t.replace(/%/gu,"%25"),gz)}function jZ(t,e){let n=t,i=Array.isArray(n.to)?n.to.slice():[],r=n.headers&&typeof n.headers=="object"?Object.assign(Object.create(null),n.headers):Object.create(null),o=Object.create(null);for(let c in r){let u=c.toLowerCase();if(u==="to"){let l=String(r[c]).split(",");for(let d=0;d<l.length;d++)i.push(l[d])}else u==="subject"||u==="body"?o[u]=r[c]:o[c]=r[c]}if(n.subject!==void 0&&(o.subject=n.subject),n.body!==void 0&&(o.body=n.body),n.headers=o,i.length){n.userinfo=void 0,n.host=void 0,n.port=void 0;for(let c=0;c<i.length;c++){let u=String(i[c]),l=u.lastIndexOf("@"),d=l>=0?u.slice(0,l):u,p=l>=0?u.slice(l+1):"",m=ns(d,PZ),f=qr(p),h=yz(f,e);i[c]=m+"@"+CZ(h,e)}n.path=i.join(","),e.skipEscape=!0}else n.path=void 0;let a="",s=0;for(let c in o)s++!==0&&(a+="&"),a+=NZ(c)+"="+ns(String(o[c]),gz);return s!==0?n.query=a:n.headers=void 0,n}var RZ={scheme:"mailto",parse:AZ,serialize:jZ,domainHost:!1,unicodeSupport:!0,skipNormalize:!0,absolutePath:!0},Vl={http:mz,https:$Z,ws:ql,wss:wZ,urn:xZ,"urn:uuid":SZ,mailto:RZ};Object.setPrototypeOf(Vl,null);function wb(t){return t&&(Vl[t]||Vl[t.toLowerCase()])||void 0}vz.exports={wsIsSecure:$b,SCHEMES:Vl,isValidSchemeName:mZ,getSchemeHandler:wb}});var Az=T((sX,Xl)=>{"use strict";var{normalizeIPv6:Sz,removeDotSegments:os,removeDotSegmentsRelative:kz,recomposeAuthority:UZ,normalizePercentEncoding:Sb,normalizePathEncoding:LZ,serializePathEncoding:_z,normalizeQueryFragmentEncoding:$z,encodeQuery:MZ,encodeFragment:FZ,encodeHost:ZZ,isIPv4:Iz,nonSimpleDomain:qZ}=vb(),{SCHEMES:Pz,getSchemeHandler:Kl}=bz(),zz=/^[A-Za-z][A-Za-z0-9+.-]*$/u,Ez="URI scheme is malformed.",Hl="URI host is malformed.",VZ=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function wz(t){let e=String(t);if(!zz.test(e))throw new TypeError(Ez);return e}function BZ(t,e){return typeof t=="string"?t=eq(t,e):typeof t=="object"&&(t=Jl(Tn(t,e),e)),t}function HZ(t,e,n){let i=n?Object.assign({scheme:"null"},n):{scheme:"null"},{parsed:r,malformedAuthorityOrPort:o,malformedReferenceEdge:a,malformedPercentEncoding:s,malformedSchemeSpecific:c,malformedHost:u,malformedScheme:l}=Gl(t,i),{parsed:d,malformedAuthorityOrPort:p,malformedReferenceEdge:m,malformedPercentEncoding:f,malformedSchemeSpecific:h,malformedHost:g,malformedScheme:y}=Gl(e,i);if(o||p||a||m||s||f||c||h||u||g||l||y)throw new Error(r.error||d.error||"URI is malformed.");let v=Dz(r,d,i,!0),b=Kl(n&&n.scheme||v.scheme),_=v.host;if((v.scheme==="http"||v.scheme==="https")&&!_)throw new Error("HTTP URIs must have a host.");let x=_!==void 0&&_!==""&&(Iz(_)||Sz(_).isIPV6);if(Tz(v,n||{},b,x))throw new Error(Hl);Oz(v,n||{},b,x);let k=_&&_.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(_);if(v.error&&!k)throw new Error(v.error);return i.skipEscape=!0,b&&b.absolutePath&&(i.absolutePath=!0),Tn(v,i)}function xb(t,e){t.host=e.host,e.ipv6Zone!==void 0&&(t.ipv6Zone=e.ipv6Zone)}function Dz(t,e,n,i){let r={};if(i||(t=Jl(Tn(t,n),n),e=Jl(Tn(e,n),n)),n=n||{},!n.tolerant&&e.scheme){r.scheme=e.scheme,r.userinfo=e.userinfo,xb(r,e),r.port=e.port;let o=Kl(e.scheme);r.path=o&&o.absolutePath?e.path||"":os(e.path||""),r.query=e.query}else{if(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)r.userinfo=e.userinfo,xb(r,e),r.port=e.port,r.path=os(e.path||""),r.query=e.query;else{if(!e.path)r.path=t.path,e.query!==void 0?r.query=e.query:r.query=t.query;else{if(e.path[0]==="/")r.path=os(e.path);else{let o=t.userinfo!==void 0||t.host!==void 0||t.port!==void 0;o&&!t.path?r.path="/"+e.path:t.path?r.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:r.path=e.path,r.path=t.scheme===void 0&&!o&&r.path[0]!=="/"?kz(r.path):os(r.path)}r.query=e.query}r.userinfo=t.userinfo,xb(r,t),r.port=t.port}r.scheme=t.scheme}return r.fragment=e.fragment,r}function GZ(t,e,n){let i=xz(t,n),r=xz(e,n);return i!==void 0&&r!==void 0&&i===r}function Tn(t,e){let n={host:t.host,ipv6Zone:t.ipv6Zone,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,to:t.to,subject:t.subject,body:t.body,headers:t.headers,error:""},i=Object.assign({},e),r=[];n.scheme&&(n.scheme=wz(n.scheme));let o=Kl(i.scheme||n.scheme);o&&o.serialize&&o.serialize(n,i);let a=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,s=(n.scheme===void 0||i.reference==="suffix")&&!a,c=!i.skipEscape&&s;n.path!==void 0&&(i.skipEscape?n.path=Sb(n.path):n.path=_z(n.path,c)),i.reference!=="suffix"&&n.scheme&&(n.scheme=wz(n.scheme),r.push(n.scheme,":"));let u=i.unicodeSupport===!0||!!(o&&o.unicodeSupport),l=UZ(n,u);if(l!==void 0&&(i.reference!=="suffix"&&r.push("//"),r.push(l),n.path&&n.path[0]!=="/"&&r.push("/")),n.path!==void 0){let d=n.path;!i.absolutePath&&(!o||!o.absolutePath)&&(d=s&&d[0]!=="/"?kz(d):os(d)),s&&(d=_z(d,!0)),l===void 0&&d[0]==="/"&&d[1]==="/"&&(d="/%2F"+d.slice(2)),r.push(d)}return n.query!==void 0&&r.push("?",MZ(n.query)),n.fragment!==void 0&&r.push("#",FZ(n.fragment)),r.join("")}var JZ=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,KZ=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,WZ=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function XZ(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 is(t){if(t===void 0)return!1;let e=t.indexOf("%");for(;e!==-1;){if(e+2>=t.length||!/^[\da-f]{2}$/iu.test(t.slice(e+1,e+3)))return!0;e=t.indexOf("%",e+3)}return!1}function Wl(t){return t[0]==="["&&t[t.length-1]==="]"}function YZ(t){let e=t[4];return is(t[3])||e!==void 0&&!Wl(e)&&is(e)||is(t[6])||is(t[7])||is(t[8])}function Oz(t,e,n,i){let r=t.host&&t.host[0]==="["&&t.host[t.host.length-1]==="]";if(Tz(t,e,n,i))return t.error=t.error||Hl,!0;if(!e.unicodeSupport&&(!n||!n.unicodeSupport)&&t.host&&!Wl(t.host)&&(e.domainHost||n&&n.domainHost)&&i===!1&&!r&&qZ(t.host)){let o;try{o=new URL("http://"+t.host)}catch(a){return t.error=t.error||"Host's domain name can not be converted to ASCII: "+a,!0}if(!QZ(o))return t.error=t.error||Hl,!0;t.host=o.hostname}return!1}function Tz(t,e,n,i){return!!(t.host&&i===!1&&!Wl(t.host)&&(e.domainHost||n&&n.domainHost)&&VZ.test(t.host))}function QZ(t){return t.username===""&&t.password===""&&t.port===""&&t.pathname==="/"&&t.search===""&&t.hash===""&&t.hostname!==""}function Gl(t,e){let n=Object.assign({},e),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=!1,o=t.length!==0&&(t.charCodeAt(0)<=32||t.charCodeAt(t.length-1)<=32),a=!1,s=!1,c=!1,u=!1,l=!1,d=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let p=t.match(KZ);p!==null&&p[1].indexOf("\\")!==-1&&(i.error="URI authority must not contain a literal backslash.",r=!0);let m=t.match(WZ);if(m!==null){let h=m[1],g=h.replace(/[\t\n\r]/g,"");g.length>=2&&(g.slice(0,2)!=="//"?(i.error=i.error||"URI authority must not contain a literal backslash.",r=!0):h.length!==g.length&&(i.error=i.error||"URI authority introducer must not contain whitespace.",r=!0))}o&&(i.error=i.error||"URI must not contain leading or trailing C0 controls or spaces.");let f=t.match(JZ);if(f){i.scheme=f[1],i.userinfo=f[3],i.host=f[4],i.port=parseInt(f[5],10),i.path=f[6]||"",i.query=f[7],i.fragment=f[8],i.scheme!==void 0&&(zz.test(i.scheme)?i.scheme=i.scheme.toLowerCase():(i.error=i.error||Ez,l=!0)),a=YZ(f),a&&(i.error=i.error||"URI contains malformed percent-encoding."),isNaN(i.port)&&(i.port=f[5]);let h=XZ(i,f);if(h!==void 0&&(i.error=i.error||h,r=!0),i.host)if(Iz(i.host)===!1){let v=Wl(i.host),b=i.host.indexOf("[")!==-1||i.host.indexOf("]")!==-1,_=Sz(i.host);d=_.isIPV6||_.isIPVFuture===!0,u=b&&(!v||_.error===!0),i.host=d?_.host:_.host.toLowerCase(),d&&_.isIPV6===!0&&i.host.indexOf("%")!==-1&&(i.ipv6Zone=i.host.slice(i.host.indexOf("%")+1)),u&&(i.error=i.error||Hl,r=!0)}else d=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference="same-document":i.scheme===void 0?i.reference="relative":i.fragment===void 0?i.reference="absolute":i.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==i.reference&&(i.error=i.error||"URI is not a "+n.reference+" reference.");let g=Kl(n.scheme||i.scheme);if(u||(c=Oz(i,n,g,d)),i.host!==void 0&&!u){let y=i.host;if(t.indexOf("%")!==-1&&!d&&(y=Sb(y,!0),y=Sb(y.toLowerCase())),n.scheme!=="null"){let v=n.unicodeSupport===!0||!!(g&&g.unicodeSupport);i.host=ZZ(y,d,v)}else i.host=y}(!g||g&&!g.skipNormalize)&&(i.path&&(i.path=LZ(i.path)),i.query&&(i.query=$z(i.query)),i.fragment&&(i.fragment=$z(i.fragment))),g&&g.parse&&(g.parse(i,n),g===Pz.urn&&i.nid===void 0&&(s=!0))}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:r,malformedReferenceEdge:o,malformedPercentEncoding:a,malformedSchemeSpecific:s,malformedHost:c,malformedScheme:l}}function Jl(t,e){return Gl(t,e).parsed}function eq(t,e){return Cz(t,e).normalized}function Cz(t,e){let{parsed:n,malformedAuthorityOrPort:i,malformedReferenceEdge:r,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:c}=Gl(t,e);return{normalized:i||r||o||a||s||c?t:Tn(n,e),malformedAuthorityOrPort:i,malformedReferenceEdge:r,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:c}}function xz(t,e){if(typeof t!="string"&&typeof t!="object")return;let n;try{n=typeof t=="string"?t:Tn(t,e)}catch{return}let{normalized:i,malformedAuthorityOrPort:r,malformedReferenceEdge:o,malformedPercentEncoding:a,malformedSchemeSpecific:s,malformedHost:c,malformedScheme:u}=Cz(n,e);return r||o||a||s||c||u?void 0:i}var kb={SCHEMES:Pz,normalize:BZ,resolve:HZ,resolveComponent:Dz,equal:GZ,serialize:Tn,parse:Jl};Xl.exports=kb;Xl.exports.default=kb;Xl.exports.fastUri=kb});var jz=T(Ib=>{"use strict";Object.defineProperty(Ib,"__esModule",{value:!0});var Nz=Az();Nz.code='require("ajv/dist/runtime/uri").default';Ib.default=Nz});var Vz=T(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.CodeGen=Ke.Name=Ke.nil=Ke.stringify=Ke.str=Ke._=Ke.KeywordCxt=void 0;var tq=ts();Object.defineProperty(Ke,"KeywordCxt",{enumerable:!0,get:function(){return tq.KeywordCxt}});var Fi=K();Object.defineProperty(Ke,"_",{enumerable:!0,get:function(){return Fi._}});Object.defineProperty(Ke,"str",{enumerable:!0,get:function(){return Fi.str}});Object.defineProperty(Ke,"stringify",{enumerable:!0,get:function(){return Fi.stringify}});Object.defineProperty(Ke,"nil",{enumerable:!0,get:function(){return Fi.nil}});Object.defineProperty(Ke,"Name",{enumerable:!0,get:function(){return Fi.Name}});Object.defineProperty(Ke,"CodeGen",{enumerable:!0,get:function(){return Fi.CodeGen}});var rq=Ul(),Fz=rs(),nq=Jv(),as=Ml(),iq=K(),ss=Ya(),Yl=Xa(),zb=ne(),Rz=tz(),oq=jz(),Zz=(t,e)=>new RegExp(t,e);Zz.code="new RegExp";var aq=["removeAdditional","useDefaults","coerceTypes"],sq=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),cq={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."},uq={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Uz=200;function lq(t){var e,n,i,r,o,a,s,c,u,l,d,p,m,f,h,g,y,v,b,_,x,k,D,A,F;let se=t.strict,Ee=(e=t.code)===null||e===void 0?void 0:e.optimize,Ie=Ee===!0||Ee===void 0?1:Ee||0,Me=(i=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&i!==void 0?i:Zz,ft=(r=t.uriResolver)!==null&&r!==void 0?r:oq.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:se)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=t.strictNumbers)!==null&&s!==void 0?s:se)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:se)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=t.strictTuples)!==null&&d!==void 0?d:se)!==null&&p!==void 0?p:"log",strictRequired:(f=(m=t.strictRequired)!==null&&m!==void 0?m:se)!==null&&f!==void 0?f:!1,code:t.code?{...t.code,optimize:Ie,regExp:Me}:{optimize:Ie,regExp:Me},loopRequired:(h=t.loopRequired)!==null&&h!==void 0?h:Uz,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:Uz,meta:(y=t.meta)!==null&&y!==void 0?y:!0,messages:(v=t.messages)!==null&&v!==void 0?v:!0,inlineRefs:(b=t.inlineRefs)!==null&&b!==void 0?b:!0,schemaId:(_=t.schemaId)!==null&&_!==void 0?_:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(k=t.validateSchema)!==null&&k!==void 0?k:!0,validateFormats:(D=t.validateFormats)!==null&&D!==void 0?D:!0,unicodeRegExp:(A=t.unicodeRegExp)!==null&&A!==void 0?A:!0,int32range:(F=t.int32range)!==null&&F!==void 0?F:!0,uriResolver:ft}}var cs=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,...lq(e)};let{es5:n,lines:i}=this.opts.code;this.scope=new iq.ValueScope({scope:{},prefixes:sq,es5:n,lines:i}),this.logger=gq(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,nq.getRules)(),Lz.call(this,cq,e,"NOT SUPPORTED"),Lz.call(this,uq,e,"DEPRECATED","warn"),this._metaOpts=mq.call(this),e.formats&&fq.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&pq.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),dq.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:i}=this.opts,r=Rz;i==="id"&&(r={...Rz},r.id=r.$id,delete r.$id),n&&e&&this.addMetaSchema(r,r[i],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){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 r=i(n);return"$async"in i||(this.errors=i.errors),r}compile(e,n){let i=this._addSchema(e,n);return i.validate||this._compileSchemaEnv(i)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:i}=this.opts;return r.call(this,e,n);async function r(l,d){await o.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||a.call(this,p)}async function o(l){l&&!this.getSchema(l)&&await r.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof Fz.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,l)}}function s({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await o.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,n)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=i(l))}finally{delete this._loading[l]}}}addSchema(e,n,i,r=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,i,r);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return n=(0,ss.normalizeId)(n||o),this._checkUnique(n),this.schemas[n]=this._addSchema(e,i,n,r,!0),this}addMetaSchema(e,n,i=this.opts.validateSchema){return this.addSchema(e,n,!0,i),this}validateSchema(e,n){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 r=this.validate(i,e);if(!r&&n){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return r}getSchema(e){let n;for(;typeof(n=Mz.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:i}=this.opts,r=new as.SchemaEnv({schema:{},schemaId:i});if(n=as.resolveSchema.call(this,r,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}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 n=Mz.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let i=e[this.opts.schemaId];return i&&(i=(0,ss.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let i;if(typeof e=="string")i=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=i);else if(typeof e=="object"&&n===void 0){if(n=e,i=n.keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(vq.call(this,i,n),!n)return(0,zb.eachItem)(i,o=>Pb.call(this,o)),this;_q.call(this,n);let r={...n,type:(0,Yl.getJSONTypes)(n.type),schemaType:(0,Yl.getJSONTypes)(n.schemaType)};return(0,zb.eachItem)(i,r.type.length===0?o=>Pb.call(this,o,r):o=>r.type.forEach(a=>Pb.call(this,o,r,a))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let i of n.rules){let r=i.rules.findIndex(o=>o.keyword===e);r>=0&&i.rules.splice(r,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:i="data"}={}){return!e||e.length===0?"No errors":e.map(r=>`${i}${r.instancePath} ${r.message}`).reduce((r,o)=>r+n+o)}$dataMetaSchema(e,n){let i=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of n){let o=r.split("/").slice(1),a=e;for(let s of o)a=a[s];for(let s in i){let c=i[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=a[s];u&&l&&(a[s]=qz(l))}}return e}_removeAllSchemas(e,n){for(let i in e){let r=e[i];(!n||n.test(i))&&(typeof r=="string"?delete e[i]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[i]))}}_addSchema(e,n,i,r=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];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,ss.normalizeId)(a||i);let u=ss.getSchemaRefs.call(this,e,i);return c=new as.SchemaEnv({schema:e,schemaId:s,meta:n,baseId:i,localRefs:u}),this._cache.set(c.schema,c),o&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=c),r&&this.validateSchema(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):as.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{as.compileSchema.call(this,e)}finally{this.opts=n}}};cs.ValidationError=rq.default;cs.MissingRefError=Fz.default;Ke.default=cs;function Lz(t,e,n,i="error"){for(let r in t){let o=r;o in e&&this.logger[i](`${n}: option ${r}. ${t[o]}`)}}function Mz(t){return t=(0,ss.normalizeId)(t),this.schemas[t]||this.refs[t]}function dq(){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 fq(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function pq(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 n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function mq(){let t={...this.opts};for(let e of aq)delete t[e];return t}var hq={log(){},warn(){},error(){}};function gq(t){if(t===!1)return hq;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 yq=/^[a-z_$][a-z0-9_$:-]*$/i;function vq(t,e){let{RULES:n}=this;if((0,zb.eachItem)(t,i=>{if(n.keywords[i])throw new Error(`Keyword ${i} is already defined`);if(!yq.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 Pb(t,e,n){var i;let r=e?.post;if(n&&r)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=r?o.post:o.rules.find(({type:c})=>c===n);if(a||(a={type:n,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,Yl.getJSONTypes)(e.type),schemaType:(0,Yl.getJSONTypes)(e.schemaType)}};e.before?bq.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,(i=e.implements)===null||i===void 0||i.forEach(c=>this.addKeyword(c))}function bq(t,e,n){let i=t.rules.findIndex(r=>r.keyword===n);i>=0?t.rules.splice(i,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function _q(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=qz(e)),t.validateSchema=this.compile(e,!0))}var $q={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function qz(t){return{anyOf:[t,$q]}}});var Bz=T(Eb=>{"use strict";Object.defineProperty(Eb,"__esModule",{value:!0});var wq={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Eb.default=wq});var Kz=T(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.callRef=Cn.getValidate=void 0;var xq=rs(),Hz=At(),$t=K(),Zi=yr(),Gz=Ml(),Ql=ne(),Sq={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:i}=t,{baseId:r,schemaEnv:o,validateName:a,opts:s,self:c}=i,{root:u}=o;if((n==="#"||n==="#/")&&r===u.baseId)return d();let l=Gz.resolveRef.call(c,u,r,n);if(l===void 0)throw new xq.default(i.opts.uriResolver,r,n);if(l instanceof Gz.SchemaEnv)return p(l);return m(l);function d(){if(o===u)return ed(t,a,o,o.$async);let f=e.scopeValue("root",{ref:u});return ed(t,(0,$t._)`${f}.validate`,u,u.$async)}function p(f){let h=Jz(t,f);ed(t,h,f,f.$async)}function m(f){let h=e.scopeValue("schema",s.code.source===!0?{ref:f,code:(0,$t.stringify)(f)}:{ref:f}),g=e.name("valid"),y=t.subschema({schema:f,dataTypes:[],schemaPath:$t.nil,topSchemaRef:h,errSchemaPath:n},g);t.mergeEvaluated(y),t.ok(g)}}};function Jz(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,$t._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Cn.getValidate=Jz;function ed(t,e,n,i){let{gen:r,it:o}=t,{allErrors:a,schemaEnv:s,opts:c}=o,u=c.passContext?Zi.default.this:$t.nil;i?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let f=r.let("valid");r.try(()=>{r.code((0,$t._)`await ${(0,Hz.callValidateCode)(t,e,u)}`),m(e),a||r.assign(f,!0)},h=>{r.if((0,$t._)`!(${h} instanceof ${o.ValidationError})`,()=>r.throw(h)),p(h),a||r.assign(f,!1)}),t.ok(f)}function d(){t.result((0,Hz.callValidateCode)(t,e,u),()=>m(e),()=>p(e))}function p(f){let h=(0,$t._)`${f}.errors`;r.assign(Zi.default.vErrors,(0,$t._)`${Zi.default.vErrors} === null ? ${h} : ${Zi.default.vErrors}.concat(${h})`),r.assign(Zi.default.errors,(0,$t._)`${Zi.default.vErrors}.length`)}function m(f){var h;if(!o.opts.unevaluated)return;let g=(h=n?.validate)===null||h===void 0?void 0:h.evaluated;if(o.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(o.props=Ql.mergeEvaluated.props(r,g.props,o.props));else{let y=r.var("props",(0,$t._)`${f}.evaluated.props`);o.props=Ql.mergeEvaluated.props(r,y,o.props,$t.Name)}if(o.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(o.items=Ql.mergeEvaluated.items(r,g.items,o.items));else{let y=r.var("items",(0,$t._)`${f}.evaluated.items`);o.items=Ql.mergeEvaluated.items(r,y,o.items,$t.Name)}}}Cn.callRef=ed;Cn.default=Sq});var Wz=T(Db=>{"use strict";Object.defineProperty(Db,"__esModule",{value:!0});var kq=Bz(),Iq=Kz(),Pq=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",kq.default,Iq.default];Db.default=Pq});var Xz=T(Ob=>{"use strict";Object.defineProperty(Ob,"__esModule",{value:!0});var td=K(),Vr=td.operators,rd={maximum:{okStr:"<=",ok:Vr.LTE,fail:Vr.GT},minimum:{okStr:">=",ok:Vr.GTE,fail:Vr.LT},exclusiveMaximum:{okStr:"<",ok:Vr.LT,fail:Vr.GTE},exclusiveMinimum:{okStr:">",ok:Vr.GT,fail:Vr.LTE}},zq={message:({keyword:t,schemaCode:e})=>(0,td.str)`must be ${rd[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,td._)`{comparison: ${rd[t].okStr}, limit: ${e}}`},Eq={keyword:Object.keys(rd),type:"number",schemaType:"number",$data:!0,error:zq,code(t){let{keyword:e,data:n,schemaCode:i}=t;t.fail$data((0,td._)`${n} ${rd[e].fail} ${i} || isNaN(${n})`)}};Ob.default=Eq});var Yz=T(Tb=>{"use strict";Object.defineProperty(Tb,"__esModule",{value:!0});var us=K(),Dq={message:({schemaCode:t})=>(0,us.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,us._)`{multipleOf: ${t}}`},Oq={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Dq,code(t){let{gen:e,data:n,schemaCode:i,it:r}=t,o=r.opts.multipleOfPrecision,a=e.let("res"),s=o?(0,us._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,us._)`${a} !== parseInt(${a})`;t.fail$data((0,us._)`(${i} === 0 || (${a} = ${n}/${i}, ${s}))`)}};Tb.default=Oq});var eE=T(Cb=>{"use strict";Object.defineProperty(Cb,"__esModule",{value:!0});function Qz(t){let e=t.length,n=0,i=0,r;for(;i<e;)n++,r=t.charCodeAt(i++),r>=55296&&r<=56319&&i<e&&(r=t.charCodeAt(i),(r&64512)===56320&&i++);return n}Cb.default=Qz;Qz.code='require("ajv/dist/runtime/ucs2length").default'});var tE=T(Ab=>{"use strict";Object.defineProperty(Ab,"__esModule",{value:!0});var An=K(),Tq=ne(),Cq=eE(),Aq={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,An.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,An._)`{limit: ${t}}`},Nq={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Aq,code(t){let{keyword:e,data:n,schemaCode:i,it:r}=t,o=e==="maxLength"?An.operators.GT:An.operators.LT,a=r.opts.unicode===!1?(0,An._)`${n}.length`:(0,An._)`${(0,Tq.useFunc)(t.gen,Cq.default)}(${n})`;t.fail$data((0,An._)`${a} ${o} ${i}`)}};Ab.default=Nq});var rE=T(Nb=>{"use strict";Object.defineProperty(Nb,"__esModule",{value:!0});var jq=At(),Rq=ne(),qi=K(),Uq={message:({schemaCode:t})=>(0,qi.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,qi._)`{pattern: ${t}}`},Lq={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Uq,code(t){let{gen:e,data:n,$data:i,schema:r,schemaCode:o,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(i){let{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,qi._)`new RegExp`:(0,Rq.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,qi._)`${u}(${o}, ${s}).test(${n})`),()=>e.assign(l,!1)),t.fail$data((0,qi._)`!${l}`)}else{let c=(0,jq.usePattern)(t,r);t.fail$data((0,qi._)`!${c}.test(${n})`)}}};Nb.default=Lq});var nE=T(jb=>{"use strict";Object.defineProperty(jb,"__esModule",{value:!0});var ls=K(),Mq={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,ls.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,ls._)`{limit: ${t}}`},Fq={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Mq,code(t){let{keyword:e,data:n,schemaCode:i}=t,r=e==="maxProperties"?ls.operators.GT:ls.operators.LT;t.fail$data((0,ls._)`Object.keys(${n}).length ${r} ${i}`)}};jb.default=Fq});var iE=T(Rb=>{"use strict";Object.defineProperty(Rb,"__esModule",{value:!0});var ds=At(),fs=K(),Zq=ne(),qq={message:({params:{missingProperty:t}})=>(0,fs.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,fs._)`{missingProperty: ${t}}`},Vq={keyword:"required",type:"object",schemaType:"array",$data:!0,error:qq,code(t){let{gen:e,schema:n,schemaCode:i,data:r,$data:o,it:a}=t,{opts:s}=a;if(!o&&n.length===0)return;let c=n.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){let m=t.parentSchema.properties,{definedProperties:f}=t.it;for(let h of n)if(m?.[h]===void 0&&!f.has(h)){let g=a.schemaEnv.baseId+a.errSchemaPath,y=`required property "${h}" is not defined at "${g}" (strictRequired)`;(0,Zq.checkStrictMode)(a,y,a.opts.strictRequired)}}function u(){if(c||o)t.block$data(fs.nil,d);else for(let m of n)(0,ds.checkReportMissingProp)(t,m)}function l(){let m=e.let("missing");if(c||o){let f=e.let("valid",!0);t.block$data(f,()=>p(m,f)),t.ok(f)}else e.if((0,ds.checkMissingProp)(t,n,m)),(0,ds.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",i,m=>{t.setParams({missingProperty:m}),e.if((0,ds.noPropertyInData)(e,r,m,s.ownProperties),()=>t.error())})}function p(m,f){t.setParams({missingProperty:m}),e.forOf(m,i,()=>{e.assign(f,(0,ds.propertyInData)(e,r,m,s.ownProperties)),e.if((0,fs.not)(f),()=>{t.error(),e.break()})},fs.nil)}}};Rb.default=Vq});var oE=T(Ub=>{"use strict";Object.defineProperty(Ub,"__esModule",{value:!0});var ps=K(),Bq={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,ps.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,ps._)`{limit: ${t}}`},Hq={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Bq,code(t){let{keyword:e,data:n,schemaCode:i}=t,r=e==="maxItems"?ps.operators.GT:ps.operators.LT;t.fail$data((0,ps._)`${n}.length ${r} ${i}`)}};Ub.default=Hq});var nd=T(Lb=>{"use strict";Object.defineProperty(Lb,"__esModule",{value:!0});var aE=rb();aE.code='require("ajv/dist/runtime/equal").default';Lb.default=aE});var sE=T(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:!0});var Mb=Xa(),We=K(),Gq=ne(),Jq=nd(),Kq={message:({params:{i:t,j:e}})=>(0,We.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,We._)`{i: ${t}, j: ${e}}`},Wq={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Kq,code(t){let{gen:e,data:n,$data:i,schema:r,parentSchema:o,schemaCode:a,it:s}=t;if(!i&&!r)return;let c=e.let("valid"),u=o.items?(0,Mb.getSchemaTypes)(o.items):[];t.block$data(c,l,(0,We._)`${a} === false`),t.ok(c);function l(){let f=e.let("i",(0,We._)`${n}.length`),h=e.let("j");t.setParams({i:f,j:h}),e.assign(c,!0),e.if((0,We._)`${f} > 1`,()=>(d()?p:m)(f,h))}function d(){return u.length>0&&!u.some(f=>f==="object"||f==="array")}function p(f,h){let g=e.name("item"),y=(0,Mb.checkDataTypes)(u,g,s.opts.strictNumbers,Mb.DataType.Wrong),v=e.const("indices",(0,We._)`{}`);e.for((0,We._)`;${f}--;`,()=>{e.let(g,(0,We._)`${n}[${f}]`),e.if(y,(0,We._)`continue`),u.length>1&&e.if((0,We._)`typeof ${g} == "string"`,(0,We._)`${g} += "_"`),e.if((0,We._)`typeof ${v}[${g}] == "number"`,()=>{e.assign(h,(0,We._)`${v}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,We._)`${v}[${g}] = ${f}`)})}function m(f,h){let g=(0,Gq.useFunc)(e,Jq.default),y=e.name("outer");e.label(y).for((0,We._)`;${f}--;`,()=>e.for((0,We._)`${h} = ${f}; ${h}--;`,()=>e.if((0,We._)`${g}(${n}[${f}], ${n}[${h}])`,()=>{t.error(),e.assign(c,!1).break(y)})))}}};Fb.default=Wq});var cE=T(qb=>{"use strict";Object.defineProperty(qb,"__esModule",{value:!0});var Zb=K(),Xq=ne(),Yq=nd(),Qq={message:"must be equal to constant",params:({schemaCode:t})=>(0,Zb._)`{allowedValue: ${t}}`},e2={keyword:"const",$data:!0,error:Qq,code(t){let{gen:e,data:n,$data:i,schemaCode:r,schema:o}=t;i||o&&typeof o=="object"?t.fail$data((0,Zb._)`!${(0,Xq.useFunc)(e,Yq.default)}(${n}, ${r})`):t.fail((0,Zb._)`${o} !== ${n}`)}};qb.default=e2});var uE=T(Vb=>{"use strict";Object.defineProperty(Vb,"__esModule",{value:!0});var ms=K(),t2=ne(),r2=nd(),n2={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ms._)`{allowedValues: ${t}}`},i2={keyword:"enum",schemaType:"array",$data:!0,error:n2,code(t){let{gen:e,data:n,$data:i,schema:r,schemaCode:o,it:a}=t;if(!i&&r.length===0)throw new Error("enum must have non-empty array");let s=r.length>=a.opts.loopEnum,c,u=()=>c??(c=(0,t2.useFunc)(e,r2.default)),l;if(s||i)l=e.let("valid"),t.block$data(l,d);else{if(!Array.isArray(r))throw new Error("ajv implementation error");let m=e.const("vSchema",o);l=(0,ms.or)(...r.map((f,h)=>p(m,h)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",o,m=>e.if((0,ms._)`${u()}(${n}, ${m})`,()=>e.assign(l,!0).break()))}function p(m,f){let h=r[f];return typeof h=="object"&&h!==null?(0,ms._)`${u()}(${n}, ${m}[${f}])`:(0,ms._)`${n} === ${h}`}}};Vb.default=i2});var lE=T(Bb=>{"use strict";Object.defineProperty(Bb,"__esModule",{value:!0});var o2=Xz(),a2=Yz(),s2=tE(),c2=rE(),u2=nE(),l2=iE(),d2=oE(),f2=sE(),p2=cE(),m2=uE(),h2=[o2.default,a2.default,s2.default,c2.default,u2.default,l2.default,d2.default,f2.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},p2.default,m2.default];Bb.default=h2});var Gb=T(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.validateAdditionalItems=void 0;var Nn=K(),Hb=ne(),g2={message:({params:{len:t}})=>(0,Nn.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Nn._)`{limit: ${t}}`},y2={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:g2,code(t){let{parentSchema:e,it:n}=t,{items:i}=e;if(!Array.isArray(i)){(0,Hb.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}dE(t,i)}};function dE(t,e){let{gen:n,schema:i,data:r,keyword:o,it:a}=t;a.items=!0;let s=n.const("len",(0,Nn._)`${r}.length`);if(i===!1)t.setParams({len:e.length}),t.pass((0,Nn._)`${s} <= ${e.length}`);else if(typeof i=="object"&&!(0,Hb.alwaysValidSchema)(a,i)){let u=n.var("valid",(0,Nn._)`${s} <= ${e.length}`);n.if((0,Nn.not)(u),()=>c(u)),t.ok(u)}function c(u){n.forRange("i",e.length,s,l=>{t.subschema({keyword:o,dataProp:l,dataPropType:Hb.Type.Num},u),a.allErrors||n.if((0,Nn.not)(u),()=>n.break())})}}hs.validateAdditionalItems=dE;hs.default=y2});var Jb=T(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.validateTuple=void 0;var fE=K(),id=ne(),v2=At(),b2={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return pE(t,"additionalItems",e);n.items=!0,!(0,id.alwaysValidSchema)(n,e)&&t.ok((0,v2.validateArray)(t))}};function pE(t,e,n=t.schema){let{gen:i,parentSchema:r,data:o,keyword:a,it:s}=t;l(r),s.opts.unevaluated&&n.length&&s.items!==!0&&(s.items=id.mergeEvaluated.items(i,n.length,s.items));let c=i.name("valid"),u=i.const("len",(0,fE._)`${o}.length`);n.forEach((d,p)=>{(0,id.alwaysValidSchema)(s,d)||(i.if((0,fE._)`${u} > ${p}`,()=>t.subschema({keyword:a,schemaProp:p,dataProp:p},c)),t.ok(c))});function l(d){let{opts:p,errSchemaPath:m}=s,f=n.length,h=f===d.minItems&&(f===d.maxItems||d[e]===!1);if(p.strictTuples&&!h){let g=`"${a}" is ${f}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,id.checkStrictMode)(s,g,p.strictTuples)}}}gs.validateTuple=pE;gs.default=b2});var mE=T(Kb=>{"use strict";Object.defineProperty(Kb,"__esModule",{value:!0});var _2=Jb(),$2={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,_2.validateTuple)(t,"items")};Kb.default=$2});var gE=T(Wb=>{"use strict";Object.defineProperty(Wb,"__esModule",{value:!0});var hE=K(),w2=ne(),x2=At(),S2=Gb(),k2={message:({params:{len:t}})=>(0,hE.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,hE._)`{limit: ${t}}`},I2={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:k2,code(t){let{schema:e,parentSchema:n,it:i}=t,{prefixItems:r}=n;i.items=!0,!(0,w2.alwaysValidSchema)(i,e)&&(r?(0,S2.validateAdditionalItems)(t,r):t.ok((0,x2.validateArray)(t)))}};Wb.default=I2});var yE=T(Xb=>{"use strict";Object.defineProperty(Xb,"__esModule",{value:!0});var jt=K(),od=ne(),P2={message:({params:{min:t,max:e}})=>e===void 0?(0,jt.str)`must contain at least ${t} valid item(s)`:(0,jt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,jt._)`{minContains: ${t}}`:(0,jt._)`{minContains: ${t}, maxContains: ${e}}`},z2={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:P2,code(t){let{gen:e,schema:n,parentSchema:i,data:r,it:o}=t,a,s,{minContains:c,maxContains:u}=i;o.opts.next?(a=c===void 0?1:c,s=u):a=1;let l=e.const("len",(0,jt._)`${r}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,od.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,od.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,od.alwaysValidSchema)(o,n)){let h=(0,jt._)`${l} >= ${a}`;s!==void 0&&(h=(0,jt._)`${h} && ${l} <= ${s}`),t.pass(h);return}o.items=!0;let d=e.name("valid");s===void 0&&a===1?m(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,jt._)`${r}.length > 0`,p)):(e.let(d,!1),p()),t.result(d,()=>t.reset());function p(){let h=e.name("_valid"),g=e.let("count",0);m(h,()=>e.if(h,()=>f(g)))}function m(h,g){e.forRange("i",0,l,y=>{t.subschema({keyword:"contains",dataProp:y,dataPropType:od.Type.Num,compositeRule:!0},h),g()})}function f(h){e.code((0,jt._)`${h}++`),s===void 0?e.if((0,jt._)`${h} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,jt._)`${h} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,jt._)`${h} >= ${a}`,()=>e.assign(d,!0)))}}};Xb.default=z2});var _E=T(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.validateSchemaDeps=er.validatePropertyDeps=er.error=void 0;var Yb=K(),E2=ne(),ys=At();er.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let i=e===1?"property":"properties";return(0,Yb.str)`must have ${i} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:i}})=>(0,Yb._)`{property: ${t},
29
+ missingProperty: ${i},
30
30
  depsCount: ${e},
31
- deps: ${r}}`};var UN={keyword:"dependencies",type:"object",schemaType:"object",error:Dt.error,code(t){let[e,r]=VN(t);gw(t,e),yw(t,r)}};function VN({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let o=Array.isArray(t[n])?e:r;o[n]=t[n]}return[e,r]}function gw(t,e=t.schema){let{gen:r,data:n,it:o}=t;if(Object.keys(e).length===0)return;let s=r.let("missing");for(let i in e){let a=e[i];if(a.length===0)continue;let c=(0,_s.propertyInData)(r,n,i,o.opts.ownProperties);t.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(c,()=>{for(let u of a)(0,_s.checkReportMissingProp)(t,u)}):(r.if((0,Rd._)`${c} && (${(0,_s.checkMissingProp)(t,a,s)})`),(0,_s.reportMissingProp)(t,s),r.else())}}Dt.validatePropertyDeps=gw;function yw(t,e=t.schema){let{gen:r,data:n,keyword:o,it:s}=t,i=r.name("valid");for(let a in e)(0,FN.alwaysValidSchema)(s,e[a])||(r.if((0,_s.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let c=t.subschema({keyword:o,schemaProp:a},i);t.mergeValidEvaluated(c,i)},()=>r.var(i,!0)),t.ok(i))}Dt.validateSchemaDeps=yw;Dt.default=UN});var bw=$(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});var vw=F(),BN=Q(),HN={message:"property name must be valid",params:({params:t})=>(0,vw._)`{propertyName: ${t.propertyName}}`},WN={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:HN,code(t){let{gen:e,schema:r,data:n,it:o}=t;if((0,BN.alwaysValidSchema)(o,r))return;let s=e.name("valid");e.forIn("key",n,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,vw.not)(s),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(s)}};Dd.default=WN});var Ad=$(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});var xa=ft(),zt=F(),GN=Gt(),Sa=Q(),JN={message:"must NOT have additional properties",params:({params:t})=>(0,zt._)`{additionalProperty: ${t.additionalProperty}}`},KN={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:JN,code(t){let{gen:e,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=!0,c.removeAdditional!=="all"&&(0,Sa.alwaysValidSchema)(i,r))return;let u=(0,xa.allSchemaProperties)(n.properties),l=(0,xa.allSchemaProperties)(n.patternProperties);d(),t.ok((0,zt._)`${s} === ${GN.default.errors}`);function d(){e.forIn("key",o,g=>{!u.length&&!l.length?f(g):e.if(p(g),()=>f(g))})}function p(g){let _;if(u.length>8){let x=(0,Sa.schemaRefOrVal)(i,n.properties,"properties");_=(0,xa.isOwnProperty)(e,x,g)}else u.length?_=(0,zt.or)(...u.map(x=>(0,zt._)`${g} === ${x}`)):_=zt.nil;return l.length&&(_=(0,zt.or)(_,...l.map(x=>(0,zt._)`${(0,xa.usePattern)(t,x)}.test(${g})`))),(0,zt.not)(_)}function m(g){e.code((0,zt._)`delete ${o}[${g}]`)}function f(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,Sa.alwaysValidSchema)(i,r)){let _=e.name("valid");c.removeAdditional==="failing"?(h(g,_,!1),e.if((0,zt.not)(_),()=>{t.reset(),m(g)})):(h(g,_),a||e.if((0,zt.not)(_),()=>e.break()))}}function h(g,_,x){let w={keyword:"additionalProperties",dataProp:g,dataPropType:Sa.Type.Str};x===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,_)}}};Nd.default=KN});var Sw=$(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});var YN=os(),ww=ft(),jd=Q(),xw=Ad(),QN={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:o,it:s}=t;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&xw.default.code(new YN.KeywordCxt(s,xw.default,"additionalProperties"));let i=(0,ww.allSchemaProperties)(r);for(let d of i)s.definedProperties.add(d);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=jd.mergeEvaluated.props(e,(0,jd.toHash)(i),s.props));let a=i.filter(d=>!(0,jd.alwaysValidSchema)(s,r[d]));if(a.length===0)return;let c=e.name("valid");for(let d of a)u(d)?l(d):(e.if((0,ww.propertyInData)(e,o,d,s.opts.ownProperties)),l(d),s.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return s.opts.useDefaults&&!s.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Md.default=QN});var zw=$(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});var $w=ft(),$a=F(),kw=Q(),Ew=Q(),XN={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:o,it:s}=t,{opts:i}=s,a=(0,$w.allSchemaProperties)(r),c=a.filter(h=>(0,kw.alwaysValidSchema)(s,r[h]));if(a.length===0||c.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let u=i.strictSchema&&!i.allowMatchingProperties&&o.properties,l=e.name("valid");s.props!==!0&&!(s.props instanceof $a.Name)&&(s.props=(0,Ew.evaluatedPropsToName)(e,s.props));let{props:d}=s;p();function p(){for(let h of a)u&&m(h),s.allErrors?f(h):(e.var(l,!0),f(h),e.if(l))}function m(h){for(let g in u)new RegExp(h).test(g)&&(0,kw.checkStrictMode)(s,`property ${g} matches pattern ${h} (use allowMatchingProperties)`)}function f(h){e.forIn("key",n,g=>{e.if((0,$a._)`${(0,$w.usePattern)(t,h)}.test(${g})`,()=>{let _=c.includes(h);_||t.subschema({keyword:"patternProperties",schemaProp:h,dataProp:g,dataPropType:Ew.Type.Str},l),s.opts.unevaluated&&d!==!0?e.assign((0,$a._)`${d}[${g}]`,!0):!_&&!s.allErrors&&e.if((0,$a.not)(l),()=>e.break())})})}}};Zd.default=XN});var Pw=$(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});var eA=Q(),tA={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,eA.alwaysValidSchema)(n,r)){t.fail();return}let o=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),t.failResult(o,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Ld.default=tA});var Tw=$(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var rA=ft(),nA={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:rA.validateUnion,error:{message:"must match a schema in anyOf"}};qd.default=nA});var Cw=$(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});var ka=F(),oA=Q(),sA={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ka._)`{passingSchemas: ${t.passing}}`},iA={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sA,code(t){let{gen:e,schema:r,parentSchema:n,it:o}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,i=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(i,()=>t.reset(),()=>t.error(!0));function u(){s.forEach((l,d)=>{let p;(0,oA.alwaysValidSchema)(o,l)?e.var(c,!0):p=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,ka._)`${c} && ${i}`).assign(i,!1).assign(a,(0,ka._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(i,!0),e.assign(a,d),p&&t.mergeEvaluated(p,ka.Name)})})}}};Fd.default=iA});var Ow=$(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});var aA=Q(),cA={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=e.name("valid");r.forEach((s,i)=>{if((0,aA.alwaysValidSchema)(n,s))return;let a=t.subschema({keyword:"allOf",schemaProp:i},o);t.ok(o),t.mergeEvaluated(a)})}};Ud.default=cA});var Dw=$(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});var Ea=F(),Rw=Q(),uA={message:({params:t})=>(0,Ea.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Ea._)`{failingKeyword: ${t.ifClause}}`},lA={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:uA,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Rw.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=Iw(n,"then"),s=Iw(n,"else");if(!o&&!s)return;let i=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),o&&s){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(a,u("then",l),u("else",l))}else o?e.if(a,u("then")):e.if((0,Ea.not)(a),u("else"));t.pass(i,()=>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 p=t.subschema({keyword:l},a);e.assign(i,a),t.mergeValidEvaluated(p,i),d?e.assign(d,(0,Ea._)`${l}`):t.setParams({ifClause:l})}}}};function Iw(t,e){let r=t.schema[e];return r!==void 0&&!(0,Rw.alwaysValidSchema)(t,r)}Vd.default=lA});var Nw=$(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});var dA=Q(),fA={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,dA.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Bd.default=fA});var Aw=$(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});var pA=Pd(),mA=fw(),hA=Td(),gA=mw(),yA=hw(),_A=_w(),vA=bw(),bA=Ad(),wA=Sw(),xA=zw(),SA=Pw(),$A=Tw(),kA=Cw(),EA=Ow(),zA=Dw(),PA=Nw();function TA(t=!1){let e=[SA.default,$A.default,kA.default,EA.default,zA.default,PA.default,vA.default,bA.default,_A.default,wA.default,xA.default];return t?e.push(mA.default,gA.default):e.push(pA.default,hA.default),e.push(yA.default),e}Hd.default=TA});var jw=$(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});var $e=F(),CA={message:({schemaCode:t})=>(0,$e.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,$e._)`{format: ${t}}`},OA={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:CA,code(t,e){let{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;if(!c.validateFormats)return;o?p():m();function p(){let f=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),h=r.const("fDef",(0,$e._)`${f}[${i}]`),g=r.let("fType"),_=r.let("format");r.if((0,$e._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>r.assign(g,(0,$e._)`${h}.type || "string"`).assign(_,(0,$e._)`${h}.validate`),()=>r.assign(g,(0,$e._)`"string"`).assign(_,h)),t.fail$data((0,$e.or)(x(),w()));function x(){return c.strictSchema===!1?$e.nil:(0,$e._)`${i} && !${_}`}function w(){let S=l.$async?(0,$e._)`(${h}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,$e._)`${_}(${n})`,k=(0,$e._)`(typeof ${_} == "function" ? ${S} : ${_}.test(${n}))`;return(0,$e._)`${_} && ${_} !== true && ${g} === ${e} && !${k}`}}function m(){let f=d.formats[s];if(!f){x();return}if(f===!0)return;let[h,g,_]=w(f);h===e&&t.pass(S());function x(){if(c.strictSchema===!1){d.logger.warn(k());return}throw new Error(k());function k(){return`unknown format "${s}" ignored in schema at path "${u}"`}}function w(k){let W=k instanceof RegExp?(0,$e.regexpCode)(k):c.code.formats?(0,$e._)`${c.code.formats}${(0,$e.getProperty)(s)}`:void 0,Z=r.scopeValue("formats",{key:s,ref:k,code:W});return typeof k=="object"&&!(k instanceof RegExp)?[k.type||"string",k.validate,(0,$e._)`${Z}.validate`]:["string",k,Z]}function S(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!l.$async)throw new Error("async format in sync schema");return(0,$e._)`await ${_}(${n})`}return typeof g=="function"?(0,$e._)`${_}(${n})`:(0,$e._)`${_}.test(${n})`}}}};Wd.default=OA});var Mw=$(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var IA=jw(),RA=[IA.default];Gd.default=RA});var Zw=$(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.contentVocabulary=An.metadataVocabulary=void 0;An.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];An.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var qw=$(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});var DA=Gb(),NA=cw(),AA=Aw(),jA=Mw(),Lw=Zw(),MA=[DA.default,NA.default,(0,AA.default)(),jA.default,Lw.metadataVocabulary,Lw.contentVocabulary];Jd.default=MA});var Uw=$(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.DiscrError=void 0;var Fw;(function(t){t.Tag="tag",t.Mapping="mapping"})(Fw||(za.DiscrError=Fw={}))});var Bw=$(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});var jn=F(),Kd=Uw(),Vw=aa(),ZA=ss(),LA=Q(),qA={message:({params:{discrError:t,tagName:e}})=>t===Kd.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,jn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},FA={keyword:"discriminator",type:"object",schemaType:"object",error:qA,code(t){let{gen:e,data:r,schema:n,parentSchema:o,it:s}=t,{oneOf:i}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),u=e.const("tag",(0,jn._)`${r}${(0,jn.getProperty)(a)}`);e.if((0,jn._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:Kd.DiscrError.Tag,tag:u,tagName:a})),t.ok(c);function l(){let m=p();e.if(!1);for(let f in m)e.elseIf((0,jn._)`${u} === ${f}`),e.assign(c,d(m[f]));e.else(),t.error(!1,{discrError:Kd.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function d(m){let f=e.name("valid"),h=t.subschema({keyword:"oneOf",schemaProp:m},f);return t.mergeEvaluated(h,jn.Name),f}function p(){var m;let f={},h=_(o),g=!0;for(let S=0;S<i.length;S++){let k=i[S];if(k?.$ref&&!(0,LA.schemaHasRulesButRef)(k,s.self.RULES)){let Z=k.$ref;if(k=Vw.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,Z),k instanceof Vw.SchemaEnv&&(k=k.schema),k===void 0)throw new ZA.default(s.opts.uriResolver,s.baseId,Z)}let W=(m=k?.properties)===null||m===void 0?void 0:m[a];if(typeof W!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);g=g&&(h||_(k)),x(W,S)}if(!g)throw new Error(`discriminator: "${a}" must be required`);return f;function _({required:S}){return Array.isArray(S)&&S.includes(a)}function x(S,k){if(S.const)w(S.const,k);else if(S.enum)for(let W of S.enum)w(W,k);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(S,k){if(typeof S!="string"||S in f)throw new Error(`discriminator: "${a}" values must be unique strings`);f[S]=k}}}};Yd.default=FA});var Hw=$((vU,UA)=>{UA.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 Xd=$((pe,Qd)=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.MissingRefError=pe.ValidationError=pe.CodeGen=pe.Name=pe.nil=pe.stringify=pe.str=pe._=pe.KeywordCxt=pe.Ajv=void 0;var VA=Fb(),BA=qw(),HA=Bw(),Ww=Hw(),WA=["/properties"],Pa="http://json-schema.org/draft-07/schema",Mn=class extends VA.default{_addVocabularies(){super._addVocabularies(),BA.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(HA.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Ww,WA):Ww;this.addMetaSchema(e,Pa,!1),this.refs["http://json-schema.org/schema"]=Pa}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Pa)?Pa:void 0)}};pe.Ajv=Mn;Qd.exports=pe=Mn;Qd.exports.Ajv=Mn;Object.defineProperty(pe,"__esModule",{value:!0});pe.default=Mn;var GA=os();Object.defineProperty(pe,"KeywordCxt",{enumerable:!0,get:function(){return GA.KeywordCxt}});var Zn=F();Object.defineProperty(pe,"_",{enumerable:!0,get:function(){return Zn._}});Object.defineProperty(pe,"str",{enumerable:!0,get:function(){return Zn.str}});Object.defineProperty(pe,"stringify",{enumerable:!0,get:function(){return Zn.stringify}});Object.defineProperty(pe,"nil",{enumerable:!0,get:function(){return Zn.nil}});Object.defineProperty(pe,"Name",{enumerable:!0,get:function(){return Zn.Name}});Object.defineProperty(pe,"CodeGen",{enumerable:!0,get:function(){return Zn.CodeGen}});var JA=sa();Object.defineProperty(pe,"ValidationError",{enumerable:!0,get:function(){return JA.default}});var KA=ss();Object.defineProperty(pe,"MissingRefError",{enumerable:!0,get:function(){return KA.default}})});var tx=$(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.formatNames=At.fastFormats=At.fullFormats=void 0;function Nt(t,e){return{validate:t,compare:e}}At.fullFormats={date:Nt(Yw,nf),time:Nt(tf(!0),of),"date-time":Nt(Gw(!0),Xw),"iso-time":Nt(tf(),Qw),"iso-date-time":Nt(Gw(),ex),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:r1,"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:u1,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:n1,int32:{type:"number",validate:i1},int64:{type:"number",validate:a1},float:{type:"number",validate:Kw},double:{type:"number",validate:Kw},password:!0,binary:!0};At.fastFormats={...At.fullFormats,date:Nt(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,nf),time:Nt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,of),"date-time":Nt(/^\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,Xw),"iso-time":Nt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Qw),"iso-date-time":Nt(/^\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,ex),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};At.formatNames=Object.keys(At.fullFormats);function YA(t){return t%4===0&&(t%100!==0||t%400===0)}var QA=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,XA=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Yw(t){let e=QA.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],o=+e[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&YA(r)?29:XA[n])}function nf(t,e){if(t&&e)return t>e?1:t<e?-1:0}var ef=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function tf(t){return function(r){let n=ef.exec(r);if(!n)return!1;let o=+n[1],s=+n[2],i=+n[3],a=n[4],c=n[5]==="-"?-1:1,u=+(n[6]||0),l=+(n[7]||0);if(u>23||l>59||t&&!a)return!1;if(o<=23&&s<=59&&i<60)return!0;let d=s-l*c,p=o-u*c-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&i<61}}function of(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(r&&n)return r-n}function Qw(t,e){if(!(t&&e))return;let r=ef.exec(t),n=ef.exec(e);if(r&&n)return t=r[1]+r[2]+r[3],e=n[1]+n[2]+n[3],t>e?1:t<e?-1:0}var rf=/t|\s/i;function Gw(t){let e=tf(t);return function(n){let o=n.split(rf);return o.length===2&&Yw(o[0])&&e(o[1])}}function Xw(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function ex(t,e){if(!(t&&e))return;let[r,n]=t.split(rf),[o,s]=e.split(rf),i=nf(r,o);if(i!==void 0)return i||of(n,s)}var e1=/\/|:/,t1=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function r1(t){return e1.test(t)&&t1.test(t)}var Jw=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function n1(t){return Jw.lastIndex=0,Jw.test(t)}var o1=-(2**31),s1=2**31-1;function i1(t){return Number.isInteger(t)&&t<=s1&&t>=o1}function a1(t){return Number.isInteger(t)}function Kw(){return!0}var c1=/[^\\]\\Z/;function u1(t){if(c1.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var rx=$(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.formatLimitDefinition=void 0;var l1=Xd(),Pt=F(),gr=Pt.operators,Ta={formatMaximum:{okStr:"<=",ok:gr.LTE,fail:gr.GT},formatMinimum:{okStr:">=",ok:gr.GTE,fail:gr.LT},formatExclusiveMaximum:{okStr:"<",ok:gr.LT,fail:gr.GTE},formatExclusiveMinimum:{okStr:">",ok:gr.GT,fail:gr.LTE}},d1={message:({keyword:t,schemaCode:e})=>(0,Pt.str)`should be ${Ta[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Pt._)`{comparison: ${Ta[t].okStr}, limit: ${e}}`};Ln.formatLimitDefinition={keyword:Object.keys(Ta),type:"string",schemaType:"string",$data:!0,error:d1,code(t){let{gen:e,data:r,schemaCode:n,keyword:o,it:s}=t,{opts:i,self:a}=s;if(!i.validateFormats)return;let c=new l1.KeywordCxt(s,a.RULES.all.format.definition,"format");c.$data?u():l();function u(){let p=e.scopeValue("formats",{ref:a.formats,code:i.code.formats}),m=e.const("fmt",(0,Pt._)`${p}[${c.schemaCode}]`);t.fail$data((0,Pt.or)((0,Pt._)`typeof ${m} != "object"`,(0,Pt._)`${m} instanceof RegExp`,(0,Pt._)`typeof ${m}.compare != "function"`,d(m)))}function l(){let p=c.schema,m=a.formats[p];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${o}": format "${p}" does not define "compare" function`);let f=e.scopeValue("formats",{key:p,ref:m,code:i.code.formats?(0,Pt._)`${i.code.formats}${(0,Pt.getProperty)(p)}`:void 0});t.fail$data(d(f))}function d(p){return(0,Pt._)`${p}.compare(${r}, ${n}) ${Ta[o].fail} 0`}},dependencies:["format"]};var f1=t=>(t.addKeyword(Ln.formatLimitDefinition),t);Ln.default=f1});var ix=$((vs,sx)=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var qn=tx(),p1=rx(),sf=F(),nx=new sf.Name("fullFormats"),m1=new sf.Name("fastFormats"),af=(t,e={keywords:!0})=>{if(Array.isArray(e))return ox(t,e,qn.fullFormats,nx),t;let[r,n]=e.mode==="fast"?[qn.fastFormats,m1]:[qn.fullFormats,nx],o=e.formats||qn.formatNames;return ox(t,o,r,n),e.keywords&&(0,p1.default)(t),t};af.get=(t,e="full")=>{let n=(e==="fast"?qn.fastFormats:qn.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function ox(t,e,r,n){var o,s;(o=(s=t.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,sf._)`require("ajv-formats/dist/formats").${n}`);for(let i of e)t.addFormat(i,r[i])}sx.exports=vs=af;Object.defineProperty(vs,"__esModule",{value:!0});vs.default=af});var te;(function(t){t.assertEqual=o=>o;function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let i of o)s[i]=i;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(let a of s)i[a]=o[a];return t.objectValues(i)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},t.find=(o,s)=>{for(let i of o)if(s(i))return i},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(te||(te={}));var Fa;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Fa||(Fa={}));var z=te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kt=t=>{switch(typeof t){case"undefined":return z.undefined;case"string":return z.string;case"number":return isNaN(t)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":return Array.isArray(t)?z.array:t===null?z.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?z.promise:typeof Map<"u"&&t instanceof Map?z.map:typeof Set<"u"&&t instanceof Set?z.set:typeof Date<"u"&&t instanceof Date?z.date:z.object;default:return z.unknown}},E=te.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"]),xx=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Qe=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(let i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){let u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,te.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(e(o))):n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Qe.create=t=>new Qe(t);var to=(t,e)=>{let r;switch(t.code){case E.invalid_type:t.received===z.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case E.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,te.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:r=`Unrecognized key(s) in object: ${te.joinValues(t.keys,", ")}`;break;case E.invalid_union:r="Invalid input";break;case E.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${te.joinValues(t.options)}`;break;case E.invalid_enum_value:r=`Invalid enum value. Expected ${te.joinValues(t.options)}, received '${t.received}'`;break;case E.invalid_arguments:r="Invalid function arguments";break;case E.invalid_return_type:r="Invalid function return type";break;case E.invalid_date:r="Invalid date";break;case E.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}"`:te.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case E.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==="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 E.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 E.custom:r="Invalid input";break;case E.invalid_intersection_types:r="Intersection results could not be merged";break;case E.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case E.not_finite:r="Number must be finite";break;default:r=e.defaultError,te.assertNever(t)}return{message:r}},mf=to;function Sx(t){mf=t}function $s(){return mf}var ks=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],i={...o,path:s},a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(i,{data:e,defaultError:a}).message;return{...o,path:s,message:o.message||a}},$x=[];function T(t,e){let r=ks({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,$s(),to].filter(n=>!!n)});t.common.issues.push(r)}var Ne=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 n=[];for(let o of r){if(o.status==="aborted")return A;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r)n.push({key:await o.key,value:await o.value});return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return A;s.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[s.value]=i.value)}return{status:e.value,value:n}}},A=Object.freeze({status:"aborted"}),hf=t=>({status:"dirty",value:t}),Le=t=>({status:"valid",value:t}),Ua=t=>t.status==="aborted",Va=t=>t.status==="dirty",ro=t=>t.status==="valid",Es=t=>typeof Promise<"u"&&t instanceof Promise,I;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(I||(I={}));var st=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ff=(t,e)=>{if(ro(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 Qe(t.common.issues);return this._error=r,this._error}}};function j(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(i,a)=>i.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:n??a.defaultError}:{message:r??a.defaultError},description:o}}var M=class{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)}get description(){return this._def.description}_getType(e){return Kt(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Kt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ne,ctx:{common:e.parent.common,data:e.data,parsedType:Kt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Es(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 n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let o={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Kt(e)},s=this._parseSync({data:e,path:o.path,parent:o});return ff(o,s)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Kt(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(Es(o)?o:Promise.resolve(o));return ff(n,s)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let i=e(o),a=()=>s.addIssue({code:E.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new Xe({schema:this,typeName:D.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return yt.create(this,this._def)}nullable(){return Zt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mt.create(this,this._def)}promise(){return Xt.create(this,this._def)}or(e){return kr.create([this,e],this._def)}and(e){return Er.create(this,e,this._def)}transform(e){return new Xe({...j(this._def),schema:this,typeName:D.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Or({...j(this._def),innerType:this,defaultValue:r,typeName:D.ZodDefault})}brand(){return new Cs({typeName:D.ZodBranded,type:this,...j(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new on({...j(this._def),innerType:this,catchValue:r,typeName:D.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return no.create(this,e)}readonly(){return an.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},kx=/^c[^\s-]{8,}$/i,Ex=/^[a-z][a-z0-9]*$/,zx=/^[0-9A-HJKMNP-TV-Z]{26}$/,Px=/^[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,Tx=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Cx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",qa,Ox=/^(((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}))$/,Ix=/^(([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})))$/,Rx=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Dx(t,e){return!!((e==="v4"||!e)&&Ox.test(t)||(e==="v6"||!e)&&Ix.test(t))}var Yt=class t extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==z.string){let s=this._getOrReturnCtx(e);return T(s,{code:E.invalid_type,expected:z.string,received:s.parsedType}),A}let n=new Ne,o;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),T(o,{code:E.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),T(o,{code:E.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let i=e.data.length>s.value,a=e.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(e,o),i?T(o,{code:E.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&T(o,{code:E.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Tx.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"email",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")qa||(qa=new RegExp(Cx,"u")),qa.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"emoji",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Px.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"uuid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")kx.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"cuid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Ex.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"cuid2",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")zx.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"ulid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),T(o,{validation:"url",code:E.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"regex",code:E.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),T(o,{code:E.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),T(o,{code:E.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),T(o,{code:E.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Rx(s).test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{code:E.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="ip"?Dx(e.data,s.version)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"ip",code:E.invalid_string,message:s.message}),n.dirty()):te.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:E.invalid_string,...I.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...I.errToObj(e)})}url(e){return this._addCheck({kind:"url",...I.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...I.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...I.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...I.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...I.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...I.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...I.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,...I.errToObj(e?.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...I.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...I.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...I.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...I.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...I.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...I.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...I.errToObj(r)})}nonempty(e){return this.min(1,I.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 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 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 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}};Yt.create=t=>{var e;return new Yt({checks:[],typeName:D.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...j(t)})};function Nx(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=parseInt(t.toFixed(o).replace(".","")),i=parseInt(e.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}var vr=class t extends M{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)!==z.number){let s=this._getOrReturnCtx(e);return T(s,{code:E.invalid_type,expected:z.number,received:s.parsedType}),A}let n,o=new Ne;for(let s of this._def.checks)s.kind==="int"?te.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),T(n,{code:E.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),T(n,{code:E.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),T(n,{code:E.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Nx(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),T(n,{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),T(n,{code:E.not_finite,message:s.message}),o.dirty()):te.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,I.toString(r))}gt(e,r){return this.setLimit("min",e,!1,I.toString(r))}lte(e,r){return this.setLimit("max",e,!0,I.toString(r))}lt(e,r){return this.setLimit("max",e,!1,I.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:I.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:I.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:I.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.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"&&te.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};vr.create=t=>new vr({checks:[],typeName:D.ZodNumber,coerce:t?.coerce||!1,...j(t)});var br=class t extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==z.bigint){let s=this._getOrReturnCtx(e);return T(s,{code:E.invalid_type,expected:z.bigint,received:s.parsedType}),A}let n,o=new Ne;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),T(n,{code:E.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),T(n,{code:E.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),T(n,{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):te.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,I.toString(r))}gt(e,r){return this.setLimit("min",e,!1,I.toString(r))}lte(e,r){return this.setLimit("max",e,!0,I.toString(r))}lt(e,r){return this.setLimit("max",e,!1,I.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:I.toString(o)}]})}_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:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:I.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}};br.create=t=>{var e;return new br({checks:[],typeName:D.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...j(t)})};var wr=class extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==z.boolean){let n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:z.boolean,received:n.parsedType}),A}return Le(e.data)}};wr.create=t=>new wr({typeName:D.ZodBoolean,coerce:t?.coerce||!1,...j(t)});var xr=class t extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==z.date){let s=this._getOrReturnCtx(e);return T(s,{code:E.invalid_type,expected:z.date,received:s.parsedType}),A}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return T(s,{code:E.invalid_date}),A}let n=new Ne,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),T(o,{code:E.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),T(o,{code:E.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):te.assertNever(s);return{status:n.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:I.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:I.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}};xr.create=t=>new xr({checks:[],coerce:t?.coerce||!1,typeName:D.ZodDate,...j(t)});var en=class extends M{_parse(e){if(this._getType(e)!==z.symbol){let n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:z.symbol,received:n.parsedType}),A}return Le(e.data)}};en.create=t=>new en({typeName:D.ZodSymbol,...j(t)});var Sr=class extends M{_parse(e){if(this._getType(e)!==z.undefined){let n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:z.undefined,received:n.parsedType}),A}return Le(e.data)}};Sr.create=t=>new Sr({typeName:D.ZodUndefined,...j(t)});var $r=class extends M{_parse(e){if(this._getType(e)!==z.null){let n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:z.null,received:n.parsedType}),A}return Le(e.data)}};$r.create=t=>new $r({typeName:D.ZodNull,...j(t)});var Qt=class extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return Le(e.data)}};Qt.create=t=>new Qt({typeName:D.ZodAny,...j(t)});var jt=class extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Le(e.data)}};jt.create=t=>new jt({typeName:D.ZodUnknown,...j(t)});var _t=class extends M{_parse(e){let r=this._getOrReturnCtx(e);return T(r,{code:E.invalid_type,expected:z.never,received:r.parsedType}),A}};_t.create=t=>new _t({typeName:D.ZodNever,...j(t)});var tn=class extends M{_parse(e){if(this._getType(e)!==z.undefined){let n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:z.void,received:n.parsedType}),A}return Le(e.data)}};tn.create=t=>new tn({typeName:D.ZodVoid,...j(t)});var Mt=class t extends M{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==z.array)return T(r,{code:E.invalid_type,expected:z.array,received:r.parsedType}),A;if(o.exactLength!==null){let i=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(i||a)&&(T(r,{code:i?E.too_big:E.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(T(r,{code:E.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(T(r,{code:E.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>o.type._parseAsync(new st(r,i,r.path,a)))).then(i=>Ne.mergeArray(n,i));let s=[...r.data].map((i,a)=>o.type._parseSync(new st(r,i,r.path,a)));return Ne.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:I.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:I.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:I.toString(r)}})}nonempty(e){return this.min(1,e)}};Mt.create=(t,e)=>new Mt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:D.ZodArray,...j(e)});function Xr(t){if(t instanceof He){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=yt.create(Xr(n))}return new He({...t._def,shape:()=>e})}else return t instanceof Mt?new Mt({...t._def,type:Xr(t.element)}):t instanceof yt?yt.create(Xr(t.unwrap())):t instanceof Zt?Zt.create(Xr(t.unwrap())):t instanceof Tt?Tt.create(t.items.map(e=>Xr(e))):t}var He=class t extends M{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=te.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==z.object){let u=this._getOrReturnCtx(e);return T(u,{code:E.invalid_type,expected:z.object,received:u.parsedType}),A}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof _t&&this._def.unknownKeys==="strip"))for(let u in o.data)i.includes(u)||a.push(u);let c=[];for(let u of i){let l=s[u],d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new st(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof _t){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:o.data[l]}});else if(u==="strict")a.length>0&&(T(o,{code:E.unrecognized_keys,keys:a}),n.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=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new st(o,d,o.path,l)),alwaysSet:l in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key;u.push({key:d,value:await l.value,alwaysSet:l.alwaysSet})}return u}).then(u=>Ne.mergeObjectSync(n,u)):Ne.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return I.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var o,s,i,a;let c=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=I.errToObj(e).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}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:D.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return te.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return te.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return Xr(this)}partial(e){let r={};return te.objectKeys(this.shape).forEach(n=>{let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return te.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof yt;)s=s._def.innerType;r[n]=s}}),new t({...this._def,shape:()=>r})}keyof(){return gf(te.objectKeys(this.shape))}};He.create=(t,e)=>new He({shape:()=>t,unknownKeys:"strip",catchall:_t.create(),typeName:D.ZodObject,...j(e)});He.strictCreate=(t,e)=>new He({shape:()=>t,unknownKeys:"strict",catchall:_t.create(),typeName:D.ZodObject,...j(e)});He.lazycreate=(t,e)=>new He({shape:t,unknownKeys:"strip",catchall:_t.create(),typeName:D.ZodObject,...j(e)});var kr=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=s.map(a=>new Qe(a.ctx.common.issues));return T(r,{code:E.invalid_union,unionErrors:i}),A}if(r.common.async)return Promise.all(n.map(async s=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let s,i=[];for(let c of n){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"&&!s&&(s={result:l,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(c=>new Qe(c));return T(r,{code:E.invalid_union,unionErrors:a}),A}}get options(){return this._def.options}};kr.create=(t,e)=>new kr({options:t,typeName:D.ZodUnion,...j(e)});var Ss=t=>t instanceof zr?Ss(t.schema):t instanceof Xe?Ss(t.innerType()):t instanceof Pr?[t.value]:t instanceof Tr?t.options:t instanceof Cr?Object.keys(t.enum):t instanceof Or?Ss(t._def.innerType):t instanceof Sr?[void 0]:t instanceof $r?[null]:null,zs=class t extends M{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.object)return T(r,{code:E.invalid_type,expected:z.object,received:r.parsedType}),A;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(T(r,{code:E.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),A)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let i=Ss(s.shape[e]);if(!i)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of i){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,s)}}return new t({typeName:D.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...j(n)})}};function Ba(t,e){let r=Kt(t),n=Kt(e);if(t===e)return{valid:!0,data:t};if(r===z.object&&n===z.object){let o=te.objectKeys(e),s=te.objectKeys(t).filter(a=>o.indexOf(a)!==-1),i={...t,...e};for(let a of s){let c=Ba(t[a],e[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===z.array&&n===z.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s<t.length;s++){let i=t[s],a=e[s],c=Ba(i,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===z.date&&n===z.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Er=class extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,i)=>{if(Ua(s)||Ua(i))return A;let a=Ba(s.value,i.value);return a.valid?((Va(s)||Va(i))&&r.dirty(),{status:r.value,value:a.data}):(T(n,{code:E.invalid_intersection_types}),A)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Er.create=(t,e,r)=>new Er({left:t,right:e,typeName:D.ZodIntersection,...j(r)});var Tt=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==z.array)return T(n,{code:E.invalid_type,expected:z.array,received:n.parsedType}),A;if(n.data.length<this._def.items.length)return T(n,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&n.data.length>this._def.items.length&&(T(n,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((i,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new st(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>Ne.mergeArray(r,i)):Ne.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Tt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Tt({items:t,typeName:D.ZodTuple,rest:null,...j(e)})};var Ps=class t extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==z.object)return T(n,{code:E.invalid_type,expected:z.object,received:n.parsedType}),A;let o=[],s=this._def.keyType,i=this._def.valueType;for(let a in n.data)o.push({key:s._parse(new st(n,a,n.path,a)),value:i._parse(new st(n,n.data[a],n.path,a))});return n.common.async?Ne.mergeObjectAsync(r,o):Ne.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof M?new t({keyType:e,valueType:r,typeName:D.ZodRecord,...j(n)}):new t({keyType:Yt.create(),valueType:e,typeName:D.ZodRecord,...j(r)})}},rn=class extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==z.map)return T(n,{code:E.invalid_type,expected:z.map,received:n.parsedType}),A;let o=this._def.keyType,s=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:o._parse(new st(n,a,n.path,[u,"key"])),value:s._parse(new st(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return A;(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 i){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return A;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};rn.create=(t,e,r)=>new rn({valueType:e,keyType:t,typeName:D.ZodMap,...j(r)});var nn=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==z.set)return T(n,{code:E.invalid_type,expected:z.set,received:n.parsedType}),A;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(T(n,{code:E.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(T(n,{code:E.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function i(c){let u=new Set;for(let l of c){if(l.status==="aborted")return A;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>s._parse(new st(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:I.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:I.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};nn.create=(t,e)=>new nn({valueType:t,minSize:null,maxSize:null,typeName:D.ZodSet,...j(e)});var Ts=class t extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.function)return T(r,{code:E.invalid_type,expected:z.function,received:r.parsedType}),A;function n(a,c){return ks({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,$s(),to].filter(u=>!!u),issueData:{code:E.invalid_arguments,argumentsError:c}})}function o(a,c){return ks({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,$s(),to].filter(u=>!!u),issueData:{code:E.invalid_return_type,returnTypeError:c}})}let s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof Xt){let a=this;return Le(async function(...c){let u=new Qe([]),l=await a._def.args.parseAsync(c,s).catch(m=>{throw u.addIssue(n(c,m)),u}),d=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(d,s).catch(m=>{throw u.addIssue(o(d,m)),u})})}else{let a=this;return Le(function(...c){let u=a._def.args.safeParse(c,s);if(!u.success)throw new Qe([n(c,u.error)]);let l=Reflect.apply(i,this,u.data),d=a._def.returns.safeParse(l,s);if(!d.success)throw new Qe([o(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Tt.create(e).rest(jt.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,n){return new t({args:e||Tt.create([]).rest(jt.create()),returns:r||jt.create(),typeName:D.ZodFunction,...j(n)})}},zr=class extends M{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})}};zr.create=(t,e)=>new zr({getter:t,typeName:D.ZodLazy,...j(e)});var Pr=class extends M{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return T(r,{received:r.data,code:E.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}};Pr.create=(t,e)=>new Pr({value:t,typeName:D.ZodLiteral,...j(e)});function gf(t,e){return new Tr({values:t,typeName:D.ZodEnum,...j(e)})}var Tr=class t extends M{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return T(r,{expected:te.joinValues(n),received:r.parsedType,code:E.invalid_type}),A}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),n=this._def.values;return T(r,{received:r.data,code:E.invalid_enum_value,options:n}),A}return Le(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){return t.create(e)}exclude(e){return t.create(this.options.filter(r=>!e.includes(r)))}};Tr.create=gf;var Cr=class extends M{_parse(e){let r=te.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==z.string&&n.parsedType!==z.number){let o=te.objectValues(r);return T(n,{expected:te.joinValues(o),received:n.parsedType,code:E.invalid_type}),A}if(r.indexOf(e.data)===-1){let o=te.objectValues(r);return T(n,{received:n.data,code:E.invalid_enum_value,options:o}),A}return Le(e.data)}get enum(){return this._def.values}};Cr.create=(t,e)=>new Cr({values:t,typeName:D.ZodNativeEnum,...j(e)});var Xt=class extends M{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.promise&&r.common.async===!1)return T(r,{code:E.invalid_type,expected:z.promise,received:r.parsedType}),A;let n=r.parsedType===z.promise?r.data:Promise.resolve(r.data);return Le(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Xt.create=(t,e)=>new Xt({type:t,typeName:D.ZodPromise,...j(e)});var Xe=class extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===D.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:i=>{T(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let i=o.transform(n.data,s);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(i).then(a=>this._def.schema._parseAsync({data:a,path:n.path,parent:n})):this._def.schema._parseSync({data:i,path:n.path,parent:n})}if(o.type==="refinement"){let i=a=>{let c=o.refinement(a,s);if(n.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(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?A:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?A:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ro(i))return i;let a=o.transform(i.value,s);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:n.data,path:n.path,parent:n}).then(i=>ro(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:r.value,value:a})):i);te.assertNever(o)}};Xe.create=(t,e,r)=>new Xe({schema:t,typeName:D.ZodEffects,effect:e,...j(r)});Xe.createWithPreprocess=(t,e,r)=>new Xe({schema:e,effect:{type:"preprocess",transform:t},typeName:D.ZodEffects,...j(r)});var yt=class extends M{_parse(e){return this._getType(e)===z.undefined?Le(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};yt.create=(t,e)=>new yt({innerType:t,typeName:D.ZodOptional,...j(e)});var Zt=class extends M{_parse(e){return this._getType(e)===z.null?Le(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Zt.create=(t,e)=>new Zt({innerType:t,typeName:D.ZodNullable,...j(e)});var Or=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===z.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Or.create=(t,e)=>new Or({innerType:t,typeName:D.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...j(e)});var on=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Es(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Qe(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Qe(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};on.create=(t,e)=>new on({innerType:t,typeName:D.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...j(e)});var sn=class extends M{_parse(e){if(this._getType(e)!==z.nan){let n=this._getOrReturnCtx(e);return T(n,{code:E.invalid_type,expected:z.nan,received:n.parsedType}),A}return{status:"valid",value:e.data}}};sn.create=t=>new sn({typeName:D.ZodNaN,...j(t)});var Ax=Symbol("zod_brand"),Cs=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},no=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?A:s.status==="dirty"?(r.dirty(),hf(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?A:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:D.ZodPipeline})}},an=class extends M{_parse(e){let r=this._def.innerType._parse(e);return ro(r)&&(r.value=Object.freeze(r.value)),r}};an.create=(t,e)=>new an({innerType:t,typeName:D.ZodReadonly,...j(e)});var yf=(t,e={},r)=>t?Qt.create().superRefine((n,o)=>{var s,i;if(!t(n)){let a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(i=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...u,fatal:c})}}):Qt.create(),jx={object:He.lazycreate},D;(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"})(D||(D={}));var Mx=(t,e={message:`Input not instance of ${t.name}`})=>yf(r=>r instanceof t,e),_f=Yt.create,vf=vr.create,Zx=sn.create,Lx=br.create,bf=wr.create,qx=xr.create,Fx=en.create,Ux=Sr.create,Vx=$r.create,Bx=Qt.create,Hx=jt.create,Wx=_t.create,Gx=tn.create,Jx=Mt.create,Kx=He.create,Yx=He.strictCreate,Qx=kr.create,Xx=zs.create,e0=Er.create,t0=Tt.create,r0=Ps.create,n0=rn.create,o0=nn.create,s0=Ts.create,i0=zr.create,a0=Pr.create,c0=Tr.create,u0=Cr.create,l0=Xt.create,pf=Xe.create,d0=yt.create,f0=Zt.create,p0=Xe.createWithPreprocess,m0=no.create,h0=()=>_f().optional(),g0=()=>vf().optional(),y0=()=>bf().optional(),_0={string:(t=>Yt.create({...t,coerce:!0})),number:(t=>vr.create({...t,coerce:!0})),boolean:(t=>wr.create({...t,coerce:!0})),bigint:(t=>br.create({...t,coerce:!0})),date:(t=>xr.create({...t,coerce:!0}))},v0=A,ke=Object.freeze({__proto__:null,defaultErrorMap:to,setErrorMap:Sx,getErrorMap:$s,makeIssue:ks,EMPTY_PATH:$x,addIssueToContext:T,ParseStatus:Ne,INVALID:A,DIRTY:hf,OK:Le,isAborted:Ua,isDirty:Va,isValid:ro,isAsync:Es,get util(){return te},get objectUtil(){return Fa},ZodParsedType:z,getParsedType:Kt,ZodType:M,ZodString:Yt,ZodNumber:vr,ZodBigInt:br,ZodBoolean:wr,ZodDate:xr,ZodSymbol:en,ZodUndefined:Sr,ZodNull:$r,ZodAny:Qt,ZodUnknown:jt,ZodNever:_t,ZodVoid:tn,ZodArray:Mt,ZodObject:He,ZodUnion:kr,ZodDiscriminatedUnion:zs,ZodIntersection:Er,ZodTuple:Tt,ZodRecord:Ps,ZodMap:rn,ZodSet:nn,ZodFunction:Ts,ZodLazy:zr,ZodLiteral:Pr,ZodEnum:Tr,ZodNativeEnum:Cr,ZodPromise:Xt,ZodEffects:Xe,ZodTransformer:Xe,ZodOptional:yt,ZodNullable:Zt,ZodDefault:Or,ZodCatch:on,ZodNaN:sn,BRAND:Ax,ZodBranded:Cs,ZodPipeline:no,ZodReadonly:an,custom:yf,Schema:M,ZodSchema:M,late:jx,get ZodFirstPartyTypeKind(){return D},coerce:_0,any:Bx,array:Jx,bigint:Lx,boolean:bf,date:qx,discriminatedUnion:Xx,effect:pf,enum:c0,function:s0,instanceof:Mx,intersection:e0,lazy:i0,literal:a0,map:n0,nan:Zx,nativeEnum:u0,never:Wx,null:Vx,nullable:f0,number:vf,object:Kx,oboolean:y0,onumber:g0,optional:d0,ostring:h0,pipeline:m0,preprocess:p0,promise:l0,record:r0,set:o0,strictObject:Yx,string:_f,symbol:Fx,transformer:pf,tuple:t0,undefined:Ux,union:Qx,unknown:Hx,void:Gx,NEVER:v0,ZodIssueCode:E,quotelessJson:xx,ZodError:Qe});var er=class{static detect(e){let r=e.trim();return this.isRemoteUrl(r)?{type:new URL(r).protocol==="https:"?"https_url":"http_url",originalPath:e,normalizedPath:r}:{type:"local",originalPath:e,normalizedPath:r}}static isValidUrl(e){try{return new URL(e.trim()).protocol.length>0}catch{return!1}}static isRemoteUrl(e){try{let r=e.trim();if(!r.startsWith("http://")&&!r.startsWith("https://"))return!1;let n=new URL(r);return!(n.protocol!=="http:"&&n.protocol!=="https:"||!n.hostname||n.hostname.length===0)}catch{return!1}}};var b0=ke.object({name:ke.string().default("eui-compodoc-mcp"),version:ke.string().default("1.0.0")}),w0=ke.object({path:ke.string().refine(t=>!t||t==="__bundled__"?!0:t.trim().length>0,{message:"Documentation path cannot be only whitespace"}).refine(t=>{if(!t||t==="__bundled__")return!0;let e=t.trim();return e.startsWith("http://")||e.startsWith("https://")?er.isRemoteUrl(e):!0},{message:"Path must be a valid local file path or HTTP/HTTPS URL"}).default("__bundled__"),watchForChanges:ke.boolean().default(!0),reloadDebounce:ke.number().min(0).default(1e3),timeout:ke.number().min(1e3).default(1e4),maxRetries:ke.number().min(0).max(10).default(3),pollingInterval:ke.number().min(5e3).default(6e4)}).default({}),x0=ke.object({maxResults:ke.number().min(1).max(1e3).default(50),minQueryLength:ke.number().min(1).default(2)}),S0=ke.object({level:ke.enum(["debug","info","warn","error"]).default("info"),format:ke.enum(["json","text"]).default("text")}),$0=ke.object({path:ke.string().optional()}).default({}),wf=ke.object({server:b0.default({}),documentation:w0,search:x0.default({}),logging:S0.default({}),accessibility:$0.default({})}),Os={server:{name:"eui-compodoc-mcp",version:"1.0.0"},documentation:{path:"__bundled__",watchForChanges:!0,reloadDebounce:1e3,timeout:1e4,maxRetries:3,pollingInterval:6e4},search:{maxResults:50,minQueryLength:2},logging:{level:"info",format:"text"}};function Ha(t){return wf.safeParse(t)}var cn=gt(require("fs")),oo=gt(require("path"));function k0(){let t=oo.join(__dirname,"documentation.json.gz");if(cn.existsSync(t))return t;let e=oo.join(__dirname,"documentation.json");return cn.existsSync(e)?e:Os.documentation.path}function xf(){let t={};return process.env.COMPODOC_MCP_DOC_PATH&&(t.documentation={path:process.env.COMPODOC_MCP_DOC_PATH}),process.env.COMPODOC_MCP_LOG_LEVEL&&(t.logging={level:process.env.COMPODOC_MCP_LOG_LEVEL}),process.env.COMPODOC_MCP_WATCH!==void 0&&(t.documentation||(t.documentation={path:""}),t.documentation.watchForChanges=process.env.COMPODOC_MCP_WATCH==="true"),process.env.COMPODOC_MCP_A11Y_PATH&&(t.accessibility={path:process.env.COMPODOC_MCP_A11Y_PATH}),t}function Sf(t){let e={};for(let r=0;r<t.length;r++)switch(t[r]){case"--doc-path":case"--documentation-path":e.documentation||(e.documentation={path:""}),e.documentation.path=t[++r];break;case"--watch":e.documentation||(e.documentation={path:""}),e.documentation.watchForChanges=!0;break;case"--no-watch":e.documentation||(e.documentation={path:""}),e.documentation.watchForChanges=!1;break;case"--log-level":e.logging={level:t[++r]};break;case"--max-results":e.search={maxResults:parseInt(t[++r],10)};break;case"--a11y-path":e.accessibility||(e.accessibility={}),e.accessibility.path=t[++r];break;case"--help":case"-h":z0(),process.exit(0);break}return e}function $f(t){try{if(!cn.existsSync(t))return process.stderr.write(`Configuration file not found: ${t}
32
- `),{};let e=cn.readFileSync(t,"utf-8"),r=oo.extname(t).toLowerCase();return r===".json"?JSON.parse(e):(process.stderr.write(`Unsupported configuration file format: ${r}
33
- `),{})}catch(e){let r=e instanceof Error?e.message:"Unknown error occurred";return process.stderr.write(`Failed to load config file ${t}: ${r}
34
- `),{}}}function Is(t,e){let r={...t};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let o=e[n],s=r[n];o&&typeof o=="object"&&!Array.isArray(o)&&s&&typeof s=="object"&&!Array.isArray(s)?r[n]=Is(s,o):o!==void 0&&(r[n]=o)}return r}function Wa(t=process.argv.slice(2)){try{let e=t.indexOf("--config"),r=e>=0?t[e+1]:void 0,n=r?$f(r):{},o=xf(),s=Sf(t),i={...Os};i=Is(i,n),i=Is(i,o),i=Is(i,s);let a=Ha(i);if(!a.success){let c=E0(a.error);return process.stderr.write(`Configuration validation failed:
31
+ deps: ${n}}`};var D2={keyword:"dependencies",type:"object",schemaType:"object",error:er.error,code(t){let[e,n]=O2(t);vE(t,e),bE(t,n)}};function O2({schema:t}){let e={},n={};for(let i in t){if(i==="__proto__")continue;let r=Array.isArray(t[i])?e:n;r[i]=t[i]}return[e,n]}function vE(t,e=t.schema){let{gen:n,data:i,it:r}=t;if(Object.keys(e).length===0)return;let o=n.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let c=(0,ys.propertyInData)(n,i,a,r.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),r.allErrors?n.if(c,()=>{for(let u of s)(0,ys.checkReportMissingProp)(t,u)}):(n.if((0,Yb._)`${c} && (${(0,ys.checkMissingProp)(t,s,o)})`),(0,ys.reportMissingProp)(t,o),n.else())}}er.validatePropertyDeps=vE;function bE(t,e=t.schema){let{gen:n,data:i,keyword:r,it:o}=t,a=n.name("valid");for(let s in e)(0,E2.alwaysValidSchema)(o,e[s])||(n.if((0,ys.propertyInData)(n,i,s,o.opts.ownProperties),()=>{let c=t.subschema({keyword:r,schemaProp:s},a);t.mergeValidEvaluated(c,a)},()=>n.var(a,!0)),t.ok(a))}er.validateSchemaDeps=bE;er.default=D2});var wE=T(Qb=>{"use strict";Object.defineProperty(Qb,"__esModule",{value:!0});var $E=K(),T2=ne(),C2={message:"property name must be valid",params:({params:t})=>(0,$E._)`{propertyName: ${t.propertyName}}`},A2={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:C2,code(t){let{gen:e,schema:n,data:i,it:r}=t;if((0,T2.alwaysValidSchema)(r,n))return;let o=e.name("valid");e.forIn("key",i,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,$E.not)(o),()=>{t.error(!0),r.allErrors||e.break()})}),t.ok(o)}};Qb.default=A2});var t_=T(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});var ad=At(),Bt=K(),N2=yr(),sd=ne(),j2={message:"must NOT have additional properties",params:({params:t})=>(0,Bt._)`{additionalProperty: ${t.additionalProperty}}`},R2={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:j2,code(t){let{gen:e,schema:n,parentSchema:i,data:r,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,sd.alwaysValidSchema)(a,n))return;let u=(0,ad.allSchemaProperties)(i.properties),l=(0,ad.allSchemaProperties)(i.patternProperties);d(),t.ok((0,Bt._)`${o} === ${N2.default.errors}`);function d(){e.forIn("key",r,g=>{!u.length&&!l.length?f(g):e.if(p(g),()=>f(g))})}function p(g){let y;if(u.length>8){let v=(0,sd.schemaRefOrVal)(a,i.properties,"properties");y=(0,ad.isOwnProperty)(e,v,g)}else u.length?y=(0,Bt.or)(...u.map(v=>(0,Bt._)`${g} === ${v}`)):y=Bt.nil;return l.length&&(y=(0,Bt.or)(y,...l.map(v=>(0,Bt._)`${(0,ad.usePattern)(t,v)}.test(${g})`))),(0,Bt.not)(y)}function m(g){e.code((0,Bt._)`delete ${r}[${g}]`)}function f(g){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){m(g);return}if(n===!1){t.setParams({additionalProperty:g}),t.error(),s||e.break();return}if(typeof n=="object"&&!(0,sd.alwaysValidSchema)(a,n)){let y=e.name("valid");c.removeAdditional==="failing"?(h(g,y,!1),e.if((0,Bt.not)(y),()=>{t.reset(),m(g)})):(h(g,y),s||e.if((0,Bt.not)(y),()=>e.break()))}}function h(g,y,v){let b={keyword:"additionalProperties",dataProp:g,dataPropType:sd.Type.Str};v===!1&&Object.assign(b,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(b,y)}}};e_.default=R2});var kE=T(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});var U2=ts(),xE=At(),r_=ne(),SE=t_(),L2={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:i,data:r,it:o}=t;o.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&SE.default.code(new U2.KeywordCxt(o,SE.default,"additionalProperties"));let a=(0,xE.allSchemaProperties)(n);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=r_.mergeEvaluated.props(e,(0,r_.toHash)(a),o.props));let s=a.filter(d=>!(0,r_.alwaysValidSchema)(o,n[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)u(d)?l(d):(e.if((0,xE.propertyInData)(e,r,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&&n[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};n_.default=L2});var EE=T(i_=>{"use strict";Object.defineProperty(i_,"__esModule",{value:!0});var IE=At(),cd=K(),PE=ne(),zE=ne(),M2={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:i,parentSchema:r,it:o}=t,{opts:a}=o,s=(0,IE.allSchemaProperties)(n),c=s.filter(h=>(0,PE.alwaysValidSchema)(o,n[h]));if(s.length===0||c.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let u=a.strictSchema&&!a.allowMatchingProperties&&r.properties,l=e.name("valid");o.props!==!0&&!(o.props instanceof cd.Name)&&(o.props=(0,zE.evaluatedPropsToName)(e,o.props));let{props:d}=o;p();function p(){for(let h of s)u&&m(h),o.allErrors?f(h):(e.var(l,!0),f(h),e.if(l))}function m(h){for(let g in u)new RegExp(h).test(g)&&(0,PE.checkStrictMode)(o,`property ${g} matches pattern ${h} (use allowMatchingProperties)`)}function f(h){e.forIn("key",i,g=>{e.if((0,cd._)`${(0,IE.usePattern)(t,h)}.test(${g})`,()=>{let y=c.includes(h);y||t.subschema({keyword:"patternProperties",schemaProp:h,dataProp:g,dataPropType:zE.Type.Str},l),o.opts.unevaluated&&d!==!0?e.assign((0,cd._)`${d}[${g}]`,!0):!y&&!o.allErrors&&e.if((0,cd.not)(l),()=>e.break())})})}}};i_.default=M2});var DE=T(o_=>{"use strict";Object.defineProperty(o_,"__esModule",{value:!0});var F2=ne(),Z2={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:i}=t;if((0,F2.alwaysValidSchema)(i,n)){t.fail();return}let r=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),t.failResult(r,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};o_.default=Z2});var OE=T(a_=>{"use strict";Object.defineProperty(a_,"__esModule",{value:!0});var q2=At(),V2={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:q2.validateUnion,error:{message:"must match a schema in anyOf"}};a_.default=V2});var TE=T(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});var ud=K(),B2=ne(),H2={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ud._)`{passingSchemas: ${t.passing}}`},G2={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:H2,code(t){let{gen:e,schema:n,parentSchema:i,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(r.opts.discriminator&&i.discriminator)return;let o=n,a=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(a,()=>t.reset(),()=>t.error(!0));function u(){o.forEach((l,d)=>{let p;(0,B2.alwaysValidSchema)(r,l)?e.var(c,!0):p=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,ud._)`${c} && ${a}`).assign(a,!1).assign(s,(0,ud._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(a,!0),e.assign(s,d),p&&t.mergeEvaluated(p,ud.Name)})})}}};s_.default=G2});var CE=T(c_=>{"use strict";Object.defineProperty(c_,"__esModule",{value:!0});var J2=ne(),K2={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let r=e.name("valid");n.forEach((o,a)=>{if((0,J2.alwaysValidSchema)(i,o))return;let s=t.subschema({keyword:"allOf",schemaProp:a},r);t.ok(r),t.mergeEvaluated(s)})}};c_.default=K2});var jE=T(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});var ld=K(),NE=ne(),W2={message:({params:t})=>(0,ld.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,ld._)`{failingKeyword: ${t.ifClause}}`},X2={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:W2,code(t){let{gen:e,parentSchema:n,it:i}=t;n.then===void 0&&n.else===void 0&&(0,NE.checkStrictMode)(i,'"if" without "then" and "else" is ignored');let r=AE(i,"then"),o=AE(i,"else");if(!r&&!o)return;let a=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),r&&o){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(s,u("then",l),u("else",l))}else r?e.if(s,u("then")):e.if((0,ld.not)(s),u("else"));t.pass(a,()=>t.error(!0));function c(){let l=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(l)}function u(l,d){return()=>{let p=t.subschema({keyword:l},s);e.assign(a,s),t.mergeValidEvaluated(p,a),d?e.assign(d,(0,ld._)`${l}`):t.setParams({ifClause:l})}}}};function AE(t,e){let n=t.schema[e];return n!==void 0&&!(0,NE.alwaysValidSchema)(t,n)}u_.default=X2});var RE=T(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});var Y2=ne(),Q2={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,Y2.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};l_.default=Q2});var UE=T(d_=>{"use strict";Object.defineProperty(d_,"__esModule",{value:!0});var eV=Gb(),tV=mE(),rV=Jb(),nV=gE(),iV=yE(),oV=_E(),aV=wE(),sV=t_(),cV=kE(),uV=EE(),lV=DE(),dV=OE(),fV=TE(),pV=CE(),mV=jE(),hV=RE();function gV(t=!1){let e=[lV.default,dV.default,fV.default,pV.default,mV.default,hV.default,aV.default,sV.default,oV.default,cV.default,uV.default];return t?e.push(tV.default,nV.default):e.push(eV.default,rV.default),e.push(iV.default),e}d_.default=gV});var LE=T(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});var Ce=K(),yV={message:({schemaCode:t})=>(0,Ce.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Ce._)`{format: ${t}}`},vV={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:yV,code(t,e){let{gen:n,data:i,$data:r,schema:o,schemaCode:a,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;r?p():m();function p(){let f=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),h=n.const("fDef",(0,Ce._)`${f}[${a}]`),g=n.let("fType"),y=n.let("format");n.if((0,Ce._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>n.assign(g,(0,Ce._)`${h}.type || "string"`).assign(y,(0,Ce._)`${h}.validate`),()=>n.assign(g,(0,Ce._)`"string"`).assign(y,h)),t.fail$data((0,Ce.or)(v(),b()));function v(){return c.strictSchema===!1?Ce.nil:(0,Ce._)`${a} && !${y}`}function b(){let _=l.$async?(0,Ce._)`(${h}.async ? await ${y}(${i}) : ${y}(${i}))`:(0,Ce._)`${y}(${i})`,x=(0,Ce._)`(typeof ${y} == "function" ? ${_} : ${y}.test(${i}))`;return(0,Ce._)`${y} && ${y} !== true && ${g} === ${e} && !${x}`}}function m(){let f=d.formats[o];if(!f){v();return}if(f===!0)return;let[h,g,y]=b(f);h===e&&t.pass(_());function v(){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 k=x instanceof RegExp?(0,Ce.regexpCode)(x):c.code.formats?(0,Ce._)`${c.code.formats}${(0,Ce.getProperty)(o)}`:void 0,D=n.scopeValue("formats",{key:o,ref:x,code:k});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,Ce._)`${D}.validate`]:["string",x,D]}function _(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ce._)`await ${y}(${i})`}return typeof g=="function"?(0,Ce._)`${y}(${i})`:(0,Ce._)`${y}.test(${i})`}}}};f_.default=vV});var ME=T(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});var bV=LE(),_V=[bV.default];p_.default=_V});var FE=T(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.contentVocabulary=Vi.metadataVocabulary=void 0;Vi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Vi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var qE=T(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});var $V=Wz(),wV=lE(),xV=UE(),SV=ME(),ZE=FE(),kV=[$V.default,wV.default,(0,xV.default)(),SV.default,ZE.metadataVocabulary,ZE.contentVocabulary];m_.default=kV});var BE=T(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.DiscrError=void 0;var VE;(function(t){t.Tag="tag",t.Mapping="mapping"})(VE||(dd.DiscrError=VE={}))});var GE=T(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});var Bi=K(),h_=BE(),HE=Ml(),IV=rs(),PV=ne(),zV={message:({params:{discrError:t,tagName:e}})=>t===h_.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,Bi._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},EV={keyword:"discriminator",type:"object",schemaType:"object",error:zV,code(t){let{gen:e,data:n,schema:i,parentSchema:r,it:o}=t,{oneOf:a}=r;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=i.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),u=e.const("tag",(0,Bi._)`${n}${(0,Bi.getProperty)(s)}`);e.if((0,Bi._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:h_.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function l(){let m=p();e.if(!1);for(let f in m)e.elseIf((0,Bi._)`${u} === ${f}`),e.assign(c,d(m[f]));e.else(),t.error(!1,{discrError:h_.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(m){let f=e.name("valid"),h=t.subschema({keyword:"oneOf",schemaProp:m},f);return t.mergeEvaluated(h,Bi.Name),f}function p(){var m;let f={},h=y(r),g=!0;for(let _=0;_<a.length;_++){let x=a[_];if(x?.$ref&&!(0,PV.schemaHasRulesButRef)(x,o.self.RULES)){let D=x.$ref;if(x=HE.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,D),x instanceof HE.SchemaEnv&&(x=x.schema),x===void 0)throw new IV.default(o.opts.uriResolver,o.baseId,D)}let k=(m=x?.properties)===null||m===void 0?void 0:m[s];if(typeof k!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(h||y(x)),v(k,_)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return f;function y({required:_}){return Array.isArray(_)&&_.includes(s)}function v(_,x){if(_.const)b(_.const,x);else if(_.enum)for(let k of _.enum)b(k,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function b(_,x){if(typeof _!="string"||_ in f)throw new Error(`discriminator: "${s}" values must be unique strings`);f[_]=x}}}};g_.default=EV});var JE=T((KX,DV)=>{DV.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 v_=T((xe,y_)=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.MissingRefError=xe.ValidationError=xe.CodeGen=xe.Name=xe.nil=xe.stringify=xe.str=xe._=xe.KeywordCxt=xe.Ajv=void 0;var OV=Vz(),TV=qE(),CV=GE(),KE=JE(),AV=["/properties"],fd="http://json-schema.org/draft-07/schema",Hi=class extends OV.default{_addVocabularies(){super._addVocabularies(),TV.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(CV.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(KE,AV):KE;this.addMetaSchema(e,fd,!1),this.refs["http://json-schema.org/schema"]=fd}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(fd)?fd:void 0)}};xe.Ajv=Hi;y_.exports=xe=Hi;y_.exports.Ajv=Hi;Object.defineProperty(xe,"__esModule",{value:!0});xe.default=Hi;var NV=ts();Object.defineProperty(xe,"KeywordCxt",{enumerable:!0,get:function(){return NV.KeywordCxt}});var Gi=K();Object.defineProperty(xe,"_",{enumerable:!0,get:function(){return Gi._}});Object.defineProperty(xe,"str",{enumerable:!0,get:function(){return Gi.str}});Object.defineProperty(xe,"stringify",{enumerable:!0,get:function(){return Gi.stringify}});Object.defineProperty(xe,"nil",{enumerable:!0,get:function(){return Gi.nil}});Object.defineProperty(xe,"Name",{enumerable:!0,get:function(){return Gi.Name}});Object.defineProperty(xe,"CodeGen",{enumerable:!0,get:function(){return Gi.CodeGen}});var jV=Ul();Object.defineProperty(xe,"ValidationError",{enumerable:!0,get:function(){return jV.default}});var RV=rs();Object.defineProperty(xe,"MissingRefError",{enumerable:!0,get:function(){return RV.default}})});var nD=T(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.formatNames=rr.fastFormats=rr.fullFormats=void 0;function tr(t,e){return{validate:t,compare:e}}rr.fullFormats={date:tr(QE,w_),time:tr(__(!0),x_),"date-time":tr(WE(!0),tD),"iso-time":tr(__(),eD),"iso-date-time":tr(WE(),rD),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:qV,"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:WV,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:VV,int32:{type:"number",validate:GV},int64:{type:"number",validate:JV},float:{type:"number",validate:YE},double:{type:"number",validate:YE},password:!0,binary:!0};rr.fastFormats={...rr.fullFormats,date:tr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,w_),time:tr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,x_),"date-time":tr(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,tD),"iso-time":tr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,eD),"iso-date-time":tr(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,rD),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};rr.formatNames=Object.keys(rr.fullFormats);function UV(t){return t%4===0&&(t%100!==0||t%400===0)}var LV=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,MV=[0,31,28,31,30,31,30,31,31,30,31,30,31];function QE(t){let e=LV.exec(t);if(!e)return!1;let n=+e[1],i=+e[2],r=+e[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&UV(n)?29:MV[i])}function w_(t,e){if(t&&e)return t>e?1:t<e?-1:0}var b_=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function __(t){return function(n){let i=b_.exec(n);if(!i)return!1;let r=+i[1],o=+i[2],a=+i[3],s=i[4],c=i[5]==="-"?-1:1,u=+(i[6]||0),l=+(i[7]||0);if(u>23||l>59||t&&!s)return!1;if(r<=23&&o<=59&&a<60)return!0;let d=o-l*c,p=r-u*c-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&a<61}}function x_(t,e){if(!(t&&e))return;let n=new Date("2020-01-01T"+t).valueOf(),i=new Date("2020-01-01T"+e).valueOf();if(n&&i)return n-i}function eD(t,e){if(!(t&&e))return;let n=b_.exec(t),i=b_.exec(e);if(n&&i)return t=n[1]+n[2]+n[3],e=i[1]+i[2]+i[3],t>e?1:t<e?-1:0}var $_=/t|\s/i;function WE(t){let e=__(t);return function(i){let r=i.split($_);return r.length===2&&QE(r[0])&&e(r[1])}}function tD(t,e){if(!(t&&e))return;let n=new Date(t).valueOf(),i=new Date(e).valueOf();if(n&&i)return n-i}function rD(t,e){if(!(t&&e))return;let[n,i]=t.split($_),[r,o]=e.split($_),a=w_(n,r);if(a!==void 0)return a||x_(i,o)}var FV=/\/|:/,ZV=/^(?:[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 qV(t){return FV.test(t)&&ZV.test(t)}var XE=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function VV(t){return XE.lastIndex=0,XE.test(t)}var BV=-(2**31),HV=2**31-1;function GV(t){return Number.isInteger(t)&&t<=HV&&t>=BV}function JV(t){return Number.isInteger(t)}function YE(){return!0}var KV=/[^\\]\\Z/;function WV(t){if(KV.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var iD=T(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.formatLimitDefinition=void 0;var XV=v_(),Ht=K(),Br=Ht.operators,pd={formatMaximum:{okStr:"<=",ok:Br.LTE,fail:Br.GT},formatMinimum:{okStr:">=",ok:Br.GTE,fail:Br.LT},formatExclusiveMaximum:{okStr:"<",ok:Br.LT,fail:Br.GTE},formatExclusiveMinimum:{okStr:">",ok:Br.GT,fail:Br.LTE}},YV={message:({keyword:t,schemaCode:e})=>(0,Ht.str)`should be ${pd[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ht._)`{comparison: ${pd[t].okStr}, limit: ${e}}`};Ji.formatLimitDefinition={keyword:Object.keys(pd),type:"string",schemaType:"string",$data:!0,error:YV,code(t){let{gen:e,data:n,schemaCode:i,keyword:r,it:o}=t,{opts:a,self:s}=o;if(!a.validateFormats)return;let c=new XV.KeywordCxt(o,s.RULES.all.format.definition,"format");c.$data?u():l();function u(){let p=e.scopeValue("formats",{ref:s.formats,code:a.code.formats}),m=e.const("fmt",(0,Ht._)`${p}[${c.schemaCode}]`);t.fail$data((0,Ht.or)((0,Ht._)`typeof ${m} != "object"`,(0,Ht._)`${m} instanceof RegExp`,(0,Ht._)`typeof ${m}.compare != "function"`,d(m)))}function l(){let p=c.schema,m=s.formats[p];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${r}": format "${p}" does not define "compare" function`);let f=e.scopeValue("formats",{key:p,ref:m,code:a.code.formats?(0,Ht._)`${a.code.formats}${(0,Ht.getProperty)(p)}`:void 0});t.fail$data(d(f))}function d(p){return(0,Ht._)`${p}.compare(${n}, ${i}) ${pd[r].fail} 0`}},dependencies:["format"]};var QV=t=>(t.addKeyword(Ji.formatLimitDefinition),t);Ji.default=QV});var cD=T((vs,sD)=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var Ki=nD(),e9=iD(),S_=K(),oD=new S_.Name("fullFormats"),t9=new S_.Name("fastFormats"),k_=(t,e={keywords:!0})=>{if(Array.isArray(e))return aD(t,e,Ki.fullFormats,oD),t;let[n,i]=e.mode==="fast"?[Ki.fastFormats,t9]:[Ki.fullFormats,oD],r=e.formats||Ki.formatNames;return aD(t,r,n,i),e.keywords&&(0,e9.default)(t),t};k_.get=(t,e="full")=>{let i=(e==="fast"?Ki.fastFormats:Ki.fullFormats)[t];if(!i)throw new Error(`Unknown format "${t}"`);return i};function aD(t,e,n,i){var r,o;(r=(o=t.opts.code).formats)!==null&&r!==void 0||(o.formats=(0,S_._)`require("ajv-formats/dist/formats").${i}`);for(let a of e)t.addFormat(a,n[a])}sD.exports=vs=k_;Object.defineProperty(vs,"__esModule",{value:!0});vs.default=k_});var ke={};nr(ke,{$brand:()=>Md,$input:()=>mm,$output:()=>pm,INVALID:()=>ot,NEVER:()=>Ld,TimePrecision:()=>Im,ZodAny:()=>lg,ZodArray:()=>mg,ZodBase64:()=>gu,ZodBase64URL:()=>yu,ZodBigInt:()=>$i,ZodBigIntFormat:()=>_u,ZodBoolean:()=>_i,ZodCIDRv4:()=>mu,ZodCIDRv6:()=>hu,ZodCUID:()=>su,ZodCUID2:()=>cu,ZodCatch:()=>Cg,ZodCodec:()=>aa,ZodCompileAsyncError:()=>Ut,ZodCompileUnsupportedError:()=>Q,ZodCreditCard:()=>og,ZodCustom:()=>sa,ZodCustomStringFormat:()=>un,ZodDate:()=>ea,ZodDefault:()=>Pg,ZodDiscriminatedUnion:()=>gg,ZodE164:()=>vu,ZodEmail:()=>nu,ZodEmoji:()=>ou,ZodEnum:()=>yi,ZodError:()=>OA,ZodExactOptional:()=>xu,ZodFile:()=>xg,ZodFirstPartyTypeKind:()=>Gg,ZodFunction:()=>qg,ZodGUID:()=>iu,ZodIBAN:()=>ag,ZodIPv4:()=>fu,ZodIPv6:()=>pu,ZodISODate:()=>Er,ZodISODateTime:()=>zr,ZodISODuration:()=>Or,ZodISOTime:()=>Dr,ZodInstanceOf:()=>Hg,ZodIntersection:()=>yg,ZodIssueCode:()=>AA,ZodJWT:()=>bu,ZodKSUID:()=>du,ZodLazy:()=>Mg,ZodLiteral:()=>wg,ZodMAC:()=>ig,ZodMap:()=>_g,ZodNaN:()=>Ng,ZodNanoID:()=>au,ZodNever:()=>fg,ZodNonOptional:()=>Su,ZodNull:()=>ug,ZodNullable:()=>Ig,ZodNumber:()=>bi,ZodNumberFormat:()=>ln,ZodObject:()=>ta,ZodOptional:()=>ia,ZodPipe:()=>oa,ZodPrefault:()=>Eg,ZodPreprocess:()=>jg,ZodPromise:()=>Zg,ZodReadonly:()=>Rg,ZodRealError:()=>yt,ZodRecord:()=>gi,ZodSet:()=>$g,ZodString:()=>vi,ZodStringFormat:()=>me,ZodSuccess:()=>Tg,ZodSymbol:()=>sg,ZodTemplateLiteral:()=>Lg,ZodTransform:()=>Sg,ZodTuple:()=>vg,ZodType:()=>H,ZodULID:()=>uu,ZodURL:()=>Yo,ZodUUID:()=>Wt,ZodUndefined:()=>cg,ZodUnion:()=>ra,ZodUnknown:()=>dg,ZodVoid:()=>pg,ZodXID:()=>lu,ZodXor:()=>hg,_ZodString:()=>ru,_default:()=>zg,_function:()=>pS,any:()=>Jx,array:()=>W,base64:()=>zx,base64url:()=>Ex,bigint:()=>qx,boolean:()=>De,catch:()=>Ag,check:()=>mS,cidrv4:()=>Ix,cidrv6:()=>Px,clone:()=>ce,codec:()=>uS,coerce:()=>Kg,compile:()=>vm,config:()=>Pe,core:()=>cr,creditCard:()=>Ox,cuid:()=>vx,cuid2:()=>bx,currencyCode:()=>Rx,custom:()=>ku,date:()=>Wx,decode:()=>Xh,decodeAsync:()=>Qh,deepPartial:()=>IS,describe:()=>hS,discriminatedUnion:()=>na,e164:()=>Dx,email:()=>cx,emoji:()=>gx,encode:()=>Wh,encodeAsync:()=>Yh,endsWith:()=>oi,enum:()=>Ve,exactOptional:()=>kg,file:()=>oS,flattenError:()=>wo,float32:()=>Lx,float64:()=>Mx,formatError:()=>xo,fromJSONSchema:()=>SS,function:()=>pS,getDiscriminatedOption:()=>Fp,getErrorMap:()=>jA,globalRegistry:()=>Ze,gt:()=>Jt,gte:()=>xt,guid:()=>ux,hash:()=>Ux,hex:()=>jx,hostname:()=>Nx,httpUrl:()=>hx,iban:()=>Tx,includes:()=>ni,input:()=>zS,instanceof:()=>yS,int:()=>eu,int32:()=>Fx,int64:()=>Vx,intersection:()=>wi,invertCodec:()=>lS,ipv4:()=>xx,ipv6:()=>kx,iso:()=>dn,json:()=>bS,jwt:()=>Cx,keyof:()=>Xx,ksuid:()=>wx,lazy:()=>Fg,length:()=>an,literal:()=>R,locales:()=>qo,looseObject:()=>qe,looseRecord:()=>tS,lowercase:()=>ti,lt:()=>Gt,lte:()=>wt,mac:()=>Sx,map:()=>rS,maxLength:()=>on,maxSize:()=>Sr,memoizer:()=>Fo,meta:()=>gS,mime:()=>si,minLength:()=>sr,minSize:()=>Kt,multipleOf:()=>xr,nan:()=>cS,nanoid:()=>yx,nativeEnum:()=>iS,negative:()=>qc,never:()=>$u,nonnegative:()=>Bc,nonoptional:()=>Og,nonpositive:()=>Vc,normalize:()=>ci,null:()=>Qo,nullable:()=>Xo,nullish:()=>aS,number:()=>oe,object:()=>j,optional:()=>pe,output:()=>ES,overwrite:()=>Lt,parse:()=>Hh,parseAsync:()=>Gh,partialRecord:()=>eS,pipe:()=>tu,positive:()=>Zc,prefault:()=>Dg,preprocess:()=>ca,prettifyError:()=>Bd,promise:()=>fS,properties:()=>ai,property:()=>Hc,readonly:()=>Ug,record:()=>he,refine:()=>Vg,regex:()=>ei,regexes:()=>zt,registry:()=>yc,safeDecode:()=>tg,safeDecodeAsync:()=>ng,safeEncode:()=>eg,safeEncodeAsync:()=>rg,safeParse:()=>Jh,safeParseAsync:()=>Kh,set:()=>nS,setErrorMap:()=>NA,size:()=>nn,slugify:()=>fi,startsWith:()=>ii,strictObject:()=>Yx,string:()=>S,stringFormat:()=>Ax,stringbool:()=>vS,success:()=>sS,superRefine:()=>Bg,symbol:()=>Hx,templateLiteral:()=>dS,toJSONSchema:()=>Wc,toLowerCase:()=>li,toUpperCase:()=>di,toZod:()=>fo,transform:()=>wu,treeifyError:()=>Vd,trim:()=>ui,tuple:()=>bg,uint32:()=>Zx,uint64:()=>Bx,ulid:()=>_x,undefined:()=>Gx,union:()=>de,unknown:()=>ye,uppercase:()=>ri,url:()=>mx,util:()=>I,uuid:()=>lx,uuidv4:()=>dx,uuidv6:()=>fx,uuidv7:()=>px,validate:()=>Gn,validateAsync:()=>Jn,void:()=>Kx,withParser:()=>vc,xid:()=>$x,xor:()=>Qx});var cr={};nr(cr,{$ZodAny:()=>Tp,$ZodArray:()=>Up,$ZodAsyncError:()=>ht,$ZodBase64:()=>_p,$ZodBase64URL:()=>$p,$ZodBigInt:()=>nc,$ZodBigIntFormat:()=>zp,$ZodBoolean:()=>No,$ZodCIDRv4:()=>vp,$ZodCIDRv6:()=>bp,$ZodCUID:()=>ap,$ZodCUID2:()=>sp,$ZodCatch:()=>nm,$ZodCheck:()=>ge,$ZodCheckBigIntFormat:()=>Cf,$ZodCheckEndsWith:()=>Bf,$ZodCheckGreaterThan:()=>Fs,$ZodCheckIncludes:()=>qf,$ZodCheckLengthEquals:()=>Lf,$ZodCheckLessThan:()=>Ms,$ZodCheckLowerCase:()=>Ff,$ZodCheckMaxLength:()=>Rf,$ZodCheckMaxSize:()=>Af,$ZodCheckMimeType:()=>Jf,$ZodCheckMinLength:()=>Uf,$ZodCheckMinSize:()=>Nf,$ZodCheckMultipleOf:()=>Of,$ZodCheckNumberFormat:()=>Tf,$ZodCheckOverwrite:()=>Kf,$ZodCheckProperties:()=>Gf,$ZodCheckProperty:()=>Hf,$ZodCheckRegex:()=>Mf,$ZodCheckSizeEquals:()=>jf,$ZodCheckStartsWith:()=>Vf,$ZodCheckStringFormat:()=>Kn,$ZodCheckUpperCase:()=>Zf,$ZodCodec:()=>Ro,$ZodCreditCard:()=>xp,$ZodCustom:()=>lm,$ZodCustomStringFormat:()=>Ip,$ZodCyclicError:()=>lc,$ZodDate:()=>jp,$ZodDefault:()=>Qp,$ZodDiscriminatedUnion:()=>Zp,$ZodE164:()=>wp,$ZodEmail:()=>ep,$ZodEmoji:()=>ip,$ZodEncodeError:()=>$r,$ZodEnum:()=>Gp,$ZodError:()=>qd,$ZodExactOptional:()=>Xp,$ZodFile:()=>Kp,$ZodFunction:()=>cm,$ZodGUID:()=>Yf,$ZodIBAN:()=>Sp,$ZodIPv4:()=>hp,$ZodIPv6:()=>gp,$ZodISODate:()=>fp,$ZodISODateTime:()=>dp,$ZodISODuration:()=>mp,$ZodISOTime:()=>pp,$ZodIntersection:()=>qp,$ZodJWT:()=>kp,$ZodKSUID:()=>lp,$ZodLazy:()=>Uo,$ZodLiteral:()=>Jp,$ZodMAC:()=>yp,$ZodMap:()=>Bp,$ZodNaN:()=>im,$ZodNanoID:()=>op,$ZodNever:()=>Ap,$ZodNonOptional:()=>tm,$ZodNull:()=>Op,$ZodNullable:()=>Yp,$ZodNumber:()=>rc,$ZodNumberFormat:()=>Pp,$ZodObject:()=>v$,$ZodObjectJIT:()=>Lp,$ZodOptional:()=>oc,$ZodPipe:()=>ac,$ZodPrefault:()=>em,$ZodPreprocess:()=>om,$ZodPromise:()=>um,$ZodReadonly:()=>am,$ZodRealError:()=>gt,$ZodRecord:()=>Vp,$ZodRegistry:()=>gc,$ZodSet:()=>Hp,$ZodString:()=>Qr,$ZodStringFormat:()=>ue,$ZodSuccess:()=>rm,$ZodSymbol:()=>Ep,$ZodTemplateLiteral:()=>sm,$ZodTransform:()=>Wp,$ZodTuple:()=>ic,$ZodType:()=>q,$ZodULID:()=>cp,$ZodURL:()=>np,$ZodUUID:()=>Qf,$ZodUndefined:()=>Dp,$ZodUnion:()=>jo,$ZodUnknown:()=>Cp,$ZodVoid:()=>Np,$ZodXID:()=>up,$ZodXor:()=>Mp,$brand:()=>Md,$constructor:()=>$,$input:()=>mm,$output:()=>pm,Doc:()=>Yr,INVALID:()=>ot,JSONSchema:()=>ox,JSONSchemaGenerator:()=>Xc,NEVER:()=>Ld,TimePrecision:()=>Im,URL_BAD_FORMAT:()=>tp,URL_UNPARSEABLE:()=>Do,ZodCompileAsyncError:()=>Ut,ZodCompileUnsupportedError:()=>Q,_any:()=>qm,_array:()=>Wm,_base64:()=>Uc,_base64url:()=>Lc,_bigint:()=>jm,_boolean:()=>Am,_catch:()=>bA,_check:()=>qw,_cidrv4:()=>jc,_cidrv6:()=>Rc,_coercedBigint:()=>Rm,_coercedBoolean:()=>Nm,_coercedDate:()=>Jm,_coercedNumber:()=>zm,_coercedString:()=>wm,_creditCard:()=>Sm,_cuid:()=>Ec,_cuid2:()=>Dc,_custom:()=>Ym,_date:()=>Gm,_decode:()=>Es,_decodeAsync:()=>Os,_default:()=>gA,_discriminatedUnion:()=>iA,_e164:()=>Mc,_email:()=>$c,_emoji:()=>Pc,_encode:()=>zs,_encodeAsync:()=>Ds,_endsWith:()=>oi,_enum:()=>lA,_file:()=>Xm,_float32:()=>Dm,_float64:()=>Om,_gt:()=>Jt,_gte:()=>xt,_guid:()=>wc,_iban:()=>km,_includes:()=>ni,_int:()=>Em,_int32:()=>Tm,_int64:()=>Um,_intersection:()=>oA,_ipv4:()=>Ac,_ipv6:()=>Nc,_isoDate:()=>Ho,_isoDateTime:()=>Bo,_isoDuration:()=>Jo,_isoTime:()=>Go,_jwt:()=>Fc,_ksuid:()=>Cc,_lazy:()=>xA,_length:()=>an,_literal:()=>fA,_lowercase:()=>ti,_lt:()=>Gt,_lte:()=>wt,_mac:()=>xm,_map:()=>cA,_max:()=>wt,_maxLength:()=>on,_maxSize:()=>Sr,_mime:()=>si,_min:()=>xt,_minLength:()=>sr,_minSize:()=>Kt,_multipleOf:()=>xr,_nan:()=>Km,_nanoid:()=>zc,_nativeEnum:()=>dA,_negative:()=>qc,_never:()=>Bm,_nonnegative:()=>Bc,_nonoptional:()=>yA,_nonpositive:()=>Vc,_normalize:()=>ci,_null:()=>Zm,_nullable:()=>hA,_number:()=>Pm,_optional:()=>mA,_overwrite:()=>Lt,_parse:()=>qn,_parseAsync:()=>Vn,_pipe:()=>_A,_positive:()=>Zc,_promise:()=>SA,_properties:()=>ai,_property:()=>Hc,_readonly:()=>$A,_record:()=>sA,_refine:()=>Qm,_regex:()=>ei,_safeDecode:()=>Cs,_safeDecodeAsync:()=>Ns,_safeEncode:()=>Ts,_safeEncodeAsync:()=>As,_safeParse:()=>Bn,_safeParseAsync:()=>Hn,_set:()=>uA,_size:()=>nn,_slugify:()=>fi,_startsWith:()=>ii,_string:()=>$m,_stringFormat:()=>sn,_stringbool:()=>nh,_success:()=>vA,_superRefine:()=>eh,_symbol:()=>Mm,_templateLiteral:()=>wA,_toLowerCase:()=>li,_toUpperCase:()=>di,_transform:()=>pA,_trim:()=>ui,_tuple:()=>aA,_uint32:()=>Cm,_uint64:()=>Lm,_ulid:()=>Oc,_undefined:()=>Fm,_union:()=>rA,_unknown:()=>Vm,_uppercase:()=>ri,_url:()=>Vo,_uuid:()=>xc,_uuidv4:()=>Sc,_uuidv6:()=>kc,_uuidv7:()=>Ic,_void:()=>Hm,_xid:()=>Tc,_xor:()=>nA,base64Charset:()=>Xs,base64urlCharset:()=>Ao,canParseURL:()=>rp,clone:()=>ce,compile:()=>vm,compileFn:()=>bc,config:()=>Pe,createStandardJSONSchemaMethod:()=>pi,createToJSONSchemaMethod:()=>oh,decode:()=>q_,decodeAsync:()=>B_,describe:()=>th,encode:()=>Z_,encodeAsync:()=>V_,extractDefs:()=>Ir,finalize:()=>Pr,flattenError:()=>wo,formatError:()=>xo,getDiscriminatedOption:()=>Fp,globalConfig:()=>Re,globalRegistry:()=>Ze,handleUnrepresentable:()=>Ae,initializeContext:()=>kr,isBackEdge:()=>fc,isRecursiveSchema:()=>dc,isValidBase64:()=>Co,isValidBase64URL:()=>Ys,isValidCIDRv6:()=>Ws,isValidCreditCard:()=>Qs,isValidIBAN:()=>ec,isValidIPv6:()=>To,isValidJWT:()=>tc,locales:()=>qo,memoizer:()=>Fo,mergeValues:()=>Wn,meta:()=>rh,parse:()=>So,parseAsync:()=>ko,parseURLObject:()=>h$,prettifyError:()=>Bd,process:()=>le,processSchema:()=>le,regexes:()=>zt,registry:()=>yc,safeDecode:()=>G_,safeDecodeAsync:()=>K_,safeEncode:()=>H_,safeEncodeAsync:()=>J_,safeParse:()=>Ps,safeParseAsync:()=>Hd,standardProps:()=>Hs,stripTabAndNewline:()=>Oo,toDotPath:()=>M_,toJSONSchema:()=>Wc,toZod:()=>fo,treeifyError:()=>Vd,urlHostnameOk:()=>Js,urlProtocolOk:()=>Ks,util:()=>I,validate:()=>Gn,validateAsync:()=>Jn,validateURL:()=>Gs,version:()=>Wf,withParser:()=>vc});var I={};nr(I,{BIGINT_FORMAT_RANGES:()=>yo,CONSTANT_CATCH:()=>ks,Class:()=>Ed,NUMBER_FORMAT_RANGES:()=>go,aborted:()=>it,allowsEval:()=>Td,assert:()=>PD,assertEqual:()=>xD,assertIs:()=>kD,assertNever:()=>ID,assertNotEqual:()=>SD,assignProp:()=>Fe,attachSchema:()=>vo,base64ToUint8Array:()=>A_,base64urlToUint8Array:()=>HD,cached:()=>Ln,captureStackTrace:()=>xs,cleanEnum:()=>BD,cleanRegex:()=>or,clone:()=>ce,cloneDef:()=>DD,codePointLength:()=>Wr,constantCatch:()=>Rd,createTransparentProxy:()=>jD,defineLazy:()=>Dd,defineLazyInternal:()=>G,derived:()=>WD,esc:()=>nt,escapeRegex:()=>Pt,explicitlyAborted:()=>Nd,extend:()=>LD,finalizeIssue:()=>mt,floatSafeRemainder:()=>po,getElementAtPath:()=>OD,getEnumValues:()=>Rn,getLengthableOrigin:()=>_o,getParsedType:()=>ND,getSizableOrigin:()=>bo,hexToUint8Array:()=>JD,hide:()=>$o,installLazyProp:()=>eO,isObject:()=>Kr,isPlainObject:()=>It,issue:()=>Zn,joinValues:()=>w,jsonStringifyReplacer:()=>Un,members:()=>jd,merge:()=>FD,mergeDefs:()=>Rt,normalizeParams:()=>C,nullish:()=>ws,numKeys:()=>AD,objectClone:()=>zD,omit:()=>UD,optionalKeys:()=>Ad,own:()=>_r,parsedType:()=>E,partial:()=>ZD,pick:()=>RD,prefixIssues:()=>pt,primitiveTypes:()=>Cd,promiseAllObject:()=>TD,propertyKeyTypes:()=>ho,randomString:()=>CD,rawShape:()=>Mn,required:()=>qD,safeExtend:()=>MD,shallowClone:()=>mo,sizeCaps:()=>Fn,slugify:()=>Od,stringifyPrimitive:()=>z,toZod:()=>fo,uint8ArrayToBase64:()=>N_,uint8ArrayToBase64url:()=>GD,uint8ArrayToHex:()=>KD,unwrapMessage:()=>jn});function xD(t){return t}function SD(t){return t}function fo(){return t=>t}function kD(t){}function ID(t){throw new Error("Unexpected value in exhaustive check")}function PD(t){}function Rn(t){let e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,r])=>e.indexOf(+i)===-1).map(([i,r])=>r)}function w(t,e="|"){return t.map(n=>z(n)).join(e)}function Un(t,e){return typeof e=="bigint"?e.toString():e}var zd=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ln(t){return new zd(t)}function ws(t){return t==null}function or(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function po(t,e){let n=t/e,i=Math.round(n),r=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var D_=Symbol("evaluating");function Dd(t,e,n){let i;Object.defineProperty(t,e,{get(){if(i!==D_)return i===void 0&&(i=D_,i=n()),i},set(r){Object.defineProperty(t,e,{value:r})},configurable:!0})}function zD(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function Fe(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Mn(t){let e=Object.getOwnPropertyDescriptor(t,"shape");return e?.get?e.get.raw:e?.value}function ir(t){return Mn(t._zod.def)??t._zod.def.shape}function O_(t,e,n){Object.defineProperty(t,e,{get(){let i=n();return Fe(this,e,i),i},enumerable:!0,configurable:!0})}function T_(t,e,n){e in t?Fe(t,e,n):t[e]=n}function Jr(t,e,n,i){let r=ir(e);for(let o of n){let a=Object.getOwnPropertyDescriptor(r,o);a.enumerable&&(a.get?O_(t,o,()=>{let s=e._zod.def.shape[o];return i?i(s,o):s}):T_(t,o,i?i(a.value,o):a.value))}}function ED(t,e){for(let n of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,n);i.enumerable&&(i.get?O_(t,n,()=>e[n]):T_(t,n,i.value))}}function Rt(...t){let e={};for(let n of t){let i=Object.getOwnPropertyDescriptors(n);Object.assign(e,i)}return Object.defineProperties({},e)}function DD(t){return Rt(t._zod.def)}function OD(t,e){return e?e.reduce((n,i)=>n?.[i],t):t}function TD(t){let e=Object.keys(t),n=e.map(i=>t[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<e.length;o++)r[e[o]]=i[o];return r})}function CD(t=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<t;i++)n+=e[Math.floor(Math.random()*e.length)];return n}function nt(t){return JSON.stringify(t)}function Od(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var xs="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Kr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Td=Ln(()=>{if(Re.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function It(t){if(Kr(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let n=e.prototype;return!(Kr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function mo(t){return It(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function AD(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}var ND=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}`)}},ho=new Set(["string","number","symbol"]),Cd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Pt(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ce(t,e,n){let i=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(i._zod.parent=t),i}function C(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 jD(t){let e;return new Proxy({},{get(n,i,r){return e??(e=t()),Reflect.get(e,i,r)},set(n,i,r,o){return e??(e=t()),Reflect.set(e,i,r,o)},has(n,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(n,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(n,i,r){return e??(e=t()),Reflect.defineProperty(e,i,r)}})}function z(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Ad(t){return Object.keys(t).filter(e=>t[e]._zod.optin!==void 0&&t[e]._zod.optout==="optional")}var go={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]},yo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function RD(t,e){let n=t._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o={};return Jr(o,t,Ss(t,e)),ce(t,Rt(n,{shape:o,checks:[]}))}function Ss(t,e){let n=ir(t),i=[];for(let r of Reflect.ownKeys(e)){if(!Object.getOwnPropertyDescriptor(n,r)?.enumerable)throw new Error(`Unrecognized key: "${String(r)}"`);e[r]&&i.push(r)}return i}function UD(t,e){let n=t._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(Ss(t,e)),a={};return Jr(a,t,Reflect.ownKeys(ir(t)).filter(s=>!o.has(s))),ce(t,Rt(n,{shape:a,checks:[]}))}function LD(t,e){if(!It(e))throw new Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let r=ir(t);for(let o of Reflect.ownKeys(e))if(Object.getOwnPropertyDescriptor(r,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ce(t,Rt(t._zod.def,{shape:C_(t,e)}))}function C_(t,e){let n={};return Jr(n,t,Reflect.ownKeys(ir(t))),ED(n,e),n}function MD(t,e){if(!It(e))throw new Error("Invalid input to safeExtend: expected a plain object");return ce(t,Rt(t._zod.def,{shape:C_(t,e)}))}function FD(t,e){if(!e?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n={};Jr(n,t,Reflect.ownKeys(ir(t))),Jr(n,e,Reflect.ownKeys(ir(e)));let i=Rt(t._zod.def,{shape:n,get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return ce(t,i)}function ZD(t,e,n,i="partial"){let o=e._zod.def.checks;if(o&&o.length>0)throw new Error(`.${i}() cannot be used on object schemas containing refinements`);let s=n?new Set(Ss(e,n)):void 0,c={};return Jr(c,e,Reflect.ownKeys(ir(e)),t&&((u,l)=>s&&!s.has(l)?u:new t({type:"optional",innerType:u}))),ce(e,Rt(e._zod.def,{shape:c,checks:[]}))}function qD(t,e,n){let i=n?new Set(Ss(e,n)):void 0,r={};return Jr(r,e,Reflect.ownKeys(ir(e)),(o,a)=>i&&!i.has(a)?o:new t({type:"nonoptional",innerType:o})),ce(e,Rt(e._zod.def,{shape:r}))}function it(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function Nd(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function pt(t,e){return e.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(t),n})}function jn(t){return typeof t=="string"?t:t?.message}function Fn(t){let e=[];for(let n of t??[]){let i=n._zod.def;if(!/_(length|size)$|_equals$/.test(i.check))break;let r=i.maximum??i.length??i.size;r>=0&&e.push([r,n])}return e}function vo(t,e,n){var i;for(let r=e;r<t.length;r++)(i=t[r]).schema??(i.schema=n)}function mt(t,e,n){var i;let r=t.inst?._zod?.traits;r?.has("$ZodType")&&(r.has("$ZodCheck")?(i=t).schema??(i.schema=t.inst):t.schema=t.inst);let o=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,a=t.message?t.message:jn(t.inst?._zod.def?.error?.(t))??jn(o?.(t))??jn(e?.error?.(t))??jn(n.customError?.(t))??jn(n.localeError?.(t))??"Invalid input",s={};for(let c of Object.keys(t))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(s[c]=t[c]);return s.path??(s.path=[]),s.message=a,e?.reportInput&&(s.input=t.input),s}function bo(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}var VD=/[\uD800-\uDBFF]/;function Wr(t){let e=t.length;if(!VD.test(t))return e;let n=e;for(let i=0;i<e-1;i++)(t.charCodeAt(i)&64512)===55296&&(t.charCodeAt(i+1)&64512)===56320&&(n--,i++);return n}function _o(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function E(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return e}function Zn(...t){let[e,n,i]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:i}:{...e}}function BD(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function A_(t){let e=atob(t),n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n}function N_(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function HD(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-e.length%4)%4);return A_(e+n)}function GD(t){return N_(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function JD(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)n[i/2]=Number.parseInt(e.slice(i,i+2),16);return n}function KD(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Ed=class{constructor(...e){}};function jd(t,e){for(let n in e){let i=Object.getOwnPropertyDescriptor(e,n);i.get?Object.defineProperty(t,n,{...i,enumerable:!1}):XD(t,n,i.value)}}function _r(t,e,n,i=!0){return Object.defineProperty(t,e,{configurable:!0,writable:!0,enumerable:i,value:n}),n}function $o(t,e,n){return _r(t,e,n,!1)}function WD(t,e){for(let n in t){let i=t[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get(){return _r(this,n,i(this))},set(r){_r(this,n,r)}})}return e}function XD(t,e,n){Object.defineProperty(t,e,{configurable:!0,get(){return this==null?n:_r(this,e,n.bind(this))},set(i){_r(this,e,i)}})}function YD(t,e){let n=Object.getPrototypeOf(t);return e in n?void 0:n}var Pd,br=!1,QD={configurable:!0,get(){br=!0}};function G(t,e,n){let i=Object.getPrototypeOf(t._zod);if(e in i&&Pd!==t._zod){Pd=void 0;return}Pd=t._zod,Object.defineProperty(i,e,{configurable:!0,get(){Object.defineProperty(this,e,QD);let r=br;br=!1;try{let o=n(this);return br?delete this[e]:Object.defineProperty(this,e,{configurable:!0,writable:!0,value:o}),br=br||r,o}catch(o){throw delete this[e],br=br||r,o}},set(r){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:r})}})}function eO(t,e,n,i){let r=YD(t,e);r&&Object.defineProperty(r,e,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,e,o),o.value=n(this),Object.defineProperty(this,e,o),o.value},set(o){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:i,value:o})}})}var ks="~constantCatch";function Rd(t){let e=()=>t;return e[ks]=!0,e}var j_,Ld=Object.freeze({status:"aborted"}),Ud={value:void 0,enumerable:!1},R_="captureStackTrace"in Error?Error:null;function tO(t){let e=R_;if(e){let n=e.stackTraceLimit;if(typeof n=="number"){try{e.stackTraceLimit=0}catch{return R_=null,new t}try{return new t}finally{e.stackTraceLimit=n}}}return new t}function $(t,e,n,i){let r={};function o(p){this.def=p,this.constr=d,this.traits=new Set}o.prototype=r;let a=n,s=a&&new WeakSet;function c(p,m){if(p._zod){if(p._zod.traits.has(t))return}else{Ud.value=new o(m);try{Object.defineProperty(p,"_zod",Ud)}finally{Ud.value=void 0}}if(p._zod.traits.add(t),e(p,m),s){let h=Object.getPrototypeOf(p),g=p._zod.constr.prototype,y=h;for(;y&&y!==g;)y=Object.getPrototypeOf(y);let v=y??h;s.has(v)||(s.add(v),jd(v,a))}let f=d.prototype;for(let h in f)Object.prototype.hasOwnProperty.call(f,h)&&(h in p||(p[h]=f[h].bind(p)))}let u=i?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:t});function d(p){let m=i?.Parent?tO(l):this;c(m,p);let f=m._zod.deferred;if(f){for(let g of f)g();m._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(m),m}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:p=>i?.Parent&&p instanceof i.Parent?!0:p?._zod?.traits?.has(t)}),Object.defineProperty(d,"name",{value:t}),d}var Md=Symbol("zod_brand"),ht=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},$r=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(j_=globalThis).__zod_globalConfig??(j_.__zod_globalConfig={});var Re=globalThis.__zod_globalConfig;function Pe(t){return t&&Object.assign(Re,t),Re}function rO(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Un,2)),t.message}function nO(t){this._zod.message=t}var iO={get:rO,set:nO,enumerable:!0,configurable:!0},Zd={value:void 0,enumerable:!1},U_=new WeakSet([Object.prototype,Error.prototype]),L_=(t,e)=>{t.name="$ZodError",Zd.value=e,Object.defineProperty(t,"issues",Zd),Zd.value=void 0,Object.defineProperty(t,"message",iO);let n=Object.getPrototypeOf(t);U_.has(n)||(U_.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}}))},qd=$("$ZodError",L_),gt=$("$ZodError",L_,void 0,{Parent:Error});function oO(t,e,n){return Object.prototype.hasOwnProperty.call(t,e)||(e==="__proto__"?Object.defineProperty(t,e,{value:n(),writable:!0,enumerable:!0,configurable:!0}):t[e]=n()),t[e]}function wo(t,e=n=>n.message){let n={},i=[];for(let r of t.issues)r.path.length>0?oO(n,r.path[0],()=>[]).push(e(r)):i.push(e(r));return{formErrors:i,fieldErrors:n}}function xo(t,e=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(e(a));else{let c=n,u=0;for(;u<s.length;){let l=s[u],d=u===s.length-1;if(l==="_errors"){d&&c._errors.push(e(a)),u++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let p=c[l];d&&p._errors.push(e(a)),c=p,u++}}}};return i(t),n}function Vd(t,e=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a;for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let c=[...o,...s.path];if(c.length===0){n.errors.push(e(s));continue}let u=n,l=0;for(;l<c.length;){let d=c[l],p=l===c.length-1;typeof d=="string"?(u.properties??(u.properties={}),Object.prototype.hasOwnProperty.call(u.properties,d)||Object.defineProperty(u.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),u=u.properties[d]):(u.items??(u.items=[]),(a=u.items)[d]??(a[d]={errors:[]}),u=u.items[d]),p&&u.errors.push(e(s)),l++}}};return i(t),n}function M_(t){let e=[],n=t.map(i=>typeof i=="object"?i.key:i);for(let i of n)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 Bd(t){let e=[],n=[...t.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)e.push(`\u2716 ${i.message}`),i.path?.length&&e.push(` \u2192 at ${M_(i.path)}`);return e.join(`
32
+ `)}function Is(t,e){return{callee:e?.callee??t,Err:e?.Err}}var qn=t=>{let e=(n,i,r,o)=>{let a=r?{...r,async:!1}:{async:!1},s=n._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new ht;if(s.issues.length){let c=new(o?.Err??t)(s.issues.map(u=>mt(u,a,Pe())));throw xs(c,o?.callee??e),c}return s.value};return e},So=qn(gt),Vn=t=>{let e=async(n,i,r,o)=>{let a=r?{...r,async:!0}:{async:!0},s=n._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(o?.Err??t)(s.issues.map(u=>mt(u,a,Pe())));throw xs(c,o?.callee??e),c}return s.value};return e},ko=Vn(gt),Bn=t=>(e,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new ht;return o.issues.length?F_(t,o.issues,r):{success:!0,data:o.value}},Ps=Bn(gt);function F_(t,e,n){let i;return{success:!1,get error(){return i||(i=new t(e.map(r=>mt(r,n,Pe()))),e=void 0,n=void 0),i},set error(r){i=r,e=void 0,n=void 0}}}var Hn=t=>async(e,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=e._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?F_(t,o.issues,r):{success:!0,data:o.value}},Hd=Hn(gt),sO=Symbol.for("zod.compile.invalid"),cO=Symbol.for("zod.compile.fallback"),Gn=((t,e,n)=>{let i=t._zod.bag.validator;if(i!==void 0){if(i(e)!==sO)return!0;if(i.definite===!0&&n===void 0)return!1}return uO(t,e,n)});function uO(t,e,n){let i=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},r=t._zod.bag.fallbackRun,o;if(r?(i[cO]=!0,o=r({value:e,issues:[]},i)):o=t._zod.run({value:e,issues:[]},i),o instanceof Promise)throw new ht;return o.issues.length===0}var Jn=async(t,e,n)=>{let i=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},r=t._zod.run({value:e,issues:[]},i);return r instanceof Promise&&(r=await r),r.issues.length===0},zs=t=>{let e=qn(t),n=(i,r,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return e(i,r,s,Is(n,a))};return n},Z_=zs(gt),Es=t=>{let e=qn(t),n=(i,r,o,a)=>e(i,r,o,Is(n,a));return n},q_=Es(gt),Ds=t=>{let e=Vn(t),n=async(i,r,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return await e(i,r,s,Is(n,a))};return n},V_=Ds(gt),Os=t=>{let e=Vn(t),n=async(i,r,o,a)=>await e(i,r,o,Is(n,a));return n},B_=Os(gt),Ts=t=>(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Bn(t)(e,n,r)},H_=Ts(gt),Cs=t=>(e,n,i)=>Bn(t)(e,n,i),G_=Cs(gt),As=t=>async(e,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Hn(t)(e,n,r)},J_=As(gt),Ns=t=>async(e,n,i)=>Hn(t)(e,n,i),K_=Ns(gt);var zt={};nr(zt,{anyString:()=>_f,base64:()=>df,base64url:()=>ff,bigint:()=>wf,boolean:()=>xf,browserEmail:()=>yO,cidrv4:()=>uf,cidrv6:()=>lf,creditCard:()=>js,cuid:()=>Jd,cuid2:()=>Kd,currencyCode:()=>gf,date:()=>yf,datetime:()=>bf,domain:()=>mf,duration:()=>tf,e164:()=>hf,email:()=>nf,emoji:()=>of,extendedDuration:()=>lO,guid:()=>rf,hex:()=>zf,hostname:()=>pf,html5Email:()=>mO,httpProtocol:()=>Io,iban:()=>Rs,idnEmail:()=>gO,integer:()=>Po,ipv4:()=>af,ipv6:()=>sf,ksuid:()=>Yd,lowercase:()=>If,mac:()=>cf,md5_base64:()=>$O,md5_base64url:()=>wO,md5_hex:()=>_O,nanoid:()=>Qd,nanoidOfLength:()=>ef,null:()=>Sf,number:()=>ar,rfc5322Email:()=>hO,sha1_base64:()=>SO,sha1_base64url:()=>kO,sha1_hex:()=>xO,sha256_base64:()=>PO,sha256_base64url:()=>zO,sha256_hex:()=>IO,sha384_base64:()=>DO,sha384_base64url:()=>OO,sha384_hex:()=>EO,sha512_base64:()=>CO,sha512_base64url:()=>AO,sha512_hex:()=>TO,string:()=>$f,time:()=>vf,ulid:()=>Wd,undefined:()=>kf,unicodeEmail:()=>W_,uppercase:()=>Pf,uuid:()=>Xr,uuid4:()=>dO,uuid6:()=>fO,uuid7:()=>pO,xid:()=>Xd});var Jd=/^[cC][0-9a-z]{6,}$/,Kd=/^[0-9a-z]+$/,Wd=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Xd=/^[0-9a-vA-V]{20}$/,Yd=/^[A-Za-z0-9]{27}$/,Qd=/^[a-zA-Z0-9_-]{21}$/;function ef(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}var tf=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,lO=/^[-+]?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)?)??$/,rf=/^([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})$/,Xr=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)$/,dO=Xr(4),fO=Xr(6),pO=Xr(7),nf=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,mO=/^[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])?)*$/,hO=/^(([^<>()\[\]\\.,;:\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,}))$/,W_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,gO=W_,yO=/^[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])?)*$/,vO="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function of(){return new RegExp(vO,"u")}var af=/^(?:(?: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])$/,sf=/^(([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}|:))$/,cf=t=>{let e=Pt(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},uf=/^((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])$/,lf=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,df=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ff=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,pf=/^(?=.{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])?)*\.?$/,mf=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Io=/^https?$/,hf=/^\+[1-9]\d{6,14}$/,js=/^\d(?:[ -]?\d){11,18}$/,gf=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Rs=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,X_="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function bO(t){return new RegExp(`^${t}$`)}var yf=bO(X_);function Gd(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}}`:t.seconds?`${e}:[0-5]\\d(?:\\.\\d+)?`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function vf(t){return new RegExp(`^${Gd(t)}$`)}function bf(t){let e=["Z"];t.offset&&e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${Gd({precision:t.precision,seconds:!0})}(?:${e.join("|")})`,i=t.local?`${n}|${Gd({precision:t.precision})}`:n;return new RegExp(`^${X_}T(?:${i})$`)}var _f=/^[\s\S]{0,}$/,$f=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},wf=/^-?\d+n?$/,Po=/^-?\d+$/,ar=/^-?\d+(?:\.\d+)?$/,xf=/^(?:true|false)$/i,Sf=/^null$/i;var kf=/^undefined$/i;var If=/^[^A-Z]*$/,Pf=/^[^a-z]*$/,zf=/^[0-9a-fA-F]*$/;function zo(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Eo(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var _O=/^[0-9a-fA-F]{32}$/,$O=zo(22,"=="),wO=Eo(22),xO=/^[0-9a-fA-F]{40}$/,SO=zo(27,"="),kO=Eo(27),IO=/^[0-9a-fA-F]{64}$/,PO=zo(43,"="),zO=Eo(43),EO=/^[0-9a-fA-F]{96}$/,DO=zo(64,""),OO=Eo(64),TO=/^[0-9a-fA-F]{128}$/,CO=zo(86,"=="),AO=Eo(86);var ge=$("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Ef=t=>{let e=t.value;return!ws(e)&&e.size!==void 0},Df=t=>{let e=t.value;return!ws(e)&&e.length!==void 0},Us={number:"number",bigint:"bigint",object:"date"},Ms=$("$ZodCheckLessThan",(t,e)=>{ge.init(t,e);let n=Us[typeof e.value];t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:Us[typeof i.value]??n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Fs=$("$ZodCheckGreaterThan",(t,e)=>{ge.init(t,e);let n=Us[typeof e.value];t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:Us[typeof i.value]??n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Of=$("$ZodCheckMultipleOf",(t,e)=>{ge.init(t,e),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?e.value!==BigInt(0)&&n.value%e.value===BigInt(0):po(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Tf=$("$ZodCheckNumberFormat",(t,e)=>{ge.init(t,e),e.format=e.format||"float64";let n=e.format?.includes("int"),i=n?"int":"number",[r,o]=go[e.format];t._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),Cf=$("$ZodCheckBigIntFormat",(t,e)=>{ge.init(t,e);let[n,i]=yo[e.format];t._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),Af=$("$ZodCheckMaxSize",(t,e)=>{var n;ge.init(t,e),(n=t._zod.def).when??(n.when=Ef),t._zod.check=i=>{let r=i.value;r.size<=e.maximum||i.issues.push({origin:bo(r),code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Nf=$("$ZodCheckMinSize",(t,e)=>{var n;ge.init(t,e),(n=t._zod.def).when??(n.when=Ef),t._zod.check=i=>{let r=i.value;r.size>=e.minimum||i.issues.push({origin:bo(r),code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),jf=$("$ZodCheckSizeEquals",(t,e)=>{var n;ge.init(t,e),(n=t._zod.def).when??(n.when=Ef),t._zod.check=i=>{let r=i.value,o=r.size;if(o===e.size)return;let a=o>e.size;i.issues.push({origin:bo(r),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Rf=$("$ZodCheckMaxLength",(t,e)=>{var n;ge.init(t,e),(n=t._zod.def).when??(n.when=Df),t._zod.check=i=>{let r=i.value,o=r.length;if((typeof r=="string"&&o>e.maximum?Wr(r):o)<=e.maximum)return;let s=_o(r);i.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Uf=$("$ZodCheckMinLength",(t,e)=>{var n;ge.init(t,e),(n=t._zod.def).when??(n.when=Df),t._zod.check=i=>{let r=i.value,o=r.length;if((typeof r=="string"&&o>=e.minimum&&o<e.minimum*2?Wr(r):o)>=e.minimum)return;let s=_o(r);i.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Lf=$("$ZodCheckLengthEquals",(t,e)=>{var n;ge.init(t,e),(n=t._zod.def).when??(n.when=Df),t._zod.check=i=>{let r=i.value,o=r.length,a=typeof r=="string"&&o>=e.length&&o<=e.length*2?Wr(r):o;if(a===e.length)return;let s=_o(r),c=a>e.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Kn=$("$ZodCheckStringFormat",(t,e)=>{var n,i;ge.init(t,e),e.pattern?(n=t._zod).check??(n.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:e.format,input:r.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),Mf=$("$ZodCheckRegex",(t,e)=>{Kn.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Ff=$("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=If),Kn.init(t,e)}),Zf=$("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Pf),Kn.init(t,e)}),qf=$("$ZodCheckIncludes",(t,e)=>{ge.init(t,e);let n=Pt(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position},}${n}`:n);e.pattern=i,t._zod.check=r=>{r.value.includes(e.includes,e.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:r.value,inst:t,continue:!e.abort})}}),Vf=$("$ZodCheckStartsWith",(t,e)=>{ge.init(t,e);let n=new RegExp(`^${Pt(e.prefix)}.*`);e.pattern??(e.pattern=n),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})}}),Bf=$("$ZodCheckEndsWith",(t,e)=>{ge.init(t,e);let n=new RegExp(`.*${Pt(e.suffix)}$`);e.pattern??(e.pattern=n),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 Ls(t,e,n){t.issues.length&&e.issues.push(...pt(n,t.issues))}var Hf=$("$ZodCheckProperty",(t,e)=>{ge.init(t,e),t._zod.check=n=>{let i=e.schema._zod.run({value:n.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>Ls(r,n,e.property));Ls(i,n,e.property)}}),Gf=$("$ZodCheckProperties",(t,e)=>{ge.init(t,e),$o(t,Symbol.iterator,function*(){yield t});let n;t._zod.check=i=>{if(i.value==null){i.issues.push({expected:"object",code:"invalid_type",input:i.value,inst:t});return}n??(n=Reflect.ownKeys(e.shape).map(a=>[a,e.shape[a]]));let r=i.value,o;for(let[a,s]of n){let c=s._zod.run({value:r[a],issues:[]},{});c instanceof Promise?(o??(o=[]),o.push(c.then(u=>Ls(u,i,a)))):Ls(c,i,a)}if(o)return Promise.all(o).then(()=>{})}}),Jf=$("$ZodCheckMimeType",(t,e)=>{ge.init(t,e);let n=new Set(e.mime);t._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),Kf=$("$ZodCheckOverwrite",(t,e)=>{ge.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});var Yr=class{constructor(e=[],n={}){this.content=[],this.indent=0,this.args=e,this.closed=n}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let i=e.split(`
33
+ `).filter(a=>a),r=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let e=Function,n=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
34
+ ${n.join(`
35
+ `)}
36
+ };`)(...Object.values(this.closed))}};var Wf={major:4,minor:6,patch:7};var q=$("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Wf;let i=t._zod.def.checks,r=t._zod.traits.has("$ZodCheck")?[t,...i??[]]:i?.length?[...i]:[];for(let o of r)for(let a of o._zod.onattach)a(t);if(r.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let o=(s,c,u)=>{if(s.memo)return s;let l=it(s),d;for(let p of c){if(p._zod.def.when){if(Nd(s)||!p._zod.def.when(s))continue}else if(l)continue;let m=s.issues.length,f=p._zod.check(s);if(f instanceof Promise&&u?.async===!1)throw new ht;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,s.issues.length!==m&&(vo(s.issues,m,t),l||(l=it(s,m)))});else{if(s.issues.length===m)continue;vo(s.issues,m,t),l||(l=it(s,m))}}return d?d.then(()=>s):s},a=(s,c,u)=>{if(it(s))return s.aborted=!0,s;let l=o(c,r,u);if(l instanceof Promise){if(u.async===!1)throw new ht;return l.then(d=>t._zod.parse(d,u))}return t._zod.parse(l,u)};t._zod.run=(s,c)=>{if(c.skipChecks)return t._zod.parse(s,c);if(c.direction==="backward"){let l=t._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>a(d,s,c)):a(l,s,c)}let u=t._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new ht;return u.then(l=>o(l,r,c))}return o(u,r,c)}}},{get"~standard"(){return $o(this,"~standard",Hs(this))},set"~standard"(t){_r(this,"~standard",t)}}),m$=(t,e)=>t.issues.length?{issues:t.issues.map(n=>mt(n,e,Pe()))}:{value:t.value};async function NO(t,e){let n={async:!0};return m$(await t._zod.run({value:e,issues:[]},n),n)}function Hs(t){return{validate:e=>{let n={async:!1};try{let i=t._zod.run({value:e,issues:[]},n);if(!(i instanceof Promise))return m$(i,n)}catch{}return NO(t,e)},vendor:"zod",version:1}}var Qr=$("$ZodString",(t,e)=>{q.init(t,e),t._zod.pattern=e.pattern??_f,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),ue=$("$ZodStringFormat",(t,e)=>{Kn.init(t,e),Qr.init(t,e)}),Yf=$("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=rf),ue.init(t,e)}),Qf=$("$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=Xr(i))}else e.pattern??(e.pattern=Xr());ue.init(t,e)}),ep=$("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=nf),ue.init(t,e)}),tp=1,Do=2;function rp(t){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(t):(new URL(t),!0)}catch{return!1}}function Gs(t,e){return!("normalize"in e)&&!("hostname"in e)&&!("protocol"in e)?rp(t)||Do:h$(t,e)}function h$(t,e){if(!e.normalize&&e.protocol?.source===Io.source&&!/^https?:\/\//i.test(t))return tp;try{if(typeof URL<"u"){let n=URL;if(typeof n.parse=="function")return n.parse(t)??Do}return new URL(t)}catch{return Do}}var jO=/[\t\n\r]/g;function Oo(t){return t.replace(jO,"")}function Js(t,e){return e.lastIndex=0,e.test(t.hostname)}function Ks(t,e){return e.lastIndex=0,e.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}var np=$("$ZodURL",(t,e)=>{ue.init(t,e),t._zod.check=n=>{try{let i=n.value.trim(),r=Gs(i,e);if(r===tp){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!e.abort});return}if(r===Do){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort});return}if(r===!0){n.value=Oo(i);return}e.hostname&&!Js(r,e.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort}),e.protocol&&!Ks(r,e.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort}),n.value=e.normalize?r.href:Oo(i);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),ip=$("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=of()),ue.init(t,e)}),op=$("$ZodNanoID",(t,e)=>{if(e.length!==void 0&&(!Number.isInteger(e.length)||e.length<1))throw new Error(`Invalid nanoid length: ${e.length}`);e.pattern??(e.pattern=e.length===void 0?Qd:ef(e.length)),ue.init(t,e)}),ap=$("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Jd),ue.init(t,e)}),sp=$("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Kd),ue.init(t,e)}),cp=$("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Wd),ue.init(t,e)}),up=$("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Xd),ue.init(t,e)}),lp=$("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Yd),ue.init(t,e)}),dp=$("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=bf(e)),ue.init(t,e)}),fp=$("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=yf),ue.init(t,e)}),pp=$("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=vf(e)),ue.init(t,e)}),mp=$("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=tf),ue.init(t,e)}),hp=$("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=af),ue.init(t,e)}),RO=/^[0-9a-fA-F:.]+$/;function To(t){return RO.test(t)?rp(`http://[${t}]`):!1}var gp=$("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=sf),ue.init(t,e),t._zod.check=n=>{To(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}),yp=$("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=cf(e.delimiter)),ue.init(t,e)}),vp=$("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=uf),ue.init(t,e)});function Ws(t){let e=t.split("/");if(e.length!==2)return!1;let[n,i]=e;if(!i)return!1;let r=Number(i);return`${r}`!==i||r<0||r>128?!1:To(n)}var bp=$("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=lf),ue.init(t,e),t._zod.check=n=>{Ws(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}});function Co(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Xs=/^[0-9a-zA-Z+/]*={0,2}$/,_p=$("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Xs),ue.init(t,e),t._zod.check=n=>{Co(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}}),Ao=/^[A-Za-z0-9_-]*$/;function Ys(t){if(!Ao.test(t))return!1;let e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Co(n)}var $p=$("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Ao),ue.init(t,e),t._zod.check=n=>{Ys(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),wp=$("$ZodE164",(t,e)=>{e.pattern??(e.pattern=hf),ue.init(t,e)}),UO=/[- ]/g;function LO(t){let e=t.length,n=1,i=0;for(;e;){let r=t.charCodeAt(--e)-48;n^=1,i+=n?[0,2,4,6,8,1,3,5,7,9][r]:r}return i%10===0}function Qs(t){return js.test(t)?LO(t.replace(UO,"")):!1}var xp=$("$ZodCreditCard",(t,e)=>{e.pattern??(e.pattern=js),ue.init(t,e),t._zod.check=n=>{Qs(n.value)||n.issues.push({code:"invalid_format",format:"credit_card",input:n.value,inst:t,continue:!e.abort})}});function MO(t){let e=0,n=t.length;for(let i=4;i<n;i++){let r=t.charCodeAt(i);e=(r>=65?e*100+(r-55):e*10+(r-48))%97}for(let i=0;i<4;i++){let r=t.charCodeAt(i);e=(r>=65?e*100+(r-55):e*10+(r-48))%97}return e===1}function ec(t){return Rs.test(t)?MO(t):!1}var Sp=$("$ZodIBAN",(t,e)=>{e.pattern??(e.pattern=Rs),ue.init(t,e),t._zod.check=n=>{ec(n.value)||n.issues.push({code:"invalid_format",format:"iban",input:n.value,inst:t,continue:!e.abort})}});function tc(t,e=null){try{let n=t.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||e&&(!("alg"in r)||r.alg!==e))}catch{return!1}}var kp=$("$ZodJWT",(t,e)=>{ue.init(t,e),t._zod.check=n=>{tc(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),Ip=$("$ZodCustomStringFormat",(t,e)=>{ue.init(t,e),t._zod.check=n=>{e.fn(n.value)||n.issues.push({code:"invalid_format",format:e.format,input:n.value,inst:t,continue:!e.abort})}}),rc=$("$ZodNumber",(t,e)=>{q.init(t,e),t._zod.pattern=ar,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:String(r):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:t,...o?{received:o}:{}}),n}}),Pp=$("$ZodNumberFormat",(t,e)=>{Tf.init(t,e),rc.init(t,e)}),No=$("$ZodBoolean",(t,e)=>{q.init(t,e),t._zod.pattern=xf,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:t}),n}}),nc=$("$ZodBigInt",(t,e)=>{q.init(t,e),t._zod.pattern=wf,t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}}),zp=$("$ZodBigIntFormat",(t,e)=>{Cf.init(t,e),nc.init(t,e)}),Ep=$("$ZodSymbol",(t,e)=>{q.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:t}),n}}),Dp=$("$ZodUndefined",(t,e)=>{q.init(t,e),t._zod.pattern=kf,t._zod.values=new Set([void 0]),t._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:t}),n}}),Op=$("$ZodNull",(t,e)=>{q.init(t,e),t._zod.pattern=Sf,t._zod.values=new Set([null]),t._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:t}),n}}),Tp=$("$ZodAny",(t,e)=>{q.init(t,e),t._zod.parse=n=>n}),Cp=$("$ZodUnknown",(t,e)=>{q.init(t,e),t._zod.parse=n=>n}),Ap=$("$ZodNever",(t,e)=>{q.init(t,e),t._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),Np=$("$ZodVoid",(t,e)=>{q.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:t}),n}}),jp=$("$ZodDate",(t,e)=>{q.init(t,e),t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:t}),n}});function Rp(t,e){let n=Fn(t._zod.def.checks);if(!n.length)return;let i=Math.min(...n.map(o=>o[0])),r=t._zod.parse;t._zod.parse=(o,a)=>{let s=e(o.value);if(s>i&&!a?.skipChecks&&a?.direction!=="backward"){for(let[c,u]of Fn(t._zod.def.checks))if(s>c&&u._zod.def.when(o)){let l=o.issues.length;return u._zod.check(o),o.issues[l].continue=!1,vo(o.issues,l,t),o}}return r(o,a)}}var FO=t=>Array.isArray(t)?t.length:-1,ZO=t=>t instanceof Map?t.size:-1,qO=t=>t instanceof Set?t.size:-1;function Q_(t,e,n){t.issues.length&&e.issues.push(...pt(n,t.issues)),e.value[n]=t.value}var Up=$("$ZodArray",(t,e)=>{q.init(t,e);let n=Re.memoizer;n?.attach(t),t._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),i;i.value=n?n.alloc(t,i,Array(o.length),r):Array(o.length);let a=[],s=r?.abortEarly;for(let c=0;c<o.length;c++){let u=o[c],l=e.element._zod.run({value:u,issues:[]},r);if(l instanceof Promise)a.push(l.then(d=>Q_(d,i,c)));else if(Q_(l,i,c),s&&l.issues.length!==0&&it(l))break}return a.length?Promise.all(a).then(()=>i):i},Rp(t,FO)});function Bs(t,e,n,i,r,o){let a=n in i,s=o==="optional";if(!(!a&&s&&r==="optional")){if(t.issues.length){if(r!==void 0&&s&&!a)return;e.issues.push(...pt(n,t.issues))}if(!a&&r===void 0){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}t.value===void 0?(a||r==="defaulted"&&!s)&&(e.value[n]=void 0):e.value[n]=t.value}}var VO=[];function g$(t){let e=Object.keys(t.shape),n=Object.getOwnPropertySymbols(t.shape),i=n.length?n:VO,r=i.length?[...e,...i]:e;for(let a of r)if(!t.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let o=Ad(t.shape);return{...t,allKeys:r,symbolKeys:i,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(o)}}function y$(t,e,n,i,r,o,a){let s=[],c=r.keySet,u=r.catchall._zod,l=u.def.type,d=u.optin,p=u.optout,m=0;for(let f in e){if(a&&n.issues.length!==m){if(it(n,m))break;m=n.issues.length}if(c.has(f))continue;if(f==="__proto__"){l==="never"&&s.push(f);continue}if(l==="never"){s.push(f);continue}let h=u.run({value:e[f],issues:[]},i);h instanceof Promise?t.push(h.then(g=>Bs(g,n,f,e,d,p))):Bs(h,n,f,e,d,p)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o,continue:!0}),t.length?Promise.all(t).then(()=>n):n}var v$=$("$ZodObject",(t,e)=>{q.init(t,e);let n=Object.getOwnPropertyDescriptor(e,"shape"),i=n?.get?n.get.raw:e.shape??{};if(i){let u=()=>{let l={...i};return Object.defineProperty(e,"shape",{value:l}),u.raw=l,l};u.raw=i,Object.defineProperty(e,"shape",{get:u})}let r=Ln(()=>g$(e));G(t,"propValues",u=>{let l=u.def.shape,d={};for(let p in l){let m=l[p]._zod;if(m.values){Object.prototype.hasOwnProperty.call(d,p)||Fe(d,p,new Set);for(let f of m.values)d[p].add(f);m.optin!==void 0&&d[p].add(void 0)}}return d});let o=Kr,a=e.catchall,s,c=Re.memoizer;c?.attach(t),t._zod.parse=(u,l)=>{s??(s=r.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:t}),u;u.value=c?c.alloc(t,u,{},l):{};let p=[],m=s.shape,f=l?.abortEarly,h=u.issues.length;for(let g of s.allKeys){if(f&&u.issues.length!==h){if(it(u,h))break;h=u.issues.length}if(g==="__proto__")continue;let y=m[g],v=y._zod.optin,b=y._zod.optout,_=y._zod.run({value:d[g],issues:[]},l);_ instanceof Promise?p.push(_.then(x=>Bs(x,u,g,d,v,b))):Bs(_,u,g,d,v,b)}return a?y$(p,d,u,l,r.value,t,f===!0):p.length?Promise.all(p).then(()=>u):u}}),Lp=$("$ZodObjectJIT",(t,e)=>{v$.init(t,e);let n=t._zod.parse,i=Ln(()=>g$(e)),r=Re.memoizer,o=m=>{let f=i.value,h=f.symbolKeys,g=new Yr(["payload","ctx"],{shape:m,inst:t,memo:r,syms:h}),y=x=>`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`,v=(x,k)=>`
37
+ let ${x}_ab = false;
38
+ for (let i = 0; i < ${x}.issues.length; i++) {
39
+ const iss = ${x}.issues[i];
40
+ iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
41
+ payload.issues.push(iss);
42
+ if (iss.continue !== true) ${x}_ab = true;
43
+ }
44
+ if (${x}_ab && ctx && ctx.abortEarly) {
45
+ payload.value = newResult;
46
+ return payload;
47
+ }`;g.write("const input = payload.value;");let b=Object.create(null),_=0;for(let x of f.allKeys)b[x]=`key_${_++}`;g.write(r?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let x of f.allKeys){if(x==="__proto__")continue;let k=b[x],D=typeof x=="symbol"?`syms[${h.indexOf(x)}]`:nt(x),A=`${D} in input`,F=m[x],se=F?._zod?.optin,Ee=se!==void 0,Ie=F?._zod?.optout==="optional";if(g.write(`const ${k} = ${y(D)};`),Ee&&Ie){let Me=se==="optional"?`${k}_present`:`${k}.value !== undefined || ${k}_present`;g.write(`
48
+ const ${k}_present = ${A};
49
+ if (!${k}.issues.length || ${k}_present) {
50
+ if (${k}.issues.length) {${v(k,D)}
51
+ }
52
+
53
+ if (${Me}) {
54
+ newResult[${D}] = ${k}.value;
55
+ }
56
+ }
57
+
58
+ `)}else Ee?(g.write(`
59
+ if (${k}.issues.length) {${v(k,D)}
60
+ }
61
+ `),se==="defaulted"?g.write(`newResult[${D}] = ${k}.value;`):g.write(`
62
+ if (${k}.value !== undefined || ${A}) {
63
+ newResult[${D}] = ${k}.value;
64
+ }
65
+ `)):g.write(`
66
+ const ${k}_present = ${A};
67
+ if (${k}.issues.length) {${v(k,D)}
68
+ }
69
+ if (!${k}_present && !${k}.issues.length) {
70
+ payload.issues.push({
71
+ code: "invalid_type",
72
+ expected: "nonoptional",
73
+ input: undefined,
74
+ path: [${D}]
75
+ });
76
+ if (ctx && ctx.abortEarly) {
77
+ payload.value = newResult;
78
+ return payload;
79
+ }
80
+ }
81
+
82
+ if (${k}_present) {
83
+ newResult[${D}] = ${k}.value;
84
+ }
85
+
86
+ `)}return g.write("payload.value = newResult;"),g.write("return payload;"),g.compile()},a,s=Kr,c=!Re.jitless,l=c&&Td.value,d=e.catchall,p;t._zod.parse=(m,f)=>{p??(p=i.value);let h=m.value;return s(h)?c&&l&&f?.async===!1&&f.jitless!==!0?(a||(a=o(e.shape)),m=a(m,f),d?y$([],h,m,f,p,t,f?.abortEarly===!0):m):n(m,f):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),m)}});function e$(t,e,n,i){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let r=t.filter(o=>!it(o));return r.length===1?(e.value=r[0].value,r[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(a=>mt(a,i,Pe())))}),e)}var jo=$("$ZodUnion",(t,e)=>{q.init(t,e),G(t,"optin",i=>i.def.options.some(r=>r._zod.optin==="defaulted")?"defaulted":i.def.options.some(r=>r._zod.optin!==void 0)?"optional":void 0),G(t,"optout",i=>i.def.options.some(r=>r._zod.optout==="optional")?"optional":void 0),G(t,"values",i=>{if(i.def.options.every(r=>r._zod.values))return new Set(i.def.options.flatMap(r=>Array.from(r._zod.values)))}),G(t,"pattern",i=>{if(i.def.options.every(r=>r._zod.pattern)){let r=i.def.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>or(o.source)).join("|")})$`)}});let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of e.options){let c=s._zod.run({value:i.value,issues:[]},r);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(s=>e$(s,i,t,r)):e$(a,i,t,r)}});function t$(t,e,n,i){let r=[];for(let o=0;o<t.length;o++)t[o].issues.length===0&&r.push(o);return r.length===1?(e.value=t[r[0]].value,e):(r.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(a=>mt(a,i,Pe())))}):e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:[],inclusive:!1,matches:r}),e)}var Mp=$("$ZodXor",(t,e)=>{jo.init(t,e),e.inclusive=!1;let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of e.options){let c=s._zod.run({value:i.value,issues:[]},r);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>t$(s,i,t,r)):t$(a,i,t,r)}});function Fp(t,e){let n=t._zod,i=n.bag.optionsMap;i||(i=b$(n.def),n.bag.optionsMap=i);let r=i.get(e);if(r===null)throw new Error(`Ambiguous discriminator value "${String(e)}"`);return r}function b$(t){let e=new Map;for(let n of t.options){let i=n._zod.propValues?.[t.discriminator];if(!i||i.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let r of i)if(e.has(r)){if(r!==void 0)throw new Error(`Duplicate discriminator value "${String(r)}"`);e.set(r,null)}else e.set(r,n)}return e}var Zp=$("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,jo.init(t,e);let n=t._zod.parse;G(t,"propValues",r=>{let o={},a=0;for(let s of r.def.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${r.def.options.indexOf(s)}"`);c[r.def.discriminator]?.has(void 0)&&a++;for(let[u,l]of Object.entries(c)){Object.prototype.hasOwnProperty.call(o,u)||Fe(o,u,new Set);for(let d of l)o[u].add(d)}}return!r.def.unionFallback&&a>1&&o[r.def.discriminator]?.delete(void 0),o}),e.options.forEach((r,o)=>{let a=Mn(r._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,e.discriminator))throw new Error(`Invalid discriminated union option at index "${o}"`)});let i=Ln(()=>b$(e));t._zod.parse=(r,o)=>{let a=r.value;if(!Kr(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),r;let s=a?.[e.discriminator],c=i.value.get(s);return c&&(s!==void 0||o.direction!=="backward")?c._zod.run(r,o):e.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(i.value.keys()).filter(u=>i.value.get(u)!==null),input:a,path:[e.discriminator],inst:t}),r)}}),qp=$("$ZodIntersection",(t,e)=>{q.init(t,e),t._zod.parse=(n,i)=>{let r=n.value,o=e.left._zod.run({value:r,issues:[]},i),a=e.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,u])=>r$(n,c,u)):r$(n,o,a)}});function Wn(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(It(t)&&It(e)){let n=Object.keys(e),i=Object.keys(t).filter(o=>n.indexOf(o)!==-1),r={...t,...e};Object.prototype.hasOwnProperty.call(r,"__proto__")&&delete r.__proto__;for(let o of i){if(o==="__proto__")continue;let a=Wn(t[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<t.length;i++){let r=t[i],o=e[i],a=Wn(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function r$(t,e,n){let i=new Map,r,o=new Map,a=(u,l)=>{let d;if(u.code==="unrecognized_keys"&&!u.path?.length)r??(r=u),d=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){let p=String(u.path[0]);o.has(p)||o.set(p,u),d=[p]}else return!1;for(let p of d)i.has(p)||i.set(p,{}),i.get(p)[l]=!0;return!0};for(let u of e.issues)a(u,"l")||t.issues.push(u);for(let u of n.issues)a(u,"r")||t.issues.push(u);let s=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(s.length){let u=r?s.filter(l=>r.keys.includes(l)):[];u.length&&t.issues.push({...r,keys:u});for(let l of s)!u.includes(l)&&o.has(l)&&t.issues.push(o.get(l))}let c=Wn(e.value,n.value);if(!c.valid){if(it(t))return t;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return t.value=c.data,t}var ic=$("$ZodTuple",(t,e)=>{q.init(t,e);let n=e.items,i=Re.memoizer;i?.attach(t),t._zod.parse=(r,o)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),r;r.value=i?i.alloc(t,r,[],o):[];let s=[],c=n$(n,"optin"),u=n$(n,"optout");if(!e.rest){if(a.length<c)return r.issues.push({code:"too_small",minimum:c,inclusive:!0,input:a,inst:t,origin:"array"}),r;a.length>n.length&&r.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:a,inst:t,origin:"array"})}let l=new Array(n.length),d=e.rest?o?.abortEarly:void 0,p=!1;for(let m=0;m<n.length;m++){let f=n[m]._zod.run({value:a[m],issues:[]},o);f instanceof Promise?s.push(f.then(h=>{l[m]=h})):(l[m]=f,d&&!p&&f.issues.length&&(p=it(f)))}if(e.rest&&!p){let m=n.length-1,f=a.slice(n.length),h=r.issues.length;for(let g of f){if(d&&r.issues.length!==h){if(it(r,h))break;h=r.issues.length}m++;let y=e.rest._zod.run({value:g,issues:[]},o);y instanceof Promise?s.push(y.then(v=>i$(v,r,m))):i$(y,r,m)}}return s.length?Promise.all(s).then(()=>o$(l,r,n,a,u)):o$(l,r,n,a,u)}});function n$(t,e){for(let n=t.length-1;n>=0;n--)if(!(e==="optin"?t[n]._zod.optin!==void 0:t[n]._zod.optout==="optional"))return n+1;return 0}function i$(t,e,n){t.issues.length&&e.issues.push(...pt(n,t.issues)),e.value[n]=t.value}function o$(t,e,n,i,r){for(let o=0;o<n.length;o++){let a=t[o],s=o<i.length;if(!s&&o>=r&&n[o]._zod.optin==="optional"){e.value.length=o;break}if(a.issues.length){if(!s&&o>=r){e.value.length=o;break}e.issues.push(...pt(o,a.issues))}e.value[o]=a.value}for(let o=e.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&e.value[o]===void 0);o--)e.value.length=o;return e}var Vp=$("$ZodRecord",(t,e)=>{q.init(t,e);let n=Re.memoizer;n?.attach(t),t._zod.parse=(i,r)=>{let o=i.value;if(!It(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),i;let a=[],s=e.keyType._zod.values;if(s&&!e.partial){i.value=n?n.alloc(t,i,{},r):{};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;let d=e.keyType._zod.run({value:l,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(f=>mt(f,r,Pe())),input:l,path:[l],inst:t});continue}let p=d.value;if(p==="__proto__")continue;let m=e.valueType._zod.run({value:o[l],issues:[]},r);m instanceof Promise?a.push(m.then(f=>{f.issues.length&&i.issues.push(...pt(l,f.issues)),i.value[p]=f.value})):(m.issues.length&&i.issues.push(...pt(l,m.issues)),i.value[p]=m.value)}let u;for(let l in o)if(!c.has(l))if(e.mode==="loose"){if(l==="__proto__")continue;i.value[l]=o[l]}else u=u??[],u.push(l);u&&u.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:u,continue:!0})}else{i.value=n?n.alloc(t,i,{},r):{};let c;for(let u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let l=e.keyType._zod.run({value:u,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&ar.test(u)&&l.issues.length){let f=e.keyType._zod.run({value:Number(u),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(l=f)}if(l.issues.length){e.mode==="loose"?i.value[u]=o[u]:s?(c=c??[],c.push(u)):i.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(f=>mt(f,r,Pe())),input:u,path:[u],inst:t});continue}let p=l.value;if(p==="__proto__")continue;let m=e.valueType._zod.run({value:o[u],issues:[]},r);m instanceof Promise?a.push(m.then(f=>{f.issues.length&&i.issues.push(...pt(u,f.issues)),i.value[p]=f.value})):(m.issues.length&&i.issues.push(...pt(u,m.issues)),i.value[p]=m.value)}c&&c.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:c,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),Bp=$("$ZodMap",(t,e)=>{q.init(t,e);let n=Re.memoizer;n?.attach(t),t._zod.parse=(i,r)=>{let o=i.value;if(!(o instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:o,inst:t}),i;let a=[];i.value=n?n.alloc(t,i,new Map,r):new Map;let s=r?.abortEarly,c=i.issues.length;for(let[u,l]of o){if(s&&i.issues.length!==c){if(it(i,c))break;c=i.issues.length}let d=e.keyType._zod.run({value:u,issues:[]},r),p=e.valueType._zod.run({value:l,issues:[]},r);d instanceof Promise||p instanceof Promise?a.push(Promise.all([d,p]).then(([m,f])=>{a$(m,f,i,u,o,t,r)})):a$(d,p,i,u,o,t,r)}return a.length?Promise.all(a).then(()=>i):i},Rp(t,ZO)});function a$(t,e,n,i,r,o,a){t.issues.length&&(ho.has(typeof i)?n.issues.push(...pt(i,t.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:t.issues.map(s=>mt(s,a,Pe()))})),e.issues.length&&(ho.has(typeof i)?n.issues.push(...pt(i,e.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:e.issues.map(s=>mt(s,a,Pe()))})),n.value.set(t.value,e.value)}var Hp=$("$ZodSet",(t,e)=>{q.init(t,e);let n=Re.memoizer;n?.attach(t),t._zod.parse=(i,r)=>{let o=i.value;if(!(o instanceof Set))return i.issues.push({input:o,inst:t,expected:"set",code:"invalid_type"}),i;let a=[];i.value=n?n.alloc(t,i,new Set,r):new Set;let s=r?.abortEarly,c=i.issues.length;for(let u of o){if(s&&i.issues.length!==c){if(it(i,c))break;c=i.issues.length}let l=e.valueType._zod.run({value:u,issues:[]},r);l instanceof Promise?a.push(l.then(d=>s$(d,i))):s$(l,i)}return a.length?Promise.all(a).then(()=>i):i},Rp(t,qO)});function s$(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var Gp=$("$ZodEnum",(t,e)=>{q.init(t,e);let n=Rn(e.entries),i=new Set(n);t._zod.values=i,G(t,"pattern",r=>{let o=Rn(r.def.entries).filter(a=>ho.has(typeof a));return new RegExp(o.length?`^(${o.map(a=>Pt(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:t}),r}}),Jp=$("$ZodLiteral",(t,e)=>{q.init(t,e);let n=new Set(e.values);t._zod.values=n,G(t,"pattern",i=>{let r=i.def.values;return new RegExp(r.length?`^(${r.map(o=>typeof o=="string"?Pt(o):o?Pt(o.toString()):String(o)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),i}}),Kp=$("$ZodFile",(t,e)=>{q.init(t,e),t._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:t}),n}}),Wp=$("$ZodTransform",(t,e)=>{q.init(t,e),t._zod.optin="optional",Re.memoizer?.guard(t),t._zod.parse=(n,i)=>{if(i.direction==="backward")throw new $r(t.constructor.name);let r=e.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n));if(r instanceof Promise)throw new ht;return n.value=r,n}});function c$(t,e){return t.value=e.issues.length?void 0:e.value,t}var oc=$("$ZodOptional",(t,e)=>{q.init(t,e),G(t,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",G(t,"values",n=>{let i=n.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),G(t,"pattern",n=>{let i=n.def.innerType._zod.pattern;return i?new RegExp(`^(${or(i.source)})?$`):void 0}),t._zod.parse=(n,i)=>{if(n.value===void 0){if(e.innerType._zod.optin!=="defaulted")return n;let r=e.innerType._zod.run({value:n.value,issues:[]},i);return r instanceof Promise?r.then(o=>c$(n,o)):c$(n,r)}return e.innerType._zod.run(n,i)}}),Xp=$("$ZodExactOptional",(t,e)=>{oc.init(t,e),G(t,"values",n=>n.def.innerType._zod.values),G(t,"pattern",n=>n.def.innerType._zod.pattern),t._zod.parse=(n,i)=>e.innerType._zod.run(n,i)}),Yp=$("$ZodNullable",(t,e)=>{q.init(t,e),G(t,"optin",n=>n.def.innerType._zod.optin),G(t,"optout",n=>n.def.innerType._zod.optout),G(t,"pattern",n=>{let i=n.def.innerType._zod.pattern;return i?new RegExp(`^(${or(i.source)}|null)$`):void 0}),G(t,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),t._zod.parse=(n,i)=>n.value===null?n:e.innerType._zod.run(n,i)}),Qp=$("$ZodDefault",(t,e)=>{q.init(t,e),t._zod.optin="defaulted",G(t,"values",n=>n.def.innerType._zod.values),t._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);if(n.value===void 0)return n.value=e.defaultValue,n;let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>u$(o,e)):u$(r,e)}});function u$(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var em=$("$ZodPrefault",(t,e)=>{q.init(t,e),t._zod.optin="defaulted",G(t,"values",n=>n.def.innerType._zod.values),t._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,i))}),tm=$("$ZodNonOptional",(t,e)=>{q.init(t,e),G(t,"values",n=>{let i=n.def.innerType._zod.values;return i?new Set([...i].filter(r=>r!==void 0)):void 0}),t._zod.parse=(n,i)=>{let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>l$(o,t)):l$(r,t)}});function l$(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 rm=$("$ZodSuccess",(t,e)=>{q.init(t,e),t._zod.parse=(n,i)=>{if(i.direction==="backward")throw new $r("ZodSuccess");let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}});function d$(t,e,n,i){return e.issues.length?(t.value=n.catchValue({...e,value:t.value,error:{issues:e.issues.map(r=>mt(r,i,Pe()))},input:t.value}),t):(t.value=e.value,e.memo&&(t.memo=!0),t)}var nm=$("$ZodCatch",(t,e)=>{q.init(t,e),G(t,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),G(t,"optout",n=>n.def.innerType._zod.optout),G(t,"values",n=>n.def.innerType._zod.values),t._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);let r=e.innerType._zod.run({value:n.value,issues:[]},i);return r instanceof Promise?r.then(o=>d$(n,o,e,i)):d$(n,r,e,i)}}),im=$("$ZodNaN",(t,e)=>{q.init(t,e),t._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:t,expected:"nan",code:"invalid_type"}),n)}),ac=$("$ZodPipe",(t,e)=>{q.init(t,e),G(t,"values",n=>n.def.in._zod.values),G(t,"optin",n=>n.def.in._zod.optin),G(t,"optout",n=>n.def.out._zod.optout),G(t,"propValues",n=>n.def.in._zod.propValues),t._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=e.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Zs(a,e.in,i)):Zs(o,e.in,i)}let r=e.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Zs(o,e.out,i)):Zs(r,e.out,i)}});function Zs(t,e,n){return t.issues.some(i=>i.code!=="unrecognized_keys")?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},n)}var Ro=$("$ZodCodec",(t,e)=>{q.init(t,e),G(t,"values",n=>n.def.in._zod.values),G(t,"optin",n=>n.def.in._zod.optin),G(t,"optout",n=>n.def.out._zod.optout),G(t,"propValues",n=>n.def.in._zod.propValues),t._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=e.in._zod.run(n,i);return o instanceof Promise?o.then(a=>qs(a,e,i)):qs(o,e,i)}else{let o=e.out._zod.run(n,i);return o instanceof Promise?o.then(a=>qs(a,e,i)):qs(o,e,i)}}});function qs(t,e,n){if(t.issues.length)return t.aborted=!0,t;if((n.direction||"forward")==="forward"){let r=e.transform(t.value,t);return r instanceof Promise?r.then(o=>Vs(t,o,e.out,n)):Vs(t,r,e.out,n)}else{let r=e.reverseTransform(t.value,t);return r instanceof Promise?r.then(o=>Vs(t,o,e.in,n)):Vs(t,r,e.in,n)}}function Vs(t,e,n,i){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:e,issues:t.issues},i)}var om=$("$ZodPreprocess",(t,e)=>{ac.init(t,e)}),am=$("$ZodReadonly",(t,e)=>{q.init(t,e),G(t,"propValues",n=>n.def.innerType._zod.propValues),G(t,"values",n=>n.def.innerType._zod.values),G(t,"optin",n=>n.def.innerType?._zod?.optin),G(t,"optout",n=>n.def.innerType?._zod?.optout),t._zod.parse=(n,i)=>{if(i.direction==="backward")return e.innerType._zod.run(n,i);let r=e.innerType._zod.run(n,i);return r instanceof Promise?r.then(f$):f$(r)}});function f$(t){return t.memo||(t.value=Object.freeze(t.value)),t}function BO(t){let e=t._zod.def,n=e.pattern,i=!!e.format?.includes("int"),r,o;for(let s of e.checks??[]){let c=s._zod.def;c.pattern&&(n=c.pattern),i||(i=!!c.format?.includes("int"));let u=c.minimum??c.length,l=c.maximum??c.length;u!==void 0&&(r===void 0||u>r)&&(r=u),l!==void 0&&(o===void 0||l<o)&&(o=l)}if(n)return n.source;if(r!==void 0&&o!==void 0&&r>o)return"(?!)";if(r!==void 0||o!==void 0)return $f({minimum:r,maximum:o}).source;let a=t._zod.pattern;return(i&&a===ar?Po:a)?.source}function Xf(t){let e=t._zod.def,n=t._zod.pattern?.source,i=e.innerType??t._zod.innerType;if(i){let r=i._zod.pattern?.source,o=Xf(i);return n&&r&&o&&o!==r?n.replace(or(r),()=>or(o)):n}if(e.options){let r=e.options.map(Xf);if(r.every(Boolean))return`^(${r.map(o=>or(o)).join("|")})$`}return BO(t)}var sm=$("$ZodTemplateLiteral",(t,e)=>{q.init(t,e);let n=[];for(let i of e.parts)if(typeof i=="object"&&i!==null){let r=Xf(i);if(!r)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);n.push(or(r))}else if(i===null||Cd.has(typeof i))n.push(Pt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${n.join("")}$`),t._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"string",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)}),cm=$("$ZodFunction",(t,e)=>(q.init(t,e),Object.defineProperty(t,"_def",{value:e}),t._zod.def=e,t.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...i){let r=t._def.input?So(t._def.input,i):i,o=Reflect.apply(n,this,r);return t._def.output?So(t._def.output,o):o},"_zod",{value:t._zod,enumerable:!1})},t.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){let r=t._def.input?await ko(t._def.input,i):i,o=await Reflect.apply(n,this,r);return t._def.output?await ko(t._def.output,o):o},"_zod",{value:t._zod,enumerable:!1})},t._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:t}),n):(t._def.output&&t._def.output._zod.def.type==="promise"?n.value=t.implementAsync(n.value):n.value=t.implement(n.value),n),t.input=(...n)=>{let i=t.constructor;return Array.isArray(n[0])?new i({type:"function",input:new ic({type:"tuple",items:n[0],rest:n[1]}),output:t._def.output}):new i({type:"function",input:n[0],output:t._def.output})},t.output=n=>{let i=t.constructor;return new i({type:"function",input:t._def.input,output:n})},t)),um=$("$ZodPromise",(t,e)=>{q.init(t,e),t._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>e.innerType._zod.run({value:r,issues:[]},i))}),Uo=$("$ZodLazy",(t,e)=>{q.init(t,e),Dd(t._zod,"innerType",()=>{let n=e;return n._cachedInner||(n._cachedInner=e.getter()),n._cachedInner}),G(t,"pattern",n=>n.innerType?._zod?.pattern),G(t,"propValues",n=>n.innerType?._zod?.propValues),G(t,"optin",n=>n.innerType?._zod?.optin??void 0),G(t,"optout",n=>n.innerType?._zod?.optout??void 0),t._zod.parse=(n,i)=>t._zod.innerType._zod.run(n,i)}),lm=$("$ZodCustom",(t,e)=>{ge.init(t,e),q.init(t,e),t._zod.parse=(n,i)=>n,t._zod.check=n=>{let i=n.value,r=e.fn(i);if(r instanceof Promise)return r.then(o=>p$(o,n,i,t));p$(r,n,i,t)}});function p$(t,e,n,i){if(!t){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),e.issues.push(Zn(r))}}var lc=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},fm="~memo",$$=[];function w$(t){return t!==null&&typeof t=="object"}function dm(t){return t.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var x$=new WeakMap,Xn=0,uc=1,Lo=2;function Mo(t,e,n){let i=x$.get(t);if(i!==void 0)return i?Lo:Xn;if(e.has(t))return Lo;e.add(t);let r=Xn,o=l=>{if(r!==Lo&&l?._zod){let d=Mo(l,e,n);d>r&&(r=d)}},a=(l,d)=>{let p=Xn;for(let m of Reflect.ownKeys(l)){let f=Object.getOwnPropertyDescriptor(l,m);if(d&&!f.enumerable)continue;let h=f.get?uc:f.value?._zod?Mo(f.value,e,n):Xn;h>p&&(p=h)}return p},s=l=>{l>r&&(r=l)},c=t._zod.def,u=c.type;switch(u){case"object":{let l=Mn(c);s(l?a(l,!0):uc),o(c.catchall);break}case"array":o(c.element);break;case"tuple":for(let l of c.items)o(l);o(c.rest);break;case"record":case"map":o(c.keyType),o(c.valueType);break;case"set":o(c.valueType);break;case"union":for(let l of c.options)o(l);break;case"intersection":o(c.left),o(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(c.innerType);break;case"pipe":o(c.in),o(c.out);break;case"function":o(c.input),o(c.output);break;case"lazy":{let l=c._cachedInner??(n?t._zod.innerType:void 0);s(l?Mo(l,e,!1):uc);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let l in c){let d=Object.getOwnPropertyDescriptor(c,l);if(!d||d.get)continue;let p=d.value;if(!(!p||typeof p!="object")){if(p._zod)o(p);else if(Array.isArray(p))for(let m of p)o(m)}}}return e.delete(t),HO(t,r)}function HO(t,e){return e!==uc&&x$.set(t,e===Lo),e}function dc(t){return Mo(t,new Set,!0)!==Xn}function GO(t,e){let n=t.buckets.get(e);return n||(n=new WeakMap,t.buckets.set(e,n)),n}var sc,cc=[],JO={alloc(t,e,n){let i=sc;if(!i)return n;sc=void 0;let r={value:n,issues:null};return i.set(e.value,r),cc.push(r),n},guard(t){var e;(e=t._zod).deferred??(e.deferred=[]),t._zod.deferred.push(()=>{let n=t._zod.parse,i=(r,o)=>{if(o.direction!=="backward"&&fc(o,r.value))throw new lc;return n(r,o)};t._zod.parse=i,t._zod.run===n&&(t._zod.run=i)})},attach(t){var e;let n,i=!1,r,o;(e=t._zod).deferred??(e.deferred=[]),t._zod.deferred.push(()=>{let a=t._zod.parse,s=(c,u)=>{if(n===void 0){let y=Mo(t,new Set,!1);if(y===Xn)return t._zod.parse=a,t._zod.run===s&&(t._zod.run=a),a(c,u);y===Lo||i?n=!0:i=!0}let l=c.value;if(!w$(l))return a(c,u);let d=u[fm];d||(d={buckets:new WeakMap,backEdges:void 0},u[fm]=d);let p;r===u?p=o:(p=GO(d,t),r=u,o=p);let m=p.get(l);if(m)return c.value=m.value,m.issues?m.issues.length&&c.issues.push(...dm(m.issues)):(c.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(m.value)),c;sc=p;let f=cc.length,h=a(c,u);sc=void 0;let g=cc.length>f?cc.pop():void 0;return h instanceof Promise?h.then(y=>(g&&(g.issues=y.issues.length?dm(y.issues):$$),y)):(g&&(g.issues=h.issues.length?dm(h.issues):$$),h)};t._zod.parse=s,t._zod.run===a&&(t._zod.run=s)})}};function Fo(){return JO}function fc(t,e){let n=t[fm]?.backEdges;return n!==void 0&&w$(e)&&n.has(e)}var qo={};nr(qo,{ar:()=>S$,az:()=>k$,be:()=>P$,bg:()=>z$,bn:()=>E$,ca:()=>D$,ckb:()=>O$,cs:()=>T$,da:()=>C$,de:()=>A$,el:()=>N$,en:()=>pc,eo:()=>j$,es:()=>R$,fa:()=>U$,fi:()=>L$,fr:()=>M$,frCA:()=>F$,gu:()=>Z$,he:()=>q$,hi:()=>V$,hr:()=>B$,hu:()=>H$,hy:()=>J$,id:()=>K$,is:()=>W$,it:()=>X$,ja:()=>Y$,ka:()=>Q$,kh:()=>ew,km:()=>mc,kn:()=>tw,ko:()=>rw,lt:()=>iw,mk:()=>ow,ms:()=>aw,ne:()=>sw,nl:()=>cw,nn:()=>uw,no:()=>lw,ota:()=>dw,pl:()=>pw,ps:()=>fw,pt:()=>mw,ptBR:()=>hw,ro:()=>gw,ru:()=>vw,sk:()=>bw,sl:()=>_w,sv:()=>$w,ta:()=>ww,tg:()=>xw,th:()=>Sw,tk:()=>kw,tr:()=>Iw,ua:()=>Pw,uk:()=>hc,ur:()=>zw,uz:()=>Ew,vi:()=>Dw,yo:()=>Cw,zhCN:()=>Ow,zhTW:()=>Tw});var KO=()=>{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"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(r){return t[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${z(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${w(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function S$(){return{localeError:KO()}}var WO=()=>{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"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(r){return t[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${z(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${w(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function k$(){return{localeError:WO()}}function I$(t,e,n,i){let r=Math.abs(t),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?e:o>=2&&o<=4?n:i}var XO=()=>{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"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(r){return t[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${z(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);if(a){let s=Number(r.maximum),c=I$(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);if(a){let s=Number(r.minimum),c=I$(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${w(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function P$(){return{localeError:XO()}}var YO=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${z(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${w(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function z$(){return{localeError:YO()}}var QO=()=>{let t={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function e(r){return t[r]??null}let n={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return r.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${z(r.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${w(r.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${r.origin??"\u09AE\u09BE\u09A8"} ${o}${r.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${r.origin??"\u09AE\u09BE\u09A8"} ${o}${r.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${r.origin} ${o}${r.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${o.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${r.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${r.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${w(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${r.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function E$(){return{localeError:QO()}}var eT=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function e(r){return t[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${z(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${w(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=e(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=e(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${w(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function D$(){return{localeError:eT()}}var tT=()=>{let t={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function e(r){return t[r]??null}let n={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},i={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a,c=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(l=>s.endsWith(l))?"\u06CC\u06D5":"\u06D5",u=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${o} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${u?"":c}`}case"invalid_value":return r.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${z(r.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${w(r.values,"|")}`;case"too_big":{let o=e(r.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${r.maximum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${r.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let o=e(r.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${r.minimum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${r.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${o.prefix}"`:o.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${o.suffix}"`:o.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${o.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:o.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${o.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${n[o.format]??r.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${r.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${w(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${r.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function O$(){return{localeError:tT()}}var rT=()=>{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"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(r){return t[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${z(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${w(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function T$(){return{localeError:rT()}}var nT=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function e(r){return t[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${z(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin),s=i[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin),s=i[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${w(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function C$(){return{localeError:nT()}}var iT=()=>{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"},map:{unit:"Elemente",verb:"zu haben"}};function e(r){return t[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${z(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${w(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function A$(){return{localeError:iT()}}var oT=()=>{let t={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function e(r){return t[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${z(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${w(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function N$(){return{localeError:oT()}}var aT=()=>{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"},map:{unit:"entries",verb:"to have"}};function e(o){return t[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function r(o,a){return o==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):i[o]??o}return o=>{switch(o.code){case"invalid_type":{let a=r(o.expected),s=E(o.input),c=r(s,o.input);return`Invalid input: expected ${a}, received ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${z(o.values[0])}`:`Invalid option: expected one of ${w(o.values,"|")}`;case"too_big":{let a=o.exact?"exactly ":o.inclusive?"<=":"<",s=e(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${a}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${a}${o.maximum.toString()}`}case"too_small":{let a=o.exact?"exactly ":o.inclusive?">=":">",s=e(o.origin);return s?`Too small: expected ${o.origin} to have ${a}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${n[a.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${w(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:o.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function pc(){return{localeError:aT()}}var sT=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function e(r){return t[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${z(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${w(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function j$(){return{localeError:sT()}}var cT=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(r){return t[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${z(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${w(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function R$(){return{localeError:cT()}}var uT=()=>{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"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(r){return t[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${z(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${w(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${w(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function U$(){return{localeError:uT()}}var lT=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(r){return t[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${z(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${w(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function L$(){return{localeError:lT()}}var dT=()=>{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(r){return t[r]??null}let n={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instance de ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${z(r.values[0])} attendu`:`Option invalide : une valeur parmi ${w(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${w(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function M$(){return{localeError:dT()}}var fT=()=>{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"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(r){return t[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${z(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=e(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=e(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${w(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function F$(){return{localeError:fT()}}var pT=()=>{let t={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function e(r){return t[r]??null}let n={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return r.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${z(r.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${w(r.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${r.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${r.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${r.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${r.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${r.origin} ${o}${r.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${o.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${r.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${r.keys.length>1?"\u0A93":""}: ${w(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${r.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function Z$(){return{localeError:pT()}}var mT=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=u=>u?t[u]:void 0,i=u=>{let l=n(u);return l?l.label:u??t.unknown.label},r=u=>`\u05D4${i(u)}`,o=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=u=>u?e[u]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let l=u.expected,d=c[l??""]??i(l),p=E(u.input),m=c[p]??t[p]?.label??p;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${z(u.values[0])}`;let l=u.values.map(m=>z(m));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=a(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let f=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(u.origin==="array"||u.origin==="set"){let f=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=u.inclusive?"<=":"<",m=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${u.maximum.toString()}`}case"too_small":{let l=a(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let f=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(u.origin==="array"||u.origin==="set"){let f=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let g=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`}let h=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=u.inclusive?">=":">",m=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${u.minimum.toString()}`}case"invalid_format":{let l=u;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let d=s[l.format],p=d?.label??l.format,f=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${f}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${w(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function q$(){return{localeError:mT()}}var hT=()=>{let t={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function e(r){return t[r]??null}let n={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return r.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${z(r.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${o}${r.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin??"\u092E\u093E\u0928"} ${o}${r.maximum} \u0939\u094B`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin} \u092E\u0947\u0902 ${o}${r.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${r.origin} ${o}${r.minimum} \u0939\u094B`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${o.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${o.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${r.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${r.keys.length>1?"\u092F\u093E\u0901":""}: ${w(r.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${r.origin} \u092E\u0947\u0902`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${r.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function V$(){return{localeError:hT()}}var gT=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(r){return t[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${z(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin),s=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin),s=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${w(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function B$(){return{localeError:gT()}}var yT=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function e(r){return t[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${z(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${w(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function H$(){return{localeError:yT()}}function G$(t,e,n){return Math.abs(t)===1?e:n}function Yn(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=t[t.length-1];return t+(e.includes(n)?"\u0576":"\u0568")}var vT=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(r){return t[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${z(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);if(a){let s=Number(r.maximum),c=G$(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Yn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Yn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);if(a){let s=Number(r.minimum),c=G$(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Yn(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Yn(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${w(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Yn(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Yn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function J$(){return{localeError:vT()}}var bT=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function e(r){return t[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${z(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${w(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function K$(){return{localeError:bT()}}var _T=()=>{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"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function e(r){return t[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${z(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${w(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function W$(){return{localeError:_T()}}var $T=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function e(r){return t[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${z(r.values[0])}`:`Opzione non valida: atteso uno tra ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${w(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function X$(){return{localeError:$T()}}var wT=()=>{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"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(r){return t[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${z(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${w(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=e(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=e(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${w(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Y$(){return{localeError:wT()}}var xT=()=>{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"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(r){return t[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${z(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${w(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${w(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Q$(){return{localeError:xT()}}var ST=()=>{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"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(r){return t[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${z(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${w(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function mc(){return{localeError:ST()}}function ew(){return mc()}var kT=()=>{let t={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function e(r){return t[r]??null}let n={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${z(r.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${r.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${r.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${o.prefix}"`:o.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${o.suffix}"`:o.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${o.includes}"`:o.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${o.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${r.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${r.keys.length>1?"s":""}: ${w(r.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${r.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function tw(){return{localeError:kT()}}var IT=()=>{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"},map:{unit:"\uAC1C",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${z(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${w(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${w(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function rw(){return{localeError:IT()}}var Zo=t=>t.charAt(0).toUpperCase()+t.slice(1);function nw(t){let e=Math.abs(t),n=e%10,i=e%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var PT=()=>{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(r,o,a,s){let c=t[r]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${z(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${w(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=e(r.origin,nw(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Zo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Zo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=e(r.origin,nw(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Zo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Zo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${w(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${Zo(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function iw(){return{localeError:PT()}}var zT=()=>{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"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(r){return t[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${z(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${w(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function ow(){return{localeError:zT()}}var ET=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function e(r){return t[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${z(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${w(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function aw(){return{localeError:ET()}}var DT=()=>{let t={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function e(r){return t[r]??null}let n={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return r.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${z(r.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${r.origin??"\u092E\u093E\u0928"} \u092E\u093E ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${r.origin??"\u092E\u093E\u0928"} ${o}${r.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${r.origin} \u092E\u093E ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${r.origin} ${o}${r.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${o.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${r.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${r.keys.length>1?"\u0939\u0930\u0942":""}: ${w(r.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${r.origin} \u092E\u093E`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${r.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function sw(){return{localeError:DT()}}var OT=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function e(r){return t[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${z(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${w(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function cw(){return{localeError:OT()}}var TT=()=>{let t={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function e(r){return t[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventa instanceof ${r.expected}, fekk ${s}`:`Ugyldig input: forventa ${o}, fekk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventa ${z(r.values[0])}`:`Ugyldig val: forventa eitt av ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`For stor(t): forventa ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`For lite(n): forventa ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${w(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function uw(){return{localeError:TT()}}var CT=()=>{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"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function e(r){return t[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${z(r.values[0])}`:`Ugyldig valg: forventet en av ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${w(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function lw(){return{localeError:CT()}}var AT=()=>{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"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(r){return t[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${z(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${w(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function dw(){return{localeError:AT()}}var NT=()=>{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"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(r){return t[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${z(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${w(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${w(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function fw(){return{localeError:NT()}}var jT=()=>{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"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function e(r){return t[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${z(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${w(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function pw(){return{localeError:jT()}}var RT=()=>{let t={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function e(a){return t[a]??null}let n={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},r={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=r[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=E(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${z(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${w(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=e(a.origin);return c?`Demasiado grande: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=e(a.origin);return c?`Demasiado pequeno: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Demasiado pequeno: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${n[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${w(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function mw(){return{localeError:RT()}}var UT=()=>{let t={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function e(a){return t[a]??null}let n={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},r={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=r[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=E(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${z(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${w(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=e(a.origin);return c?`Grande demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Grande demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=e(a.origin);return c?`Pequeno demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Pequeno demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${n[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${w(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function hw(){return{localeError:UT()}}var LT=()=>{let t={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function e(r){return t[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${z(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${w(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function gw(){return{localeError:LT()}}function yw(t,e,n,i){let r=Math.abs(t),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?e:o>=2&&o<=4?n:i}var MT=()=>{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"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${z(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);if(a){let s=Number(r.maximum),c=yw(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);if(a){let s=Number(r.minimum),c=yw(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${w(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function vw(){return{localeError:MT()}}var FT=()=>{let t={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function e(r){return t[r]??null}let n={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${r.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${o}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${z(r.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${r.origin??"hodnota"} mus\xED ma\u0165 ${o}${r.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${r.origin??"hodnota"} mus\xED by\u0165 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED ma\u0165 ${o}${r.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED by\u0165 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${o.includes}"`:o.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${w(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function bw(){return{localeError:FT()}}var ZT=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function e(r){return t[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${z(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${w(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function _w(){return{localeError:ZT()}}var qT=()=>{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"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(r){return t[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${z(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${w(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function $w(){return{localeError:qT()}}var VT=()=>{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"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(r){return t[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${z(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${w(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${w(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function ww(){return{localeError:VT()}}var BT=()=>{let t={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},i={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${o} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return r.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${z(r.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${w(r.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${r.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${r.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${r.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${r.origin} \u0431\u043E\u044F\u0434 ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${r.origin} \u0431\u043E\u044F\u0434 ${o}${r.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:o.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:o.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${o.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:o.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${o.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${n[o.format]??r.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${r.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${r.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${w(r.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${r.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${r.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function xw(){return{localeError:BT()}}var HT=()=>{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"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(r){return t[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${z(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=e(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=e(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${w(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Sw(){return{localeError:HT()}}var GT=()=>{let t={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function e(r){return t[r]??null}let n={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${o} \xFDerine ${s} alyndy`}case"invalid_value":return r.values.length===1?`N\xE4dogry baha: ${z(r.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Has uly: gara\u015Fyl\xFDan ${r.origin??"baha"} ${o} ${r.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${r.origin??"baha"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`N\xE4dogry setir: "${o.prefix}" bilen ba\u015Flamaly`:o.format==="ends_with"?`N\xE4dogry setir: "${o.suffix}" bilen gutarmaly`:o.format==="includes"?`N\xE4dogry setir: "${o.includes}" saklamaly`:o.format==="regex"?`N\xE4dogry setir: ${o.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xE4dogry san: ${r.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${r.keys.length>1?"lar":""}: ${w(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${r.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function kw(){return{localeError:GT()}}var JT=()=>{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"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(r){return t[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${z(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${w(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Iw(){return{localeError:JT()}}var KT=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${z(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${w(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function hc(){return{localeError:KT()}}function Pw(){return hc()}var WT=()=>{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"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(r){return t[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${z(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${w(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${w(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function zw(){return{localeError:WT()}}var XT=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function e(r){return t[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${z(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${w(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Ew(){return{localeError:XT()}}var YT=()=>{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"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(r){return t[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${z(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${w(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Dw(){return{localeError:YT()}}var QT=()=>{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"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function e(r){return t[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${z(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${w(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Ow(){return{localeError:QT()}}var eC=()=>{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"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(r){return t[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${z(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${w(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Tw(){return{localeError:eC()}}var tC=()=>{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"},map:{unit:"nkan",verb:"n\xED"}};function e(r){return t[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=E(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${z(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${w(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=e(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=e(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${w(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Cw(){return{localeError:tC()}}var Aw,pm=Symbol("ZodOutput"),mm=Symbol("ZodInput"),gc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){let i=n[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function yc(){return new gc}(Aw=globalThis).__zod_globalRegistry??(Aw.__zod_globalRegistry=yc());var Ze=globalThis.__zod_globalRegistry;var ot=Symbol.for("zod.compile.invalid"),Nw=Symbol.for("zod.compile.fallback"),Ut=class extends Error{constructor(e="z.compile does not support async refinements, transforms, or checks"){super(e),this.name="ZodCompileAsyncError"}},Q=class extends Error{constructor(e,n=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=n}};function nC(t,e){try{return bc(t,{assertOnly:!0})}catch{return e}}function vm(t,e){try{let n=bc(t),i=vc(t,n);return i._zod.bag.validator=nC(t,n),i}catch(n){if(e?.strict)throw n;return t}}function vc(t,e){if(dc(t))throw new Q("a schema whose subtree contains a reference cycle");let n=ce(t),i=t._zod.run,r=i.__originalRun??i,o=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[Nw]||s&&fc(s,a.value))return r(a,s);let c=e(a.value);return c!==ot?(a.value=c,a):(s&&(s[Nw]=!0),r(a,s))};return o.__originalRun=r,n._zod.bag.fallbackRun=r,n._zod.bag.validator=e,n._zod.run=o,i.__originalRun||iC(n,t,e),n}function iC(t,e,n){let i=t,r=e;if(typeof r.safeParse=="function"){let o=r.safeParse;i.safeParse=(a,s)=>{let c=n(a);return c!==ot?{success:!0,data:c}:o(a,s)}}if(typeof r.parse=="function"){let o=r.parse;i.parse=(a,s)=>{let c=n(a);return c!==ot?c:o(a,s)}}}function bc(t,e){let n=!0;try{n=dc(t)}catch{}if(n)throw new Q("a schema whose subtree contains a reference cycle");let i={constants:new Map,constantCounter:0,varCounter:0,definite:!0},r=new Yr(["input"]),o=Se(r,i,t,"input",!e?.assertOnly);r.write(o===null?"return true;":`return ${o};`);let a=["INVALID",...i.constants.keys()],s=[ot,...i.constants.values()],c=r.content.join(`
87
+ `),u=e?.debug?a.length>0?`// Constants: ${a.join(", ")}
88
+ ${c}`:c:"",l=Function,d=`return (input) => {
89
+ ${c}
90
+ }`,p;try{p=new l(...a,d)(...s)}catch(m){throw new Q(`this schema (generated code failed to evaluate: ${m.message})`)}return e?.debug&&(p.code=u),p.definite=i.definite,p}function Z(t,e){for(let[i,r]of t.constants)if(r===e)return i;let n=`c${t.constantCounter++}`;return t.constants.set(n,e),n}function tn(t,e){return t.definite=!1,Z(t,e)}function M(t){return`v${t.varCounter++}`}function oC(t,e){let n=t._zod.run({value:e,issues:[]},{});if(n&&typeof n.then=="function")return ot;let i=n;return i.issues.length===0?i.value:ot}function Xe(t,e,n,i,r=!0){let o=t.content.length,a=e.constants.size,s=e.constantCounter,c=e.varCounter;try{return Se(t,e,n,i,r)}catch(u){if(!(u instanceof Q)||!u.islandable)throw u;if(t.content.length=o,e.constants.size>a){let l=Array.from(e.constants.keys()).slice(a);for(let d of l)e.constants.delete(d)}return e.constantCounter=s,e.varCounter=c,aC(t,e,n,i)}}function aC(t,e,n,i){e.definite=!1;let r=Z(e,n),o=Z(e,oC),a=M(e);return t.write(`const ${a} = ${o}(${r}, ${i});`),t.write(`if (${a} === INVALID) return INVALID;`),a}var sC=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function cC(t,e,n,i){let r=n._zod.def.checks;if(!r||r.length===0)return i;let o=i;for(let a of r){let s=a._zod.def;if(s.when&&!sC.has(s.check))throw new Q('check with a custom "when" condition');switch(s.check){case"greater_than":uC(t,e,s,o);break;case"less_than":lC(t,e,s,o);break;case"multiple_of":dC(t,e,s,o);break;case"number_format":Fw(t,s,o);break;case"min_length":{let c=wr(s.minimum,"min_length"),u=hm(t,e,o,`${o}.length >= ${c} && ${o}.length < ${s.minimum*2}`);t.write(`if (${u} < ${c}) return INVALID;`);break}case"max_length":{let c=wr(s.maximum,"max_length"),u=hm(t,e,o,`${o}.length > ${c}`);t.write(`if (${u} > ${c}) return INVALID;`);break}case"length_equals":{let c=wr(s.length,"length_equals"),u=hm(t,e,o,`${o}.length >= ${c} && ${o}.length <= ${s.length*2}`);t.write(`if (${u} !== ${c}) return INVALID;`);break}case"min_size":t.write(`if (${o}.size < ${wr(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":t.write(`if (${o}.size > ${wr(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":t.write(`if (${o}.size !== ${wr(s.size,"size_equals")}) return INVALID;`);break;case"string_format":o=Zw(t,e,s,o);break;case"custom":o=yC(t,e,a,o);break;case"bigint_format":fC(t,s,o);break;case"mime_type":pC(t,e,s,o);break;case"property":hC(t,e,s,o);break;case"properties":mC(t,e,s,o);break;case"overwrite":{let c=M(e);gC(t,e,a,o,c),o=c;break}default:throw new Q(`check type ${s.check}`)}}return o}function hm(t,e,n,i){let r=Z(e,Wr),o=M(e);return t.write(`const ${o} = typeof ${n} === "string" && ${i} ? ${r}(${n}) : ${n}.length;`),o}function wr(t,e){if(typeof t!="number"||!Number.isFinite(t))throw new Q(`${e} bound of type ${typeof t}`);return`${t}`}function Mw(t,e){if(typeof e=="bigint")return`${e}n`;if(typeof e=="number"){if(Number.isNaN(e))throw new Q("comparison check with NaN bound");return`${e}`}if(e instanceof Date){if(Number.isNaN(e.getTime()))throw new Q("comparison check with Invalid Date bound");return Z(t,e)}throw new Q(`comparison check bound of type ${typeof e}`)}function uC(t,e,n,i){let r=n.inclusive?"<":"<=";t.write(`if (${i} ${r} ${Mw(e,n.value)}) return INVALID;`)}function lC(t,e,n,i){let r=n.inclusive?">":">=";t.write(`if (${i} ${r} ${Mw(e,n.value)}) return INVALID;`)}function dC(t,e,n,i){if(typeof n.value=="bigint"){if(n.value===BigInt(0))throw new Q("multiple_of check with a zero divisor");t.write(`if (${i} % ${n.value}n !== 0n) return INVALID;`)}else{let r=Z(e,po);t.write(`if (${r}(${i}, ${wr(n.value,"multiple_of")}) !== 0) return INVALID;`)}}function Fw(t,e,n){let i=e.format;switch(i){case"safeint":t.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case"int32":t.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case"uint32":t.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case"float32":t.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case"float64":t.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new Q(`number format ${i}`)}}function fC(t,e,n){let i=e.format;if(i)switch(i){case"int64":t.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":t.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new Q(`bigint format ${i}`)}}function pC(t,e,n,i){let r=n.mime;if(r&&r.length>0){let o=Z(e,new Set(r));t.write(`if (!${o}.has(${i}.type)) return INVALID;`)}}function mC(t,e,n,i){if(n.when)throw new Q('check with a custom "when" condition');t.write(`if (${i} == null) return INVALID;`);let r=n.shape;for(let o of Reflect.ownKeys(r)){let a=typeof o=="symbol"?Z(e,o):nt(o),s=M(e);t.write(`const ${s} = ${i}[${a}];`),Xe(t,e,r[o],s,!1)}}function hC(t,e,n,i){let r=`${i}[${JSON.stringify(n.property)}]`;Se(t,e,n.schema,r)}function gC(t,e,n,i,r){let o=n._zod.def.tx;if(!o)throw new Q("overwrite check without a transform function");if(rn(o))throw new Ut("z.compile: async overwrite transforms are not supported");let a=Z(e,o);t.write(`const ${r} = ${a}(${i});`)}function gm(){throw new ht}function bm(t){this.issues.push(t)}function yC(t,e,n,i){let r=n._zod.def;if(r.fn){if(rn(r.fn))throw new Ut("z.compile: async .refine() predicates are not supported");let o=tn(e,r.fn),a=Z(e,gm),s=M(e);return t.write(`const ${s} = ${o}(${i});`),t.write(`if (${s} instanceof Promise) ${a}();`),t.write(`if (!${s}) return INVALID;`),i}if(n._zod.check){if(rn(n._zod.check))throw new Ut("z.compile: async .superRefine() / check functions are not supported");let o=n._zod.check,s=tn(e,u=>{let l={value:u,issues:[],addIssue:bm};return o(l)instanceof Promise&&gm(),l.issues.length===0?l.value:ot}),c=M(e);return t.write(`const ${c} = ${s}(${i});`),t.write(`if (${c} === INVALID) return INVALID;`),c}throw new Q("custom check without a predicate or check function")}var vC=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function Zw(t,e,n,i,r=!0){let o=n.format;if(o==="base64"){let u=Z(e,Co);return t.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="base64url"){let u=Z(e,Ys);return t.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="jwt"){let u=Z(e,tc),l=Z(e,n.alg??null);return t.write(`if (!${u}(${i}, ${l})) return INVALID;`),i}if(o==="ipv6"){let u=Z(e,To);return t.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="cidrv6"){let u=Z(e,Ws);return t.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="credit_card"){let u=Z(e,Qs);return t.write(`if (!${u}(${i})) return INVALID;`),i}if(o==="iban"){let u=Z(e,ec);return t.write(`if (!${u}(${i})) return INVALID;`),i}let a=n;if(o==="url"||o==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let u=Z(e,Gs),l=Z(e,n),d=M(e),p=M(e);if(t.write(`const ${d} = ${i}.trim();`),t.write(`const ${p} = ${u}(${d}, ${l});`),t.write(`if (typeof ${p} === "number") return INVALID;`),a.hostname!==void 0){let h=Z(e,Js);t.write(`if (!${h}(${p}, ${l}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let h=Z(e,Ks);t.write(`if (!${h}(${p}, ${l}.protocol)) return INVALID;`)}if(!r)return null;let m=M(e),f=a.normalize?`${p}.href`:`${Z(e,Oo)}(${d})`;return t.write(`const ${m} = ${f};`),m}let s=n.fn;if(s){if(rn(s))throw new Q(`async string format ${o}`);let u=Z(e,s);return t.write(`if (!${u}(${i})) return INVALID;`),i}if(vC.has(o)&&n.pattern){let u=Z(e,n.pattern);return t.write(`${u}.lastIndex = 0;`),t.write(`if (!${u}.test(${i})) return INVALID;`),i}let c=n.format;switch(c){case"regex":throw new Q("regex format without a pattern");case"lowercase":t.write(`if (${i} !== ${i}.toLowerCase()) return INVALID;`);break;case"uppercase":t.write(`if (${i} !== ${i}.toUpperCase()) return INVALID;`);break;case"includes":t.write(`if (!${i}.includes(${nt(n.includes)})) return INVALID;`);break;case"starts_with":{let u=n.prefix;t.write(`if (${i}.slice(0, ${u.length}) !== ${nt(u)}) return INVALID;`);break}case"ends_with":{let u=n.suffix;t.write(`if (${i}.slice(-${u.length}) !== ${nt(u)}) return INVALID;`);break}default:throw new Q(`string format ${c}`)}return i}function Se(t,e,n,i,r=!0){let o=n._zod.def,a=o.type;if(o.coerce)throw new Q(`coercion (z.coerce.${a}())`);let s=r||!!o.checks?.length,c;switch(a){case"string":c=bC(t,e,n,i,s);break;case"number":c=_C(t,n,i);break;case"boolean":c=$C(t,i);break;case"bigint":c=wC(t,n,i);break;case"symbol":c=xC(t,i);break;case"undefined":c=SC(t,i);break;case"null":c=kC(t,i);break;case"any":case"unknown":c=i;break;case"never":t.write("return INVALID;"),c=i;break;case"void":c=IC(t,i);break;case"nan":c=PC(t,i);break;case"date":c=zC(t,i);break;case"object":c=EC(t,e,n,i,s);break;case"optional":c=DC(t,e,n,i,s);break;case"nullable":c=CC(t,e,n,i,s);break;case"array":c=AC(t,e,n,i,s);break;case"literal":c=NC(t,e,n,i);break;case"enum":c=jC(t,e,n,i);break;case"readonly":{let u=Rw(t,e,n,i),l=M(e);t.write(`const ${l} = Object.freeze(${u});`),c=l;break}case"success":Rw(t,e,n,i),c="true";break;case"default":case"prefault":c=RC(t,e,n,i);break;case"nonoptional":c=UC(t,e,n,i);break;case"tuple":c=LC(t,e,n,i);break;case"union":c=MC(t,e,n,i);break;case"intersection":c=qC(t,e,n,i);break;case"record":c=VC(t,e,n,i);break;case"map":c=HC(t,e,n,i);break;case"set":c=GC(t,e,n,i);break;case"file":c=JC(t,i);break;case"template_literal":c=KC(t,e,n,i);break;case"lazy":c=WC(t,e,n,i);break;case"pipe":c=XC(t,e,n,i);break;case"custom":c=YC(t,e,n,i);break;case"transform":c=tA(t,e,n,i);break;case"catch":c=eA(t,e,n,i);break;default:throw new Q(`schema type ${a}`)}return c===null?null:cC(t,e,n,c)}function bC(t,e,n,i,r=!0){t.write(`if (typeof ${i} !== "string") return INVALID;`);let o=n._zod.def;return o.format===void 0?i:Zw(t,e,o,i,r)}function _C(t,e,n){t.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let i=e._zod.def;return i.check==="number_format"&&i.format&&Fw(t,{format:i.format},n),n}function $C(t,e){return t.write(`if (typeof ${e} !== "boolean") return INVALID;`),e}function wC(t,e,n){t.write(`if (typeof ${n} !== "bigint") return INVALID;`);let i=e._zod.def;if(i.format)switch(i.format){case"int64":t.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":t.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break}return n}function xC(t,e){return t.write(`if (typeof ${e} !== "symbol") return INVALID;`),e}function SC(t,e){return t.write(`if (${e} !== undefined) return INVALID;`),e}function kC(t,e){return t.write(`if (${e} !== null) return INVALID;`),e}function IC(t,e){return t.write(`if (${e} !== undefined) return INVALID;`),e}function PC(t,e){return t.write(`if (typeof ${e} !== "number" || !Number.isNaN(${e})) return INVALID;`),e}function zC(t,e){return t.write(`if (!(${e} instanceof Date) || Number.isNaN(${e}.getTime())) return INVALID;`),e}function EC(t,e,n,i,r=!0){let o=n._zod.def;t.write(`if (typeof ${i} !== "object" || ${i} === null || Array.isArray(${i})) return INVALID;`);let a=o.shape,s=Object.keys(a),c=Object.getOwnPropertySymbols(a),u=c.length?[...s,...c]:s,l=v=>typeof v=="symbol"?Z(e,v):nt(v),d=v=>typeof v=="symbol"?`[${l(v)}]`:nt(v),p=a;if(s.includes("__proto__"))throw new Q('object shape key "__proto__"');let m=new Map;for(let v of u){let b=p[v],_=l(v),x=M(e);if(t.write(`const ${x} = ${i}[${_}];`),b._zod.optin!==void 0){let k=M(e);t.write(`let ${k} = (() => {`),t.indented(D=>{let A=Xe(D,e,b,x);D.write(`return ${A};`)}),t.write("})();"),b._zod.optout==="optional"?(t.write(`if (${k} === INVALID) {`),t.indented(D=>{D.write(`if (${_} in ${i}) return INVALID;`),D.write(`${k} = undefined;`)}),t.write("}")):t.write(`if (${k} === INVALID) return INVALID;`),m.set(v,k)}else{TC(b)&&t.write(`if (!(${_} in ${i})) return INVALID;`);let k=Xe(t,e,b,x,r);k!==null&&m.set(v,k)}}let f=o.catchall,h="none";if(f){let v=f._zod.def.type;if(v==="never"){let b=s.map(_=>`k !== ${nt(_)}`).join(" && ")||"true";t.write(`for (const k in ${i}) {`),t.indented(_=>{_.write(`if (${b}) return INVALID;`)}),t.write("}")}else(v==="unknown"||v==="any")&&!f._zod.def.checks?.length?h="passthrough":h="schema"}let g=M(e),y=u.some(v=>jw(p[v])||ym(p[v]));if(!r){if(h==="schema"){let v=s.length>0?Z(e,new Set(s)):null;t.write(`for (const k in ${i}) {`),t.indented(b=>{b.write('if (k === "__proto__") continue;'),v&&b.write(`if (${v}.has(k)) continue;`);let _=M(e);b.write(`const ${_} = ${i}[k];`),Xe(b,e,f,_,!1)}),t.write("}")}return null}if(y){t.write(`const ${g} = {};`);for(let v of u){let b=l(v),_=m.get(v);ym(p[v])?t.write(`if (${b} in ${i}) ${g}[${b}] = ${_};`):jw(p[v])?t.write(`if (${_} !== undefined || ${b} in ${i}) ${g}[${b}] = ${_};`):t.write(`${g}[${b}] = ${_};`)}}else{let v=u.map(b=>`${d(b)}: ${m.get(b)}`).join(", ");t.write(`const ${g} = { ${v} };`)}if(h!=="none"){let v=s.length>0?Z(e,new Set(s)):null;t.write(`for (const k in ${i}) {`),t.indented(b=>{if(b.write('if (k === "__proto__") continue;'),v&&b.write(`if (${v}.has(k)) continue;`),h==="passthrough")b.write(`${g}[k] = ${i}[k];`);else{let _=M(e);b.write(`const ${_} = ${i}[k];`);let x=Xe(b,e,f,_);b.write(`${g}[k] = ${x};`)}}),t.write("}")}return g}function DC(t,e,n,i,r=!0){let o=n._zod.def;if(OC(n))return Se(t,e,o.innerType,i,r);if(o.innerType._zod.optin==="defaulted"){let s=M(e),c=M(e);return t.write(`let ${s};`),t.write(`if (${i} === undefined) {`),t.indented(u=>{u.write(`const ${c} = (() => {`),u.indented(l=>{let d=Se(l,e,o.innerType,i);l.write(`return ${d};`)}),u.write("})();"),u.write(`if (${c} !== INVALID) ${s} = ${c};`)}),t.write("} else {"),t.indented(u=>{let l=Se(u,e,o.innerType,i);u.write(`${s} = ${l};`)}),t.write("}"),s}let a=r?M(e):null;return a&&t.write(`let ${a};`),t.write(`if (${i} !== undefined) {`),t.indented(s=>{let c=Se(s,e,o.innerType,i,r);a&&c!==null&&s.write(`${a} = ${c};`)}),t.write("}"),a}function OC(t){return t._zod.traits?.has("$ZodExactOptional")===!0}function TC(t){return t._zod.optin===void 0&&en(t)}function en(t){if(t._zod.def.coerce)return!0;let e=t._zod.def;switch(e.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return e.innerType?en(e.innerType):!1;case"literal":return!!e.values?.includes(void 0);case"enum":return!!t._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return e.innerType?en(e.innerType):!0;case"catch":return!0;case"union":return e.options?e.options.some(en):!0;case"intersection":return!e.left||!e.right?!0:en(e.left)&&en(e.right);case"pipe":return e.in?en(e.in):!0;default:return!0}}function ym(t){return t._zod.optin==="optional"&&t._zod.optout==="optional"}function jw(t){return(t._zod.optin!=="defaulted"||t._zod.optout==="optional")&&Qn(t)}function Qn(t){let e=t._zod.def;switch(e.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!e.values?.includes(void 0);case"enum":return!!t._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return e.innerType?Qn(e.innerType):!0;case"union":return e.options?e.options.some(Qn):!0;case"intersection":return!e.left||!e.right||Qn(e.left)||Qn(e.right);case"pipe":return e.out?Qn(e.out):!0;default:return!0}}function CC(t,e,n,i,r=!0){let o=n._zod.def,a=r?M(e):null;return a&&t.write(`let ${a} = null;`),t.write(`if (${i} !== null) {`),t.indented(s=>{let c=Se(s,e,o.innerType,i,r);a&&c!==null&&s.write(`${a} = ${c};`)}),t.write("}"),a}function _m(t,e,n){for(let[i,r]of Fn(e._zod.def.checks))t.write(`if (${n} > ${wr(i,r._zod.def.check)}) return INVALID;`)}function AC(t,e,n,i,r=!0){let o=n._zod.def;t.write(`if (!Array.isArray(${i})) return INVALID;`),_m(t,n,`${i}.length`);let a=r?M(e):null,s=M(e),c=M(e);return a&&t.write(`const ${a} = new Array(${i}.length);`),t.write(`for (let ${s} = 0; ${s} < ${i}.length; ${s}++) {`),t.indented(u=>{u.write(`const ${c} = ${i}[${s}];`);let l=Xe(u,e,o.element,c,r);a&&l!==null&&u.write(`${a}[${s}] = ${l};`)}),t.write("}"),a}function NC(t,e,n,i){let o=n._zod.def.values;if(o.length!==1){let s=Z(e,new Set(o));return t.write(`if (!${s}.has(${i})) return INVALID;`),i}let a=o[0];if(typeof a=="number"&&Number.isNaN(a)){let s=Z(e,new Set(o));return t.write(`if (!${s}.has(${i})) return INVALID;`),i}if(typeof a=="string")t.write(`if (${i} !== ${nt(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")t.write(`if (${i} !== ${a}) return INVALID;`);else if(a===null)t.write(`if (${i} !== null) return INVALID;`);else if(a===void 0)t.write(`if (${i} !== undefined) return INVALID;`);else if(typeof a=="bigint")t.write(`if (${i} !== ${a}n) return INVALID;`);else throw new Q(`literal type ${typeof a}`);return i}function jC(t,e,n,i){let r=n._zod.values;if(!r)throw new Q("enum schema without enumerated values");let o=Z(e,r);return t.write(`if (!${o}.has(${i})) return INVALID;`),i}function Rw(t,e,n,i){let r=n._zod.def;return Se(t,e,r.innerType,i)}function RC(t,e,n,i){let r=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,"defaultValue")?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type==="prefault"){if(!a)return Se(t,e,r.innerType,i);let c=Z(e,a),u=M(e);return t.write(`let ${u} = ${i};`),t.write(`if (${i} === undefined) ${u} = ${c}();`),Se(t,e,r.innerType,u)}let s=M(e);if(a){let c=Z(e,a),u=Z(e,mo);t.write(`let ${s};`),t.write(`if (${i} === undefined) {`),t.indented(l=>{l.write(`${s} = ${u}(${c}());`)}),t.write("} else {"),t.indented(l=>{let d=Se(l,e,r.innerType,i);l.write(`${s} = ${d} === undefined ? ${u}(${c}()) : ${d};`)}),t.write("}")}else t.write(`let ${s};`),t.write(`if (${i} !== undefined) {`),t.indented(c=>{let u=Se(c,e,r.innerType,i);c.write(`${s} = ${u};`)}),t.write("}");return s}function UC(t,e,n,i){let r=n._zod.def,o=Se(t,e,r.innerType,i),a=M(e);return t.write(`const ${a} = ${o};`),t.write(`if (${a} === undefined) return INVALID;`),a}function LC(t,e,n,i){let r=n._zod.def,o=r.items,a=r.rest;t.write(`if (!Array.isArray(${i})) return INVALID;`);let s=Uw(o,"optin"),c=Uw(o,"optout");a?t.write(`if (${i}.length < ${s}) return INVALID;`):t.write(`if (${i}.length < ${s} || ${i}.length > ${o.length}) return INVALID;`);let u=M(e);t.write(`const ${u} = [];`);for(let l=0;l<o.length;l++){let d=o[l];if(l>=c)t.write(`if (${u}.length === ${l}) {`),t.indented(p=>{p.write(`if (${l} < ${i}.length) {`),p.indented(m=>{let f=M(e);m.write(`const ${f} = ${i}[${l}];`);let h=Xe(m,e,d,f);m.write(`${u}[${l}] = ${h};`)}),p.write("} else {"),p.indented(m=>{if(ym(d)){m.write(`${u}.length = ${l};`);return}let f=M(e),h=M(e);m.write(`const ${f} = undefined;`),m.write(`const ${h} = (() => {`),m.indented(g=>{let y=Xe(g,e,d,f);g.write(`return ${y};`)}),m.write("})();"),m.write(`if (${h} === INVALID || ${h} === undefined) ${u}.length = ${l};`),m.write(`else ${u}[${l}] = ${h};`)}),p.write("}")}),t.write("}");else{let p=M(e);t.write(`const ${p} = ${i}[${l}];`);let m=Xe(t,e,d,p);t.write(`${u}[${l}] = ${m};`)}}if(a){let l=M(e),d=M(e);t.write(`for (let ${l} = ${o.length}; ${l} < ${i}.length; ${l}++) {`),t.indented(p=>{p.write(`const ${d} = ${i}[${l}];`);let m=Xe(p,e,a,d);p.write(`${u}[${l}] = ${m};`)}),t.write("}")}return u}function Uw(t,e){for(let n=t.length-1;n>=0;n--)if(!(e==="optin"?t[n]._zod.optin!==void 0:t[n]._zod.optout==="optional"))return n+1;return 0}function MC(t,e,n,i){let r=n._zod.def,o=r.options;if(r.discriminator)return FC(t,e,r,i);if(r.inclusive===!1)throw new Q("exclusive unions (z.xor)");if(o.length===0)return t.write("return INVALID;"),i;if(o.length===1)return Se(t,e,o[0],i);if(o.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(o.flatMap(l=>l._zod.def.values)),u=Z(e,c);return t.write(`if (!${u}.has(${i})) return INVALID;`),i}let s=M(e);t.write(`let ${s};`);for(let c=0;c<o.length;c++){let u=o[c];c===0?t.write(`${s} = (() => {`):t.write(`if (${s} === INVALID) ${s} = (() => {`),t.indented(l=>{let d=Se(l,e,u,i);l.write(`return ${d};`)}),t.write("})();")}return t.write(`if (${s} === INVALID) return INVALID;`),s}function FC(t,e,n,i){if(n.unionFallback)throw new Q("discriminated union with unionFallback");if(n.options.length===0)return t.write("return INVALID;"),i;let r=M(e),o=M(e);t.write(`const ${r} = ${i}?.[${nt(n.discriminator)}];`),t.write(`let ${o};`);let a=!0,s=new Set;for(let c of n.options){let u=c._zod.propValues?.[n.discriminator];if(!u||u.size===0)throw new Q("discriminated union option without static discriminator values");for(let p of u){if(s.has(p))throw new Q(`duplicate discriminator value ${String(p)}`);s.add(p)}let l=Array.from(u,p=>ZC(e,r,p)),d=a?"if":"else if";t.write(`${d} (${l.join(" || ")}) {`),t.indented(p=>{let m=Se(p,e,c,i);p.write(`${o} = ${m};`)}),t.write("}"),a=!1}return t.write("else { return INVALID; }"),o}function ZC(t,e,n){if(typeof n=="string")return`${e} === ${nt(n)}`;if(typeof n=="number")return Number.isNaN(n)?`Number.isNaN(${e})`:`${e} === ${n}`;if(typeof n=="boolean")return`${e} === ${n}`;if(n===null)return`${e} === null`;if(n===void 0)return`${e} === undefined`;if(typeof n=="bigint")return`${e} === ${n}n`;if(typeof n=="symbol"){let i=Z(t,n);return`${e} === ${i}`}throw new Q(`literal discriminator value ${String(n)}`)}function qC(t,e,n,i){let r=n._zod.def;e.definite=!1;let o=Xe(t,e,r.left,i),a=Xe(t,e,r.right,i),s=Z(e,Wn),c=M(e);return t.write(`const ${c} = ${s}(${o}, ${a});`),t.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function VC(t,e,n,i){let r=n._zod.def,o=Z(e,It);t.write(`if (!${o}(${i})) return INVALID;`);let a=M(e),s=M(e),c=M(e);t.write(`const ${a} = {};`);let u=r,l=u.partial?void 0:r.keyType._zod.values;if(l){let m=[];for(let h of l){if(!(typeof h=="string"||typeof h=="number"||typeof h=="symbol"))throw new Q(`record key value ${String(h)}`);let g=typeof h=="number"?h.toString():h;if(g==="__proto__")throw new Q('record key "__proto__"');m.push(g);let y=Z(e,h),v=Se(t,e,r.keyType,y),b=M(e);t.write(`const ${b} = ${i}[${BC(e,g)}];`);let _=Xe(t,e,r.valueType,b);t.write(`${a}[${v}] = ${_};`)}let f=Z(e,new Set(m));return t.write(`for (const ${s} in ${i}) {`),t.indented(h=>{h.write(`if (${f}.has(${s})) continue;`),u.mode==="loose"?h.write(`if (${s} !== "__proto__") ${a}[${s}] = ${i}[${s}];`):h.write("return INVALID;")}),t.write("}"),a}let d=r.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){let m=r.mode==="loose",f=bc(r.keyType);f.definite===!1&&(e.definite=!1);let h=Z(e,f),g=Z(e,ar),y=M(e);return Lw(t,e,i,s,v=>{v.write(`let ${y} = ${h}(${s});`),v.write(`if (${y} === INVALID && typeof ${s} === "string" && ${g}.test(${s})) ${y} = ${h}(Number(${s}));`),m?v.write(`if (${y} === INVALID) { ${a}[${s}] = ${i}[${s}]; continue; }`):v.write(`if (${y} === INVALID) return INVALID;`),v.write(`if (${y} === "__proto__") continue;`);let b=M(e);v.write(`const ${b} = ${i}[${s}];`);let _=Xe(v,e,r.valueType,b);v.write(`${a}[${y}] = ${_};`)}),a}return Lw(t,e,i,s,m=>{m.write(`const ${c} = ${i}[${s}];`);let f=Xe(m,e,r.valueType,c);m.write(`${a}[${s}] = ${f};`)},"return INVALID;"),a}function Lw(t,e,n,i,r,o){let a=Z(e,Object.prototype.propertyIsEnumerable),s=M(e),c=M(e),u=M(e);t.write(`const ${s} = Object.getOwnPropertySymbols(${n});`),t.write(`const ${c} = Object.getOwnPropertyNames(${n});`),t.write(`for (let ${u} = 0; ${u} < ${c}.length; ${u}++) {`),t.indented(l=>{l.write(`const ${i} = ${c}[${u}];`),l.write(`if (${i} === "__proto__" || !${a}.call(${n}, ${i})) continue;`),r(l)}),t.write("}"),t.write(`for (let ${u} = 0; ${u} < ${s}.length; ${u}++) {`),t.indented(l=>{l.write(`const ${i} = ${s}[${u}];`),l.write(`if (!${a}.call(${n}, ${i})) continue;`),o?l.write(o):r(l)}),t.write("}")}function BC(t,e){return typeof e=="string"?nt(e):Z(t,e)}function HC(t,e,n,i){let r=n._zod.def;t.write(`if (!(${i} instanceof Map)) return INVALID;`),_m(t,n,`${i}.size`);let o=M(e),a=M(e),s=M(e);return t.write(`const ${o} = new Map();`),t.write(`for (const [${a}, ${s}] of ${i}) {`),t.indented(c=>{let u=Se(c,e,r.keyType,a),l=Se(c,e,r.valueType,s);c.write(`${o}.set(${u}, ${l});`)}),t.write("}"),o}function GC(t,e,n,i){let r=n._zod.def;t.write(`if (!(${i} instanceof Set)) return INVALID;`),_m(t,n,`${i}.size`);let o=M(e),a=M(e);return t.write(`const ${o} = new Set();`),t.write(`for (const ${a} of ${i}) {`),t.indented(s=>{let c=Se(s,e,r.valueType,a);s.write(`${o}.add(${c});`)}),t.write("}"),o}function JC(t,e){return t.write(`if (!(${e} instanceof File)) return INVALID;`),e}function KC(t,e,n,i){t.write(`if (typeof ${i} !== "string") return INVALID;`);let r=n._zod.pattern;if(r){let o=Z(e,r);t.write(`${o}.lastIndex = 0;`),t.write(`if (!${o}.test(${i})) return INVALID;`)}return i}function WC(t,e,n,i){let r=n._zod.def,o=tn(e,r.getter),a=Z(e,{parser:null});t.write(`if (!${a}.parser) {`),t.indented(c=>{c.write(`const inner = ${o}();`),c.write(`${a}.parser = function(input) {`),c.indented(u=>{u.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),u.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),t.write("}");let s=M(e);return t.write(`const ${s} = ${a}.parser(${i});`),t.write(`if (${s} === INVALID) return INVALID;`),s}function XC(t,e,n,i){let r=n._zod.def,o=Se(t,e,r.in,i);if(r.transform){if(rn(r.transform))throw new Ut("z.compile: async transforms in pipes are not supported");let a=r.transform,c=tn(e,l=>{let d={value:l,issues:[],addIssue:bm},p=a(l,d);return p instanceof Promise?ot:d.issues.length===0?p:ot}),u=M(e);return t.write(`const ${u} = ${c}(${o});`),t.write(`if (${u} === INVALID) return INVALID;`),Se(t,e,r.out,u)}else return Se(t,e,r.out,o)}function rn(t){return typeof t=="function"&&(t.constructor.name==="AsyncFunction"||t[Symbol.toStringTag]==="AsyncFunction")}function YC(t,e,n,i){let r=n._zod.def;if(r.fn){if(rn(r.fn))throw new Ut("z.compile: async custom predicates are not supported");let o=tn(e,r.fn),a=Z(e,gm),s=M(e);t.write(`const ${s} = ${o}(${i});`),t.write(`if (${s} instanceof Promise) ${a}();`),t.write(`if (!${s}) return INVALID;`)}else throw new Q("custom schema without a predicate function");return i}function QC(t,e,n){let i=t._zod.run({value:n,issues:[]},{});if(i&&typeof i.then=="function")return ot;let r=i;return r.issues.length===0?r.value:e()}function eA(t,e,n,i){let r=n._zod.def;if(!r.catchValue[ks])throw new Q("catch with a callback (only a constant catch value compiles)",!1);let o=M(e);t.write(`let ${o} = (() => {`),t.indented(u=>{let l=Xe(u,e,r.innerType,i);u.write(`return ${l};`)}),t.write("})();");let a=Z(e,r.innerType),s=tn(e,r.catchValue),c=Z(e,QC);return t.write(`if (${o} === INVALID) {`),t.indented(u=>{u.write(`${o} = ${c}(${a}, ${s}, ${i});`),u.write(`if (${o} === INVALID) return INVALID;`)}),t.write("}"),o}function tA(t,e,n,i){let r=n._zod.def;if(r.transform){if(rn(r.transform))throw new Ut("z.compile: async transforms are not supported");let o=r.transform,s=tn(e,u=>{let l={value:u,issues:[],addIssue:bm},d=o(u,l);return d instanceof Promise?ot:l.issues.length===0?d:ot}),c=M(e);return t.write(`const ${c} = ${s}(${i});`),t.write(`if (${c} === INVALID) return INVALID;`),c}return i}function _c(t){return t.checks&&(t.checks=[...t.checks]),t}function $m(t,e){return new t(_c({type:"string",...C(e)}))}function wm(t,e){return new t(_c({type:"string",coerce:!0,...C(e)}))}function $c(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...C(e)})}function wc(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...C(e)})}function xc(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...C(e)})}function Sc(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(e)})}function kc(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(e)})}function Ic(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(e)})}function Vo(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...C(e)})}function Pc(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...C(e)})}function zc(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(e)})}function Ec(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...C(e)})}function Dc(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(e)})}function Oc(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...C(e)})}function Tc(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...C(e)})}function Cc(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(e)})}function Ac(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(e)})}function Nc(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(e)})}function xm(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...C(e)})}function jc(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(e)})}function Rc(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(e)})}function Uc(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...C(e)})}function Lc(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...C(e)})}function Mc(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...C(e)})}function Sm(t,e){return new t({type:"string",format:"credit_card",check:"string_format",abort:!1,...C(e)})}function km(t,e){return new t({type:"string",format:"iban",check:"string_format",abort:!1,...C(e)})}function Fc(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...C(e)})}var Im={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Bo(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(e)})}function Ho(t,e){return new t({type:"string",format:"date",check:"string_format",...C(e)})}function Go(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...C(e)})}function Jo(t,e){return new t({type:"string",format:"duration",check:"string_format",...C(e)})}function Pm(t,e){return new t(_c({type:"number",checks:[],...C(e)}))}function zm(t,e){return new t(_c({type:"number",coerce:!0,checks:[],...C(e)}))}function Em(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...C(e)})}function Dm(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...C(e)})}function Om(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...C(e)})}function Tm(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...C(e)})}function Cm(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...C(e)})}function Am(t,e){return new t({type:"boolean",...C(e)})}function Nm(t,e){return new t({type:"boolean",coerce:!0,...C(e)})}function jm(t,e){return new t({type:"bigint",...C(e)})}function Rm(t,e){return new t({type:"bigint",coerce:!0,...C(e)})}function Um(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(e)})}function Lm(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(e)})}function Mm(t,e){return new t({type:"symbol",...C(e)})}function Fm(t,e){return new t({type:"undefined",...C(e)})}function Zm(t,e){return new t({type:"null",...C(e)})}function qm(t){return new t({type:"any"})}function Vm(t){return new t({type:"unknown"})}function Bm(t,e){return new t({type:"never",...C(e)})}function Hm(t,e){return new t({type:"void",...C(e)})}function Gm(t,e){return new t({type:"date",...C(e)})}function Jm(t,e){return new t({type:"date",coerce:!0,...C(e)})}function Km(t,e){return new t({type:"nan",...C(e)})}function Gt(t,e){return new Ms({check:"less_than",...C(e),value:t,inclusive:!1})}function wt(t,e){return new Ms({check:"less_than",...C(e),value:t,inclusive:!0})}function Jt(t,e){return new Fs({check:"greater_than",...C(e),value:t,inclusive:!1})}function xt(t,e){return new Fs({check:"greater_than",...C(e),value:t,inclusive:!0})}function Zc(t){return Jt(0,t)}function qc(t){return Gt(0,t)}function Vc(t){return wt(0,t)}function Bc(t){return xt(0,t)}function xr(t,e){return new Of({check:"multiple_of",...C(e),value:t})}function Sr(t,e){return new Af({check:"max_size",...C(e),maximum:t})}function Kt(t,e){return new Nf({check:"min_size",...C(e),minimum:t})}function nn(t,e){return new jf({check:"size_equals",...C(e),size:t})}function on(t,e){return new Rf({check:"max_length",...C(e),maximum:t})}function sr(t,e){return new Uf({check:"min_length",...C(e),minimum:t})}function an(t,e){return new Lf({check:"length_equals",...C(e),length:t})}function ei(t,e){return new Mf({check:"string_format",format:"regex",...C(e),pattern:t})}function ti(t){return new Ff({check:"string_format",format:"lowercase",...C(t)})}function ri(t){return new Zf({check:"string_format",format:"uppercase",...C(t)})}function ni(t,e){return new qf({check:"string_format",format:"includes",...C(e),includes:t})}function ii(t,e){return new Vf({check:"string_format",format:"starts_with",...C(e),prefix:t})}function oi(t,e){return new Bf({check:"string_format",format:"ends_with",...C(e),suffix:t})}function Hc(t,e,n){return new Hf({check:"property",property:t,schema:e,...C(n)})}function ai(t,e){return new Gf({check:"properties",shape:t,...C(e)})}function si(t,e){return new Jf({check:"mime_type",mime:t,...C(e)})}function Lt(t){return new Kf({check:"overwrite",tx:t})}function ci(t){return Lt(e=>e.normalize(t))}function ui(){return Lt(t=>t.trim())}function li(){return Lt(t=>t.toLowerCase())}function di(){return Lt(t=>t.toUpperCase())}function fi(){return Lt(t=>Od(t))}function Wm(t,e,n){return new t({type:"array",element:e,...C(n)})}function rA(t,e,n){return new t({type:"union",options:e,...C(n)})}function nA(t,e,n){return new t({type:"union",options:e,inclusive:!1,...C(n)})}function iA(t,e,n,i){return new t({type:"union",options:n,discriminator:e,...C(i)})}function oA(t,e,n){return new t({type:"intersection",left:e,right:n})}function aA(t,e,n,i){let r=n instanceof q,o=r?i:n,a=r?n:null;return new t({type:"tuple",items:e,rest:a,...C(o)})}function sA(t,e,n,i){return new t({type:"record",keyType:e,valueType:n,...C(i)})}function cA(t,e,n,i){return new t({type:"map",keyType:e,valueType:n,...C(i)})}function uA(t,e,n){return new t({type:"set",valueType:e,...C(n)})}function lA(t,e,n){let i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new t({type:"enum",entries:i,...C(n)})}function dA(t,e,n){return new t({type:"enum",entries:e,...C(n)})}function fA(t,e,n){return new t({type:"literal",values:Array.isArray(e)?e:[e],...C(n)})}function Xm(t,e){return new t({type:"file",...C(e)})}function pA(t,e){return new t({type:"transform",transform:e})}function mA(t,e){return new t({type:"optional",innerType:e})}function hA(t,e){return new t({type:"nullable",innerType:e})}function gA(t,e,n){return new t({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():mo(n)}})}function yA(t,e,n){return new t({type:"nonoptional",innerType:e,...C(n)})}function vA(t,e){return new t({type:"success",innerType:e})}function bA(t,e,n){return new t({type:"catch",innerType:e,catchValue:typeof n=="function"?n:Rd(n)})}function _A(t,e,n){return new t({type:"pipe",in:e,out:n})}function $A(t,e){return new t({type:"readonly",innerType:e})}function wA(t,e,n){return new t({type:"template_literal",parts:e,...C(n)})}function xA(t,e){return new t({type:"lazy",getter:e})}function SA(t,e){return new t({type:"promise",innerType:e})}function Ym(t,e,n){let i=C(n);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function Qm(t,e,n){return new t({type:"custom",check:"custom",fn:e,...C(n)})}function eh(t,e){let n=qw(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Zn(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(Zn(o))}},t(i.value,i)),e);return n}function qw(t,e){let n=new ge({check:"custom",...C(e)});return n._zod.check=t,n}function th(t){let e=new ge({check:"describe"});return e._zod.onattach=[n=>{let i=Ze.get(n)??{};Ze.add(n,{...i,description:t})}],e._zod.check=()=>{},e}function rh(t){let e=new ge({check:"meta"});return e._zod.onattach=[n=>{let i=Ze.get(n)??{};Ze.add(n,{...i,...t})}],e._zod.check=()=>{},e}function nh(t,e){let n=C(e),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(m=>typeof m=="string"?m.toLowerCase():m),r=r.map(m=>typeof m=="string"?m.toLowerCase():m));let o=new Set(i),a=new Set(r),s=t.Codec??Ro,c=t.Boolean??No,u=t.String??Qr,l=new u({type:"string",error:n.error}),d=new c({type:"boolean",error:n.error}),p=new s({type:"pipe",in:l,out:d,transform:((m,f)=>{let h=m;return n.case!=="sensitive"&&(h=h.toLowerCase()),o.has(h)?!0:a.has(h)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:f.value,inst:p,continue:!1}),{})}),reverseTransform:((m,f)=>m===!0?i[0]||"true":r[0]||"false"),error:n.error});return p._zod.bag.truthy=i,p._zod.bag.falsy=r,p._zod.bag.case=n.case??"insensitive",p}function sn(t,e,n,i={}){let r=C(i),o={check:"string_format",type:"string",format:e,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new t(o)}function Ko(t,...e){for(let n of e)for(let i of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,i)&&Fe(t,i,n[i]);return t}function kr(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??Ze,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:t?.cycles??"ref",reused:t?.reused??"inline",intersections:[],deferred:[],external:t?.external??void 0}}function Ae(t,e,n,i,r){let o=typeof e.unrepresentable=="function"?e.unrepresentable({zodSchema:t,path:i.path,message:r}):e.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(r);return Object.assign(n,o),!0}function le(t,e,n={path:[],schemaPath:[]}){var i;let r=t._zod.def,o=e.seen.get(t);if(o)return o.count++,n.schemaPath.includes(t)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,a),e.sharedDefsExtractedFor=void 0,e.sharedEmitDoneFor=void 0;let s=t._zod.toJSONSchema?.();if(s)a.schema=s;else{let l={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,a.schema,l);else{let p=a.schema,m=e.processors[r.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);m(t,e,p,l)}let d=t._zod.parent;d&&(a.ref||(a.ref=d),le(d,e,l),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Ko(a.schema,c),e.io==="input"&&at(t)&&(delete a.schema.examples,delete a.schema.default),e.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,e.seen.get(t).schema}function Vw(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Ir(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;let i=new Map;for(let a of t.seen.entries()){let s=t.metadataRegistry.get(a[0])?.id;if(s){let c=i.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let r=a=>{let s=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(a[0])?.id,p=t.external.uri??(f=>f);if(d)return{ref:p(d)};let m=a[1].defId??a[1].schema.id??`schema${t.counter++}`;return a[1].defId=m,{defId:m,ref:`${p("__shared")}#/${s}/${Vw(m)}`}}let c="#",u=`${c}/${s}/`;if(a[1]===n&&!a[1].schema.id)return{ref:c};let l=a[1].schema.id??`__schema${t.counter++}`;return{defId:l,ref:u+Vw(l)}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:u}=r(a);s.def={...s.schema},u&&(s.defId=u);let l=s.schema;for(let d in l)delete l[d];l.$ref=c};if(t.cycles==="throw")for(let a of t.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
91
+
92
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of t.seen.entries()){let s=a[1];if(e===a[0]){o(a);continue}if(t.external){let u=t.external.registry.get(a[0])?.id;if(e!==a[0]&&u){o(a);continue}}if(t.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}s.count>1&&t.reused==="ref"&&o(a)}t.external&&(t.sharedDefsExtractedFor=t.external)}function Gw(t){let e=t.anyOf;if(!Array.isArray(e)||e.length===0||t.type!==void 0)return;let n=[];for(let i of e){if(!i||typeof i!="object")return;Gw(i);let r=Object.keys(i);if(r.length!==1||r[0]!=="type")return;let o=i.type;for(let a of Array.isArray(o)?o:[o]){if(typeof a!="string")return;n.includes(a)||n.push(a)}}delete t.anyOf,t.type=n.length===1?n[0]:n}var Jw=new Set(["type","properties","required","additionalProperties"]),Bw=["oneOf","anyOf"];function Hw(t){let e=t.additionalProperties;return e===void 0||e===!1||typeof e!="object"||e===null?null:Object.keys(e).length?e:null}function ih(t){let e=[];for(let o of t){if(typeof o!="object"||o.type!=="object")return null;for(let a in o)if(!Jw.has(a))return null;e.push(o)}let n={},i=new Set;for(let o of e){for(let a in o.properties){if(Object.prototype.hasOwnProperty.call(n,a))continue;let s=[];for(let u of e){let l=u.properties?.[a]??Hw(u);l!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(l))||s.push(l))}let c=s.length===1?s[0]:ih(s)??{allOf:s};Fe(n,a,c)}for(let a of o.required??[])i.add(a)}let r={type:"object",properties:n};if(i.size&&(r.required=[...i]),e.every(o=>o.additionalProperties===!1))r.additionalProperties=!1;else{let o=[];for(let a of e){let s=Hw(a);s&&!o.some(c=>JSON.stringify(c)===JSON.stringify(s))&&o.push(s)}o.length===1?r.additionalProperties=o[0]:o.length>1&&(r.additionalProperties={allOf:o})}return r}function kA(t){let e=t.allOf;if(!Array.isArray(e)||e.length<2)return;for(let r of Jw)if(r in t)return;let n=e.filter(r=>Bw.some(o=>Array.isArray(r[o]))),i=null;if(!n.length)i=ih(e);else{let r=n[0],o=Bw.find(c=>Array.isArray(r[c]));if(Object.keys(r).length!==1)return;let a=e.filter(c=>c!==r),s=r[o].map(c=>ih([...a,c]));if(s.some(c=>!c))return;i={[o]:s}}i&&(delete t.allOf,Ko(t,i))}function Pr(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let c=t.seen.get(s);if(c.ref===null)return;let u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){i(d);let m=t.seen.get(d),f=m.schema;if(f.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(f)):Ko(u,f),Ko(u,l),s._zod.parent===d)for(let g in u)g==="$ref"||g==="allOf"||g in l||delete u[g];if(f.$ref&&m.def)for(let g in u)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(u[g])===JSON.stringify(m.def[g])&&delete u[g]}let p=s._zod.parent;if(p&&p!==d){i(p);let m=t.seen.get(p);if(m?.schema.$ref&&(u.$ref=m.schema.$ref,m.def))for(let f in u)f==="$ref"||f==="allOf"||f in m.def&&JSON.stringify(u[f])===JSON.stringify(m.def[f])&&delete u[f]}t.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(let s of[...t.seen.entries()].reverse())i(s[0]);if(t.target!=="openapi-3.0")for(let s of t.seen.entries())Gw(s[1].def??s[1].schema);for(let s of t.deferred)s();if(t.intersections.length){let s=new Map;for(let c of t.seen.values())for(let u of[c.schema,c.def]){let l=u?.allOf;if(!Array.isArray(l))continue;let d=s.get(l);d?d.push(u):s.set(l,[u])}for(let c of t.intersections)for(let u of s.get(c)??[])kA(u)}}let r={};if(t.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=t.external.uri(s)}Ko(r,n.defId?n.schema:n.def??n.schema);let o=t.metadataRegistry.get(e)?.id;o!==void 0&&r.id===o&&delete r.id;let a=t.external?.defs??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(let s of t.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,Fe(a,c.defId,c.def))}t.external&&(t.sharedEmitDoneFor=t.external),t.external||Object.keys(a).length>0&&(t.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:pi(e,"input",t.processors),output:pi(e,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function at(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let i=t._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return at(i.element,n);if(i.type==="set")return at(i.valueType,n);if(i.type==="lazy")return at(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault"||i.type==="catch")return at(i.innerType,n);if(i.type==="intersection")return at(i.left,n)||at(i.right,n);if(i.type==="record"||i.type==="map")return at(i.keyType,n)||at(i.valueType,n);if(i.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:at(i.in,n)||at(i.out,n);if(i.type==="object"){for(let r in i.shape)if(at(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(at(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(at(r,n))return!0;return!!(i.rest&&at(i.rest,n))}return!1}var oh=(t,e={})=>n=>{let i=kr({...n,processors:e});return le(t,i),Ir(i,t),Pr(i,t)},pi=(t,e,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=kr({...r??{},target:o,io:e,processors:n});return le(t,a),Ir(a,t),Pr(a,t)};var mi=(t,e,n)=>{(t[e]===void 0||n>t[e])&&(t[e]=n)},hi=(t,e,n)=>{(t[e]===void 0||n<t[e])&&(t[e]=n)},Kw=(t,e)=>{mi(t,"minimum",e),hi(t,"maximum",e)},Qw=(t,e)=>{t.multipleOf??(t.multipleOf=[]),t.multipleOf.includes(e)||t.multipleOf.push(e)},ex=(t,e)=>{t.patterns??(t.patterns=new Set),t.patterns.add(e)},tx=(t,e)=>{t.mime=t.mime?t.mime.filter(n=>e.includes(n)):[...e]},rx=(t,e)=>{t.format=e,e.includes("int")&&(t.isInt=!0)},Ww=(t,e)=>mi(t,"minimum",e.minimum),Xw=(t,e)=>hi(t,"maximum",e.maximum),Yw=t=>(e,n)=>{rx(e,n.format);let[i,r]=t[n.format];mi(e,"minimum",i),hi(e,"maximum",r)},IA={greater_than:(t,e)=>mi(t,e.inclusive?"minimum":"exclusiveMinimum",e.value),less_than:(t,e)=>hi(t,e.inclusive?"maximum":"exclusiveMaximum",e.value),multiple_of:(t,e)=>Qw(t,e.value),number_format:Yw(go),bigint_format:Yw(yo),min_length:Ww,max_length:Xw,length_equals:(t,e)=>Kw(t,e.length),min_size:Ww,max_size:Xw,size_equals:(t,e)=>Kw(t,e.size),string_format:(t,e)=>{rx(t,e.format),e.pattern&&ex(t,e.pattern),(e.format==="base64"||e.format==="base64url")&&(t.contentEncoding=e.format),(e.local||e.precision===-1)&&(t.laxFormat=!0)},mime_type:(t,e)=>tx(t,e.mime)};function Ne(t){let e={},n=t._zod.def,i=t._zod.traits.has("$ZodCheck")?[t,...n.checks??[]]:n.checks??[];for(let o of i)IA[o._zod.def.check]?.(e,o._zod.def);let r=t._zod.bag;r.minimum!==void 0&&mi(e,"minimum",r.minimum),r.exclusiveMinimum!==void 0&&mi(e,"exclusiveMinimum",r.exclusiveMinimum),r.maximum!==void 0&&hi(e,"maximum",r.maximum),r.exclusiveMaximum!==void 0&&hi(e,"exclusiveMaximum",r.exclusiveMaximum),r.multipleOf!==void 0&&Qw(e,r.multipleOf),r.format!==void 0&&(e.format??(e.format=r.format),r.format.includes("int")&&(e.isInt=!0)),r.mime&&tx(e,r.mime);for(let o of r.patterns??[])ex(e,o);return e}var PA={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},zA=new Map([[Xs,df],[Ao,ff]]),nx=t=>zA.get(t)??t,ch=(t,e,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:u,laxFormat:l}=Ne(t);if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),s&&(r.format=PA[s]??s,r.format===""&&delete r.format,(s==="time"||l)&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let d=[...c].map(nx);d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},uh=(t,e,n,i)=>{let r=n,{minimum:o,maximum:a,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:u,isInt:l}=Ne(t);r.type=l?"integer":"number";let d=typeof u=="number"&&u>=(o??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),m=e.target==="draft-04"||e.target==="openapi-3.0";if(d?m?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u:typeof o=="number"&&(r.minimum=o),p?m?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:typeof a=="number"&&(r.maximum=a),s){let f=new Set;for(let y of s)Number.isFinite(y)&&y!==0?f.add(Math.abs(y)):Ae(t,e,r,i,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`);let[h,...g]=f;h!==void 0&&(r.multipleOf=h),g.length&&(r.allOf=[...r.allOf??[],...g.map(y=>({multipleOf:y}))])}},lh=(t,e,n,i)=>{n.type="boolean"},dh=(t,e,n,i)=>{Ae(t,e,n,i,"BigInt cannot be represented in JSON Schema")},fh=(t,e,n,i)=>{Ae(t,e,n,i,"Symbols cannot be represented in JSON Schema")},ph=(t,e,n,i)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},mh=(t,e,n,i)=>{Ae(t,e,n,i,"Undefined cannot be represented in JSON Schema")},hh=(t,e,n,i)=>{Ae(t,e,n,i,"Void cannot be represented in JSON Schema")},gh=(t,e,n,i)=>{n.not={}},yh=(t,e,n,i)=>{},vh=(t,e,n,i)=>{},bh=(t,e,n,i)=>{Ae(t,e,n,i,"Date cannot be represented in JSON Schema")},_h=(t,e,n,i)=>{let r=t._zod.def,o=Rn(r.entries);if(o.length===0){n.not={};return}o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},$h=(t,e,n,i)=>{let r=t._zod.def;if(r.values.length===0){n.not={};return}let o=[];for(let a of r.values)if(a===void 0){if(Ae(t,e,n,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Ae(t,e,n,i,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},wh=(t,e,n,i)=>{Ae(t,e,n,i,"NaN cannot be represented in JSON Schema")},xh=(t,e,n,i)=>{let r=n,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},Sh=(t,e,n,i)=>{let r=n;r.type="string",r.format="binary",r.contentEncoding="binary";let{minimum:o,maximum:a,mime:s}=Ne(t);o!==void 0&&(r.minLength=o),a!==void 0&&(r.maxLength=a),s&&(s.length===0?r.not={}:s.length===1?r.contentMediaType=s[0]:r.anyOf=s.map(c=>({contentMediaType:c})))},kh=(t,e,n,i)=>{n.type="boolean"},Ih=(t,e,n,i)=>{Ae(t,e,n,i,"Custom types cannot be represented in JSON Schema")},Ph=(t,e,n,i)=>{Ae(t,e,n,i,"Function types cannot be represented in JSON Schema")},zh=(t,e,n,i)=>{Ae(t,e,n,i,"Transforms cannot be represented in JSON Schema")},Eh=(t,e,n,i)=>{Ae(t,e,n,i,"Map cannot be represented in JSON Schema")},Dh=(t,e,n,i)=>{Ae(t,e,n,i,"Set cannot be represented in JSON Schema")},Oh=(t,e,n,i)=>{let r=n,o=t._zod.def,{minimum:a,maximum:s}=Ne(t);typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=le(o.element,e,{...i,path:[...i.path,"items"]})};function Wo(t){let e=t._zod.def;return e.type==="pipe"&&e.in._zod.traits.has("$ZodTransform")?Wo(e.out):e.type==="catch"?Wo(e.innerType):t._zod.optin}var Th=(t,e,n,i)=>{let r=n,o=t._zod.def,a=o.shape;if(Object.getOwnPropertySymbols(a).length&&Ae(t,e,r,i,"Symbol keys cannot be represented in JSON Schema"))return;r.type="object",r.properties={};for(let u in a)Fe(r.properties,u,le(a[u],e,{...i,path:[...i.path,"properties",u]}));let c=[];for(let u of Object.keys(a)){let l=o.shape[u];(e.io==="input"?Wo(l)===void 0:l._zod.optout===void 0)&&c.push(u)}c.length>0&&(r.required=c),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=le(o.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(r.additionalProperties=!1)},Jc=(t,e,n,i)=>{let r=t._zod.def,o=r.inclusive===!1,a=r.options.map((s,c)=>le(s,e,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?n.oneOf=a:n.anyOf=a},Ch=(t,e,n,i)=>{let r=t._zod.def,o=le(r.left,e,{...i,path:[...i.path,"allOf",0]}),a=le(r.right,e,{...i,path:[...i.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=c,e.intersections.push(c)},Ah=(t,e,n,i)=>{let r=n,o=t._zod.def;r.type="array";let a=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((h,g)=>le(h,e,{...i,path:[...i.path,a,g]})),u=o.rest?le(o.rest,e,{...i,path:[...i.path,s,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null,l=o.items.length;for(;l>0;){let h=o.items[l-1];if(!(e.io==="input"?Wo(h)!==void 0:h._zod.optout==="optional"))break;l--}let d=o.items.length,p=!o.rest;e.target==="draft-2020-12"?(r.prefixItems=c,p?r.items=!1:u&&(r.items=u),l>0&&(r.minItems=l),p&&(r.maxItems=d)):e.target==="openapi-3.0"?(r.items={anyOf:c},u&&r.items.anyOf.push(u),l>0&&(r.minItems=l),p&&(r.maxItems=d)):(r.items=c,p?r.additionalItems=!1:u&&(r.additionalItems=u),l>0&&(r.minItems=l),p&&(r.maxItems=d));let{minimum:m,maximum:f}=Ne(t);typeof m=="number"&&(r.minItems=m),typeof f=="number"&&(r.maxItems=f)};function ah(t,e,n){if(e.$ref){if(n.has(e))return e;n.add(e);let f=t.get(e)?.def;if(!f)return e;let h=ah(t,f,n);return h===f?e:h}for(let f of["anyOf","oneOf"]){let h=e[f];if(!Array.isArray(h))continue;let g=h.map(y=>ah(t,y,n));g.some((y,v)=>y!==h[v])&&(e={...e,[f]:g})}let i=Array.isArray(e.type)?e.type:[e.type],r=!i.includes("string")&&i.some(f=>f==="number"||f==="integer"),o=e.enum??(e.const!==void 0?[e.const]:void 0);if(!r&&!o?.some(f=>typeof f=="number"))return e;let{minimum:a,maximum:s,exclusiveMinimum:c,exclusiveMaximum:u,multipleOf:l,format:d,id:p,...m}=e;return m.enum?m.enum=m.enum.map(f=>typeof f=="number"?String(f):f):typeof m.const=="number"&&(m.const=String(m.const)),r&&(m.type="string",o||(m.pattern=(i.includes("number")?ar:Po).source)),m}var sh=new WeakMap;function EA(t){let e=new Map;for(let i of t.seen.values())i.def&&!e.has(i.schema)&&e.set(i.schema,i);let n=new Map;for(let i of sh.get(t)??[]){let r=t.seen.get(i),o=(r?.def??r?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;let a=ah(e,o,new Set);a!==o&&n.set(o,a)}if(n.size)for(let i of t.seen.values())for(let r of[i.schema,i.def]){let o=r&&n.get(r.propertyNames);o&&(r.propertyNames=o)}}var Nh=(t,e,n,i)=>{let r=n,o=t._zod.def;r.type="object";let a=o.keyType,s=Ne(a).patterns;if(o.mode==="loose"&&s&&s.size>0){let l=le(o.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let d of s)Fe(r.patternProperties,nx(d).source,l)}else{if(e.target==="draft-07"||e.target==="draft-2020-12"){r.propertyNames=le(o.keyType,e,{...i,path:[...i.path,"propertyNames"]});let l=sh.get(e);l||(l=[],sh.set(e,l),e.deferred.push(()=>EA(e))),l.push(t)}r.additionalProperties=le(o.valueType,e,{...i,path:[...i.path,"additionalProperties"]})}let c=a._zod.values,u=e.io==="input"&&Wo(o.valueType)!==void 0;if(c&&!o.partial&&!u){let l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(r.required=l.map(String))}},jh=(t,e,n,i)=>{let r=t._zod.def,o=le(r.innerType,e,i),a=e.seen.get(t);e.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Rh=(t,e,n,i)=>{let r=t._zod.def;le(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType},Uh=Symbol();function ix(t,e,n,i,r){let o=!1,a=JSON.stringify(t,(s,c)=>typeof c!="bigint"?c:(o=!0,null));return o?(Ae(e,n,i,r,"BigInt defaults cannot be represented in JSON Schema"),Uh):JSON.parse(a)}var Lh=(t,e,n,i)=>{let r=t._zod.def;le(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType;let a=ix(r.defaultValue,t,e,n,i);a!==Uh&&(n.default=a)},Mh=(t,e,n,i)=>{let r=t._zod.def;le(r.innerType,e,i);let o=e.seen.get(t);if(o.ref=r.innerType,e.io!=="input")return;let a=ix(r.defaultValue,t,e,n,i);a!==Uh&&(n._prefault=a)},Fh=(t,e,n,i)=>{let r=t._zod.def;le(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{Ae(t,e,n,i,"Dynamic catch values are not supported in JSON Schema");return}n.default=a},Zh=(t,e,n,i)=>{let r=t._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=e.io==="input"?o?r.out:r.in:r.out;le(a,e,i);let s=e.seen.get(t);s.ref=a},qh=(t,e,n,i)=>{let r=t._zod.def;le(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType,n.readOnly=!0},Vh=(t,e,n,i)=>{let r=t._zod.def;le(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType},Kc=(t,e,n,i)=>{let r=t._zod.def;le(r.innerType,e,i);let o=e.seen.get(t);o.ref=r.innerType},Bh=(t,e,n,i)=>{let r=t._zod.innerType;le(r,e,i);let o=e.seen.get(t);o.ref=r},Gc={string:ch,number:uh,boolean:lh,bigint:dh,symbol:fh,null:ph,undefined:mh,void:hh,never:gh,any:yh,unknown:vh,date:bh,enum:_h,literal:$h,nan:wh,template_literal:xh,file:Sh,success:kh,custom:Ih,function:Ph,transform:zh,map:Eh,set:Dh,array:Oh,object:Th,union:Jc,intersection:Ch,tuple:Ah,record:Nh,nullable:jh,nonoptional:Rh,default:Lh,prefault:Mh,catch:Fh,pipe:Zh,readonly:qh,promise:Vh,optional:Kc,lazy:Bh};function Wc(t,e){if("_idmap"in t){let i=t,r=kr({...e,processors:Gc}),o={};for(let c of i._idmap.entries()){let[u,l]=c;le(l,r)}let a={},s={registry:i,uri:e?.uri,defs:o};r.external=s;for(let c of i._idmap.entries()){let[u,l]=c;Ir(r,l),Fe(a,u,Pr(r,l))}if(Object.keys(o).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let n=kr({...e,processors:Gc});return le(t,n),Ir(n,t),Pr(n,t)}var Xc=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let n=e?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=kr({processors:Gc,target:n,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,n={path:[],schemaPath:[]}){return le(e,this.ctx,n)}emit(e,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Ir(this.ctx,e);let i=Pr(this.ctx,e),{"~standard":r,...o}=i;return o}};var ox={};var xi={};nr(xi,{ZodAny:()=>lg,ZodArray:()=>mg,ZodBase64:()=>gu,ZodBase64URL:()=>yu,ZodBigInt:()=>$i,ZodBigIntFormat:()=>_u,ZodBoolean:()=>_i,ZodCIDRv4:()=>mu,ZodCIDRv6:()=>hu,ZodCUID:()=>su,ZodCUID2:()=>cu,ZodCatch:()=>Cg,ZodCodec:()=>aa,ZodCreditCard:()=>og,ZodCustom:()=>sa,ZodCustomStringFormat:()=>un,ZodDate:()=>ea,ZodDefault:()=>Pg,ZodDiscriminatedUnion:()=>gg,ZodE164:()=>vu,ZodEmail:()=>nu,ZodEmoji:()=>ou,ZodEnum:()=>yi,ZodExactOptional:()=>xu,ZodFile:()=>xg,ZodFunction:()=>qg,ZodGUID:()=>iu,ZodIBAN:()=>ag,ZodIPv4:()=>fu,ZodIPv6:()=>pu,ZodISODate:()=>Er,ZodISODateTime:()=>zr,ZodISODuration:()=>Or,ZodISOTime:()=>Dr,ZodInstanceOf:()=>Hg,ZodIntersection:()=>yg,ZodJWT:()=>bu,ZodKSUID:()=>du,ZodLazy:()=>Mg,ZodLiteral:()=>wg,ZodMAC:()=>ig,ZodMap:()=>_g,ZodNaN:()=>Ng,ZodNanoID:()=>au,ZodNever:()=>fg,ZodNonOptional:()=>Su,ZodNull:()=>ug,ZodNullable:()=>Ig,ZodNumber:()=>bi,ZodNumberFormat:()=>ln,ZodObject:()=>ta,ZodOptional:()=>ia,ZodPipe:()=>oa,ZodPrefault:()=>Eg,ZodPreprocess:()=>jg,ZodPromise:()=>Zg,ZodReadonly:()=>Rg,ZodRecord:()=>gi,ZodSet:()=>$g,ZodString:()=>vi,ZodStringFormat:()=>me,ZodSuccess:()=>Tg,ZodSymbol:()=>sg,ZodTemplateLiteral:()=>Lg,ZodTransform:()=>Sg,ZodTuple:()=>vg,ZodType:()=>H,ZodULID:()=>uu,ZodURL:()=>Yo,ZodUUID:()=>Wt,ZodUndefined:()=>cg,ZodUnion:()=>ra,ZodUnknown:()=>dg,ZodVoid:()=>pg,ZodXID:()=>lu,ZodXor:()=>hg,_ZodString:()=>ru,_default:()=>zg,_function:()=>pS,any:()=>Jx,array:()=>W,base64:()=>zx,base64url:()=>Ex,bigint:()=>qx,boolean:()=>De,catch:()=>Ag,check:()=>mS,cidrv4:()=>Ix,cidrv6:()=>Px,codec:()=>uS,creditCard:()=>Ox,cuid:()=>vx,cuid2:()=>bx,currencyCode:()=>Rx,custom:()=>ku,date:()=>Wx,describe:()=>hS,discriminatedUnion:()=>na,e164:()=>Dx,email:()=>cx,emoji:()=>gx,enum:()=>Ve,exactOptional:()=>kg,file:()=>oS,float32:()=>Lx,float64:()=>Mx,function:()=>pS,guid:()=>ux,hash:()=>Ux,hex:()=>jx,hostname:()=>Nx,httpUrl:()=>hx,iban:()=>Tx,instanceof:()=>yS,int:()=>eu,int32:()=>Fx,int64:()=>Vx,intersection:()=>wi,invertCodec:()=>lS,ipv4:()=>xx,ipv6:()=>kx,json:()=>bS,jwt:()=>Cx,keyof:()=>Xx,ksuid:()=>wx,lazy:()=>Fg,literal:()=>R,looseObject:()=>qe,looseRecord:()=>tS,mac:()=>Sx,map:()=>rS,meta:()=>gS,nan:()=>cS,nanoid:()=>yx,nativeEnum:()=>iS,never:()=>$u,nonoptional:()=>Og,null:()=>Qo,nullable:()=>Xo,nullish:()=>aS,number:()=>oe,object:()=>j,optional:()=>pe,partialRecord:()=>eS,pipe:()=>tu,prefault:()=>Dg,preprocess:()=>ca,promise:()=>fS,readonly:()=>Ug,record:()=>he,refine:()=>Vg,set:()=>nS,strictObject:()=>Yx,string:()=>S,stringFormat:()=>Ax,stringbool:()=>vS,success:()=>sS,superRefine:()=>Bg,symbol:()=>Hx,templateLiteral:()=>dS,transform:()=>wu,tuple:()=>bg,uint32:()=>Zx,uint64:()=>Bx,ulid:()=>_x,undefined:()=>Gx,union:()=>de,unknown:()=>ye,url:()=>mx,uuid:()=>lx,uuidv4:()=>dx,uuidv6:()=>fx,uuidv7:()=>px,void:()=>Kx,xid:()=>$x,xor:()=>Qx});var Yc={};nr(Yc,{endsWith:()=>oi,gt:()=>Jt,gte:()=>xt,includes:()=>ni,length:()=>an,lowercase:()=>ti,lt:()=>Gt,lte:()=>wt,maxLength:()=>on,maxSize:()=>Sr,mime:()=>si,minLength:()=>sr,minSize:()=>Kt,multipleOf:()=>xr,negative:()=>qc,nonnegative:()=>Bc,nonpositive:()=>Vc,normalize:()=>ci,overwrite:()=>Lt,positive:()=>Zc,properties:()=>ai,property:()=>Hc,regex:()=>ei,size:()=>nn,slugify:()=>fi,startsWith:()=>ii,toLowerCase:()=>li,toUpperCase:()=>di,trim:()=>ui,uppercase:()=>ri});var ax=new WeakSet([Object.prototype,Error.prototype]);function Qc(t,e,n){Object.defineProperty(t,e,{configurable:!0,enumerable:!1,get(){let i=n(this);return Object.defineProperty(this,e,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,e,{value:i,configurable:!0,writable:!0})}})}var sx=(t,e)=>{qd.init(t,e),t.name="ZodError";let n=Object.getPrototypeOf(t);ax.has(n)||(ax.add(n),Qc(n,"format",i=>r=>xo(i,r)),Qc(n,"flatten",i=>r=>wo(i,r)),Qc(n,"addIssue",i=>r=>{i.issues.push(r),i.message=JSON.stringify(i.issues,Un,2)}),Qc(n,"addIssues",i=>r=>{i.issues.push(...r),i.message=JSON.stringify(i.issues,Un,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},OA=$("ZodError",sx),yt=$("ZodError",sx,void 0,{Parent:Error});var Hh=qn(yt),Gh=Vn(yt),Jh=Bn(yt),Kh=Hn(yt),Wh=zs(yt),Xh=Es(yt),Yh=Ds(yt),Qh=Os(yt),eg=Ts(yt),tg=Cs(yt),rg=As(yt),ng=Ns(yt);function CA(){Re.localeError||Pe(pc())}function cn(){Re.memoizer||Pe({memoizer:Fo()})}var H=$("ZodType",(t,e)=>(CA(),q.init(t,e),t.def=e,t.type=e.type,t),{check(...t){let e=this.def;return this.clone(I.mergeDefs(e,{checks:[...e.checks??[],...t.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,e){return ce(this,t,e)},brand(){return this},register(t,e){return t.add(this,e),this},refine(t,e){return this.check(Vg(t,e))},superRefine(t,e){return this.check(Bg(t,e))},overwrite(t){return this.check(Lt(t))},optional(){return pe(this)},exactOptional(){return kg(this)},nullable(){return Xo(this)},nullish(){return pe(Xo(this))},nonoptional(t){return Og(this,t)},array(){return W(this)},or(t){return de([this,t])},and(t){return wi(this,t)},transform(t){return tu(this,wu(t))},default(t){return zg(this,t)},prefault(t){return Dg(this,t)},catch(t){return Ag(this,t)},pipe(t){return tu(this,t)},readonly(){return Ug(this)},describe(t){let e=this.clone();return Ze.add(e,{description:t}),e},meta(...t){if(t.length===0)return Ze.get(this);let e=this.clone();return Ze.add(e,t[0]),e},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...e){return e.length===0?t(this):t(this,...e)},get"~standard"(){return I.hide(this,"~standard",{...Hs(this),jsonSchema:{input:pi(this,"input"),output:pi(this,"output")}})},set"~standard"(t){I.own(this,"~standard",t)},parse:function t(e,n){return Hh(this,e,n,{callee:t})},parseAsync:async function t(e,n){return await Gh(this,e,n,{callee:t})},safeParse(t,e){return Jh(this,t,e)},async safeParseAsync(t,e){return Kh(this,t,e)},get spa(){return this?.safeParseAsync},set spa(t){I.own(this,"spa",t)},validate(t,e){return Gn(this,t,e)},validateAsync(t,e){return Jn(this,t,e)},encode:function t(e,n){return Wh(this,e,n,{callee:t})},decode:function t(e,n){return Xh(this,e,n,{callee:t})},encodeAsync:async function t(e,n){return await Yh(this,e,n,{callee:t})},decodeAsync:async function t(e,n){return await Qh(this,e,n,{callee:t})},safeEncode(t,e){return eg(this,t,e)},safeDecode(t,e){return tg(this,t,e)},async safeEncodeAsync(t,e){return rg(this,t,e)},async safeDecodeAsync(t,e){return ng(this,t,e)},toJSONSchema(t){return oh(this,{})(t)},get description(){return Ze.get(this)?.description},get _def(){return this._zod.def}}),ru=$("_ZodString",(t,e)=>{Qr.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ch(t,n,i,r)},I.derived({format:t=>Ne(t).format??null,minLength:t=>Ne(t).minimum??null,maxLength:t=>Ne(t).maximum??null},{regex(...t){return this.check(ei(...t))},includes(...t){return this.check(ni(...t))},startsWith(...t){return this.check(ii(...t))},endsWith(...t){return this.check(oi(...t))},min(...t){return this.check(sr(...t))},max(...t){return this.check(on(...t))},length(...t){return this.check(an(...t))},nonempty(...t){return this.check(sr(1,...t))},lowercase(t){return this.check(ti(t))},uppercase(t){return this.check(ri(t))},trim(){return this.check(ui())},normalize(...t){return this.check(ci(...t))},toLowerCase(){return this.check(li())},toUpperCase(){return this.check(di())},slugify(){return this.check(fi())}})),vi=$("ZodString",(t,e)=>{Qr.init(t,e),ru.init(t,e)},{email(t){return this.check($c(nu,t))},url(t){return this.check(Vo(Yo,t))},jwt(t){return this.check(Fc(bu,t))},emoji(t){return this.check(Pc(ou,t))},guid(t){return this.check(wc(iu,t))},uuid(t){return this.check(xc(Wt,t))},uuidv4(t){return this.check(Sc(Wt,t))},uuidv6(t){return this.check(kc(Wt,t))},uuidv7(t){return this.check(Ic(Wt,t))},nanoid(t){return this.check(zc(au,t))},cuid(t){return this.check(Ec(su,t))},cuid2(t){return this.check(Dc(cu,t))},ulid(t){return this.check(Oc(uu,t))},base64(t){return this.check(Uc(gu,t))},base64url(t){return this.check(Lc(yu,t))},xid(t){return this.check(Tc(lu,t))},ksuid(t){return this.check(Cc(du,t))},ipv4(t){return this.check(Ac(fu,t))},ipv6(t){return this.check(Nc(pu,t))},cidrv4(t){return this.check(jc(mu,t))},cidrv6(t){return this.check(Rc(hu,t))},e164(t){return this.check(Mc(vu,t))},datetime(t){return this.check(Bo(zr,t))},date(t){return this.check(Ho(Er,t))},time(t){return this.check(Go(Dr,t))},duration(t){return this.check(Jo(Or,t))}});function S(t){return $m(vi,t)}var me=$("ZodStringFormat",(t,e)=>{ue.init(t,e),ru.init(t,e)}),zr=$("ZodISODateTime",(t,e)=>{dp.init(t,e),me.init(t,e)}),Er=$("ZodISODate",(t,e)=>{fp.init(t,e),me.init(t,e)}),Dr=$("ZodISOTime",(t,e)=>{pp.init(t,e),me.init(t,e)}),Or=$("ZodISODuration",(t,e)=>{mp.init(t,e),me.init(t,e)}),nu=$("ZodEmail",(t,e)=>{ep.init(t,e),me.init(t,e)});function cx(t){return $c(nu,t)}var iu=$("ZodGUID",(t,e)=>{Yf.init(t,e),me.init(t,e)});function ux(t){return wc(iu,t)}var Wt=$("ZodUUID",(t,e)=>{Qf.init(t,e),me.init(t,e)});function lx(t){return xc(Wt,t)}function dx(t){return Sc(Wt,t)}function fx(t){return kc(Wt,t)}function px(t){return Ic(Wt,t)}var Yo=$("ZodURL",(t,e)=>{np.init(t,e),me.init(t,e)});function mx(t){return Vo(Yo,t)}function hx(t){return Vo(Yo,{protocol:Io,hostname:mf,...I.normalizeParams(t)})}var ou=$("ZodEmoji",(t,e)=>{ip.init(t,e),me.init(t,e)});function gx(t){return Pc(ou,t)}var au=$("ZodNanoID",(t,e)=>{op.init(t,e),me.init(t,e)});function yx(t){return zc(au,t)}var su=$("ZodCUID",(t,e)=>{ap.init(t,e),me.init(t,e)});function vx(t){return Ec(su,t)}var cu=$("ZodCUID2",(t,e)=>{sp.init(t,e),me.init(t,e)});function bx(t){return Dc(cu,t)}var uu=$("ZodULID",(t,e)=>{cp.init(t,e),me.init(t,e)});function _x(t){return Oc(uu,t)}var lu=$("ZodXID",(t,e)=>{up.init(t,e),me.init(t,e)});function $x(t){return Tc(lu,t)}var du=$("ZodKSUID",(t,e)=>{lp.init(t,e),me.init(t,e)});function wx(t){return Cc(du,t)}var fu=$("ZodIPv4",(t,e)=>{hp.init(t,e),me.init(t,e)});function xx(t){return Ac(fu,t)}var ig=$("ZodMAC",(t,e)=>{yp.init(t,e),me.init(t,e)});function Sx(t){return xm(ig,t)}var pu=$("ZodIPv6",(t,e)=>{gp.init(t,e),me.init(t,e)});function kx(t){return Nc(pu,t)}var mu=$("ZodCIDRv4",(t,e)=>{vp.init(t,e),me.init(t,e)});function Ix(t){return jc(mu,t)}var hu=$("ZodCIDRv6",(t,e)=>{bp.init(t,e),me.init(t,e)});function Px(t){return Rc(hu,t)}var gu=$("ZodBase64",(t,e)=>{_p.init(t,e),me.init(t,e)});function zx(t){return Uc(gu,t)}var yu=$("ZodBase64URL",(t,e)=>{$p.init(t,e),me.init(t,e)});function Ex(t){return Lc(yu,t)}var vu=$("ZodE164",(t,e)=>{wp.init(t,e),me.init(t,e)});function Dx(t){return Mc(vu,t)}var og=$("ZodCreditCard",(t,e)=>{xp.init(t,e),me.init(t,e)});function Ox(t){return Sm(og,t)}var ag=$("ZodIBAN",(t,e)=>{Sp.init(t,e),me.init(t,e)});function Tx(t){return km(ag,t)}var bu=$("ZodJWT",(t,e)=>{kp.init(t,e),me.init(t,e)});function Cx(t){return Fc(bu,t)}var un=$("ZodCustomStringFormat",(t,e)=>{Ip.init(t,e),me.init(t,e)});function Ax(t,e,n={}){return sn(un,t,e,n)}function Nx(t){return sn(un,"hostname",pf,t)}function jx(t){return sn(un,"hex",zf,t)}function Rx(t){return sn(un,"currency_code",gf,t)}function Ux(t,e){let n=e?.enc??"hex",i=`${t}_${n}`,r=zt[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return sn(un,i,r,e)}var bi=$("ZodNumber",(t,e)=>{rc.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>uh(t,n,i,r),t.isFinite=!0},I.derived({minValue:t=>{let{minimum:e,exclusiveMinimum:n}=Ne(t);return Math.max(e??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:t=>{let{maximum:e,exclusiveMaximum:n}=Ne(t);return Math.min(e??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:t=>{let{isInt:e,multipleOf:n}=Ne(t);return!!e||!!n?.some(Number.isSafeInteger)},format:t=>Ne(t).format??null},{gt(t,e){return this.check(Jt(t,e))},gte(t,e){return this.check(xt(t,e))},min(t,e){return this.check(xt(t,e))},lt(t,e){return this.check(Gt(t,e))},lte(t,e){return this.check(wt(t,e))},max(t,e){return this.check(wt(t,e))},int(t){return this.check(eu(t))},safe(t){return this.check(eu(t))},positive(t){return this.check(Jt(0,t))},nonnegative(t){return this.check(xt(0,t))},negative(t){return this.check(Gt(0,t))},nonpositive(t){return this.check(wt(0,t))},multipleOf(t,e){return this.check(xr(t,e))},step(t,e){return this.check(xr(t,e))},finite(){return this}}));function oe(t){return Pm(bi,t)}var ln=$("ZodNumberFormat",(t,e)=>{Pp.init(t,e),bi.init(t,e)});function eu(t){return Em(ln,t)}function Lx(t){return Dm(ln,t)}function Mx(t){return Om(ln,t)}function Fx(t){return Tm(ln,t)}function Zx(t){return Cm(ln,t)}var _i=$("ZodBoolean",(t,e)=>{No.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>lh(t,n,i,r)});function De(t){return Am(_i,t)}var $i=$("ZodBigInt",(t,e)=>{nc.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>dh(t,n,i,r)},I.derived({minValue:t=>Ne(t).minimum??null,maxValue:t=>Ne(t).maximum??null,format:t=>Ne(t).format??null},{gte(t,e){return this.check(xt(t,e))},min(t,e){return this.check(xt(t,e))},gt(t,e){return this.check(Jt(t,e))},lt(t,e){return this.check(Gt(t,e))},lte(t,e){return this.check(wt(t,e))},max(t,e){return this.check(wt(t,e))},positive(t){return this.check(Jt(BigInt(0),t))},negative(t){return this.check(Gt(BigInt(0),t))},nonpositive(t){return this.check(wt(BigInt(0),t))},nonnegative(t){return this.check(xt(BigInt(0),t))},multipleOf(t,e){return this.check(xr(t,e))}}));function qx(t){return jm($i,t)}var _u=$("ZodBigIntFormat",(t,e)=>{zp.init(t,e),$i.init(t,e)});function Vx(t){return Um(_u,t)}function Bx(t){return Lm(_u,t)}var sg=$("ZodSymbol",(t,e)=>{Ep.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>fh(t,n,i,r)});function Hx(t){return Mm(sg,t)}var cg=$("ZodUndefined",(t,e)=>{Dp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>mh(t,n,i,r)});function Gx(t){return Fm(cg,t)}var ug=$("ZodNull",(t,e)=>{Op.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>ph(t,n,i,r)});function Qo(t){return Zm(ug,t)}var lg=$("ZodAny",(t,e)=>{Tp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>yh(t,n,i,r)});function Jx(){return qm(lg)}var dg=$("ZodUnknown",(t,e)=>{Cp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>vh(t,n,i,r)});function ye(){return Vm(dg)}var fg=$("ZodNever",(t,e)=>{Ap.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>gh(t,n,i,r)});function $u(t){return Bm(fg,t)}var pg=$("ZodVoid",(t,e)=>{Np.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>hh(t,n,i,r)});function Kx(t){return Hm(pg,t)}var ea=$("ZodDate",(t,e)=>{jp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>bh(t,n,i,r),t.min=(n,i)=>t.check(xt(n,i)),t.max=(n,i)=>t.check(wt(n,i))},I.derived({minDate:t=>{let{minimum:e}=Ne(t);return e?new Date(e):null},maxDate:t=>{let{maximum:e}=Ne(t);return e?new Date(e):null}},{}));function Wx(t){return Gm(ea,t)}var mg=$("ZodArray",(t,e)=>{cn(),Up.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Oh(t,n,i,r),t.element=e.element},{min(t,e){return this.check(sr(t,e))},nonempty(t){return this.check(sr(1,t))},max(t,e){return this.check(on(t,e))},length(t,e){return this.check(an(t,e))},unwrap(){return this.element}});function W(t,e){return Wm(mg,t,e)}function Xx(t){let e=t._zod.def.shape;return Ve(Object.keys(e))}var ta=$("ZodObject",(t,e)=>{cn(),Lp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Th(t,n,i,r),I.installLazyProp(t,"shape",n=>n._zod.def.shape,!1)},{keyof(){return Ve(Object.keys(this._zod.def.shape))},catchall(t){return this.clone(I.mergeDefs(this._zod.def,{catchall:t}))},passthrough(){return this.clone(I.mergeDefs(this._zod.def,{catchall:ye()}))},loose(){return this.clone(I.mergeDefs(this._zod.def,{catchall:ye()}))},strict(){return this.clone(I.mergeDefs(this._zod.def,{catchall:$u()}))},strip(){return this.clone(I.mergeDefs(this._zod.def,{catchall:void 0}))},extend(t){return I.extend(this,t)},safeExtend(t){return I.safeExtend(this,t)},merge(t){return I.merge(this,t)},pick(t){return I.pick(this,t)},omit(t){return I.omit(this,t)},partial(...t){return I.partial(ia,this,t[0])},exactPartial(...t){return I.partial(xu,this,t[0],"exactPartial")},required(...t){return I.required(Su,this,t[0])}});function j(t,e){let n={type:"object",shape:t??{},...I.normalizeParams(e)};return new ta(n)}function Yx(t,e){return new ta({type:"object",shape:t,catchall:$u(),...I.normalizeParams(e)})}function qe(t,e){return new ta({type:"object",shape:t,catchall:ye(),...I.normalizeParams(e)})}var ra=$("ZodUnion",(t,e)=>{jo.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Jc(t,n,i,r),t.options=e.options});function de(t,e){return new ra({type:"union",options:t,...I.normalizeParams(e)})}var hg=$("ZodXor",(t,e)=>{ra.init(t,e),Mp.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Jc(t,n,i,r),t.options=e.options});function Qx(t,e){return new hg({type:"union",options:t,inclusive:!1,...I.normalizeParams(e)})}var gg=$("ZodDiscriminatedUnion",(t,e)=>{ra.init(t,e),Zp.init(t,e)});function na(t,e,n){return new gg({type:"union",options:e,discriminator:t,...I.normalizeParams(n)})}var yg=$("ZodIntersection",(t,e)=>{qp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Ch(t,n,i,r)});function wi(t,e){return new yg({type:"intersection",left:t,right:e})}var vg=$("ZodTuple",(t,e)=>{cn(),ic.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Ah(t,n,i,r)},{rest(t){return this.clone({...this._zod.def,rest:t})},partial(){let t=this._zod.def;if(t.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...t,items:t.items.map(e=>new ia({type:"optional",innerType:e}))})}});function bg(t,e,n){let i=e instanceof q,r=i?n:e,o=i?e:null;return new vg({type:"tuple",items:t,rest:o,...I.normalizeParams(r)})}var gi=$("ZodRecord",(t,e)=>{cn(),Vp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Nh(t,n,i,r),t.keyType=e.keyType,t.valueType=e.valueType});function he(t,e,n){return!e||!e._zod?new gi({type:"record",keyType:S(),valueType:t,...I.normalizeParams(e)}):new gi({type:"record",keyType:t,valueType:e,...I.normalizeParams(n)})}function eS(t,e,n){return new gi({type:"record",keyType:t,valueType:e,...I.normalizeParams(n),partial:!0})}function tS(t,e,n){return new gi({type:"record",keyType:t,valueType:e,mode:"loose",...I.normalizeParams(n)})}var _g=$("ZodMap",(t,e)=>{cn(),Bp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Eh(t,n,i,r),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...n)=>t.check(Kt(...n)),t.nonempty=n=>t.check(Kt(1,n)),t.max=(...n)=>t.check(Sr(...n)),t.size=(...n)=>t.check(nn(...n))});function rS(t,e,n){return new _g({type:"map",keyType:t,valueType:e,...I.normalizeParams(n)})}var $g=$("ZodSet",(t,e)=>{cn(),Hp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Dh(t,n,i,r),t.min=(...n)=>t.check(Kt(...n)),t.nonempty=n=>t.check(Kt(1,n)),t.max=(...n)=>t.check(Sr(...n)),t.size=(...n)=>t.check(nn(...n))});function nS(t,e){return new $g({type:"set",valueType:t,...I.normalizeParams(e)})}var yi=$("ZodEnum",(t,e)=>{Gp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(i,r,o)=>_h(t,i,r,o),t.enum=e.entries,t.options=[...t._zod.values];let n=new Set(Object.keys(e.entries));t.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new yi({...e,checks:[],...I.normalizeParams(r),entries:o})},t.exclude=(i,r)=>{let o={...e.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new yi({...e,checks:[],...I.normalizeParams(r),entries:o})}});function Ve(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new yi({type:"enum",entries:n,...I.normalizeParams(e)})}function iS(t,e){return new yi({type:"enum",entries:t,...I.normalizeParams(e)})}var wg=$("ZodLiteral",(t,e)=>{Jp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>$h(t,n,i,r),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 R(t,e){return new wg({type:"literal",values:Array.isArray(t)?t:[t],...I.normalizeParams(e)})}var xg=$("ZodFile",(t,e)=>{Kp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Sh(t,n,i,r),t.min=(n,i)=>t.check(Kt(n,i)),t.max=(n,i)=>t.check(Sr(n,i)),t.mime=(n,i)=>t.check(si(Array.isArray(n)?n:[n],i))});function oS(t){return Xm(xg,t)}var Sg=$("ZodTransform",(t,e)=>{cn(),Wp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>zh(t,n,i,r),t._zod.parse=(n,i)=>{if(i.direction==="backward")throw new $r(t.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(I.issue(o,n.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=n.value),a.inst??(a.inst=t),n.issues.push(I.issue(a))}};let r=e.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n)):(n.value=r,n)}});function wu(t){return new Sg({type:"transform",transform:t})}var ia=$("ZodOptional",(t,e)=>{oc.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Kc(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});function pe(t){return new ia({type:"optional",innerType:t})}var xu=$("ZodExactOptional",(t,e)=>{Xp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Kc(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});function kg(t){return new xu({type:"optional",innerType:t})}var Ig=$("ZodNullable",(t,e)=>{Yp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>jh(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});function Xo(t){return new Ig({type:"nullable",innerType:t})}function aS(t){return pe(Xo(t))}var Pg=$("ZodDefault",(t,e)=>{Qp.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Lh(t,n,i,r),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function zg(t,e){return new Pg({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():I.shallowClone(e)}})}var Eg=$("ZodPrefault",(t,e)=>{em.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Mh(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});function Dg(t,e){return new Eg({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():I.shallowClone(e)}})}var Su=$("ZodNonOptional",(t,e)=>{tm.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Rh(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});function Og(t,e){return new Su({type:"nonoptional",innerType:t,...I.normalizeParams(e)})}var Tg=$("ZodSuccess",(t,e)=>{rm.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>kh(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});function sS(t){return new Tg({type:"success",innerType:t})}var Cg=$("ZodCatch",(t,e)=>{nm.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Fh(t,n,i,r),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function Ag(t,e){return new Cg({type:"catch",innerType:t,catchValue:typeof e=="function"?e:I.constantCatch(e)})}var Ng=$("ZodNaN",(t,e)=>{im.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>wh(t,n,i,r)});function cS(t){return Km(Ng,t)}var oa=$("ZodPipe",(t,e)=>{ac.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Zh(t,n,i,r),t.in=e.in,t.out=e.out});function tu(t,e){return new oa({type:"pipe",in:t,out:e})}var aa=$("ZodCodec",(t,e)=>{oa.init(t,e),Ro.init(t,e)});function uS(t,e,n){return new aa({type:"pipe",in:t,out:e,transform:n.decode,reverseTransform:n.encode})}function lS(t){let e=t._zod.def;return new aa({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}var jg=$("ZodPreprocess",(t,e)=>{oa.init(t,e),om.init(t,e)}),Rg=$("ZodReadonly",(t,e)=>{am.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>qh(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});function Ug(t){return new Rg({type:"readonly",innerType:t})}var Lg=$("ZodTemplateLiteral",(t,e)=>{sm.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>xh(t,n,i,r)});function dS(t,e){return new Lg({type:"template_literal",parts:t,...I.normalizeParams(e)})}var Mg=$("ZodLazy",(t,e)=>{Uo.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Bh(t,n,i,r),t.unwrap=()=>t._zod.def.getter()});function Fg(t){return new Mg({type:"lazy",getter:t})}var Zg=$("ZodPromise",(t,e)=>{um.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Vh(t,n,i,r),t.unwrap=()=>t._zod.def.innerType});function fS(t){return new Zg({type:"promise",innerType:t})}var qg=$("ZodFunction",(t,e)=>{cm.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Ph(t,n,i,r)});function pS(t){return new qg({type:"function",input:Array.isArray(t?.input)?bg(t?.input):t?.input??W(ye()),output:t?.output??ye()})}var sa=$("ZodCustom",(t,e)=>{lm.init(t,e),H.init(t,e),t._zod.processJSONSchema=(n,i,r)=>Ih(t,n,i,r)});function mS(t){let e=new ge({check:"custom"});return e._zod.check=t,e}function ku(t,e){return Ym(sa,t??(()=>!0),e)}function Vg(t,e={}){return Qm(sa,t,e)}function Bg(t,e){return eh(t,e)}var hS=th,gS=rh,Hg=$("ZodInstanceOf",(t,e)=>{sa.init(t,e)},{properties(t,e){return this.check(ai(t,e))}});function yS(t,e={}){let n=new Hg({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...I.normalizeParams(e)});return n._zod.bag.Class=t,n._zod.check=i=>{i.value instanceof t||i.issues.push({code:"invalid_type",expected:t.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var vS=(...t)=>nh({Codec:aa,Boolean:_i,String:vi},...t);function bS(t){let e=Fg(()=>de([S(t),oe(),De(),Qo(),W(e),he(S(),e)]));return e}function ca(t,e){return new jg({type:"pipe",in:wu(t),out:e})}var AA={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 NA(t){Pe({customError:t})}function jA(){return Pe().customError}var Gg;Gg||(Gg={});var dn={};nr(dn,{ZodISODate:()=>Er,ZodISODateTime:()=>zr,ZodISODuration:()=>Or,ZodISOTime:()=>Dr,date:()=>UA,datetime:()=>RA,duration:()=>MA,time:()=>LA});function RA(t){return Bo(zr,t)}function UA(t){return Ho(Er,t)}function LA(t){return Go(Dr,t)}function MA(t){return Jo(Or,t)}var N={...xi,...Yc,iso:dn},FA=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function ZA(t,e){let n=t.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function _S(t,e){return t.map((n,i)=>i<e?n:n.optional())}function qA(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function VA(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=t.slice(1).split("/").filter(Boolean);if(n.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1]===void 0?void 0:qA(n[1]);if(!r||!e.defs[r])throw new Error(`Reference not found: ${t}`);return e.defs[r]}throw new Error(`Reference not found: ${t}`)}function BA(t,e){return N.transform(i=>i).check(i=>{let r=i.value;if(typeof r!="object"||r===null||Array.isArray(r))return;let o=Object.getOwnPropertyNames(r);if(e.minProperties!==void 0&&o.length<e.minProperties&&i.issues.push({origin:"object",code:"too_small",minimum:e.minProperties,inclusive:!0,message:`Too small: expected object to have >=${e.minProperties} properties`,input:r,inst:t,continue:!0}),e.maxProperties!==void 0&&o.length>e.maxProperties&&i.issues.push({origin:"object",code:"too_big",maximum:e.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${e.maxProperties} properties`,input:r,inst:t,continue:!0}),e.keySchema)for(let a of o){let s=e.keySchema.safeParse(a);s.success||i.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(t)}function Jg(t,e){if(t===null)return"z";let n=typeof t;if(n!=="object"){if(n==="number"&&Number.isNaN(t))return null;let i=String(t);return`${n[0]}${i.length}:${i}`}if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let o=[];for(let a of t){let s=Jg(a,e);if(s===null)return null;o.push(s)}return`a${o.length}:[${o.join(",")}]`}let i=Object.keys(t).sort(),r=[];for(let o of i){let a=Jg(t[o],e);if(a===null)return null;r.push(`${o.length}:${o}=${a}`)}return`o${r.length}:{${r.join(",")}}`}finally{e.delete(t)}}var HA=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),GA=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function ua(t){return typeof t!="object"||t===null?!1:Array.isArray(t)?t.some(ua):typeof t.$ref=="string"?!0:Object.entries(t).some(([e,n])=>HA.has(e)?ua(n):!GA.has(e)||typeof n!="object"||n===null?!1:Object.values(n).some(ua))}function $S(t){return t===1?"element":"elements"}function JA(t,e){return N.transform(i=>i).check(i=>{let r=i.value;if(Array.isArray(r)){if(e.uniqueItems===!0){let o=new Map;for(let a=0;a<r.length;a++){let s=Jg(r[a],new Set);if(s===null)continue;let c=o.get(s);if(c===void 0){o.set(s,a);continue}i.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${c}`,input:r,path:[a],continue:!0})}}if(e.containsSchema){let o=e.minContains??1,a=e.maxContains!==void 0?e.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let c of r)if(e.containsSchema.safeParse(c).success&&++s>=a)break;s<o&&i.issues.push({code:"custom",message:`Array must contain at least ${o} matching ${$S(o)}; found ${s}`,input:r,continue:!0}),e.maxContains!==void 0&&s>e.maxContains&&i.issues.push({code:"custom",message:`Array must contain at most ${e.maxContains} matching ${$S(e.maxContains)}`,input:r,continue:!0})}}}).pipe(t)}function wS(t,e){if(t!==!1)return t===void 0||t===!0?N.any():st(t,e)}var KA=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function xS(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return N.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let r=t.$ref;if(e.refs.has(r))return e.refs.get(r);if(e.processing.has(r))return N.lazy(()=>{if(!e.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return e.refs.get(r)});e.processing.add(r);let o=VA(r,e),a=st(o,e);return e.refs.set(r,a),e.processing.delete(r),a}if(t.enum!==void 0){let r=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&r.length===1&&r[0]===null)return N.null();if(r.length===0)return N.never();if(r.length===1)return N.literal(r[0]);if(r.every(a=>typeof a=="string"))return N.enum(r);let o=r.map(a=>N.literal(a));return o.length<2?o[0]:N.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return N.literal(t.const);let n=t.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...t,type:o};return xS(a,e)});return r.length===0?N.never():r.length===1?r[0]:N.union(r)}if(!n)return N.any();let i;switch(n){case"string":{let r=N.string();if(t.format){let o=t.format;o==="email"?r=r.check(N.email()):o==="uri"||o==="uri-reference"?r=r.check(N.url()):o==="uuid"||o==="guid"?r=r.check(N.uuid()):o==="date-time"?r=r.check(N.iso.datetime({offset:!0})):o==="date"?r=r.check(N.iso.date()):o==="time"?r=r.check(N.regex(KA)):o==="duration"?r=r.check(N.iso.duration()):o==="hostname"?r=r.check(N.hostname()):o==="ipv4"?r=r.check(N.ipv4()):o==="ipv6"?r=r.check(N.ipv6()):o==="mac"?r=r.check(N.mac()):o==="cidr"?r=r.check(N.cidrv4()):o==="cidr-v6"?r=r.check(N.cidrv6()):o==="base64"?r=r.check(N.base64()):o==="base64url"?r=r.check(N.base64url()):o==="e164"?r=r.check(N.e164()):o==="credit_card"?r=r.check(N.creditCard()):o==="iban"?r=r.check(N.iban()):o==="jwt"?r=r.check(N.jwt()):o==="emoji"?r=r.check(N.emoji()):o==="nanoid"?r=r.check(N.nanoid()):o==="cuid"?r=r.check(N.cuid()):o==="cuid2"?r=r.check(N.cuid2()):o==="ulid"?r=r.check(N.ulid()):o==="xid"?r=r.check(N.xid()):o==="ksuid"&&(r=r.check(N.ksuid()))}typeof t.minLength=="number"&&(r=r.min(t.minLength)),typeof t.maxLength=="number"&&(r=r.max(t.maxLength)),t.pattern&&(r=r.regex(new RegExp(t.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?N.number().int():N.number();typeof t.minimum=="number"&&t.exclusiveMinimum!==!0&&(r=r.min(t.minimum)),typeof t.maximum=="number"&&t.exclusiveMaximum!==!0&&(r=r.max(t.maximum)),typeof t.exclusiveMinimum=="number"?r=r.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(r=r.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?r=r.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(r=r.lt(t.maximum)),typeof t.multipleOf=="number"&&(r=r.multipleOf(t.multipleOf)),i=r;break}case"boolean":{i=N.boolean();break}case"null":{i=N.null();break}case"object":{let r={},o=t.properties||{},a=new Set(t.required||[]),s=typeof t.additionalProperties=="object"?st(t.additionalProperties,e):void 0;for(let[d,p]of Object.entries(o)){let m=st(p,e);Fe(r,d,a.has(d)?m:m.optional())}if(t.patternProperties){let d=t.patternProperties,p=Object.keys(d),m=[];for(let h of p){let g=st(d[h],e),y=N.string().regex(new RegExp(h));m.push(N.looseRecord(y,g))}let f=[];if(Object.keys(r).length>0&&f.push(N.object(r).passthrough()),f.push(...m),f.length===0)i=N.object({}).passthrough();else if(f.length===1)i=f[0];else{let h=N.intersection(f[0],f[1]);for(let g=2;g<f.length;g++)h=N.intersection(h,f[g]);i=h}if(t.additionalProperties===!1){let h=Object.keys(r),g=p.map(v=>new RegExp(v)),y=i;i=i.check(v=>{if(!It(v.value))return;let b=[];for(let _ of Object.keys(v.value))h.includes(_)||g.some(x=>x.test(_))||b.push(_);b.length&&v.issues.push({code:"unrecognized_keys",keys:b,input:v.value,inst:y})})}}else{let d=N.object(r);t.additionalProperties===!1?i=d.strict():s?i=d.catchall(s):i=d.passthrough()}let c=t.propertyNames!==void 0&&t.propertyNames!==!0,u=typeof t.minProperties=="number"?t.minProperties:void 0,l=typeof t.maxProperties=="number"?t.maxProperties:void 0;if(c||u!==void 0||l!==void 0){let d;if(c){let p=typeof t.propertyNames=="object"&&t.propertyNames.type===void 0?{type:"string",...t.propertyNames}:t.propertyNames;d=st(p,e)}i=BA(i,{keySchema:d,minProperties:u,maxProperties:l})}break}case"array":{let r=t.prefixItems,o=t.items;if(r&&Array.isArray(r)){let a=typeof t.minItems=="number"?t.minItems:0,s=r.map(d=>st(d,e)),c=_S(s,a),u=Array.isArray(o)?void 0:wS(o,e),l=N.tuple(c);i=u?l.rest(u):l,typeof t.minItems=="number"&&(i=i.check(N.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(N.maxLength(t.maxItems)))}else if(Array.isArray(o)){let a=typeof t.minItems=="number"?t.minItems:0,s=o.map(d=>st(d,e)),c=_S(s,a),u=wS(t.additionalItems,e),l=N.tuple(c);i=u?l.rest(u):l,typeof t.minItems=="number"&&(i=i.check(N.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(N.maxLength(t.maxItems)))}else if(o!==void 0){let a=st(o,e),s=N.array(a);typeof t.minItems=="number"&&(s=s.min(t.minItems)),typeof t.maxItems=="number"&&(s=s.max(t.maxItems)),i=s}else i=N.array(N.any());(t.uniqueItems===!0||t.contains!==void 0)&&(i=JA(i,{uniqueItems:t.uniqueItems===!0,containsSchema:t.contains!==void 0?st(t.contains,e):void 0,minContains:typeof t.minContains=="number"?t.minContains:void 0,maxContains:typeof t.maxContains=="number"?t.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${n}`)}return i}function st(t,e){if(typeof t=="boolean")return t?N.any():N.never();let n=xS(t,e),i=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let s=t.anyOf.map(u=>st(u,e)),c=N.union(s);n=i?N.intersection(n,c):c}if(t.oneOf&&Array.isArray(t.oneOf)){let s=t.oneOf.map(u=>st(u,e)),c=N.xor(s);n=i?N.intersection(n,c):c}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)n=i?n:N.any();else{let s=i?n:st(t.allOf[0],e),c=i?0:1;for(let u=c;u<t.allOf.length;u++)s=N.intersection(s,st(t.allOf[u],e));n=s}t.nullable===!0&&e.version==="openapi-3.0"&&(n=N.nullable(n)),t.readOnly===!0&&(n=N.readonly(n)),t.default!==void 0&&(n=n.default(t.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in t&&(r[s]=t[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in t&&(r[s]=t[s]);if(t.type==="object"&&t.$ref===void 0){t.propertyNames!==void 0&&!ua(t.propertyNames)&&(r.propertyNames=t.propertyNames);for(let s of["minProperties","maxProperties"])t[s]!==void 0&&(r[s]=t[s])}if(t.type==="array"&&t.$ref===void 0){t.contains!==void 0&&!ua(t.contains)&&(r.contains=t.contains);for(let s of["uniqueItems","minContains","maxContains"])t[s]!==void 0&&(r[s]=t[s])}for(let s of Object.keys(t))FA.has(s)||Fe(r,s,t[s]);return Object.keys(r).length>0&&e.registry.add(n,r),t.description&&(n=n.describe(t.description)),n}function SS(t,e){if(typeof t=="boolean")return t?N.any():N.never();let n;try{n=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=ZA(n,e?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:e?.registry??Ze};return st(n,o)}var kS=Symbol("z.visit/resolving");function la(t,e){let n=typeof e=="function"?e:(a,s)=>{let c=e[a._zod.def.type];return c?c(a,s):a},i=new Map;function r(a){let s=i.get(a);if(s===kS)return new Uo({type:"lazy",getter:()=>i.get(a)});if(s!==void 0)return s;i.set(a,kS);let c=o(a),u=n(c,c!==a);return i.set(a,u),u}function o(a){let s=a._zod.def,c=s.type;switch(c){case"object":{let u=s.shape,l=Object.keys(u),d=!1,p={};for(let f of l){let h=r(u[f]);h!==u[f]&&(d=!0),p[f]=h}let m=s.catchall;return s.catchall&&(m=r(s.catchall),m!==s.catchall&&(d=!0)),d?ce(a,{...s,shape:p,catchall:m}):a}case"array":{let u=r(s.element);return u===s.element?a:ce(a,{...s,element:u})}case"tuple":{let u=s.items,l=!1,d=[];for(let m of u){let f=r(m);f!==m&&(l=!0),d.push(f)}let p=s.rest;return s.rest&&(p=r(s.rest),p!==s.rest&&(l=!0)),l?ce(a,{...s,items:d,rest:p}):a}case"record":case"map":{let u=r(s.keyType),l=r(s.valueType);return u===s.keyType&&l===s.valueType?a:ce(a,{...s,keyType:u,valueType:l})}case"set":{let u=r(s.valueType);return u===s.valueType?a:ce(a,{...s,valueType:u})}case"union":{let u=s.options,l=!1,d=[];for(let p of u){let m=r(p);m!==p&&(l=!0),d.push(m)}return l?ce(a,{...s,options:d}):a}case"intersection":{let u=r(s.left),l=r(s.right);return u===s.left&&l===s.right?a:ce(a,{...s,left:u,right:l})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let u=r(s.innerType);return u===s.innerType?a:ce(a,{...s,innerType:u})}case"pipe":{let u=r(s.in),l=r(s.out);return u===s.in&&l===s.out?a:ce(a,{...s,in:u,out:l})}case"function":{let u=r(s.input),l=r(s.output);return u===s.input&&l===s.output?a:ce(a,{...s,input:u,output:l})}case"lazy":{let u=s.getter,{_cachedInner:l,...d}=s;return ce(a,{...d,getter:()=>r(u())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return r(t)}function IS(t){return la(t,{object:e=>e.partial(),union:e=>{let n=e._zod.def;return n.discriminator===void 0?e:de(n.options)}})}function WA(t,e){if(!e?.length)return t;let n=t._zod.def;return ce(t,Rt(n,{checks:[...n.checks??[],...e]}),{parent:!0})}function PS(t){return WA(t.out,t.checks)}function XA(t){return t.in._zod.traits.has("$ZodTransform")?PS(t):t.in}function zS(t){return la(t,{pipe:e=>XA(e._zod.def),default:(e,n)=>n?pe(e._zod.def.innerType):e,catch:(e,n)=>n?e._zod.def.innerType:e})}function ES(t){return la(t,{pipe:e=>PS(e._zod.def),prefault:(e,n)=>n?e._zod.def.innerType:e})}var Kg={};nr(Kg,{bigint:()=>tN,boolean:()=>eN,date:()=>rN,number:()=>QA,string:()=>YA});function YA(t){return wm(vi,t)}function QA(t){return zm(bi,t)}function eN(t){return Nm(_i,t)}function tN(t){return Rm($i,t)}function rN(t){return Jm(ea,t)}var ur=class{static detect(e){let n=e.trim();return this.isRemoteUrl(n)?{type:new URL(n).protocol==="https:"?"https_url":"http_url",originalPath:e,normalizedPath:n}:{type:"local",originalPath:e,normalizedPath:n}}static isValidUrl(e){try{return new URL(e.trim()).protocol.length>0}catch{return!1}}static isRemoteUrl(e){try{let n=e.trim();if(!n.startsWith("http://")&&!n.startsWith("https://"))return!1;let i=new URL(n);return!(i.protocol!=="http:"&&i.protocol!=="https:"||!i.hostname||i.hostname.length===0)}catch{return!1}}};var nN=ke.object({name:ke.string().default("eui-compodoc-mcp"),version:ke.string().default("1.0.0")}),iN=ke.object({path:ke.string().refine(t=>!t||t==="__bundled__"?!0:t.trim().length>0,{message:"Documentation path cannot be only whitespace"}).refine(t=>{if(!t||t==="__bundled__")return!0;let e=t.trim();return e.startsWith("http://")||e.startsWith("https://")?ur.isRemoteUrl(e):!0},{message:"Path must be a valid local file path or HTTP/HTTPS URL"}).default("__bundled__"),watchForChanges:ke.boolean().default(!0),reloadDebounce:ke.number().min(0).default(1e3),timeout:ke.number().min(1e3).default(1e4),maxRetries:ke.number().min(0).max(10).default(3),pollingInterval:ke.number().min(5e3).default(6e4)}).default({}),oN=ke.object({maxResults:ke.number().min(1).max(1e3).default(50),minQueryLength:ke.number().min(1).default(2)}),aN=ke.object({level:ke.enum(["debug","info","warn","error"]).default("info"),format:ke.enum(["json","text"]).default("text")}),sN=ke.object({path:ke.string().optional()}).default({}),cN=ke.object({path:ke.string().optional()}).default({}),DS=ke.object({server:nN.default({}),documentation:iN,search:oN.default({}),logging:aN.default({}),accessibility:sN.default({}),examples:cN.default({})}),Iu={server:{name:"eui-compodoc-mcp",version:"1.0.0"},documentation:{path:"__bundled__",watchForChanges:!0,reloadDebounce:1e3,timeout:1e4,maxRetries:3,pollingInterval:6e4},search:{maxResults:50,minQueryLength:2},logging:{level:"info",format:"text"}};function Wg(t){return DS.safeParse(t)}var Si=rt(require("fs")),da=rt(require("path"));function uN(){let t=da.join(__dirname,"documentation.json.gz");if(Si.existsSync(t))return t;let e=da.join(__dirname,"documentation.json");return Si.existsSync(e)?e:Iu.documentation.path}function OS(){let t={};return process.env.COMPODOC_MCP_DOC_PATH&&(t.documentation={path:process.env.COMPODOC_MCP_DOC_PATH}),process.env.COMPODOC_MCP_LOG_LEVEL&&(t.logging={level:process.env.COMPODOC_MCP_LOG_LEVEL}),process.env.COMPODOC_MCP_WATCH!==void 0&&(t.documentation||(t.documentation={path:""}),t.documentation.watchForChanges=process.env.COMPODOC_MCP_WATCH==="true"),process.env.COMPODOC_MCP_A11Y_PATH&&(t.accessibility={path:process.env.COMPODOC_MCP_A11Y_PATH}),process.env.COMPODOC_MCP_EXAMPLES_PATH&&(t.examples={path:process.env.COMPODOC_MCP_EXAMPLES_PATH}),t}function TS(t){let e={};for(let n=0;n<t.length;n++)switch(t[n]){case"--doc-path":case"--documentation-path":e.documentation||(e.documentation={path:""}),e.documentation.path=t[++n];break;case"--watch":e.documentation||(e.documentation={path:""}),e.documentation.watchForChanges=!0;break;case"--no-watch":e.documentation||(e.documentation={path:""}),e.documentation.watchForChanges=!1;break;case"--log-level":e.logging={level:t[++n]};break;case"--max-results":e.search={maxResults:parseInt(t[++n],10)};break;case"--a11y-path":e.accessibility||(e.accessibility={}),e.accessibility.path=t[++n];break;case"--examples-path":e.examples||(e.examples={}),e.examples.path=t[++n];break;case"--help":case"-h":dN(),process.exit(0);break}return e}function CS(t){try{if(!Si.existsSync(t))return process.stderr.write(`Configuration file not found: ${t}
93
+ `),{};let e=Si.readFileSync(t,"utf-8"),n=da.extname(t).toLowerCase();return n===".json"?JSON.parse(e):(process.stderr.write(`Unsupported configuration file format: ${n}
94
+ `),{})}catch(e){let n=e instanceof Error?e.message:"Unknown error occurred";return process.stderr.write(`Failed to load config file ${t}: ${n}
95
+ `),{}}}function Pu(t,e){let n={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let r=e[i],o=n[i];r&&typeof r=="object"&&!Array.isArray(r)&&o&&typeof o=="object"&&!Array.isArray(o)?n[i]=Pu(o,r):r!==void 0&&(n[i]=r)}return n}function Xg(t=process.argv.slice(2)){try{let e=t.indexOf("--config"),n=e>=0?t[e+1]:void 0,i=n?CS(n):{},r=OS(),o=TS(t),a={...Iu};a=Pu(a,i),a=Pu(a,r),a=Pu(a,o);let s=Wg(a);if(!s.success){let c=lN(s.error);return process.stderr.write(`Configuration validation failed:
35
96
  `),c.forEach(u=>process.stderr.write(` - ${u}
36
- `)),{success:!1,errors:c}}return a.data.documentation.path==="__bundled__"&&(a.data.documentation.path=k0()),{success:!0,config:a.data}}catch(e){return{success:!1,errors:[`Failed to load configuration: ${e instanceof Error?e.message:"Configuration error"}`]}}}function E0(t){return t.errors.map(e=>`${e.path.join(".")}: ${e.message}`)}function z0(){process.stderr.write(`
97
+ `)),{success:!1,errors:c}}return s.data.documentation.path==="__bundled__"&&(s.data.documentation.path=uN()),{success:!0,config:s.data}}catch(e){return{success:!1,errors:[`Failed to load configuration: ${e instanceof Error?e.message:"Configuration error"}`]}}}function lN(t){return t.errors.map(e=>`${e.path.join(".")}: ${e.message}`)}function dN(){process.stderr.write(`
37
98
  EUI Compodoc MCP Server - Model Context Protocol server for Angular component documentation
38
99
 
39
100
  Usage:
@@ -42,6 +103,7 @@ Usage:
42
103
  Options:
43
104
  --doc-path <path> Path to documentation.json file (required)
44
105
  --a11y-path <path> Path or URL to accessibility.json file (optional)
106
+ --examples-path <path> Path or URL to examples.json file (optional)
45
107
  --watch Watch for changes to documentation.json (default: true)
46
108
  --no-watch Disable file watching
47
109
  --log-level <level> Logging level: debug, info, warn, error (default: info)
@@ -52,6 +114,7 @@ Options:
52
114
  Environment Variables:
53
115
  COMPODOC_MCP_DOC_PATH Path to documentation.json file
54
116
  COMPODOC_MCP_A11Y_PATH Path or URL to accessibility.json file
117
+ COMPODOC_MCP_EXAMPLES_PATH Path or URL to examples.json file
55
118
  COMPODOC_MCP_LOG_LEVEL Logging level
56
119
  COMPODOC_MCP_WATCH Enable/disable file watching (true/false)
57
120
 
@@ -69,6 +132,9 @@ Configuration File Format (JSON):
69
132
  "accessibility": {
70
133
  "path": "https://euidev.ecdevops.eu/eui-showcase-ux-components-21.x/json/accessibility.json"
71
134
  },
135
+ "examples": {
136
+ "path": "https://euidev.ecdevops.eu/eui-showcase-ux-components-21.x/json/examples.json"
137
+ },
72
138
  "search": {
73
139
  "maxResults": 50,
74
140
  "minQueryLength": 2
@@ -86,91 +152,28 @@ Examples:
86
152
  COMPODOC_MCP_DOC_PATH=./documentation.json eui-compodoc-mcp
87
153
 
88
154
  For more information, visit: https://github.com/your-org/eui-compodoc-mcp
89
- `)}var mo=gt(require("fs")),rh=gt(require("path")),nh=require("zlib");var Lf=require("node:events"),qf=require("node:fs"),Ls=require("node:fs/promises"),H=gt(require("node:path"),1);var Lt=require("node:fs/promises"),Ir=require("node:path"),Pf=require("node:stream"),et={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},un={root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:et.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:256};Object.freeze(un);var Tf="READDIRP_RECURSIVE_ERROR",P0=new Set(["ENOENT","EPERM","EACCES","ELOOP",Tf]),kf=[et.DIR_TYPE,et.EVERYTHING_TYPE,et.FILE_DIR_TYPE,et.FILE_TYPE],T0=new Set([et.DIR_TYPE,et.EVERYTHING_TYPE,et.FILE_DIR_TYPE]),C0=new Set([et.EVERYTHING_TYPE,et.FILE_DIR_TYPE,et.FILE_TYPE]),O0=t=>P0.has(t.code),I0=process.platform==="win32",Ef=t=>!0,zf=t=>{if(t===void 0)return Ef;if(typeof t=="function")return t;if(typeof t=="string"){let e=t.trim();return r=>r.basename===e}if(Array.isArray(t)){let e=t.map(r=>r.trim());return r=>e.some(n=>r.basename===n)}return Ef},Ga=class extends Pf.Readable{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;_relStart;constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark??un.highWaterMark});let r={...un,...e},n=r.root??un.root,o=r.type??un.type;this._fileFilter=zf(r.fileFilter),this._directoryFilter=zf(r.directoryFilter);let s=r.lstat?Lt.lstat:Lt.stat;I0?this._stat=a=>s(a,{bigint:!0}):this._stat=s,this._maxDepth=r.depth!=null&&Number.isSafeInteger(r.depth)?r.depth:un.depth,this._wantsDir=T0.has(o),this._wantsFile=C0.has(o),this._wantsEverything=o===et.EVERYTHING_TYPE,this._root=(0,Ir.resolve)(n),this._relStart=this._root.endsWith(Ir.sep)?this._root.length:this._root.length+1,this._isDirent=!r.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent};let i={path:this._root,depth:1};i.pending=this._exploreDir(this._root,1),this.parents=[i],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let r=this.parent,n=r&&r.files;if(n&&n.length>0){let{path:o,depth:s}=r,i=n.splice(0,e).map(c=>this._formatEntry(c,o)),a=this._isDirent?i:await Promise.all(i);for(let c of a){if(!c)continue;if(this.destroyed)return;let u=this._getEntryType(c);typeof u!="string"&&(u=await u),u==="directory"&&this._directoryFilter(c)?(s<=this._maxDepth&&this.parents.push({path:c.fullPath,depth:s+1}),this._wantsDir&&(this.push(c),e--)):(u==="file"||this._includeAsFile(c))&&this._fileFilter(c)&&this._wantsFile&&(this.push(c),e--)}}else{let o=this.parents.pop();if(!o){this.push(null);break}let s=o.pending??this._exploreDir(o.path,o.depth),i=this.parents[this.parents.length-1];if(i&&!i.pending&&(i.pending=this._exploreDir(i.path,i.depth)),this.parent=await s,this.destroyed)return}}}catch(r){this.destroy(r)}finally{this.reading=!1}}}async _exploreDir(e,r){let n;try{n=await(0,Lt.readdir)(e,this._rdOptions)}catch(o){this._onError(o)}return{files:n,depth:r,path:e}}_formatEntry(e,r){let n=this._isDirent?e.name:e,o=(0,Ir.join)(r,n),s={path:o.slice(this._relStart),fullPath:o,basename:n};return this._isDirent?(s.dirent=e,s):this._stat(o).then(i=>(s.stats=i,s),i=>{this._onError(i)})}_onError(e){O0(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}_getEntryType(e){if(!e||!(this._statsProp in e))return"";let r=e[this._statsProp];return r.isFile()?"file":r.isDirectory()?"directory":r.isSymbolicLink()?this._getSymlinkEntryType(e):""}async _getSymlinkEntryType(e){let r=e.fullPath;try{let n=await(0,Lt.realpath)(r),o=await(0,Lt.lstat)(n);if(o.isFile())return"file";if(o.isDirectory()){let s=n.length;if(r.startsWith(n)&&r[s]===Ir.sep){let i=new Error(`Circular symlink detected: "${r}" points to "${n}"`);return i.code=Tf,this._onError(i),""}return"directory"}}catch(n){this._onError(n)}return""}_includeAsFile(e){let r=e&&e[this._statsProp];return r&&this._wantsEverything&&!r.isDirectory()}};function Cf(t,e={}){let r=e.entryType||e.type;if(r==="both"&&(r=et.FILE_DIR_TYPE),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(r&&!kf.includes(r))throw new Error(`readdirp: Invalid type passed. Use one of ${kf.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");let n={...e,root:t};return r&&(n.type=r),new Ga(n)}var Dr=require("node:fs"),bt=require("node:fs/promises"),If=require("node:os"),he=gt(require("node:path"),1),R0="data",Ya="end",Rf="close",js=()=>{};var Ms=process.platform,Qa=Ms==="win32",D0=Ms==="darwin",N0=Ms==="linux",A0=Ms==="freebsd",Df=(0,If.type)()==="OS400",be={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},vt=be,j0="watch",M0={lstat:bt.lstat,stat:bt.stat},Rr="listeners",Rs="errHandlers",ln="rawEmitters",Z0=[Rr,Rs,ln],L0=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),q0=t=>L0.has(he.extname(t).slice(1).toLowerCase()),Ka=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},so=(t,e,r)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(r)},F0=t=>e=>{let r=t[e];r instanceof Set?r.clear():delete t[e]},io=(t,e,r)=>{let n=t[e];n instanceof Set?n.delete(r):n===r&&delete t[e]},Nf=t=>t instanceof Set?t.size===0:!t,Ds=new Map;function Of(t,e,r,n,o){let s=(i,a)=>{r(t),o(i,a,{watchedPath:t}),a&&t!==a&&Ns(he.resolve(t,a),Rr,he.join(t,a))};try{return(0,Dr.watch)(t,{persistent:e.persistent},s)}catch(i){n(i);return}}var Ns=(t,e,r,n,o)=>{let s=Ds.get(t);s&&Ka(s[e],i=>{i(r,n,o)})},U0=(t,e,r,n)=>{let{listener:o,errHandler:s,rawEmitter:i}=n,a=Ds.get(e),c;if(!r.persistent)return c=Of(t,r,o,s,i),c?c.close.bind(c):void 0;if(a)so(a,Rr,o),so(a,Rs,s),so(a,ln,i);else{if(c=Of(t,r,Ns.bind(null,e,Rr),s,Ns.bind(null,e,ln)),!c)return;c.on(vt.ERROR,async u=>{let l=Ns.bind(null,e,Rs);if(a&&(a.watcherUnusable=!0),Qa&&u.code==="EPERM")try{await(await(0,bt.open)(t,"r")).close(),l(u)}catch{}else l(u)}),a={listeners:o,errHandlers:s,rawEmitters:i,watcher:c},Ds.set(e,a)}return()=>{io(a,Rr,o),io(a,Rs,s),io(a,ln,i),Nf(a.listeners)&&(a.watcher.close(),Ds.delete(e),Z0.forEach(F0(a)),a.watcher=void 0,Object.freeze(a))}},Ja=new Map,V0=(t,e,r,n)=>{let{listener:o,rawEmitter:s}=n,i=Ja.get(e),a=i&&i.options;return a&&(a.persistent<r.persistent||a.interval>r.interval)&&((0,Dr.unwatchFile)(e),i=void 0),i?(so(i,Rr,o),so(i,ln,s)):(i={listeners:o,rawEmitters:s,options:r,watcher:(0,Dr.watchFile)(e,r,(c,u)=>{Ka(i.rawEmitters,d=>{d(vt.CHANGE,e,{curr:c,prev:u})});let l=c.mtimeMs;(c.size!==u.size||l>u.mtimeMs||l===0)&&Ka(i.listeners,d=>d(t,c))})},Ja.set(e,i)),()=>{io(i,Rr,o),io(i,ln,s),Nf(i.listeners)&&(Ja.delete(e),(0,Dr.unwatchFile)(e),i.options=i.watcher=void 0,Object.freeze(i))}},As=class{fsw;_boundHandleError;constructor(e){this.fsw=e,this._boundHandleError=r=>e._handleError(r)}_watchWithNodeFs(e,r){let n=this.fsw.options,o=he.dirname(e),s=he.basename(e);this.fsw._getWatchedDir(o).add(s);let a=he.resolve(e),c={persistent:n.persistent};r||(r=js);let u;if(n.usePolling){let l=n.interval!==n.binaryInterval;c.interval=l&&q0(s)?n.binaryInterval:n.interval,u=V0(e,a,c,{listener:r,rawEmitter:this.fsw._emitRaw})}else u=U0(e,a,c,{listener:r,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return u}_handleFile(e,r,n){if(this.fsw.closed)return;let o=he.dirname(e),s=he.basename(e),i=this.fsw._getWatchedDir(o),a=r;if(i.has(s))return;let c=async(l,d)=>{if(this.fsw._throttle(j0,e,5)){if(!d||d.mtimeMs===0)try{let p=await(0,bt.stat)(e);if(this.fsw.closed)return;let m=p.atimeMs,f=p.mtimeMs;if((!m||m<=f||f!==a.mtimeMs)&&this.fsw._emit(vt.CHANGE,e,p),(D0||N0||A0)&&a.ino!==p.ino){this.fsw._closeFile(l),a=p;let h=this._watchWithNodeFs(e,c);h&&this.fsw._addPathCloser(l,h)}else a=p}catch{this.fsw._remove(o,s)}else if(i.has(s)){let p=d.atimeMs,m=d.mtimeMs;(!p||p<=m||m!==a.mtimeMs)&&this.fsw._emit(vt.CHANGE,e,d),a=d}}},u=this._watchWithNodeFs(e,c);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(vt.ADD,e,0))return;this.fsw._emit(vt.ADD,e,r)}return u}async _handleSymlink(e,r,n,o){if(this.fsw.closed)return;let s=e.fullPath,i=this.fsw._getWatchedDir(r);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let a;try{a=await(0,bt.realpath)(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(o)?this.fsw._symlinkPaths.get(s)!==a&&(this.fsw._symlinkPaths.set(s,a),this.fsw._emit(vt.CHANGE,n,e.stats)):(i.add(o),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(vt.ADD,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,r,n,o,s,i,a){e=he.join(e,"");let c=o?`${e}:${o}`:e;if(a=this.fsw._throttle("readdir",c,1e3),!a)return;let u=this.fsw._getWatchedDir(n.path),l=new Set,d=this.fsw._readdirp(e,{fileFilter:p=>n.filterPath(p),directoryFilter:p=>n.filterDir(p)});if(d)return d.on(R0,async p=>{if(this.fsw.closed){d=void 0;return}let m=p.path,f=he.join(e,m);if(l.add(m),!(p.stats.isSymbolicLink()&&await this._handleSymlink(p,e,f,m))){if(this.fsw.closed){d=void 0;return}(m===o||!o&&!u.has(m))&&(this.fsw._incrReadyCount(),f=he.join(s,he.relative(s,f)),this._addToNodeFs(f,r,n,i+1))}}).on(vt.ERROR,this._boundHandleError),new Promise((p,m)=>{if(!d)return m();d.once(Ya,()=>{if(this.fsw.closed){d=void 0;return}let f=a?a.clear():!1;p(void 0),u.getChildren().filter(h=>h!==e&&!l.has(h)).forEach(h=>{this.fsw._remove(e,h)}),d=void 0,f&&this._handleRead(e,!1,n,o,s,i,a)})})}async _handleDir(e,r,n,o,s,i,a){let c=this.fsw._getWatchedDir(he.dirname(e)),u=c.has(he.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!s&&!u&&this.fsw._emit(vt.ADD_DIR,e,r),c.add(he.basename(e)),this.fsw._getWatchedDir(e);let l,d,p=this.fsw.options.depth;if((p==null||o<=p)&&!this.fsw._symlinkPaths.has(a)){if(!s&&(await this._handleRead(e,n,i,s,e,o,l),this.fsw.closed))return;d=this._watchWithNodeFs(e,(m,f)=>{f&&f.mtimeMs===0||this._handleRead(m,!1,i,s,e,o,l)})}return d}async _addToNodeFs(e,r,n,o,s){let i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;let a=this.fsw._getWatchHelpers(e);n&&(a.filterPath=c=>n.filterPath(c),a.filterDir=c=>n.filterDir(c));try{let c=await M0[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,c))return i(),!1;let u=this.fsw.options.followSymlinks,l;if(c.isDirectory()){let d=he.resolve(e),p=u?await(0,bt.realpath)(e):e;if(this.fsw.closed||(l=await this._handleDir(a.watchPath,c,r,o,s,a,p),this.fsw.closed))return;d!==p&&p!==void 0&&this.fsw._symlinkPaths.set(d,p)}else if(c.isSymbolicLink()){let d=u?await(0,bt.realpath)(e):e;if(this.fsw.closed)return;let p=he.dirname(a.watchPath);if(this.fsw._getWatchedDir(p).add(a.watchPath),this.fsw._emit(vt.ADD,a.watchPath,c),l=await this._handleDir(p,c,r,o,e,a,d),this.fsw.closed)return;d!==void 0&&this.fsw._symlinkPaths.set(he.resolve(e),d)}else l=this._handleFile(a.watchPath,c,r);return i(),l&&this.fsw._addPathCloser(e,l),!1}catch(c){if(this.fsw._handleError(c))return i(),e}}};var Xa="/",B0="//",Ff=".",H0="..",W0="string",G0=/\\/g,Uf=/\/\//g,J0=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,K0=/^\.[/\\]/;function Zs(t){return Array.isArray(t)?t:[t]}var ec=t=>typeof t=="object"&&t!==null&&!(t instanceof RegExp);function Y0(t){return typeof t=="function"?t:typeof t=="string"?e=>t===e:t instanceof RegExp?e=>t.test(e):typeof t=="object"&&t!==null?e=>{if(t.path===e)return!0;if(t.recursive){let r=H.relative(t.path,e);return r?!r.startsWith("..")&&!H.isAbsolute(r):!1}return!1}:()=>!1}function Q0(t){if(typeof t!="string")throw new Error("string expected");t=H.normalize(t),t=t.replace(/\\/g,"/");let e=!1;return t.startsWith("//")&&(e=!0),t=t.replace(Uf,"/"),e&&(t="/"+t),t}function Af(t,e,r){let n=Q0(e);for(let o=0;o<t.length;o++){let s=t[o];if(s(n,r))return!0}return!1}function X0(t,e){if(t==null)throw new TypeError("anymatch: specify first argument");let n=Zs(t).map(o=>Y0(o));return e==null?(o,s)=>Af(n,o,s):Af(n,e)}var jf=t=>{let e=Zs(t).flat();if(!e.every(r=>typeof r===W0))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Vf)},Mf=t=>{let e=t.replace(G0,Xa),r=!1;return e.startsWith(B0)&&(r=!0),e=e.replace(Uf,Xa),r&&(e=Xa+e),e},Vf=t=>Mf(H.normalize(Mf(t))),Zf=(t="")=>e=>typeof e=="string"?Vf(H.isAbsolute(e)?e:H.join(t,e)):e,eS=(t,e)=>H.isAbsolute(t)?t:H.join(e,t),tS=Object.freeze(new Set),tc=class{path;_removeWatcher;items;constructor(e,r){this.path=e,this._removeWatcher=r,this.items=new Set}add(e){let{items:r}=this;r&&e!==Ff&&e!==H0&&r.add(e)}async remove(e){let{items:r}=this;if(!r||(r.delete(e),r.size>0))return;let n=this.path;try{await(0,Ls.readdir)(n)}catch{this._removeWatcher&&this._removeWatcher(H.dirname(n),H.basename(n))}}has(e){let{items:r}=this;if(r)return r.has(e)}getChildren(){let{items:e}=this;return e?[...e.values()]:[]}dispose(){this.items.clear(),this.path="",this._removeWatcher=js,this.items=tS,Object.freeze(this)}},rS="stat",nS="lstat",rc=class{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor(e,r,n){this.fsw=n;let o=e;this.path=e=e.replace(K0,""),this.watchPath=o,this.fullWatchPath=H.resolve(o),this.dirParts=[],this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=r,this.statMethod=r?rS:nS}entryPath(e){return H.join(this.watchPath,H.relative(this.watchPath,e.fullPath))}filterPath(e){let{stats:r}=e;if(r&&r.isSymbolicLink())return this.filterDir(e);let n=this.entryPath(e);return this.fsw._isntIgnored(n,r)&&this.fsw._hasReadPermissions(r)}filterDir(e){return this.fsw._isntIgnored(this.entryPath(e),e.stats)}},nc=class extends Lf.EventEmitter{closed;options;_closers;_ignoredPaths;_throttled;_streams;_symlinkPaths;_watched;_pendingWrites;_pendingUnlinks;_readyCount;_emitReady;_closePromise;_userIgnored;_readyEmitted;_emitRaw;_boundRemove;_nodeFsHandler;constructor(e={}){super(),this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let r=e.awaitWriteFinish,n={stabilityThreshold:2e3,pollInterval:100},o={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...e,ignored:e.ignored?Zs(e.ignored):Zs([]),awaitWriteFinish:r===!0?n:typeof r=="object"?{...n,...r}:!1};Df&&(o.usePolling=!0),o.atomic===void 0&&(o.atomic=!o.usePolling);let s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){let c=s.toLowerCase();c==="false"||c==="0"?o.usePolling=!1:c==="true"||c==="1"?o.usePolling=!0:o.usePolling=!!c}let i=process.env.CHOKIDAR_INTERVAL;i&&(o.interval=Number.parseInt(i,10));let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=js,this._readyEmitted=!0,process.nextTick(()=>this.emit(be.READY)))},this._emitRaw=(...c)=>this.emit(be.RAW,...c),this._boundRemove=this._remove.bind(this),this.options=o,this._nodeFsHandler=new As(this),Object.freeze(o)}_addIgnoredPath(e){if(ec(e)){for(let r of this._ignoredPaths)if(ec(r)&&r.path===e.path&&r.recursive===e.recursive)return}this._ignoredPaths.add(e)}_removeIgnoredPath(e){if(this._ignoredPaths.delete(e),typeof e=="string")for(let r of this._ignoredPaths)ec(r)&&r.path===e&&this._ignoredPaths.delete(r)}add(e,r,n){let{cwd:o}=this.options;this.closed=!1,this._closePromise=void 0;let s=jf(e);return o&&(s=s.map(i=>eS(i,o))),s.forEach(i=>{this._removeIgnoredPath(i)}),this._userIgnored=void 0,this._readyCount||(this._readyCount=0),this._readyCount+=s.length,Promise.all(s.map(async i=>{let a=await this._nodeFsHandler._addToNodeFs(i,!n,void 0,0,r);return a&&this._emitReady(),a})).then(i=>{this.closed||i.forEach(a=>{a&&this.add(H.dirname(a),H.basename(r||a))})}),this}unwatch(e){if(this.closed)return this;let r=jf(e),{cwd:n}=this.options;return r.forEach(o=>{!H.isAbsolute(o)&&!this._closers.has(o)&&(n&&(o=H.join(n,o)),o=H.resolve(o)),this._closePath(o),this._addIgnoredPath(o),this._watched.has(o)&&this._addIgnoredPath({path:o,recursive:!0}),this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let e=[];return this._closers.forEach(r=>r.forEach(n=>{let o=n();o instanceof Promise&&e.push(o)})),this._streams.forEach(r=>r.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(r=>r.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let e={};return this._watched.forEach((r,n)=>{let s=(this.options.cwd?H.relative(this.options.cwd,n):n)||Ff;e[s]=r.getChildren().sort()}),e}emitWithAll(e,r){this.emit(e,...r),e!==be.ERROR&&this.emit(be.ALL,e,...r)}async _emit(e,r,n){if(this.closed)return;let o=this.options;Qa&&(r=H.normalize(r)),o.cwd&&(r=H.relative(o.cwd,r));let s=[r];n!=null&&s.push(n);let i=o.awaitWriteFinish,a;if(i&&(a=this._pendingWrites.get(r)))return a.lastChange=new Date,this;if(o.atomic){if(e===be.UNLINK)return this._pendingUnlinks.set(r,[e,...s]),setTimeout(()=>{this._pendingUnlinks.forEach((c,u)=>{this.emit(...c),this.emit(be.ALL,...c),this._pendingUnlinks.delete(u)})},typeof o.atomic=="number"?o.atomic:100),this;e===be.ADD&&this._pendingUnlinks.has(r)&&(e=be.CHANGE,this._pendingUnlinks.delete(r))}if(i&&(e===be.ADD||e===be.CHANGE)&&this._readyEmitted){let c=(u,l)=>{u?(e=be.ERROR,s[0]=u,this.emitWithAll(e,s)):l&&(s.length>1?s[1]=l:s.push(l),this.emitWithAll(e,s))};return this._awaitWriteFinish(r,i.stabilityThreshold,e,c),this}if(e===be.CHANGE&&!this._throttle(be.CHANGE,r,50))return this;if(o.alwaysStat&&n===void 0&&(e===be.ADD||e===be.ADD_DIR||e===be.CHANGE)){let c=o.cwd?H.join(o.cwd,r):r,u;try{u=await(0,Ls.stat)(c)}catch{}if(!u||this.closed)return;s.push(u)}return this.emitWithAll(e,s),this}_handleError(e){let r=e&&e.code;return e&&r!=="ENOENT"&&r!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||r!=="EPERM"&&r!=="EACCES")&&this.emit(be.ERROR,e),e||this.closed}_throttle(e,r,n){this._throttled.has(e)||this._throttled.set(e,new Map);let o=this._throttled.get(e);if(!o)throw new Error("invalid throttle");let s=o.get(r);if(s)return s.count++,!1;let i,a=()=>{let u=o.get(r),l=u?u.count:0;return o.delete(r),clearTimeout(i),u&&clearTimeout(u.timeoutObject),l};i=setTimeout(a,n);let c={timeoutObject:i,clear:a,count:0};return o.set(r,c),c}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,r,n,o){let s=this.options.awaitWriteFinish;if(typeof s!="object")return;let i=s.pollInterval,a,c=e;this.options.cwd&&!H.isAbsolute(e)&&(c=H.join(this.options.cwd,e));let u=new Date,l=this._pendingWrites;function d(p){(0,qf.stat)(c,(m,f)=>{if(m||!l.has(e)){m&&m.code!=="ENOENT"&&o(m);return}let h=Number(new Date);p&&f.size!==p.size&&(l.get(e).lastChange=h);let g=l.get(e);h-g.lastChange>=r?(l.delete(e),o(void 0,f)):a=setTimeout(d,i,f)})}l.has(e)||(l.set(e,{lastChange:u,cancelWait:()=>(l.delete(e),clearTimeout(a),n)}),a=setTimeout(d,i))}_isIgnored(e,r){if(this.options.atomic&&J0.test(e))return!0;if(!this._userIgnored){let{cwd:n}=this.options,s=(this.options.ignored||[]).map(Zf(n)),a=[...[...this._ignoredPaths].map(Zf(n)),...s];this._userIgnored=X0(a,void 0)}return this._userIgnored(e,r)}_isntIgnored(e,r){return!this._isIgnored(e,r)}_getWatchHelpers(e){return new rc(e,this.options.followSymlinks,this)}_getWatchedDir(e){let r=H.resolve(e);return this._watched.has(r)||this._watched.set(r,new tc(r,this._boundRemove)),this._watched.get(r)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,r,n){let o=H.join(e,r),s=H.resolve(o);if(n=n??(this._watched.has(o)||this._watched.has(s)),!this._throttle("remove",o,100))return;!n&&this._watched.size===1&&this.add(e,r,!0),this._getWatchedDir(o).getChildren().forEach(p=>this._remove(o,p));let c=this._getWatchedDir(e),u=c.has(r);c.remove(r),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let l=o;if(this.options.cwd&&(l=H.relative(this.options.cwd,o)),this.options.awaitWriteFinish&&this._pendingWrites.has(l)&&this._pendingWrites.get(l).cancelWait()===be.ADD)return;this._watched.delete(o),this._watched.delete(s);let d=n?be.UNLINK_DIR:be.UNLINK;u&&!this._isIgnored(o)&&this._emit(d,o),this._closePath(o)}_closePath(e){this._closeFile(e);let r=H.dirname(e);this._getWatchedDir(r).remove(H.basename(e))}_closeFile(e){let r=this._closers.get(e);r&&(r.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,r){if(!r)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(r)}_readdirp(e,r){if(this.closed)return;let n={type:be.ALL,alwaysStat:!0,lstat:!0,...r,depth:0},o=Cf(e,n);return this._streams.add(o),o.once(Rf,()=>{o=void 0}),o.once(Ya,()=>{o&&(this._streams.delete(o),o=void 0)}),o}};function Bf(t,e={}){let r=new nc(e);return r.add(t),r}var Yc=gt(th()),po=class t{pino;context;constructor(e){this.context=e.context,this.pino=(0,Yc.default)({level:e.level},Yc.default.destination({dest:2,sync:!0}))}child(e){let r=new t({level:this.pino.level,format:"json",context:this.context?`${this.context}:${e}`:e});return r.pino=this.pino.child({context:e}),r}setLevel(e){this.pino.level=e}debug(e,r){this.pino.debug(r||{},e)}info(e,r){this.pino.info(r||{},e)}warn(e,r){this.pino.warn(r||{},e)}error(e,r,n){let o=n&&typeof n=="object"?n:{};this.pino.error({err:r,...o},e)}},fo=null;function Qc(t){return fo=new po(t),fo}function ne(){return fo||(fo=new po({level:"info",format:"text"})),fo}var Zz={failureThreshold:5,successThreshold:2,timeout:1e4,resetTimeout:6e4},si=class{state="CLOSED";failureCount=0;successCount=0;nextAttempt=Date.now();options;name;constructor(e,r={}){this.name=e,this.options={...Zz,...r}}getState(){return this.state}getStats(){return{state:this.state,failureCount:this.failureCount,successCount:this.successCount,nextAttempt:this.nextAttempt}}async execute(e){let r=ne();if(this.state==="OPEN"){if(Date.now()<this.nextAttempt){let n=new Error(`Circuit breaker '${this.name}' is OPEN. Next attempt at ${new Date(this.nextAttempt).toISOString()}`);throw r.warn("Circuit breaker is open",{name:this.name,nextAttempt:this.nextAttempt}),n}this.state="HALF_OPEN",this.successCount=0,r.info("Circuit breaker transitioning to HALF_OPEN",{name:this.name})}try{let n=await this.executeWithTimeout(e);return this.onSuccess(),n}catch(n){throw this.onFailure(),n}}async executeWithTimeout(e){return Promise.race([e(),new Promise((r,n)=>setTimeout(()=>n(new Error(`Operation timed out after ${this.options.timeout}ms`)),this.options.timeout))])}onSuccess(){let e=ne();this.failureCount=0,this.state==="HALF_OPEN"&&(this.successCount++,e.debug("Circuit breaker success in HALF_OPEN",{name:this.name,successCount:this.successCount,threshold:this.options.successThreshold}),this.successCount>=this.options.successThreshold&&(this.state="CLOSED",this.successCount=0,e.info("Circuit breaker closed",{name:this.name})))}onFailure(){let e=ne();this.failureCount++,e.debug("Circuit breaker failure",{name:this.name,failureCount:this.failureCount,threshold:this.options.failureThreshold,state:this.state}),(this.state==="HALF_OPEN"||this.failureCount>=this.options.failureThreshold)&&(this.state="OPEN",this.nextAttempt=Date.now()+this.options.resetTimeout,e.warn("Circuit breaker opened",{name:this.name,failureCount:this.failureCount,nextAttempt:this.nextAttempt}))}reset(){let e=ne();this.state="CLOSED",this.failureCount=0,this.successCount=0,this.nextAttempt=Date.now(),e.info("Circuit breaker manually reset",{name:this.name})}},ii=class{breakers=new Map;get(e,r){return this.breakers.has(e)||this.breakers.set(e,new si(e,r)),this.breakers.get(e)}getAll(){return new Map(this.breakers)}resetAll(){this.breakers.forEach(e=>{e.reset()})}getAllStats(){let e={};return this.breakers.forEach((r,n)=>{e[n]=r.getStats()}),e}},Lz=new ii;var ai=class{filePath;watchForChanges;reloadDebounce;watcher;reloadTimer;onReloadCallback;onErrorCallback;currentData;constructor(e){this.filePath=rh.resolve(e.path),this.watchForChanges=e.watchForChanges,this.reloadDebounce=e.reloadDebounce,this.onReloadCallback=e.onReload,this.onErrorCallback=e.onError}async load(){try{if(!mo.existsSync(this.filePath))return{success:!1,error:`Documentation file not found: ${this.filePath}`};let e;if(this.filePath.endsWith(".gz")){let o=await mo.promises.readFile(this.filePath);e=(0,nh.gunzipSync)(o).toString("utf-8")}else e=await mo.promises.readFile(this.filePath,"utf-8");let r;try{r=JSON.parse(e)}catch(o){return{success:!1,error:`Failed to parse JSON: ${o instanceof Error?o.message:String(o)}`}}let n=this.validateStructure(r);return n?{success:!1,error:n}:(this.currentData=r,this.watchForChanges&&!this.watcher&&this.startMonitoring(),{success:!0,data:r})}catch(e){return{success:!1,error:`Failed to load documentation: ${e instanceof Error?e.message:String(e)}`}}}startMonitoring(){!this.watchForChanges||this.watcher||this.startWatching()}async stopMonitoring(){this.reloadTimer&&(clearTimeout(this.reloadTimer),this.reloadTimer=void 0),this.watcher&&(await this.watcher.close(),this.watcher=void 0,ne().info("Stopped watching documentation file"))}getCurrentData(){return this.currentData}async dispose(){await this.stopMonitoring(),this.currentData=void 0,this.onReloadCallback=void 0,this.onErrorCallback=void 0}validateStructure(e){if(!e||typeof e!="object")return"Documentation must be an object";let r=e,n=["pipes","components","directives","injectables","interfaces","classes","modules"];for(let o of n){let s=r[o];if(s!==void 0&&!Array.isArray(s))return`${o} must be an array`}return null}startWatching(){this.watcher||(this.watcher=Bf(this.filePath,{persistent:!0,ignoreInitial:!0}),this.watcher.on("change",()=>{this.scheduleReload()}),this.watcher.on("error",e=>{let r=e instanceof Error?e:new Error(String(e));ne().error("File watcher error",r),this.onErrorCallback&&this.onErrorCallback(r)}),ne().info(`Watching for changes: ${this.filePath}`))}scheduleReload(){this.reloadTimer&&clearTimeout(this.reloadTimer),this.reloadTimer=setTimeout(()=>{this.reload()},this.reloadDebounce)}async reload(){ne().info("Reloading documentation...");let e=await this.load();e.success&&e.data?(ne().info("Documentation reloaded successfully"),this.onReloadCallback&&this.onReloadCallback(e.data)):(ne().error("Failed to reload documentation",new Error(e.error)),this.onErrorCallback&&this.onErrorCallback(new Error(e.error)))}};var mn=class{options;constructor(e){this.options=e}async fetch(e,r){let n;for(let o=0;o<=this.options.maxRetries;o++)try{let s=await this.fetchOnce(e,r);if(!this.isRetryableError(void 0,s.status)||o>=this.options.maxRetries)return s;let i=this.calculateBackoff(o);await this.sleep(i)}catch(s){if(n=s instanceof Error?s:new Error(String(s)),o<this.options.maxRetries&&this.isRetryableError(n)){let i=this.calculateBackoff(o);await this.sleep(i);continue}throw n}throw n||new Error("Unknown error during fetch")}async fetchOnce(e,r){let n=new AbortController,o=setTimeout(()=>n.abort(),this.options.timeout);try{let s={Accept:"application/json","User-Agent":this.options.userAgent||"DocumentationLoader/1.0"};r&&r.forEach((u,l)=>{s[l]=u});let i=await fetch(e,{signal:n.signal,headers:s});clearTimeout(o);let a=new Map;i.headers.forEach((u,l)=>{a.set(l,u)});let c=await i.text();return{status:i.status,statusText:i.statusText,data:c,headers:a}}catch(s){throw clearTimeout(o),s instanceof Error&&s.name==="AbortError"?new Error(`Request timeout after ${this.options.timeout}ms`):s}}isRetryableError(e,r){if(r!==void 0){if(r>=200&&r<400)return!1;if(r>=500||r===408||r===429)return!0;if(r>=400&&r<500)return!1}if(e){let n=e.message.toLowerCase();if(n.includes("timeout")||n.includes("network")||n.includes("econnrefused")||n.includes("enotfound")||n.includes("econnreset"))return!0}return!0}calculateBackoff(e){return this.options.retryDelay*Math.pow(2,e)}sleep(e){return new Promise(r=>setTimeout(r,e))}};var ci=class{cache;constructor(){this.cache=new Map}set(e,r,n){let o={data:r,timestamp:Date.now()},s=this.getHeaderCaseInsensitive(n,"etag");s&&(o.etag=s);let i=this.getHeaderCaseInsensitive(n,"last-modified");i&&(o.lastModified=i),this.cache.set(e,o)}get(e){return this.cache.get(e)}getConditionalHeaders(e){let r=new Map,n=this.cache.get(e);return n&&(n.etag&&r.set("If-None-Match",n.etag),n.lastModified&&r.set("If-Modified-Since",n.lastModified)),r}clear(e){this.cache.delete(e)}clearAll(){this.cache.clear()}getHeaderCaseInsensitive(e,r){let n=r.toLowerCase();for(let[o,s]of e.entries())if(o.toLowerCase()===n)return s}};var Xc=class t extends Error{constructor(r,n,o){super(r);this.url=n;this.cause=o;this.name="NetworkError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}url;cause};var ho=class t extends Xc{constructor(r,n,o,s){super(r,n);this.statusCode=o;this.statusText=s;this.name="HttpError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}statusCode;statusText},go=class t extends Error{constructor(r,n){super(r);this.content=n;this.name="ParseError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}content};var ui=class{url;httpClient;cacheManager;pollingTimer;currentData;pollingInterval;onReloadCallback;onErrorCallback;constructor(e){this.url=e.url,this.pollingInterval=e.pollingInterval,this.onReloadCallback=e.onReload,this.onErrorCallback=e.onError;let r={timeout:e.timeout,maxRetries:e.maxRetries,retryDelay:1e3,userAgent:"DocumentationLoader/1.0"};this.httpClient=new mn(r),this.cacheManager=new ci}async load(){return this.fetchDocumentation()}startMonitoring(){this.pollingTimer||(this.pollingTimer=setInterval(()=>{this.poll()},this.pollingInterval),ne().info(`Started polling ${this.url} every ${this.pollingInterval}ms`))}async stopMonitoring(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=void 0,ne().info(`Stopped polling ${this.url}`))}getCurrentData(){return this.currentData}async dispose(){await this.stopMonitoring(),this.cacheManager.clear(this.url),this.currentData=void 0,this.onReloadCallback=void 0,this.onErrorCallback=void 0}async poll(){try{ne().debug(`Polling ${this.url} for updates...`);let e=this.cacheManager.getConditionalHeaders(this.url),r=await this.httpClient.fetch(this.url,e);if(r.status===304){ne().debug("No changes detected (304 Not Modified)");return}if(r.status===200){let n=this.parseJson(r.data),o=this.validateStructure(n);if(o)throw new go(o,r.data);this.cacheManager.set(this.url,n,r.headers),this.currentData=n,ne().info(`Documentation updated from ${this.url}`),this.onReloadCallback&&this.onReloadCallback(n);return}throw new ho(`HTTP ${r.status}: ${r.statusText}`,this.url,r.status,r.statusText)}catch(e){let r=e instanceof Error?e.message:String(e);ne().error(`Polling error for ${this.url}`,e instanceof Error?e:new Error(r)),this.onErrorCallback&&this.onErrorCallback(e instanceof Error?e:new Error(r))}}async fetchDocumentation(){try{let e=this.cacheManager.get(this.url),r=e?this.cacheManager.getConditionalHeaders(this.url):void 0,n=await this.httpClient.fetch(this.url,r);if(n.status===304&&e)return ne().debug("Using cached documentation (304 Not Modified)"),this.currentData=e.data,{success:!0,data:e.data};if(n.status!==200)return{success:!1,error:`${new ho(`HTTP ${n.status}: ${n.statusText}`,this.url,n.status,n.statusText).message} (URL: ${this.url})`};let o=this.parseJson(n.data),s=this.validateStructure(o);return s?{success:!1,error:s}:(this.cacheManager.set(this.url,o,n.headers),this.currentData=o,{success:!0,data:o})}catch(e){let r=e instanceof Error?e.message:String(e);return{success:!1,error:`Failed to fetch documentation from ${this.url}: ${r}`}}}parseJson(e){try{return JSON.parse(e)}catch(r){let n=r instanceof Error?r.message:String(r);throw new go(`Failed to parse JSON: ${n}`,e)}}validateStructure(e){if(!e||typeof e!="object")return"Documentation must be an object";let r=e,n=["pipes","components","directives","injectables","interfaces","classes","modules"];for(let o of n){let s=r[o];if(s!==void 0&&!Array.isArray(s))return`${o} must be an array`}return null}};var yo=class{source;constructor(e){this.source=this.createSource(e)}async load(){let e=await this.source.load();return e.success&&this.source.startMonitoring(),e}getCurrentData(){return this.source.getCurrentData()}async stopWatching(){await this.source.stopMonitoring()}async dispose(){await this.source.dispose()}createSource(e){let r=er.detect(e.path);return r.type==="local"?new ai({path:r.normalizedPath,watchForChanges:e.watchForChanges??!0,reloadDebounce:e.reloadDebounce??1e3,onReload:e.onReload,onError:e.onError}):new ui({url:r.normalizedPath,timeout:e.timeout??1e4,maxRetries:e.maxRetries??3,pollingInterval:e.pollingInterval??6e4,onReload:e.onReload,onError:e.onError})}};var _o=class{build(e){let r={byName:new Map,bySelector:new Map,searchIndex:new Map,components:[],directives:[],pipes:[],services:[],lastUpdated:new Date,totalCount:0},n=new Map;if(e.components)for(let o of e.components){if(n.has(o.name))throw new Error(`Duplicate name detected: "${o.name}" exists as both ${n.get(o.name)} and component. All component, directive, pipe, and service names must be unique across the entire documentation.`);n.set(o.name,"component"),this.indexComponent(o,r)}if(e.directives)for(let o of e.directives){if(n.has(o.name))throw new Error(`Duplicate name detected: "${o.name}" exists as both ${n.get(o.name)} and directive. All component, directive, pipe, and service names must be unique across the entire documentation.`);n.set(o.name,"directive"),this.indexDirective(o,r)}if(e.pipes)for(let o of e.pipes){if(n.has(o.name))throw new Error(`Duplicate name detected: "${o.name}" exists as both ${n.get(o.name)} and pipe. All component, directive, pipe, and service names must be unique across the entire documentation.`);n.set(o.name,"pipe"),this.indexPipe(o,r)}if(e.injectables)for(let o of e.injectables){if(n.has(o.name))throw new Error(`Duplicate name detected: "${o.name}" exists as both ${n.get(o.name)} and injectable. All component, directive, pipe, and service names must be unique across the entire documentation.`);n.set(o.name,"injectable"),this.indexInjectable(o,r)}return r.totalCount=r.components.length+r.directives.length+r.pipes.length+r.services.length,r}indexComponent(e,r){r.components.push(e),r.byName.set(e.name,e),e.selector&&r.bySelector.set(e.selector,e),this.addToSearchIndex(e,r)}indexDirective(e,r){r.directives.push(e),r.byName.set(e.name,e),e.selector&&r.bySelector.set(e.selector,e),this.addToSearchIndex(e,r)}indexPipe(e,r){r.pipes.push(e),r.byName.set(e.name,e),this.addToSearchIndex(e,r)}indexInjectable(e,r){r.services.push(e),r.byName.set(e.name,e),this.addToSearchIndex(e,r)}addToSearchIndex(e,r){let n=new Set;if(this.extractWords(e.name,n),"selector"in e&&e.selector&&this.extractWords(e.selector,n),e.description&&this.extractWords(e.description,n),"inputs"in e&&e.inputs)for(let o of e.inputs)this.extractWords(o.name,n),o.description&&this.extractWords(o.description,n);if("outputs"in e&&e.outputs)for(let o of e.outputs)this.extractWords(o.name,n),o.description&&this.extractWords(o.description,n);if("methods"in e&&e.methods)for(let o of e.methods)this.extractWords(o.name,n);for(let o of n)r.searchIndex.has(o)||r.searchIndex.set(o,new Set),r.searchIndex.get(o).add(e.name)}extractWords(e,r){let n=e.toLowerCase(),o=n.split(/[^a-z0-9]+/).filter(s=>s.length>0);for(let s of o)r.add(s);o.length===0&&e.trim().length>0&&r.add(n.trim())}getStatistics(e){return{totalCount:e.totalCount,componentCount:e.components.length,directiveCount:e.directives.length,pipeCount:e.pipes.length,serviceCount:e.services.length,lastUpdated:e.lastUpdated}}rebuild(e,r){return this.build(e)}};var oh;function v(t,e,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,c);let u=i.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let p=l[d];p in a||(a[p]=u[p].bind(a))}}let o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:t});function i(a){var c;let u=r?.Parent?new s:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(i,"name",{value:t}),i}var Ot=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},hn=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(oh=globalThis).__zod_globalConfig??(oh.__zod_globalConfig={});var gn=globalThis.__zod_globalConfig;function tt(t){return t&&Object.assign(gn,t),gn}var Y={};df(Y,{BIGINT_FORMAT_RANGES:()=>ch,Class:()=>tu,NUMBER_FORMAT_RANGES:()=>au,aborted:()=>or,allowsEval:()=>ou,assert:()=>Wz,assertEqual:()=>Uz,assertIs:()=>Bz,assertNever:()=>Hz,assertNotEqual:()=>Vz,assignProp:()=>rr,base64ToUint8Array:()=>lh,base64urlToUint8Array:()=>lP,cached:()=>_n,captureStackTrace:()=>fi,cleanEnum:()=>uP,cleanRegex:()=>xo,clone:()=>St,cloneDef:()=>Jz,createTransparentProxy:()=>tP,defineLazy:()=>oe,esc:()=>di,escapeRegex:()=>Ut,explicitlyAborted:()=>cu,extend:()=>oP,finalizeIssue:()=>ct,floatSafeRemainder:()=>ru,getElementAtPath:()=>Kz,getEnumValues:()=>bo,getLengthableOrigin:()=>So,getParsedType:()=>eP,getSizableOrigin:()=>uh,hexToUint8Array:()=>fP,isObject:()=>Lr,isPlainObject:()=>nr,issue:()=>vn,joinValues:()=>li,jsonStringifyReplacer:()=>yn,merge:()=>iP,mergeDefs:()=>Ft,normalizeParams:()=>R,nullish:()=>wo,numKeys:()=>Xz,objectClone:()=>Gz,omit:()=>nP,optionalKeys:()=>iu,parsedType:()=>uu,partial:()=>aP,pick:()=>rP,prefixIssues:()=>Vt,primitiveTypes:()=>ah,promiseAllObject:()=>Yz,propertyKeyTypes:()=>su,randomString:()=>Qz,required:()=>cP,safeExtend:()=>sP,shallowClone:()=>ih,slugify:()=>nu,stringifyPrimitive:()=>pi,uint8ArrayToBase64:()=>dh,uint8ArrayToBase64url:()=>dP,uint8ArrayToHex:()=>pP,unwrapMessage:()=>vo});function Uz(t){return t}function Vz(t){return t}function Bz(t){}function Hz(t){throw new Error("Unexpected value in exhaustive check")}function Wz(t){}function bo(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,o])=>e.indexOf(+n)===-1).map(([n,o])=>o)}function li(t,e="|"){return t.map(r=>pi(r)).join(e)}function yn(t,e){return typeof e=="bigint"?e.toString():e}function _n(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function wo(t){return t==null}function xo(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function ru(t,e){let r=t/e,n=Math.round(r),o=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var sh=Symbol("evaluating");function oe(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==sh)return n===void 0&&(n=sh,n=r()),n},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}function Gz(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function rr(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ft(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function Jz(t){return Ft(t._zod.def)}function Kz(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function Yz(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let o={};for(let s=0;s<e.length;s++)o[e[s]]=n[s];return o})}function Qz(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function di(t){return JSON.stringify(t)}function nu(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var fi="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Lr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var ou=_n(()=>{if(gn.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function nr(t){if(Lr(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Lr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function ih(t){return nr(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Xz(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var eP=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}`)}},su=new Set(["string","number","symbol"]),ah=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ut(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function St(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function R(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 tP(t){let e;return new Proxy({},{get(r,n,o){return e??(e=t()),Reflect.get(e,n,o)},set(r,n,o,s){return e??(e=t()),Reflect.set(e,n,o,s)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,o){return e??(e=t()),Reflect.defineProperty(e,n,o)}})}function pi(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function iu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var au={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]},ch={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function rP(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let s=Ft(t._zod.def,{get shape(){let i={};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(i[a]=r.shape[a])}return rr(this,"shape",i),i},checks:[]});return St(t,s)}function nP(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let s=Ft(t._zod.def,{get shape(){let i={...t._zod.def.shape};for(let a in e){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete i[a]}return rr(this,"shape",i),i},checks:[]});return St(t,s)}function oP(t,e){if(!nr(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let s=t._zod.def.shape;for(let i in e)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=Ft(t._zod.def,{get shape(){let s={...t._zod.def.shape,...e};return rr(this,"shape",s),s}});return St(t,o)}function sP(t,e){if(!nr(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Ft(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return rr(this,"shape",n),n}});return St(t,r)}function iP(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Ft(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return rr(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return St(t,r)}function aP(t,e,r){let o=e._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let i=Ft(e._zod.def,{get shape(){let a=e._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=t?new t({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=t?new t({type:"optional",innerType:a[u]}):a[u];return rr(this,"shape",c),c},checks:[]});return St(e,i)}function cP(t,e,r){let n=Ft(e._zod.def,{get shape(){let o=e._zod.def.shape,s={...o};if(r)for(let i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new t({type:"nonoptional",innerType:o[i]}))}else for(let i in o)s[i]=new t({type:"nonoptional",innerType:o[i]});return rr(this,"shape",s),s}});return St(e,n)}function or(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 cu(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function Vt(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function vo(t){return typeof t=="string"?t:t?.message}function ct(t,e,r){let n=t.message?t.message:vo(t.inst?._zod.def?.error?.(t))??vo(e?.error?.(t))??vo(r.customError?.(t))??vo(r.localeError?.(t))??"Invalid input",{inst:o,continue:s,input:i,...a}=t;return a.path??(a.path=[]),a.message=n,e?.reportInput&&(a.input=i),a}function uh(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function So(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function uu(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function vn(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function uP(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function lh(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function dh(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function lP(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return lh(e+r)}function dP(t){return dh(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function fP(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 n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function pP(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var tu=class{constructor(...e){}};var fh=(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,yn,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},mi=v("$ZodError",fh),lu=v("$ZodError",fh,{Parent:Error});function ph(t,e=r=>r.message){let r={},n=[];for(let o of t.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(e(o))):n.push(e(o));return{formErrors:n,fieldErrors:r}}function mh(t,e=r=>r.message){let r={_errors:[]},n=(o,s=[])=>{for(let i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>n({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")n({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")n({issues:i.issues},[...s,...i.path]);else{let a=[...s,...i.path];if(a.length===0)r._errors.push(e(i));else{let c=r,u=0;for(;u<a.length;){let l=a[u];u===a.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(e(i))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}}};return n(t),r}var hi=t=>(e,r,n,o)=>{let s=n?{...n,async:!1}:{async:!1},i=e._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new Ot;if(i.issues.length){let a=new(o?.Err??t)(i.issues.map(c=>ct(c,s,tt())));throw fi(a,o?.callee),a}return i.value};var gi=t=>async(e,r,n,o)=>{let s=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){let a=new(o?.Err??t)(i.issues.map(c=>ct(c,s,tt())));throw fi(a,o?.callee),a}return i.value};var $o=t=>(e,r,n)=>{let o=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Ot;return s.issues.length?{success:!1,error:new(t??mi)(s.issues.map(i=>ct(i,o,tt())))}:{success:!0,data:s.value}},ko=$o(lu),Eo=t=>async(e,r,n)=>{let o=n?{...n,async:!0}:{async:!0},s=e._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(i=>ct(i,o,tt())))}:{success:!0,data:s.value}},yi=Eo(lu),hh=t=>(e,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return hi(t)(e,r,o)};var gh=t=>(e,r,n)=>hi(t)(e,r,n);var yh=t=>async(e,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return gi(t)(e,r,o)};var _h=t=>async(e,r,n)=>gi(t)(e,r,n);var vh=t=>(e,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return $o(t)(e,r,o)};var bh=t=>(e,r,n)=>$o(t)(e,r,n);var wh=t=>async(e,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Eo(t)(e,r,o)};var xh=t=>async(e,r,n)=>Eo(t)(e,r,n);var Sh=/^[cC][0-9a-z]{6,}$/,$h=/^[0-9a-z]+$/,kh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Eh=/^[0-9a-vA-V]{20}$/,zh=/^[A-Za-z0-9]{27}$/,Ph=/^[a-zA-Z0-9_-]{21}$/,Th=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Ch=/^([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})$/,du=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)$/;var Oh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var hP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ih(){return new RegExp(hP,"u")}var Rh=/^(?:(?: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])$/,Dh=/^(([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}|:))$/;var Nh=/^((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])$/,Ah=/^(([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])$/,jh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fu=/^[A-Za-z0-9_-]*$/;var Mh=/^https?$/,Zh=/^\+[1-9]\d{6,14}$/,Lh="(?:(?:\\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])))",qh=new RegExp(`^${Lh}$`);function Fh(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 Uh(t){return new RegExp(`^${Fh(t)}$`)}function Vh(t){let e=Fh({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${Lh}T(?:${n})$`)}var Bh=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)};var Hh=/^-?\d+$/,pu=/^-?\d+(?:\.\d+)?$/,Wh=/^(?:true|false)$/i,Gh=/^null$/i;var Jh=/^[^A-Z]*$/,Kh=/^[^a-z]*$/;var Pe=v("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Yh={number:"number",bigint:"bigint",object:"date"},mu=v("$ZodCheckLessThan",(t,e)=>{Pe.init(t,e);let r=Yh[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,s=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<s&&(e.inclusive?o.maximum=e.value:o.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),hu=v("$ZodCheckGreaterThan",(t,e)=>{Pe.init(t,e);let r=Yh[typeof e.value];t._zod.onattach.push(n=>{let o=n._zod.bag,s=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Qh=v("$ZodCheckMultipleOf",(t,e)=>{Pe.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.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):ru(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})}}),Xh=v("$ZodCheckNumberFormat",(t,e)=>{Pe.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[o,s]=au[e.format];t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,a.minimum=o,a.maximum=s,r&&(a.pattern=Hh)}),t._zod.check=i=>{let a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!e.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:t,continue:!e.abort})}});var eg=v("$ZodCheckMaxLength",(t,e)=>{var r;Pe.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!wo(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let o=n.value;if(o.length<=e.maximum)return;let i=So(o);n.issues.push({origin:i,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),tg=v("$ZodCheckMinLength",(t,e)=>{var r;Pe.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!wo(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let o=n.value;if(o.length>=e.minimum)return;let i=So(o);n.issues.push({origin:i,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),rg=v("$ZodCheckLengthEquals",(t,e)=>{var r;Pe.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!wo(o)&&o.length!==void 0}),t._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),t._zod.check=n=>{let o=n.value,s=o.length;if(s===e.length)return;let i=So(o),a=s>e.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),zo=v("$ZodCheckStringFormat",(t,e)=>{var r,n;Pe.init(t,e),t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),ng=v("$ZodCheckRegex",(t,e)=>{zo.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})}}),og=v("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Jh),zo.init(t,e)}),sg=v("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Kh),zo.init(t,e)}),ig=v("$ZodCheckIncludes",(t,e)=>{Pe.init(t,e);let r=Ut(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(o=>{let s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:t,continue:!e.abort})}}),ag=v("$ZodCheckStartsWith",(t,e)=>{Pe.init(t,e);let r=new RegExp(`^${Ut(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),cg=v("$ZodCheckEndsWith",(t,e)=>{Pe.init(t,e);let r=new RegExp(`.*${Ut(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});var ug=v("$ZodCheckOverwrite",(t,e)=>{Pe.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var vi=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 n=e.split(`
90
- `).filter(i=>i),o=Math.min(...n.map(i=>i.length-i.trimStart().length)),s=n.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(let i of s)this.content.push(i)}compile(){let e=Function,r=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new e(...r,o.join(`
91
- `))}};var dg={major:4,minor:4,patch:3};var le=v("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=dg;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let o of n)for(let s of o._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let o=(i,a,c)=>{let u=or(i),l;for(let d of a){if(d._zod.def.when){if(cu(i)||!d._zod.def.when(i))continue}else if(u)continue;let p=i.issues.length,m=d._zod.check(i);if(m instanceof Promise&&c?.async===!1)throw new Ot;if(l||m instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await m,i.issues.length!==p&&(u||(u=or(i,p)))});else{if(i.issues.length===p)continue;u||(u=or(i,p))}}return l?l.then(()=>i):i},s=(i,a,c)=>{if(or(i))return i.aborted=!0,i;let u=o(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new Ot;return u.then(l=>t._zod.parse(l,c))}return t._zod.parse(u,c)};t._zod.run=(i,a)=>{if(a.skipChecks)return t._zod.parse(i,a);if(a.direction==="backward"){let u=t._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>s(l,i,a)):s(u,i,a)}let c=t._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Ot;return c.then(u=>o(u,n,a))}return o(c,n,a)}}oe(t,"~standard",()=>({validate:o=>{try{let s=ko(t,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return yi(t,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),xi=v("$ZodString",(t,e)=>{le.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Bh(t._zod.bag),t._zod.parse=(r,n)=>{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}}),de=v("$ZodStringFormat",(t,e)=>{zo.init(t,e),xi.init(t,e)}),bg=v("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Ch),de.init(t,e)}),wg=v("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=du(n))}else e.pattern??(e.pattern=du());de.init(t,e)}),xg=v("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Oh),de.init(t,e)}),Sg=v("$ZodURL",(t,e)=>{de.init(t,e),t._zod.check=r=>{try{let n=r.value.trim();if(!e.normalize&&e.protocol?.source===Mh.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:t,continue:!e.abort});return}let o=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.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=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),$g=v("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Ih()),de.init(t,e)}),kg=v("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Ph),de.init(t,e)}),Eg=v("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Sh),de.init(t,e)}),zg=v("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=$h),de.init(t,e)}),Pg=v("$ZodULID",(t,e)=>{e.pattern??(e.pattern=kh),de.init(t,e)}),Tg=v("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Eh),de.init(t,e)}),Cg=v("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=zh),de.init(t,e)}),Og=v("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Vh(e)),de.init(t,e)}),Ig=v("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=qh),de.init(t,e)}),Rg=v("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Uh(e)),de.init(t,e)}),Dg=v("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Th),de.init(t,e)}),Ng=v("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Rh),de.init(t,e),t._zod.bag.format="ipv4"}),Ag=v("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Dh),de.init(t,e),t._zod.bag.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})}}});var jg=v("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Nh),de.init(t,e)}),Mg=v("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Ah),de.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[o,s]=n;if(!s)throw new Error;let i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function Zg(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Lg=v("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=jh),de.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{Zg(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function _P(t){if(!fu.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Zg(r)}var qg=v("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=fu),de.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{_P(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Fg=v("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Zh),de.init(t,e)});function vP(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||e&&(!("alg"in o)||o.alg!==e))}catch{return!1}}var Ug=v("$ZodJWT",(t,e)=>{de.init(t,e),t._zod.check=r=>{vP(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});var yu=v("$ZodNumber",(t,e)=>{le.init(t,e),t._zod.pattern=t._zod.bag.pattern??pu,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...s?{received:s}:{}}),r}}),Vg=v("$ZodNumberFormat",(t,e)=>{Xh.init(t,e),yu.init(t,e)}),Bg=v("$ZodBoolean",(t,e)=>{le.init(t,e),t._zod.pattern=Wh,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),r}});var Hg=v("$ZodNull",(t,e)=>{le.init(t,e),t._zod.pattern=Gh,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:t}),r}});var Wg=v("$ZodUnknown",(t,e)=>{le.init(t,e),t._zod.parse=r=>r}),Gg=v("$ZodNever",(t,e)=>{le.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)});function fg(t,e,r){t.issues.length&&e.issues.push(...Vt(r,t.issues)),e.value[r]=t.value}var Jg=v("$ZodArray",(t,e)=>{le.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),r;r.value=Array(o.length);let s=[];for(let i=0;i<o.length;i++){let a=o[i],c=e.element._zod.run({value:a,issues:[]},n);c instanceof Promise?s.push(c.then(u=>fg(u,r,i))):fg(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function wi(t,e,r,n,o,s){let i=r in n;if(t.issues.length){if(o&&s&&!i)return;e.issues.push(...Vt(r,t.issues))}if(!i&&!o){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}t.value===void 0?i&&(e.value[r]=void 0):e.value[r]=t.value}function Kg(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=iu(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function Yg(t,e,r,n,o,s){let i=[],a=o.keySet,c=o.catchall._zod,u=c.def.type,l=c.optin==="optional",d=c.optout==="optional";for(let p in e){if(p==="__proto__"||a.has(p))continue;if(u==="never"){i.push(p);continue}let m=c.run({value:e[p],issues:[]},n);m instanceof Promise?t.push(m.then(f=>wi(f,r,p,e,l,d))):wi(m,r,p,e,l,d)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:e,inst:s}),t.length?Promise.all(t).then(()=>r):r}var bP=v("$ZodObject",(t,e)=>{if(le.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 n=_n(()=>Kg(e));oe(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 o=Lr,s=e.catchall,i;t._zod.parse=(a,c)=>{i??(i=n.value);let u=a.value;if(!o(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),a;a.value={};let l=[],d=i.shape;for(let p of i.keys){let m=d[p],f=m._zod.optin==="optional",h=m._zod.optout==="optional",g=m._zod.run({value:u[p],issues:[]},c);g instanceof Promise?l.push(g.then(_=>wi(_,a,p,u,f,h))):wi(g,a,p,u,f,h)}return s?Yg(l,u,a,c,n.value,t):l.length?Promise.all(l).then(()=>a):a}}),Qg=v("$ZodObjectJIT",(t,e)=>{bP.init(t,e);let r=t._zod.parse,n=_n(()=>Kg(e)),o=p=>{let m=new vi(["shape","payload","ctx"]),f=n.value,h=w=>{let S=di(w);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};m.write("const input = payload.value;");let g=Object.create(null),_=0;for(let w of f.keys)g[w]=`key_${_++}`;m.write("const newResult = {};");for(let w of f.keys){let S=g[w],k=di(w),W=p[w],Z=W?._zod?.optin==="optional",re=W?._zod?.optout==="optional";m.write(`const ${S} = ${h(w)};`),Z&&re?m.write(`
92
- if (${S}.issues.length) {
93
- if (${k} in input) {
94
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
95
- ...iss,
96
- path: iss.path ? [${k}, ...iss.path] : [${k}]
97
- })));
98
- }
99
- }
100
-
101
- if (${S}.value === undefined) {
102
- if (${k} in input) {
103
- newResult[${k}] = undefined;
104
- }
105
- } else {
106
- newResult[${k}] = ${S}.value;
107
- }
108
-
109
- `):Z?m.write(`
110
- if (${S}.issues.length) {
111
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
112
- ...iss,
113
- path: iss.path ? [${k}, ...iss.path] : [${k}]
114
- })));
115
- }
116
-
117
- if (${S}.value === undefined) {
118
- if (${k} in input) {
119
- newResult[${k}] = undefined;
120
- }
121
- } else {
122
- newResult[${k}] = ${S}.value;
123
- }
124
-
125
- `):m.write(`
126
- const ${S}_present = ${k} in input;
127
- if (${S}.issues.length) {
128
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
129
- ...iss,
130
- path: iss.path ? [${k}, ...iss.path] : [${k}]
131
- })));
132
- }
133
- if (!${S}_present && !${S}.issues.length) {
134
- payload.issues.push({
135
- code: "invalid_type",
136
- expected: "nonoptional",
137
- input: undefined,
138
- path: [${k}]
139
- });
140
- }
141
-
142
- if (${S}_present) {
143
- if (${S}.value === undefined) {
144
- newResult[${k}] = undefined;
145
- } else {
146
- newResult[${k}] = ${S}.value;
147
- }
148
- }
149
-
150
- `)}m.write("payload.value = newResult;"),m.write("return payload;");let x=m.compile();return(w,S)=>x(p,w,S)},s,i=Lr,a=!gn.jitless,u=a&&ou.value,l=e.catchall,d;t._zod.parse=(p,m)=>{d??(d=n.value);let f=p.value;return i(f)?a&&u&&m?.async===!1&&m.jitless!==!0?(s||(s=o(e.shape)),p=s(p,m),l?Yg([],f,p,m,d,t):p):r(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),p)}});function pg(t,e,r,n){for(let s of t)if(s.issues.length===0)return e.value=s.value,e;let o=t.filter(s=>!or(s));return o.length===1?(e.value=o[0].value,o[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(i=>ct(i,n,tt())))}),e)}var _u=v("$ZodUnion",(t,e)=>{le.init(t,e),oe(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),oe(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),oe(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),oe(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=>xo(o.source)).join("|")})$`)}});let r=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(n,o)=>{if(r)return r(n,o);let s=!1,i=[];for(let a of e.options){let c=a._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)i.push(c),s=!0;else{if(c.issues.length===0)return c;i.push(c)}}return s?Promise.all(i).then(a=>pg(a,n,t,o)):pg(i,n,t,o)}});var Xg=v("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,_u.init(t,e);let r=t._zod.parse;oe(t._zod,"propValues",()=>{let o={};for(let s of e.options){let i=s._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let[a,c]of Object.entries(i)){o[a]||(o[a]=new Set);for(let u of c)o[a].add(u)}}return o});let n=_n(()=>{let o=e.options,s=new Map;for(let i of o){let a=i._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let c of a){if(s.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);s.set(c,i)}}return s});t._zod.parse=(o,s)=>{let i=o.value;if(!Lr(i))return o.issues.push({code:"invalid_type",expected:"object",input:i,inst:t}),o;let a=n.value.get(i?.[e.discriminator]);return a?a._zod.run(o,s):e.unionFallback||s.direction==="backward"?r(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(n.value.keys()),input:i,path:[e.discriminator],inst:t}),o)}}),ey=v("$ZodIntersection",(t,e)=>{le.init(t,e),t._zod.parse=(r,n)=>{let o=r.value,s=e.left._zod.run({value:o,issues:[]},n),i=e.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,u])=>mg(r,c,u)):mg(r,s,i)}});function gu(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(nr(t)&&nr(e)){let r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),o={...t,...e};for(let s of n){let i=gu(t[s],e[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let o=t[n],s=e[n],i=gu(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function mg(t,e,r){let n=new Map,o;for(let a of e.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(let c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else t.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else t.issues.push(a);let s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&o&&t.issues.push({...o,keys:s}),or(t))return t;let i=gu(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 ty=v("$ZodRecord",(t,e)=>{le.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!nr(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),r;let s=[],i=e.keyType._zod.values;if(i){r.value={};let a=new Set;for(let u of i)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let l=e.keyType._zod.run({value:u,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(m=>ct(m,n,tt())),input:u,path:[u],inst:t});continue}let d=l.value,p=e.valueType._zod.run({value:o[u],issues:[]},n);p instanceof Promise?s.push(p.then(m=>{m.issues.length&&r.issues.push(...Vt(u,m.issues)),r.value[d]=m.value})):(p.issues.length&&r.issues.push(...Vt(u,p.issues)),r.value[d]=p.value)}let c;for(let u in o)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(o)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,a))continue;let c=e.keyType._zod.run({value:a,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&pu.test(a)&&c.issues.length){let d=e.keyType._zod.run({value:Number(a),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){e.mode==="loose"?r.value[a]=o[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>ct(d,n,tt())),input:a,path:[a],inst:t});continue}let l=e.valueType._zod.run({value:o[a],issues:[]},n);l instanceof Promise?s.push(l.then(d=>{d.issues.length&&r.issues.push(...Vt(a,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...Vt(a,l.issues)),r.value[c.value]=l.value)}}return s.length?Promise.all(s).then(()=>r):r}});var ry=v("$ZodEnum",(t,e)=>{le.init(t,e);let r=bo(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(o=>su.has(typeof o)).map(o=>typeof o=="string"?Ut(o):o.toString()).join("|")})$`),t._zod.parse=(o,s)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:t}),o}}),ny=v("$ZodLiteral",(t,e)=>{if(le.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Ut(n):n?Ut(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,o)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:e.values,input:s,inst:t}),n}});var oy=v("$ZodTransform",(t,e)=>{le.init(t,e),t._zod.optin="optional",t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new hn(t.constructor.name);let o=e.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r.fallback=!0,r));if(o instanceof Promise)throw new Ot;return r.value=o,r.fallback=!0,r}});function hg(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}var vu=v("$ZodOptional",(t,e)=>{le.init(t,e),t._zod.optin="optional",t._zod.optout="optional",oe(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),oe(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${xo(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let o=r.value,s=e.innerType._zod.run(r,n);return s instanceof Promise?s.then(i=>hg(i,o)):hg(s,o)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),sy=v("$ZodExactOptional",(t,e)=>{vu.init(t,e),oe(t._zod,"values",()=>e.innerType._zod.values),oe(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),iy=v("$ZodNullable",(t,e)=>{le.init(t,e),oe(t._zod,"optin",()=>e.innerType._zod.optin),oe(t._zod,"optout",()=>e.innerType._zod.optout),oe(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${xo(r.source)}|null)$`):void 0}),oe(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),ay=v("$ZodDefault",(t,e)=>{le.init(t,e),t._zod.optin="optional",oe(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>gg(s,e)):gg(o,e)}});function gg(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var cy=v("$ZodPrefault",(t,e)=>{le.init(t,e),t._zod.optin="optional",oe(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),uy=v("$ZodNonOptional",(t,e)=>{le.init(t,e),oe(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>yg(s,t)):yg(o,t)}});function yg(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 ly=v("$ZodCatch",(t,e)=>{le.init(t,e),t._zod.optin="optional",oe(t._zod,"optout",()=>e.innerType._zod.optout),oe(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=e.catchValue({...r,error:{issues:s.issues.map(i=>ct(i,n,tt()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(s=>ct(s,n,tt()))},input:r.value}),r.issues=[],r.fallback=!0),r)}});var bu=v("$ZodPipe",(t,e)=>{le.init(t,e),oe(t._zod,"values",()=>e.in._zod.values),oe(t._zod,"optin",()=>e.in._zod.optin),oe(t._zod,"optout",()=>e.out._zod.optout),oe(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let s=e.out._zod.run(r,n);return s instanceof Promise?s.then(i=>bi(i,e.in,n)):bi(s,e.in,n)}let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(s=>bi(s,e.out,n)):bi(o,e.out,n)}});function bi(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},r)}var dy=v("$ZodPreprocess",(t,e)=>{bu.init(t,e)}),fy=v("$ZodReadonly",(t,e)=>{le.init(t,e),oe(t._zod,"propValues",()=>e.innerType._zod.propValues),oe(t._zod,"values",()=>e.innerType._zod.values),oe(t._zod,"optin",()=>e.innerType?._zod?.optin),oe(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(_g):_g(o)}});function _g(t){return t.value=Object.freeze(t.value),t}var py=v("$ZodCustom",(t,e)=>{Pe.init(t,e),le.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,o=e.fn(n);if(o instanceof Promise)return o.then(s=>vg(s,r,n,t));vg(o,r,n,t)}});function vg(t,e,r,n){if(!t){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),e.issues.push(vn(o))}}var wP=()=>{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"},map:{unit:"entries",verb:"to have"}};function e(o){return t[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let s=n[o.expected]??o.expected,i=uu(o.input),a=n[i]??i;return`Invalid input: expected ${s}, received ${a}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${pi(o.values[0])}`:`Invalid option: expected one of ${li(o.values,"|")}`;case"too_big":{let s=o.inclusive?"<=":"<",i=e(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${s}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${s}${o.maximum.toString()}`}case"too_small":{let s=o.inclusive?">=":">",i=e(o.origin);return i?`Too small: expected ${o.origin} to have ${s}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${r[s.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${li(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(i=>`'${i}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function my(){return{localeError:wP()}}var hy;var wu=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),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 n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function xP(){return new wu}(hy=globalThis).__zod_globalRegistry??(hy.__zod_globalRegistry=xP());var qr=globalThis.__zod_globalRegistry;function gy(t,e){return new t({type:"string",...R(e)})}function yy(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...R(e)})}function xu(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...R(e)})}function _y(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...R(e)})}function vy(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...R(e)})}function by(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...R(e)})}function wy(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...R(e)})}function xy(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...R(e)})}function Sy(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...R(e)})}function $y(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...R(e)})}function ky(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...R(e)})}function Ey(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...R(e)})}function zy(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...R(e)})}function Py(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...R(e)})}function Ty(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...R(e)})}function Cy(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...R(e)})}function Oy(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...R(e)})}function Iy(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...R(e)})}function Ry(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...R(e)})}function Dy(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...R(e)})}function Ny(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...R(e)})}function Ay(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...R(e)})}function jy(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...R(e)})}function My(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...R(e)})}function Zy(t,e){return new t({type:"string",format:"date",check:"string_format",...R(e)})}function Ly(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...R(e)})}function qy(t,e){return new t({type:"string",format:"duration",check:"string_format",...R(e)})}function Fy(t,e){return new t({type:"number",checks:[],...R(e)})}function Uy(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...R(e)})}function Vy(t,e){return new t({type:"boolean",...R(e)})}function By(t,e){return new t({type:"null",...R(e)})}function Hy(t){return new t({type:"unknown"})}function Wy(t,e){return new t({type:"never",...R(e)})}function Si(t,e){return new mu({check:"less_than",...R(e),value:t,inclusive:!1})}function Po(t,e){return new mu({check:"less_than",...R(e),value:t,inclusive:!0})}function $i(t,e){return new hu({check:"greater_than",...R(e),value:t,inclusive:!1})}function To(t,e){return new hu({check:"greater_than",...R(e),value:t,inclusive:!0})}function ki(t,e){return new Qh({check:"multiple_of",...R(e),value:t})}function Ei(t,e){return new eg({check:"max_length",...R(e),maximum:t})}function bn(t,e){return new tg({check:"min_length",...R(e),minimum:t})}function zi(t,e){return new rg({check:"length_equals",...R(e),length:t})}function Su(t,e){return new ng({check:"string_format",format:"regex",...R(e),pattern:t})}function $u(t){return new og({check:"string_format",format:"lowercase",...R(t)})}function ku(t){return new sg({check:"string_format",format:"uppercase",...R(t)})}function Eu(t,e){return new ig({check:"string_format",format:"includes",...R(e),includes:t})}function zu(t,e){return new ag({check:"string_format",format:"starts_with",...R(e),prefix:t})}function Pu(t,e){return new cg({check:"string_format",format:"ends_with",...R(e),suffix:t})}function sr(t){return new ug({check:"overwrite",tx:t})}function Tu(t){return sr(e=>e.normalize(t))}function Cu(){return sr(t=>t.trim())}function Ou(){return sr(t=>t.toLowerCase())}function Iu(){return sr(t=>t.toUpperCase())}function Ru(){return sr(t=>nu(t))}function Gy(t,e,r){return new t({type:"array",element:e,...R(r)})}function Jy(t,e,r){let n=R(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function Ky(t,e,r){return new t({type:"custom",check:"custom",fn:e,...R(r)})}function Yy(t,e){let r=SP(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(vn(o,n.value,r._zod.def));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push(vn(s))}},t(n.value,n)),e);return r}function SP(t,e){let r=new Pe({check:"custom",...R(e)});return r._zod.check=t,r}function Du(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??qr,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function Se(t,e,r={path:[],schemaPath:[]}){var n;let o=t._zod.def,s=e.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let i={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,i);let a=t._zod.toJSONSchema?.();if(a)i.schema=a;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,i.schema,l);else{let p=i.schema,m=e.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(t,e,p,l)}let d=t._zod.parent;d&&(i.ref||(i.ref=d),Se(d,e,l),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(i.schema,c),e.io==="input"&&qe(t)&&(delete i.schema.examples,delete i.schema.default),e.io==="input"&&"_prefault"in i.schema&&((n=i.schema).default??(n.default=i.schema._prefault)),delete i.schema._prefault,e.seen.get(t).schema}function Nu(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let i of t.seen.entries()){let a=t.metadataRegistry.get(i[0])?.id;if(a){let c=n.get(a);if(c&&c!==i[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,i[0])}}let o=i=>{let a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(i[0])?.id,p=t.external.uri??(f=>f);if(d)return{ref:p(d)};let m=i[1].defId??i[1].schema.id??`schema${t.counter++}`;return i[1].defId=m,{defId:m,ref:`${p("__shared")}#/${a}/${m}`}}if(i[1]===r)return{ref:"#"};let u=`#/${a}/`,l=i[1].schema.id??`__schema${t.counter++}`;return{defId:l,ref:u+l}},s=i=>{if(i[1].schema.$ref)return;let a=i[1],{ref:c,defId:u}=o(i);a.def={...a.schema},u&&(a.defId=u);let l=a.schema;for(let d in l)delete l[d];l.$ref=c};if(t.cycles==="throw")for(let i of t.seen.entries()){let a=i[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
151
-
152
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of t.seen.entries()){let a=i[1];if(e===i[0]){s(i);continue}if(t.external){let u=t.external.registry.get(i[0])?.id;if(e!==i[0]&&u){s(i);continue}}if(t.metadataRegistry.get(i[0])?.id){s(i);continue}if(a.cycle){s(i);continue}if(a.count>1&&t.reused==="ref"){s(i);continue}}}function Au(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=a=>{let c=t.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){n(d);let m=t.seen.get(d),f=m.schema;if(f.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(f)):Object.assign(u,f),Object.assign(u,l),a._zod.parent===d)for(let g in u)g==="$ref"||g==="allOf"||g in l||delete u[g];if(f.$ref&&m.def)for(let g in u)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(u[g])===JSON.stringify(m.def[g])&&delete u[g]}let p=a._zod.parent;if(p&&p!==d){n(p);let m=t.seen.get(p);if(m?.schema.$ref&&(u.$ref=m.schema.$ref,m.def))for(let f in u)f==="$ref"||f==="allOf"||f in m.def&&JSON.stringify(u[f])===JSON.stringify(m.def[f])&&delete u[f]}t.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(let a of[...t.seen.entries()].reverse())n(a[0]);let o={};if(t.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let a=t.external.registry.get(e)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(a)}Object.assign(o,r.def??r.schema);let s=t.metadataRegistry.get(e)?.id;s!==void 0&&o.id===s&&delete o.id;let i=t.external?.defs??{};for(let a of t.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,i[c.defId]=c.def)}t.external||Object.keys(i).length>0&&(t.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{let a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...e["~standard"],jsonSchema:{input:Co(e,"input",t.processors),output:Co(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}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;if(n.type==="transform")return!0;if(n.type==="array")return qe(n.element,r);if(n.type==="set")return qe(n.valueType,r);if(n.type==="lazy")return qe(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return qe(n.innerType,r);if(n.type==="intersection")return qe(n.left,r)||qe(n.right,r);if(n.type==="record"||n.type==="map")return qe(n.keyType,r)||qe(n.valueType,r);if(n.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:qe(n.in,r)||qe(n.out,r);if(n.type==="object"){for(let o in n.shape)if(qe(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(qe(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(qe(o,r))return!0;return!!(n.rest&&qe(n.rest,r))}return!1}var Qy=(t,e={})=>r=>{let n=Du({...r,processors:e});return Se(t,n),Nu(n,t),Au(n,t)},Co=(t,e,r={})=>n=>{let{libraryOptions:o,target:s}=n??{},i=Du({...o??{},target:s,io:e,processors:r});return Se(t,i),Nu(i,t),Au(i,t)};var $P={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Xy=(t,e,r,n)=>{let o=r;o.type="string";let{minimum:s,maximum:i,format:a,patterns:c,contentEncoding:u}=t._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=$P[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},e_=(t,e,r,n)=>{let o=r,{minimum:s,maximum:i,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=t._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number";let d=typeof l=="number"&&l>=(s??Number.NEGATIVE_INFINITY),p=typeof u=="number"&&u<=(i??Number.POSITIVE_INFINITY),m=e.target==="draft-04"||e.target==="openapi-3.0";d?m?(o.minimum=l,o.exclusiveMinimum=!0):o.exclusiveMinimum=l:typeof s=="number"&&(o.minimum=s),p?m?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u:typeof i=="number"&&(o.maximum=i),typeof c=="number"&&(o.multipleOf=c)},t_=(t,e,r,n)=>{r.type="boolean"};var r_=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"};var n_=(t,e,r,n)=>{r.not={}};var o_=(t,e,r,n)=>{};var s_=(t,e,r,n)=>{let o=t._zod.def,s=bo(o.entries);s.every(i=>typeof i=="number")&&(r.type="number"),s.every(i=>typeof i=="string")&&(r.type="string"),r.enum=s},i_=(t,e,r,n)=>{let o=t._zod.def,s=[];for(let i of o.values)if(i===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(i))}else s.push(i);if(s.length!==0)if(s.length===1){let i=s[0];r.type=i===null?"null":typeof i,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[i]:r.const=i}else s.every(i=>typeof i=="number")&&(r.type="number"),s.every(i=>typeof i=="string")&&(r.type="string"),s.every(i=>typeof i=="boolean")&&(r.type="boolean"),s.every(i=>i===null)&&(r.type="null"),r.enum=s};var a_=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")};var c_=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")};var u_=(t,e,r,n)=>{let o=r,s=t._zod.def,{minimum:i,maximum:a}=t._zod.bag;typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Se(s.element,e,{...n,path:[...n.path,"items"]})},l_=(t,e,r,n)=>{let o=r,s=t._zod.def;o.type="object",o.properties={};let i=s.shape;for(let u in i)o.properties[u]=Se(i[u],e,{...n,path:[...n.path,"properties",u]});let a=new Set(Object.keys(i)),c=new Set([...a].filter(u=>{let l=s.shape[u]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(o.required=Array.from(c)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Se(s.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(o.additionalProperties=!1)},d_=(t,e,r,n)=>{let o=t._zod.def,s=o.inclusive===!1,i=o.options.map((a,c)=>Se(a,e,{...n,path:[...n.path,s?"oneOf":"anyOf",c]}));s?r.oneOf=i:r.anyOf=i},f_=(t,e,r,n)=>{let o=t._zod.def,s=Se(o.left,e,{...n,path:[...n.path,"allOf",0]}),i=Se(o.right,e,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];r.allOf=c};var p_=(t,e,r,n)=>{let o=r,s=t._zod.def;o.type="object";let i=s.keyType,c=i._zod.bag?.patterns;if(s.mode==="loose"&&c&&c.size>0){let l=Se(s.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let d of c)o.patternProperties[d.source]=l}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(o.propertyNames=Se(s.keyType,e,{...n,path:[...n.path,"propertyNames"]})),o.additionalProperties=Se(s.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let u=i._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(o.required=l)}},m_=(t,e,r,n)=>{let o=t._zod.def,s=Se(o.innerType,e,n),i=e.seen.get(t);e.target==="openapi-3.0"?(i.ref=o.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},h_=(t,e,r,n)=>{let o=t._zod.def;Se(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType},g_=(t,e,r,n)=>{let o=t._zod.def;Se(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},y_=(t,e,r,n)=>{let o=t._zod.def;Se(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},__=(t,e,r,n)=>{let o=t._zod.def;Se(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=i},v_=(t,e,r,n)=>{let o=t._zod.def,s=o.in._zod.traits.has("$ZodTransform"),i=e.io==="input"?s?o.out:o.in:o.out;Se(i,e,n);let a=e.seen.get(t);a.ref=i},b_=(t,e,r,n)=>{let o=t._zod.def;Se(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType,r.readOnly=!0};var ju=(t,e,r,n)=>{let o=t._zod.def;Se(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType};function wn(t){return!!t._zod}function ir(t,e){return wn(t)?ko(t,e):t.safeParse(e)}function Pi(t){if(!t)return;let e;if(wn(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function w_(t){if(wn(t)){let s=t._zod?.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.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 n=t.value;if(n!==void 0)return n}var Io={};df(Io,{ZodISODate:()=>S_,ZodISODateTime:()=>x_,ZodISODuration:()=>k_,ZodISOTime:()=>$_,date:()=>Zu,datetime:()=>Mu,duration:()=>qu,time:()=>Lu});var x_=v("ZodISODateTime",(t,e)=>{Og.init(t,e),ge.init(t,e)});function Mu(t){return My(x_,t)}var S_=v("ZodISODate",(t,e)=>{Ig.init(t,e),ge.init(t,e)});function Zu(t){return Zy(S_,t)}var $_=v("ZodISOTime",(t,e)=>{Rg.init(t,e),ge.init(t,e)});function Lu(t){return Ly($_,t)}var k_=v("ZodISODuration",(t,e)=>{Dg.init(t,e),ge.init(t,e)});function qu(t){return qy(k_,t)}var RP=(t,e)=>{mi.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>mh(t,r)},flatten:{value:r=>ph(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,yn,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,yn,2)}},isEmpty:{get(){return t.issues.length===0}}})};var rt=v("ZodError",RP,{Parent:Error});var E_=hi(rt),z_=gi(rt),P_=$o(rt),T_=Eo(rt),C_=hh(rt),O_=gh(rt),I_=yh(rt),R_=_h(rt),D_=vh(rt),N_=bh(rt),A_=wh(rt),j_=xh(rt);var M_=new WeakMap;function Ro(t,e,r){let n=Object.getPrototypeOf(t),o=M_.get(n);if(o||(o=new Set,M_.set(n,o)),!o.has(e)){o.add(e);for(let s in r){let i=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){let a=i.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}var _e=v("ZodType",(t,e)=>(le.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Co(t,"input"),output:Co(t,"output")}}),t.toJSONSchema=Qy(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(r,n)=>E_(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>P_(t,r,n),t.parseAsync=async(r,n)=>z_(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>T_(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>C_(t,r,n),t.decode=(r,n)=>O_(t,r,n),t.encodeAsync=async(r,n)=>I_(t,r,n),t.decodeAsync=async(r,n)=>R_(t,r,n),t.safeEncode=(r,n)=>D_(t,r,n),t.safeDecode=(r,n)=>N_(t,r,n),t.safeEncodeAsync=async(r,n)=>A_(t,r,n),t.safeDecodeAsync=async(r,n)=>j_(t,r,n),Ro(t,"ZodType",{check(...r){let n=this.def;return this.clone(Y.mergeDefs(n,{checks:[...n.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return St(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(ST(r,n))},superRefine(r,n){return this.check($T(r,n))},overwrite(r){return this.check(sr(r))},optional(){return we(this)},exactOptional(){return dT(this)},nullable(){return F_(this)},nullish(){return we(F_(this))},nonoptional(r){return yT(this,r)},array(){return J(this)},or(r){return ce([this,r])},and(r){return Ci(this,r)},transform(r){return U_(this,G_(r))},default(r){return mT(this,r)},prefault(r){return gT(this,r)},catch(r){return vT(this,r)},pipe(r){return U_(this,r)},readonly(){return xT(this)},describe(r){let n=this.clone();return qr.add(n,{description:r}),n},meta(...r){if(r.length===0)return qr.get(this);let n=this.clone();return qr.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(t,"description",{get(){return qr.get(t)?.description},configurable:!0}),t)),V_=v("_ZodString",(t,e)=>{xi.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,o,s)=>Xy(t,n,o,s);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,Ro(t,"_ZodString",{regex(...n){return this.check(Su(...n))},includes(...n){return this.check(Eu(...n))},startsWith(...n){return this.check(zu(...n))},endsWith(...n){return this.check(Pu(...n))},min(...n){return this.check(bn(...n))},max(...n){return this.check(Ei(...n))},length(...n){return this.check(zi(...n))},nonempty(...n){return this.check(bn(1,...n))},lowercase(n){return this.check($u(n))},uppercase(n){return this.check(ku(n))},trim(){return this.check(Cu())},normalize(...n){return this.check(Tu(...n))},toLowerCase(){return this.check(Ou())},toUpperCase(){return this.check(Iu())},slugify(){return this.check(Ru())}})}),NP=v("ZodString",(t,e)=>{xi.init(t,e),V_.init(t,e),t.email=r=>t.check(yy(AP,r)),t.url=r=>t.check(xy(jP,r)),t.jwt=r=>t.check(jy(QP,r)),t.emoji=r=>t.check(Sy(MP,r)),t.guid=r=>t.check(xu(Z_,r)),t.uuid=r=>t.check(_y(Ti,r)),t.uuidv4=r=>t.check(vy(Ti,r)),t.uuidv6=r=>t.check(by(Ti,r)),t.uuidv7=r=>t.check(wy(Ti,r)),t.nanoid=r=>t.check($y(ZP,r)),t.guid=r=>t.check(xu(Z_,r)),t.cuid=r=>t.check(ky(LP,r)),t.cuid2=r=>t.check(Ey(qP,r)),t.ulid=r=>t.check(zy(FP,r)),t.base64=r=>t.check(Dy(JP,r)),t.base64url=r=>t.check(Ny(KP,r)),t.xid=r=>t.check(Py(UP,r)),t.ksuid=r=>t.check(Ty(VP,r)),t.ipv4=r=>t.check(Cy(BP,r)),t.ipv6=r=>t.check(Oy(HP,r)),t.cidrv4=r=>t.check(Iy(WP,r)),t.cidrv6=r=>t.check(Ry(GP,r)),t.e164=r=>t.check(Ay(YP,r)),t.datetime=r=>t.check(Mu(r)),t.date=r=>t.check(Zu(r)),t.time=r=>t.check(Lu(r)),t.duration=r=>t.check(qu(r))});function y(t){return gy(NP,t)}var ge=v("ZodStringFormat",(t,e)=>{de.init(t,e),V_.init(t,e)}),AP=v("ZodEmail",(t,e)=>{xg.init(t,e),ge.init(t,e)});var Z_=v("ZodGUID",(t,e)=>{bg.init(t,e),ge.init(t,e)});var Ti=v("ZodUUID",(t,e)=>{wg.init(t,e),ge.init(t,e)});var jP=v("ZodURL",(t,e)=>{Sg.init(t,e),ge.init(t,e)});var MP=v("ZodEmoji",(t,e)=>{$g.init(t,e),ge.init(t,e)});var ZP=v("ZodNanoID",(t,e)=>{kg.init(t,e),ge.init(t,e)});var LP=v("ZodCUID",(t,e)=>{Eg.init(t,e),ge.init(t,e)});var qP=v("ZodCUID2",(t,e)=>{zg.init(t,e),ge.init(t,e)});var FP=v("ZodULID",(t,e)=>{Pg.init(t,e),ge.init(t,e)});var UP=v("ZodXID",(t,e)=>{Tg.init(t,e),ge.init(t,e)});var VP=v("ZodKSUID",(t,e)=>{Cg.init(t,e),ge.init(t,e)});var BP=v("ZodIPv4",(t,e)=>{Ng.init(t,e),ge.init(t,e)});var HP=v("ZodIPv6",(t,e)=>{Ag.init(t,e),ge.init(t,e)});var WP=v("ZodCIDRv4",(t,e)=>{jg.init(t,e),ge.init(t,e)});var GP=v("ZodCIDRv6",(t,e)=>{Mg.init(t,e),ge.init(t,e)});var JP=v("ZodBase64",(t,e)=>{Lg.init(t,e),ge.init(t,e)});var KP=v("ZodBase64URL",(t,e)=>{qg.init(t,e),ge.init(t,e)});var YP=v("ZodE164",(t,e)=>{Fg.init(t,e),ge.init(t,e)});var QP=v("ZodJWT",(t,e)=>{Ug.init(t,e),ge.init(t,e)});var B_=v("ZodNumber",(t,e)=>{yu.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,o,s)=>e_(t,n,o,s),Ro(t,"ZodNumber",{gt(n,o){return this.check($i(n,o))},gte(n,o){return this.check(To(n,o))},min(n,o){return this.check(To(n,o))},lt(n,o){return this.check(Si(n,o))},lte(n,o){return this.check(Po(n,o))},max(n,o){return this.check(Po(n,o))},int(n){return this.check(L_(n))},safe(n){return this.check(L_(n))},positive(n){return this.check($i(0,n))},nonnegative(n){return this.check(To(0,n))},negative(n){return this.check(Si(0,n))},nonpositive(n){return this.check(Po(0,n))},multipleOf(n,o){return this.check(ki(n,o))},step(n,o){return this.check(ki(n,o))},finite(){return this}});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 se(t){return Fy(B_,t)}var XP=v("ZodNumberFormat",(t,e)=>{Vg.init(t,e),B_.init(t,e)});function L_(t){return Uy(XP,t)}var eT=v("ZodBoolean",(t,e)=>{Bg.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>t_(t,r,n,o)});function ze(t){return Vy(eT,t)}var tT=v("ZodNull",(t,e)=>{Hg.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>r_(t,r,n,o)});function Uu(t){return By(tT,t)}var rT=v("ZodUnknown",(t,e)=>{Wg.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>o_(t,r,n,o)});function ye(){return Hy(rT)}var nT=v("ZodNever",(t,e)=>{Gg.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>n_(t,r,n,o)});function oT(t){return Wy(nT,t)}var sT=v("ZodArray",(t,e)=>{Jg.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>u_(t,r,n,o),t.element=e.element,Ro(t,"ZodArray",{min(r,n){return this.check(bn(r,n))},nonempty(r){return this.check(bn(1,r))},max(r,n){return this.check(Ei(r,n))},length(r,n){return this.check(zi(r,n))},unwrap(){return this.element}})});function J(t,e){return Gy(sT,t,e)}var H_=v("ZodObject",(t,e)=>{Qg.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>l_(t,r,n,o),Y.defineLazy(t,"shape",()=>e.shape),Ro(t,"ZodObject",{keyof(){return We(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:ye()})},loose(){return this.clone({...this._zod.def,catchall:ye()})},strict(){return this.clone({...this._zod.def,catchall:oT()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Y.extend(this,r)},safeExtend(r){return Y.safeExtend(this,r)},merge(r){return Y.merge(this,r)},pick(r){return Y.pick(this,r)},omit(r){return Y.omit(this,r)},partial(...r){return Y.partial(J_,this,r[0])},required(...r){return Y.required(K_,this,r[0])}})});function P(t,e){let r={type:"object",shape:t??{},...Y.normalizeParams(e)};return new H_(r)}function Fe(t,e){return new H_({type:"object",shape:t,catchall:ye(),...Y.normalizeParams(e)})}var W_=v("ZodUnion",(t,e)=>{_u.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>d_(t,r,n,o),t.options=e.options});function ce(t,e){return new W_({type:"union",options:t,...Y.normalizeParams(e)})}var iT=v("ZodDiscriminatedUnion",(t,e)=>{W_.init(t,e),Xg.init(t,e)});function Vu(t,e,r){return new iT({type:"union",options:e,discriminator:t,...Y.normalizeParams(r)})}var aT=v("ZodIntersection",(t,e)=>{ey.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>f_(t,r,n,o)});function Ci(t,e){return new aT({type:"intersection",left:t,right:e})}var q_=v("ZodRecord",(t,e)=>{ty.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>p_(t,r,n,o),t.keyType=e.keyType,t.valueType=e.valueType});function ve(t,e,r){return!e||!e._zod?new q_({type:"record",keyType:y(),valueType:t,...Y.normalizeParams(e)}):new q_({type:"record",keyType:t,valueType:e,...Y.normalizeParams(r)})}var Fu=v("ZodEnum",(t,e)=>{ry.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,o,s)=>s_(t,n,o,s),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,o)=>{let s={};for(let i of n)if(r.has(i))s[i]=e.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Fu({...e,checks:[],...Y.normalizeParams(o),entries:s})},t.exclude=(n,o)=>{let s={...e.entries};for(let i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Fu({...e,checks:[],...Y.normalizeParams(o),entries:s})}});function We(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Fu({type:"enum",entries:r,...Y.normalizeParams(e)})}var cT=v("ZodLiteral",(t,e)=>{ny.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>i_(t,r,n,o),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 C(t,e){return new cT({type:"literal",values:Array.isArray(t)?t:[t],...Y.normalizeParams(e)})}var uT=v("ZodTransform",(t,e)=>{oy.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>c_(t,r,n,o),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new hn(t.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Y.issue(s,r.value,e));else{let i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=t),r.issues.push(Y.issue(i))}};let o=e.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=o,r.fallback=!0,r)}});function G_(t){return new uT({type:"transform",transform:t})}var J_=v("ZodOptional",(t,e)=>{vu.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>ju(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function we(t){return new J_({type:"optional",innerType:t})}var lT=v("ZodExactOptional",(t,e)=>{sy.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>ju(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function dT(t){return new lT({type:"optional",innerType:t})}var fT=v("ZodNullable",(t,e)=>{iy.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>m_(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function F_(t){return new fT({type:"nullable",innerType:t})}var pT=v("ZodDefault",(t,e)=>{ay.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>g_(t,r,n,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function mT(t,e){return new pT({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():Y.shallowClone(e)}})}var hT=v("ZodPrefault",(t,e)=>{cy.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>y_(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function gT(t,e){return new hT({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():Y.shallowClone(e)}})}var K_=v("ZodNonOptional",(t,e)=>{uy.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>h_(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function yT(t,e){return new K_({type:"nonoptional",innerType:t,...Y.normalizeParams(e)})}var _T=v("ZodCatch",(t,e)=>{ly.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>__(t,r,n,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function vT(t,e){return new _T({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var Y_=v("ZodPipe",(t,e)=>{bu.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>v_(t,r,n,o),t.in=e.in,t.out=e.out});function U_(t,e){return new Y_({type:"pipe",in:t,out:e})}var bT=v("ZodPreprocess",(t,e)=>{Y_.init(t,e),dy.init(t,e)}),wT=v("ZodReadonly",(t,e)=>{fy.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>b_(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function xT(t){return new wT({type:"readonly",innerType:t})}var Q_=v("ZodCustom",(t,e)=>{py.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,n,o)=>a_(t,r,n,o)});function X_(t,e){return Jy(Q_,t??(()=>!0),e)}function ST(t,e={}){return Ky(Q_,t,e)}function $T(t,e){return Yy(t,e)}function Bu(t,e){return new bT({type:"pipe",in:G_(t),out:e})}tt(my());var Wu="2025-11-25";var ev=[Wu,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],ar="io.modelcontextprotocol/related-task",Ii="2.0",Te=X_(t=>t!==null&&(typeof t=="object"||typeof t=="function")),tv=ce([y(),se().int()]),rv=y(),vq=Fe({ttl:ce([se(),Uu()]).optional(),pollInterval:se().optional()}),kT=P({ttl:se().optional()}),ET=P({taskId:y()}),Gu=Fe({progressToken:tv.optional(),[ar]:ET.optional()}),nt=P({_meta:Gu.optional()}),Do=nt.extend({task:kT.optional()}),nv=t=>Do.safeParse(t).success,Ce=P({method:y(),params:nt.loose().optional()}),ut=P({_meta:Gu.optional()}),lt=P({method:y(),params:ut.loose().optional()}),Oe=Fe({_meta:Gu.optional()}),Ri=ce([y(),se().int()]),ov=P({jsonrpc:C(Ii),id:Ri,...Ce.shape}).strict(),Ju=t=>ov.safeParse(t).success,sv=P({jsonrpc:C(Ii),...lt.shape}).strict(),iv=t=>sv.safeParse(t).success,Ku=P({jsonrpc:C(Ii),id:Ri,result:Oe}).strict(),No=t=>Ku.safeParse(t).success;var G;(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"})(G||(G={}));var Yu=P({jsonrpc:C(Ii),id:Ri.optional(),error:P({code:se().int(),message:y(),data:ye().optional()})}).strict();var av=t=>Yu.safeParse(t).success;var cv=ce([ov,sv,Ku,Yu]),bq=ce([Ku,Yu]),Di=Oe.strict(),zT=ut.extend({requestId:Ri.optional(),reason:y().optional()}),Ni=lt.extend({method:C("notifications/cancelled"),params:zT}),PT=P({src:y(),mimeType:y().optional(),sizes:J(y()).optional(),theme:We(["light","dark"]).optional()}),Ao=P({icons:J(PT).optional()}),xn=P({name:y(),title:y().optional()}),uv=xn.extend({...xn.shape,...Ao.shape,version:y(),websiteUrl:y().optional(),description:y().optional()}),TT=Ci(P({applyDefaults:ze().optional()}),ve(y(),ye())),CT=Bu(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Ci(P({form:TT.optional(),url:Te.optional()}),ve(y(),ye()).optional())),OT=Fe({list:Te.optional(),cancel:Te.optional(),requests:Fe({sampling:Fe({createMessage:Te.optional()}).optional(),elicitation:Fe({create:Te.optional()}).optional()}).optional()}),IT=Fe({list:Te.optional(),cancel:Te.optional(),requests:Fe({tools:Fe({call:Te.optional()}).optional()}).optional()}),RT=P({experimental:ve(y(),Te).optional(),sampling:P({context:Te.optional(),tools:Te.optional()}).optional(),elicitation:CT.optional(),roots:P({listChanged:ze().optional()}).optional(),tasks:OT.optional()}),DT=nt.extend({protocolVersion:y(),capabilities:RT,clientInfo:uv}),Qu=Ce.extend({method:C("initialize"),params:DT});var NT=P({experimental:ve(y(),Te).optional(),logging:Te.optional(),completions:Te.optional(),prompts:P({listChanged:ze().optional()}).optional(),resources:P({subscribe:ze().optional(),listChanged:ze().optional()}).optional(),tools:P({listChanged:ze().optional()}).optional(),tasks:IT.optional()}),AT=Oe.extend({protocolVersion:y(),capabilities:NT,serverInfo:uv,instructions:y().optional()}),Xu=lt.extend({method:C("notifications/initialized"),params:ut.optional()});var Ai=Ce.extend({method:C("ping"),params:nt.optional()}),jT=P({progress:se(),total:we(se()),message:we(y())}),MT=P({...ut.shape,...jT.shape,progressToken:tv}),ji=lt.extend({method:C("notifications/progress"),params:MT}),ZT=nt.extend({cursor:rv.optional()}),jo=Ce.extend({params:ZT.optional()}),Mo=Oe.extend({nextCursor:rv.optional()}),LT=We(["working","input_required","completed","failed","cancelled"]),Zo=P({taskId:y(),status:LT,ttl:ce([se(),Uu()]),createdAt:y(),lastUpdatedAt:y(),pollInterval:we(se()),statusMessage:we(y())}),Sn=Oe.extend({task:Zo}),qT=ut.merge(Zo),Lo=lt.extend({method:C("notifications/tasks/status"),params:qT}),Mi=Ce.extend({method:C("tasks/get"),params:nt.extend({taskId:y()})}),Zi=Oe.merge(Zo),Li=Ce.extend({method:C("tasks/result"),params:nt.extend({taskId:y()})}),wq=Oe.loose(),qi=jo.extend({method:C("tasks/list")}),Fi=Mo.extend({tasks:J(Zo)}),Ui=Ce.extend({method:C("tasks/cancel"),params:nt.extend({taskId:y()})}),lv=Oe.merge(Zo),dv=P({uri:y(),mimeType:we(y()),_meta:ve(y(),ye()).optional()}),fv=dv.extend({text:y()}),el=y().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),pv=dv.extend({blob:el}),qo=We(["user","assistant"]),$n=P({audience:J(qo).optional(),priority:se().min(0).max(1).optional(),lastModified:Io.datetime({offset:!0}).optional()}),mv=P({...xn.shape,...Ao.shape,uri:y(),description:we(y()),mimeType:we(y()),annotations:$n.optional(),_meta:we(Fe({}))}),FT=P({...xn.shape,...Ao.shape,uriTemplate:y(),description:we(y()),mimeType:we(y()),annotations:$n.optional(),_meta:we(Fe({}))}),UT=jo.extend({method:C("resources/list")}),VT=Mo.extend({resources:J(mv)}),BT=jo.extend({method:C("resources/templates/list")}),HT=Mo.extend({resourceTemplates:J(FT)}),tl=nt.extend({uri:y()}),WT=tl,GT=Ce.extend({method:C("resources/read"),params:WT}),JT=Oe.extend({contents:J(ce([fv,pv]))}),KT=lt.extend({method:C("notifications/resources/list_changed"),params:ut.optional()}),YT=tl,QT=Ce.extend({method:C("resources/subscribe"),params:YT}),XT=tl,eC=Ce.extend({method:C("resources/unsubscribe"),params:XT}),tC=ut.extend({uri:y()}),rC=lt.extend({method:C("notifications/resources/updated"),params:tC}),nC=P({name:y(),description:we(y()),required:we(ze())}),oC=P({...xn.shape,...Ao.shape,description:we(y()),arguments:we(J(nC)),_meta:we(Fe({}))}),sC=jo.extend({method:C("prompts/list")}),iC=Mo.extend({prompts:J(oC)}),aC=nt.extend({name:y(),arguments:ve(y(),y()).optional()}),cC=Ce.extend({method:C("prompts/get"),params:aC}),rl=P({type:C("text"),text:y(),annotations:$n.optional(),_meta:ve(y(),ye()).optional()}),nl=P({type:C("image"),data:el,mimeType:y(),annotations:$n.optional(),_meta:ve(y(),ye()).optional()}),ol=P({type:C("audio"),data:el,mimeType:y(),annotations:$n.optional(),_meta:ve(y(),ye()).optional()}),uC=P({type:C("tool_use"),name:y(),id:y(),input:ve(y(),ye()),_meta:ve(y(),ye()).optional()}),lC=P({type:C("resource"),resource:ce([fv,pv]),annotations:$n.optional(),_meta:ve(y(),ye()).optional()}),dC=mv.extend({type:C("resource_link")}),sl=ce([rl,nl,ol,dC,lC]),fC=P({role:qo,content:sl}),pC=Oe.extend({description:y().optional(),messages:J(fC)}),mC=lt.extend({method:C("notifications/prompts/list_changed"),params:ut.optional()}),hC=P({title:y().optional(),readOnlyHint:ze().optional(),destructiveHint:ze().optional(),idempotentHint:ze().optional(),openWorldHint:ze().optional()}),gC=P({taskSupport:We(["required","optional","forbidden"]).optional()}),hv=P({...xn.shape,...Ao.shape,description:y().optional(),inputSchema:P({type:C("object"),properties:ve(y(),Te).optional(),required:J(y()).optional()}).catchall(ye()),outputSchema:P({type:C("object"),properties:ve(y(),Te).optional(),required:J(y()).optional()}).catchall(ye()).optional(),annotations:hC.optional(),execution:gC.optional(),_meta:ve(y(),ye()).optional()}),il=jo.extend({method:C("tools/list")}),yC=Mo.extend({tools:J(hv)}),Vi=Oe.extend({content:J(sl).default([]),structuredContent:ve(y(),ye()).optional(),isError:ze().optional()}),xq=Vi.or(Oe.extend({toolResult:ye()})),_C=Do.extend({name:y(),arguments:ve(y(),ye()).optional()}),Fo=Ce.extend({method:C("tools/call"),params:_C}),vC=lt.extend({method:C("notifications/tools/list_changed"),params:ut.optional()}),Sq=P({autoRefresh:ze().default(!0),debounceMs:se().int().nonnegative().default(300)}),Uo=We(["debug","info","notice","warning","error","critical","alert","emergency"]),bC=nt.extend({level:Uo}),al=Ce.extend({method:C("logging/setLevel"),params:bC}),wC=ut.extend({level:Uo,logger:y().optional(),data:ye()}),xC=lt.extend({method:C("notifications/message"),params:wC}),SC=P({name:y().optional()}),$C=P({hints:J(SC).optional(),costPriority:se().min(0).max(1).optional(),speedPriority:se().min(0).max(1).optional(),intelligencePriority:se().min(0).max(1).optional()}),kC=P({mode:We(["auto","required","none"]).optional()}),EC=P({type:C("tool_result"),toolUseId:y().describe("The unique identifier for the corresponding tool call."),content:J(sl).default([]),structuredContent:P({}).loose().optional(),isError:ze().optional(),_meta:ve(y(),ye()).optional()}),zC=Vu("type",[rl,nl,ol]),Oi=Vu("type",[rl,nl,ol,uC,EC]),PC=P({role:qo,content:ce([Oi,J(Oi)]),_meta:ve(y(),ye()).optional()}),TC=Do.extend({messages:J(PC),modelPreferences:$C.optional(),systemPrompt:y().optional(),includeContext:We(["none","thisServer","allServers"]).optional(),temperature:se().optional(),maxTokens:se().int(),stopSequences:J(y()).optional(),metadata:Te.optional(),tools:J(hv).optional(),toolChoice:kC.optional()}),CC=Ce.extend({method:C("sampling/createMessage"),params:TC}),cl=Oe.extend({model:y(),stopReason:we(We(["endTurn","stopSequence","maxTokens"]).or(y())),role:qo,content:zC}),ul=Oe.extend({model:y(),stopReason:we(We(["endTurn","stopSequence","maxTokens","toolUse"]).or(y())),role:qo,content:ce([Oi,J(Oi)])}),OC=P({type:C("boolean"),title:y().optional(),description:y().optional(),default:ze().optional()}),IC=P({type:C("string"),title:y().optional(),description:y().optional(),minLength:se().optional(),maxLength:se().optional(),format:We(["email","uri","date","date-time"]).optional(),default:y().optional()}),RC=P({type:We(["number","integer"]),title:y().optional(),description:y().optional(),minimum:se().optional(),maximum:se().optional(),default:se().optional()}),DC=P({type:C("string"),title:y().optional(),description:y().optional(),enum:J(y()),default:y().optional()}),NC=P({type:C("string"),title:y().optional(),description:y().optional(),oneOf:J(P({const:y(),title:y()})),default:y().optional()}),AC=P({type:C("string"),title:y().optional(),description:y().optional(),enum:J(y()),enumNames:J(y()).optional(),default:y().optional()}),jC=ce([DC,NC]),MC=P({type:C("array"),title:y().optional(),description:y().optional(),minItems:se().optional(),maxItems:se().optional(),items:P({type:C("string"),enum:J(y())}),default:J(y()).optional()}),ZC=P({type:C("array"),title:y().optional(),description:y().optional(),minItems:se().optional(),maxItems:se().optional(),items:P({anyOf:J(P({const:y(),title:y()}))}),default:J(y()).optional()}),LC=ce([MC,ZC]),qC=ce([AC,jC,LC]),FC=ce([qC,OC,IC,RC]),UC=Do.extend({mode:C("form").optional(),message:y(),requestedSchema:P({type:C("object"),properties:ve(y(),FC),required:J(y()).optional()})}),VC=Do.extend({mode:C("url"),message:y(),elicitationId:y(),url:y().url()}),BC=ce([UC,VC]),HC=Ce.extend({method:C("elicitation/create"),params:BC}),WC=ut.extend({elicitationId:y()}),GC=lt.extend({method:C("notifications/elicitation/complete"),params:WC}),Bi=Oe.extend({action:We(["accept","decline","cancel"]),content:Bu(t=>t===null?void 0:t,ve(y(),ce([y(),se(),ze(),J(y())])).optional())}),JC=P({type:C("ref/resource"),uri:y()});var KC=P({type:C("ref/prompt"),name:y()}),YC=nt.extend({ref:ce([KC,JC]),argument:P({name:y(),value:y()}),context:P({arguments:ve(y(),y()).optional()}).optional()}),QC=Ce.extend({method:C("completion/complete"),params:YC});var XC=Oe.extend({completion:Fe({values:J(y()).max(100),total:we(se().int()),hasMore:we(ze())})}),eO=P({uri:y().startsWith("file://"),name:y().optional(),_meta:ve(y(),ye()).optional()}),tO=Ce.extend({method:C("roots/list"),params:nt.optional()}),ll=Oe.extend({roots:J(eO)}),rO=lt.extend({method:C("notifications/roots/list_changed"),params:ut.optional()}),$q=ce([Ai,Qu,QC,al,cC,sC,UT,BT,GT,QT,eC,Fo,il,Mi,Li,qi,Ui]),kq=ce([Ni,ji,Xu,rO,Lo]),Eq=ce([Di,cl,ul,Bi,ll,Zi,Fi,Sn]),zq=ce([Ai,CC,HC,tO,Mi,Li,qi,Ui]),Pq=ce([Ni,ji,xC,rC,KT,vC,mC,Lo,GC]),Tq=ce([Di,AT,XC,pC,iC,VT,HT,JT,Vi,yC,Zi,Fi,Sn]),L=class t extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===G.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new Hu(o.elicitations,r)}return new t(e,r,n)}},Hu=class extends L{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(G.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function cr(t){return t==="completed"||t==="failed"||t==="cancelled"}var c2=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function dl(t){let r=Pi(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=w_(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function fl(t,e){let r=ir(t,e);if(!r.success)throw r.error;return r.data}var cO=6e4,Hi=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(Ni,r=>{this._oncancel(r)}),this.setNotificationHandler(ji,r=>{this._onprogress(r)}),this.setRequestHandler(Ai,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Mi,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new L(G.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(Li,async(r,n)=>{let o=async()=>{let s=r.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(s,n.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,p=new L(d.error.code,d.error.message,d.error.data);l(p)}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:n.requestId})}}let i=await this._taskStore.getTask(s,n.sessionId);if(!i)throw new L(G.InvalidParams,`Task not found: ${s}`);if(!cr(i.status))return await this._waitForTaskUpdate(s,n.signal),await o();if(cr(i.status)){let a=await this._taskStore.getTaskResult(s,n.sessionId);return this._clearTaskQueue(s),{...a,_meta:{...a._meta,[ar]:{taskId:s}}}}return await o()};return await o()}),this.setRequestHandler(qi,async(r,n)=>{try{let{tasks:o,nextCursor:s}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:o,nextCursor:s,_meta:{}}}catch(o){throw new L(G.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(Ui,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new L(G.InvalidParams,`Task not found: ${r.params.taskId}`);if(cr(o.status))throw new L(G.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let s=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!s)throw new L(G.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...s}}catch(o){throw o instanceof L?o:new L(G.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,r,n,o,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:s,onTimeout:o})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),L.fromError(G.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});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 n=this.transport?.onerror;this._transport.onerror=s=>{n?.(s),this._onerror(s)};let o=this._transport?.onmessage;this._transport.onmessage=(s,i)=>{o?.(s,i),No(s)||av(s)?this._onresponse(s):Ju(s)?this._onrequest(s,i):iv(s)?this._onnotification(s):this._onerror(new Error(`Unknown message type: ${JSON.stringify(s)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=L.fromError(G.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of e.values())n(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(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(e,r){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,s=e.params?._meta?.[ar]?.taskId;if(n===void 0){let l={jsonrpc:"2.0",id:e.id,error:{code:G.MethodNotFound,message:"Method not found"}};s&&this._taskMessageQueue?this._enqueueTaskMessage(s,{type:"error",message:l,timestamp:Date.now()},o?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):o?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let i=new AbortController;this._requestHandlerAbortControllers.set(e.id,i);let a=nv(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,o?.sessionId):void 0,u={signal:i.signal,sessionId:o?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(i.signal.aborted)return;let d={relatedRequestId:e.id};s&&(d.relatedTask={taskId:s}),await this.notification(l,d)},sendRequest:async(l,d,p)=>{if(i.signal.aborted)throw new L(G.ConnectionClosed,"Request was cancelled");let m={...p,relatedRequestId:e.id};s&&!m.relatedTask&&(m.relatedTask={taskId:s});let f=m.relatedTask?.taskId??s;return f&&c&&await c.updateTaskStatus(f,"input_required"),await this.request(l,d,m)},authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:s,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,u)).then(async l=>{if(i.signal.aborted)return;let d={result:l,jsonrpc:"2.0",id:e.id};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"response",message:d,timestamp:Date.now()},o?.sessionId):await o?.send(d)},async l=>{if(i.signal.aborted)return;let d={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:G.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"error",message:d,timestamp:Date.now()},o?.sessionId):await o?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,o=Number(r),s=this._progressHandlers.get(o);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&i&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),i(c);return}s(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),No(e))n(e);else{let i=new L(e.error.code,e.error.message,e.error.data);n(i)}return}let o=this._responseHandlers.get(r);if(o===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 s=!1;if(No(e)&&e.result&&typeof e.result=="object"){let i=e.result;if(i.task&&typeof i.task=="object"){let a=i.task;typeof a.taskId=="string"&&(s=!0,this._taskProgressTokens.set(a.taskId,r))}}if(s||this._progressHandlers.delete(r),No(e))o(e);else{let i=L.fromError(e.error.code,e.error.message,e.error.data);o(i)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,r,n){let{task:o}=n??{};if(!o){try{yield{type:"result",result:await this.request(e,r,n)}}catch(i){yield{type:"error",error:i instanceof L?i:new L(G.InternalError,String(i))}}return}let s;try{let i=await this.request(e,Sn,n);if(i.task)s=i.task.taskId,yield{type:"taskCreated",task:i.task};else throw new L(G.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:s},n);if(yield{type:"taskStatus",task:a},cr(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:s},r,n)}:a.status==="failed"?yield{type:"error",error:new L(G.InternalError,`Task ${s} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new L(G.InternalError,`Task ${s} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:s},r,n)};return}let c=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),n?.signal?.throwIfAborted()}}catch(i){yield{type:"error",error:i instanceof L?i:new L(G.InternalError,String(i))}}}request(e,r,n){let{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i,task:a,relatedTask:c}=n??{};return new Promise((u,l)=>{let d=x=>{l(x)};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(x){d(x);return}n?.signal?.throwIfAborted();let p=this._requestMessageId++,m={...e,jsonrpc:"2.0",id:p};n?.onprogress&&(this._progressHandlers.set(p,n.onprogress),m.params={...e.params,_meta:{...e.params?._meta||{},progressToken:p}}),a&&(m.params={...m.params,task:a}),c&&(m.params={...m.params,_meta:{...m.params?._meta||{},[ar]:c}});let f=x=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(x)}},{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i}).catch(S=>this._onerror(new Error(`Failed to send cancellation: ${S}`)));let w=x instanceof L?x:new L(G.RequestTimeout,String(x));l(w)};this._responseHandlers.set(p,x=>{if(!n?.signal?.aborted){if(x instanceof Error)return l(x);try{let w=ir(r,x.result);w.success?u(w.data):l(w.error)}catch(w){l(w)}}}),n?.signal?.addEventListener("abort",()=>{f(n?.signal?.reason)});let h=n?.timeout??cO,g=()=>f(L.fromError(G.RequestTimeout,"Request timed out",{timeout:h}));this._setupTimeout(p,h,n?.maxTotalTimeout,g,n?.resetTimeoutOnProgress??!1);let _=c?.taskId;if(_){let x=w=>{let S=this._responseHandlers.get(p);S?S(w):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,x),this._enqueueTaskMessage(_,{type:"request",message:m,timestamp:Date.now()}).catch(w=>{this._cleanupTimeout(p),l(w)})}else this._transport.send(m,{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i}).catch(x=>{this._cleanupTimeout(p),l(x)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},Zi,r)}async getTaskResult(e,r,n){return this.request({method:"tasks/result",params:e},r,n)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},Fi,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},lv,r)}async notification(e,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let n=r?.relatedTask?.taskId;if(n){let a={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[ar]:r.relatedTask}}};await this._enqueueTaskMessage(n,{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||{},[ar]:r.relatedTask}}}),this._transport?.send(a,r).catch(c=>this._onerror(c))});return}let i={...e,jsonrpc:"2.0"};r?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[ar]:r.relatedTask}}}),await this._transport.send(i,r)}setRequestHandler(e,r){let n=dl(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,s)=>{let i=fl(e,o);return Promise.resolve(r(i,s))})}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 n=dl(e);this._notificationHandlers.set(n,o=>{let s=fl(e,o);return Promise.resolve(r(s))})}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,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,n,o)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,r);for(let o of n)if(o.type==="request"&&Ju(o.message)){let s=o.message.id,i=this._requestResolvers.get(s);i?(i(new L(G.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(s)):this._onerror(new Error(`Resolver missing for request ${s} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(e);o?.pollInterval&&(n=o.pollInterval)}catch{}return new Promise((o,s)=>{if(r.aborted){s(new L(G.InvalidRequest,"Request cancelled"));return}let i=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(i),s(new L(G.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!e)throw new Error("No request provided");return await n.createTask(o,e.id,{method:e.method,params:e.params},r)},getTask:async o=>{let s=await n.getTask(o,r);if(!s)throw new L(G.InvalidParams,"Failed to retrieve task: Task not found");return s},storeTaskResult:async(o,s,i)=>{await n.storeTaskResult(o,s,i,r);let a=await n.getTask(o,r);if(a){let c=Lo.parse({method:"notifications/tasks/status",params:a});await this.notification(c),cr(a.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>n.getTaskResult(o,r),updateTaskStatus:async(o,s,i)=>{let a=await n.getTask(o,r);if(!a)throw new L(G.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(cr(a.status))throw new L(G.InvalidParams,`Cannot update task "${o}" from terminal status "${a.status}" to "${s}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(o,s,i,r);let c=await n.getTask(o,r);if(c){let u=Lo.parse({method:"notifications/tasks/status",params:c});await this.notification(u),cr(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}};function gv(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function yv(t,e){let r={...t};for(let n in e){let o=n,s=e[o];if(s===void 0)continue;let i=r[o];gv(i)&&gv(s)?r[o]={...i,...s}:r[o]=s}return r}var ax=gt(Xd(),1),cx=gt(ix(),1);function h1(){let t=new ax.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,cx.default)(t),t}var Ca=class{constructor(e){this._ajv=e??h1()}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 n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var Oa=class{constructor(e){this._server=e}requestStream(e,r,n){return this._server.requestStream(e,r,n)}async getTask(e,r){return this._server.getTask({taskId:e},r)}async getTaskResult(e,r,n){return this._server.getTaskResult({taskId:e},r,n)}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 ux(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 lx(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 Ia=class extends Hi{constructor(e,r){super(r),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Uo.options.map((n,o)=>[n,o])),this.isMessageIgnored=(n,o)=>{let s=this._loggingLevels.get(o);return s?this.LOG_LEVEL_SEVERITY.get(n)<this.LOG_LEVEL_SEVERITY.get(s):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new Ca,this.setRequestHandler(Qu,n=>this._oninitialize(n)),this.setNotificationHandler(Xu,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(al,async(n,o)=>{let s=o.sessionId||o.requestInfo?.headers["mcp-session-id"]||void 0,{level:i}=n.params,a=Uo.safeParse(i);return a.success&&this._loggingLevels.set(s,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Oa(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=yv(this._capabilities,e)}setRequestHandler(e,r){let o=Pi(e)?.method;if(!o)throw new Error("Schema is missing a method literal");let s;if(wn(o)){let a=o;s=a._zod?.def?.value??a.value}else{let a=o;s=a._def?.value??a.value}if(typeof s!="string")throw new Error("Schema method literal must be a string");if(s==="tools/call"){let a=async(c,u)=>{let l=ir(Fo,c);if(!l.success){let f=l.error instanceof Error?l.error.message:String(l.error);throw new L(G.InvalidParams,`Invalid tools/call request: ${f}`)}let{params:d}=l.data,p=await Promise.resolve(r(c,u));if(d.task){let f=ir(Sn,p);if(!f.success){let h=f.error instanceof Error?f.error.message:String(f.error);throw new L(G.InvalidParams,`Invalid task creation result: ${h}`)}return f.data}let m=ir(Vi,p);if(!m.success){let f=m.error instanceof Error?m.error.message:String(m.error);throw new L(G.InvalidParams,`Invalid tools/call result: ${f}`)}return m.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){lx(this._clientCapabilities?.tasks?.requests,e,"Client")}assertTaskHandlerCapability(e){this._capabilities&&ux(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:ev.includes(r)?r:Wu,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"},Di)}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 n=e.messages[e.messages.length-1],o=Array.isArray(n.content)?n.content:[n.content],s=o.some(u=>u.type==="tool_result"),i=e.messages.length>1?e.messages[e.messages.length-2]:void 0,a=i?Array.isArray(i.content)?i.content:[i.content]:[],c=a.some(u=>u.type==="tool_use");if(s){if(o.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(o.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},ul,r):this.request({method:"sampling/createMessage",params:e},cl,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 o=e;return this.request({method:"elicitation/create",params:o},Bi,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let o=e.mode==="form"?e:{...e,mode:"form"},s=await this.request({method:"elicitation/create",params:o},Bi,r);if(s.action==="accept"&&s.content&&o.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(o.requestedSchema)(s.content);if(!a.valid)throw new L(G.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(i){throw i instanceof L?i:new L(G.InternalError,`Error validating elicitation response: ${i instanceof Error?i.message:String(i)}`)}return s}}}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},ll,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 cf=gt(require("node:process"),1);var Ra=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
153
- `);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),g1(r)}clear(){this._buffer=void 0}};function g1(t){return cv.parse(JSON.parse(t))}function dx(t){return JSON.stringify(t)+`
154
- `}var Da=class{constructor(e=cf.default.stdin,r=cf.default.stdout){this._stdin=e,this._stdout=r,this._readBuffer=new Ra,this._started=!1,this._ondata=n=>{this._readBuffer.append(n),this.processReadBuffer()},this._onerror=n=>{this.onerror?.(n)}}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 n=dx(e);this._stdout.write(n)?r():this._stdout.once("drain",r)})}};var bs=class{index;constructor(e){this.index=e}getByName(e){return this.index.byName.get(e)}getBySelector(e){return this.index.bySelector.get(e)}getByType(e){switch(e){case"component":return this.index.components;case"directive":return this.index.directives;case"pipe":return this.index.pipes;case"service":return this.index.services;case"all":return[...this.index.components,...this.index.directives,...this.index.pipes,...this.index.services];default:return[]}}getAll(e=!1){let r=this.getByType("all");return e?r:r.filter(n=>!n.deprecated)}updateIndex(e){this.index=e}};var ws=class{index;constructor(e){this.index=e}search(e){let{query:r,types:n,includeDeprecated:o=!1,limit:s=50,offset:i=0}=e,a=r.toLowerCase().trim();if(a.length===0)return{items:[],total:0,hasMore:!1};let c=this.getCandidates(a,n),u=[];for(let m of c){if(!o&&m.deprecated)continue;let f=this.calculateRelevanceScore(m,a);f>0&&u.push({doc:m,relevanceScore:f})}u.sort((m,f)=>f.relevanceScore-m.relevanceScore);let l=u.length,d=u.slice(i,i+s),p=i+s<l;return{items:d,total:l,hasMore:p}}getCandidates(e,r){let n=e.split(/[^a-z0-9]+/).filter(i=>i.length>0),o=new Set;for(let i of n){if(this.index.searchIndex.has(i)){let a=this.index.searchIndex.get(i);for(let c of a)o.add(c)}for(let[a,c]of this.index.searchIndex.entries())if(a.startsWith(i))for(let u of c)o.add(u)}let s=[];for(let i of o){let a=this.index.byName.get(i);a&&(r&&r.length>0?r.includes(a.type)&&s.push(a):s.push(a))}return s}calculateRelevanceScore(e,r){let n=0,o=e.name.toLowerCase();if(o===r&&(n+=100),"selector"in e&&e.selector){let s=e.selector.toLowerCase();(s===r||s.includes(r))&&(n+=80)}if(o.startsWith(r)&&(n+=60),!o.startsWith(r)&&o.includes(r)&&(n+=30),e.description&&e.description.toLowerCase().includes(r)&&(n+=40),"inputs"in e&&e.inputs){for(let s of e.inputs)if(s.name.toLowerCase().includes(r)){n+=30;break}}if("outputs"in e&&e.outputs){for(let s of e.outputs)if(s.name.toLowerCase().includes(r)){n+=30;break}}if("methods"in e&&e.methods){for(let s of e.methods)if(s.name.toLowerCase().includes(r)){n+=20;break}}return e.deprecated&&(n=Math.floor(n*.5)),n}updateIndex(e){this.index=e}};var Na=class{getPreferredDescription(e){return e.rawdescription??e.description??""}formatList(e,r=!1){return e.filter(n=>r||!n.deprecated).map(n=>this.formatSummary(n))}formatSummary(e){let r=e.type==="injectable"?"service":e.type,n="selector"in e?e.selector:void 0;return{name:e.name,type:r,selector:n,description:this.getPreferredDescription(e),deprecated:e.deprecated}}formatDetails(e){let r=this.formatInputs(e),n=this.formatOutputs(e),o=this.formatMethods(e),s=this.formatExamples(e),i=e.type==="injectable"?"service":e.type,a="selector"in e?e.selector:void 0,c="standalone"in e?e.standalone:void 0,u="imports"in e?e.imports:void 0;return{name:e.name,type:i,selector:a,description:this.getPreferredDescription(e),inputs:r,outputs:n,methods:o,examples:s,deprecated:e.deprecated,deprecationMessage:e.deprecationMessage,standalone:c,imports:u}}formatInputs(e){let r=[];return"inputs"in e&&e.inputs&&r.push(...e.inputs.map(n=>this.formatProperty(n))),"inputsClass"in e&&e.inputsClass&&r.push(...e.inputsClass.map(n=>this.formatProperty(n))),r}formatOutputs(e){let r=[];return"outputs"in e&&e.outputs&&r.push(...e.outputs.map(n=>this.formatProperty(n))),"outputsClass"in e&&e.outputsClass&&r.push(...e.outputsClass.map(n=>this.formatProperty(n))),r}formatProperty(e){return{name:e.name,type:e.type||"any",required:!e.optional,description:this.getPreferredDescription(e),defaultValue:e.defaultValue}}formatMethods(e){return!("methods"in e)||!e.methods?[]:e.methods.map(r=>this.formatMethod(r))}formatMethod(e){let r=(e.args||[]).map(s=>({name:s.name,type:s.type||"any",optional:s.optional||!1,defaultValue:s.defaultValue})),n=r.map(s=>{let i=s.optional?"?":"",a=s.defaultValue?` = ${s.defaultValue}`:"";return`${s.name}${i}: ${s.type}${a}`}).join(", "),o=`${e.name}(${n}): ${e.returnType||"void"}`;return{name:e.name,signature:o,description:this.getPreferredDescription(e),parameters:r,returnType:e.returnType||"void"}}formatExamples(e){return!("examples"in e)||!e.examples?[]:e.examples}formatSearchResults(e){return e.map(r=>{let n=r.doc.type==="injectable"?"service":r.doc.type,o="selector"in r.doc?r.doc.selector:void 0;return{name:r.doc.name,type:n,selector:o,description:this.getPreferredDescription(r.doc),deprecated:r.doc.deprecated,relevanceScore:r.relevanceScore}})}toJSON(e){return JSON.stringify(e,null,2)}formatDeprecatedList(e,r){if(e.length===0)return"No deprecated items found.";let n=e.reduce((s,i)=>(s[i.type]||(s[i.type]=[]),s[i.type].push(i),s),{}),o=`Found ${e.length} deprecated item(s):
155
+ `)}var ka=rt(require("fs")),RI=rt(require("path")),UI=require("zlib");var _k=require("node:events"),$k=require("node:fs"),wk=require("node:fs/promises"),Oe=rt(require("node:path"),1);var lr=require("node:fs/promises"),fn=require("node:path"),RS=require("node:stream"),St={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},ki={root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:St.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:256};Object.freeze(ki);var US="READDIRP_RECURSIVE_ERROR",fN=new Set(["ENOENT","EPERM","EACCES","ELOOP",US]),AS=[St.DIR_TYPE,St.EVERYTHING_TYPE,St.FILE_DIR_TYPE,St.FILE_TYPE],pN=new Set([St.DIR_TYPE,St.EVERYTHING_TYPE,St.FILE_DIR_TYPE]),mN=new Set([St.EVERYTHING_TYPE,St.FILE_DIR_TYPE,St.FILE_TYPE]),hN=t=>fN.has(t.code),gN=process.platform==="win32",NS=t=>!0,jS=t=>{if(t===void 0)return NS;if(typeof t=="function")return t;if(typeof t=="string"){let e=t.trim();return n=>n.basename===e}if(Array.isArray(t)){let e=t.map(n=>n.trim());return n=>e.some(i=>n.basename===i)}return NS},Yg=class extends RS.Readable{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;_relStart;constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark??ki.highWaterMark});let n={...ki,...e},i=n.root??ki.root,r=n.type??ki.type;this._fileFilter=jS(n.fileFilter),this._directoryFilter=jS(n.directoryFilter);let o=n.lstat?lr.lstat:lr.stat;gN?this._stat=s=>o(s,{bigint:!0}):this._stat=o,this._maxDepth=n.depth!=null&&Number.isSafeInteger(n.depth)?n.depth:ki.depth,this._wantsDir=pN.has(r),this._wantsFile=mN.has(r),this._wantsEverything=r===St.EVERYTHING_TYPE,this._root=(0,fn.resolve)(i),this._relStart=this._root.endsWith(fn.sep)?this._root.length:this._root.length+1,this._isDirent=!n.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent};let a={path:this._root,depth:1};a.pending=this._exploreDir(this._root,1),this.parents=[a],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let n=this.parent,i=n&&n.files;if(i&&i.length>0){let{path:r,depth:o}=n,a=i.splice(0,e).map(c=>this._formatEntry(c,r)),s=this._isDirent?a:await Promise.all(a);for(let c of s){if(!c)continue;if(this.destroyed)return;let u=this._getEntryType(c);typeof u!="string"&&(u=await u),u==="directory"&&this._directoryFilter(c)?(o<=this._maxDepth&&this.parents.push({path:c.fullPath,depth:o+1}),this._wantsDir&&(this.push(c),e--)):(u==="file"||this._includeAsFile(c))&&this._fileFilter(c)&&this._wantsFile&&(this.push(c),e--)}}else{let r=this.parents.pop();if(!r){this.push(null);break}let o=r.pending??this._exploreDir(r.path,r.depth),a=this.parents[this.parents.length-1];if(a&&!a.pending&&(a.pending=this._exploreDir(a.path,a.depth)),this.parent=await o,this.destroyed)return}}}catch(n){this.destroy(n)}finally{this.reading=!1}}}async _exploreDir(e,n){let i;try{i=await(0,lr.readdir)(e,this._rdOptions)}catch(r){this._onError(r)}return{files:i,depth:n,path:e}}_formatEntry(e,n){let i=this._isDirent?e.name:e,r=(0,fn.join)(n,i),o={path:r.slice(this._relStart),fullPath:r,basename:i};return this._isDirent?(o.dirent=e,o):this._stat(r).then(a=>(o.stats=a,o),a=>{this._onError(a)})}_onError(e){hN(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}_getEntryType(e){if(!e||!(this._statsProp in e))return"";let n=e[this._statsProp];return n.isFile()?"file":n.isDirectory()?"directory":n.isSymbolicLink()?this._getSymlinkEntryType(e):""}async _getSymlinkEntryType(e){let n=e.fullPath;try{let i=await(0,lr.realpath)(n),r=await(0,lr.lstat)(i);if(r.isFile())return"file";if(r.isDirectory()){let o=i.length;if(n.startsWith(i)&&n[o]===fn.sep){let a=new Error(`Circular symlink detected: "${n}" points to "${i}"`);return a.code=US,this._onError(a),""}return"directory"}}catch(i){this._onError(i)}return""}_includeAsFile(e){let n=e&&e[this._statsProp];return n&&this._wantsEverything&&!n.isDirectory()}};function LS(t,e={}){let n=e.entryType||e.type;if(n==="both"&&(n=St.FILE_DIR_TYPE),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(n&&!AS.includes(n))throw new Error(`readdirp: Invalid type passed. Use one of ${AS.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");let i={...e,root:t};return n&&(i.type=n),new Yg(i)}var ga=require("node:fs"),gn=require("node:fs/promises"),Le=rt(require("node:path"),1);var MS=require("node:os"),Ue=rt(require("node:path"),1),ey=process.platform,ct=ey==="win32",pn=ey==="darwin",FS=ey==="linux";var ZS=(0,MS.type)()==="OS400";function yN(t){return t?.code}function ty(t){let e=yN(t);return e==="ENOENT"||e==="ENOTDIR"?"missing":e==="EPERM"||e==="EACCES"?"permission":e==="ERR_FEATURE_UNAVAILABLE_ON_PLATFORM"?"recursive-unsupported":"other"}function ze(t){return ty(t)==="missing"}function qS(t){return ty(t)==="permission"}function VS(t){return ty(t)==="recursive-unsupported"}var BS=Object.freeze({now:()=>Date.now(),setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>{t&&clearTimeout(t)}}),ee={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},Qg=/\\/g,vN=/\/\//g;function Ii(t){if(typeof t!="string")throw new TypeError("string expected");let e=t.replace(Qg,"/"),n=e.startsWith("//"),i=Ue.normalize(e).replace(Qg,"/").replace(vN,"/");return n&&!i.startsWith("//")&&(i=`/${i}`),i}function Tr(t){if(typeof t.mtimeMs!="bigint")return t;let e=t,n=e.mtimeNs/1000000000n,i=e.mtimeNs%1000000000n,r=Number(n)*1e3+Number(i)/1e6;return{size:Number(e.size),mtimeMs:r,ino:Number(e.ino)}}function L(t){let e=Ue.resolve(t);return ct||!e.includes("\\")?e.replace(Qg,"/"):Ii(e)}function HS(t){return t!==".."&&!t.startsWith(`..${Ue.sep}`)&&!Ue.isAbsolute(t)}function mn(t,e){let n=Ue.relative(t,e);return n===""||HS(n)}function fa(t,e){let n=Ue.relative(t,e);return n!==""&&HS(n)}function dr(t){return typeof t=="object"&&t!==null&&!(t instanceof RegExp)}function GS(t){return t instanceof RegExp?new RegExp(t.source,t.flags):dr(t)?Object.freeze({...t}):t}function bN(t){return typeof t=="function"?t:typeof t=="string"?e=>t===e:t instanceof RegExp?e=>(t.lastIndex=0,t.test(e)):dr(t)?e=>t.path===e||!!(t.recursive&&fa(t.path,e)):()=>!1}function pa(t){let e=t.map(bN);return(n,i)=>{if(e.length===0)return!1;let r=Ii(n);return e.some(o=>o(r,i))}}function JS(t,e=process.cwd()){return typeof t=="string"?Ii(Ue.isAbsolute(t)?t:Ue.join(e,t)):dr(t)?{path:Ii(Ue.isAbsolute(t.path)?t.path:Ue.join(e,t.path)),recursive:t.recursive}:t}var _N=/^\.[/\\]/,zu=class t{watchPath;followSymlinks;recursiveRoot;recursiveDisabled;observationTrigger;realpathAncestry;pathGeneration;context;constructor(e,n,i){this.context=i,this.watchPath=e.replace(_N,""),this.followSymlinks=n,this.realpathAncestry=new Set,this.pathGeneration=i.capturePathGeneration()}fork(e){let n=new t(e,this.followSymlinks,this.context);return n.recursiveRoot=this.recursiveRoot,n.recursiveDisabled=this.recursiveDisabled,n.observationTrigger=this.observationTrigger,n.realpathAncestry=new Set(this.realpathAncestry),n.pathGeneration=this.pathGeneration,n}withObservation(e){let n=Object.create(this);return n.observationTrigger=e,n}filterPath(e){return e.stats?.isSymbolicLink()?this.filterDir(e):this.context.isntIgnored(Ue.join(this.watchPath,e.path),e.stats)}filterDir(e){return this.context.isntIgnored(Ue.join(this.watchPath,e.path),e.stats)}};var $N=0;function ny(){return++$N}function wN(t,e){return t.closed?!1:(t.subscribers.add(e),!0)}function xN(t,e){if(!(t.closed||!t.subscribers.delete(e)))return t.subscribers.size>0?"remaining":"last"}function SN(t){if(t.closed)return;t.closed=!0;let e=[...t.subscribers];return t.subscribers.clear(),e}function YS(t){[...t.subscribers].some(n=>n.persistent)?t.watcher.ref():t.watcher.unref()}function iy(t,e){let n=SN(t);if(n)return e.get(t.resource)===t&&e.delete(t.resource),t.watcher.close(),n}function QS(t,e){wN(t,e),YS(t)}function ek(t,e,n){let i=!1;return{resource:t.resource,close:()=>{if(i)return;i=!0;let r=xN(t,e);r==="remaining"?YS(t):r==="last"&&n.get(t.resource)===t&&iy(t,n)}}}function tk(t){let e=t.backend==="native-recursive"||t.backend==="auto"&&(pn||ct),n=t.backend==="polling"?"polling":e&&t.depth===void 0?"native-recursive-preferred":"native-per-directory";return Object.freeze({kind:n,polling:n==="polling",recursive:n==="native-recursive-preferred",perDirectory:n==="native-per-directory"})}var oy=ee,kN=1e3;function ya(){return performance.now()}function rk(t){let e=Le.normalize(t);if(!ct)return e;try{return ga.realpathSync.native(e)}catch{return e}}function nk(t,e){if(!ct||e===null||!Le.isAbsolute(e))return e;let n=Le.normalize(Le.toNamespacedPath(t)),i=Le.normalize(Le.toNamespacedPath(e)),r=Le.relative(n,i);return mn(n,i)?r||null:e}var hn=new Map;function IN(t,e,n){return(0,ga.watch)(t,e,n)}var PN=IN,ma=new Map,KS=!1;function zN(t,e,n){return(0,ga.watch)(t,e,n)}var EN=zN;function DN(t,e){let n=iy(t,ma);n&&n.forEach(i=>i.failure(e))}function ik(t,e,n,i){if(KS)return{kind:"unsupported"};let r=Le.resolve(t),o={...n,watchedPath:t,persistent:e},a=ma.get(r);if(!a){let c,u,l=rk(t);try{c=EN(l,{persistent:e,recursive:!0},(d,p)=>{let m=u;if(!m||m.closed||ma.get(r)!==m)return;let f={kind:"native",resource:r,rawEvent:d,relativePath:nk(l,p),sequence:++m.sequence,observedAt:ya()};m.subscribers.forEach(h=>{h.rawEmitter(d,p,{watchedPath:h.watchedPath}),h.publish(f)})})}catch(d){return VS(d)?(KS=!0,{kind:"unsupported"}):{kind:"failed",error:d}}u=a={resource:r,generation:ny(),subscribers:new Set,closed:!1,watcher:c,sequence:0},ma.set(r,a),c.on(oy.ERROR,d=>DN(a,d))}QS(a,o);let s=ek(a,o,ma);return i.aborted&&s.close(),{kind:"subscribed",subscription:s}}function ON(t,e,n,i){try{return PN(t,{persistent:e.persistent},n)}catch(r){i(r);return}}function ok(t,e,n,i,r=n){if(t.closed||hn.get(t.resource)!==t)return;let o={kind:"native",resource:t.resource,rawEvent:e,relativePath:n,sequence:++t.sequence,observedAt:ya()};t.subscribers.forEach(a=>{i&&a.rawEmitter(e,r,{watchedPath:a.watchedPath}),a.publish(o)})}function WS(t,e){t.closed||hn.get(t.resource)!==t||t.subscribers.forEach(n=>n.errHandler(e))}function ak(t,e){iy(t,hn)?.forEach(i=>i.failure?.(e))}async function TN(t,e,n){if(ct&&n.code==="EPERM")try{await(await(0,gn.open)(t,"r")).close(),WS(e,n)}catch{ok(e,"rename",null,!1)}else WS(e,n);ak(e,n)}async function CN(t,e){try{await(0,gn.lstat)(Le.join(e,Le.basename(e)));return}catch(n){if(!ze(n))return}try{if(!(await(0,gn.stat)(e)).isDirectory())return}catch{return}t.closed||hn.get(t.resource)!==t||ak(t,new Error(`Watched directory was replaced: ${e}`))}function AN(t,e,n,i,r){let o,a=ON(e,i,(s,c)=>{let u=nk(e,c);ok(o,s,u,!0,c),FS&&s==="rename"&&c===Le.basename(e)&&CN(o,e)},r.errHandler);if(a)return o={resource:n,generation:ny(),subscribers:new Set([r]),closed:!1,watcher:a,sequence:0},hn.set(n,o),a.on(oy.ERROR,s=>{TN(t,o,s)}),o}function Du(t,e,n,i,r){let o=e,a={...i,watchedPath:t,persistent:n.persistent??!0},s=hn.get(o);if(s)QS(s,a);else if(s=AN(t,rk(t),o,n,a),!s)return;let c=ek(s,a,hn);if(r.aborted){c.close();return}return c}var NN=Object.freeze({missing:!0}),Eu=new Map;function ha(t){return"missing"in t}function jN(t,e){let n=ha(t),i=ha(e);if(n||i)return n!==i;let r=!ct&&t.ino!==0&&e.ino!==0&&t.ino!==e.ino;return t.size!==e.size||t.mtimeMs!==e.mtimeMs||r}function sk(t){t.timer&&(t.persistent?t.timer.ref():t.timer.unref())}function ry(t,e=t.interval){t.closed||t.subscribers.size===0||(t.timer=t.scheduler.setTimeout(()=>{t.timer=void 0;let n=RN(t);t.currentPoll=n,n.then(()=>{t.currentPoll===n&&(t.currentPoll=void 0)},()=>{t.currentPoll===n&&(t.currentPoll=void 0)})},e),sk(t))}async function RN(t){if(t.closed||t.running||t.subscribers.size===0)return;t.running=!0;let e=t.scheduler.now(),n;try{n=await(0,gn.stat)(t.resource)}catch(i){ze(i)?n=NN:t.subscribers.forEach(r=>r.errHandler(i))}if(!t.closed&&n){let i=t.previous;t.previous=n;let r=t.scheduler.now(),o=i&&jN(i,n),a=t.directoryReplayAt!==void 0&&r>=t.directoryReplayAt;if(!ha(n)&&n.isDirectory()?o?t.directoryReplayAt=r+kN:a&&(t.directoryReplayAt=void 0):t.directoryReplayAt=void 0,i&&(o||a)){let s={kind:"poll",resource:t.resource,current:n,previous:i,sequence:++t.sequence,observedAt:t.scheduler.now()};t.subscribers.forEach(c=>{c.rawEmitter(oy.CHANGE,t.resource,{current:n,previous:i}),c.publish(s)})}}if(t.running=!1,!t.closed&&t.subscribers.size>0){let i=t.scheduler.now()-e;ry(t,Math.max(0,t.interval-i))}}function XS(t){if(t.closed||t.subscribers.size===0)return;let e=Math.min(...[...t.subscribers].map(r=>r.interval)),n=[...t.subscribers].some(r=>r.persistent),i=t.interval!==e;t.interval=e,t.persistent=n,t.timer&&i?(t.scheduler.clearTimeout(t.timer),t.timer=void 0,ry(t)):t.timer?sk(t):t.running||ry(t)}function ck(t,e,n,i,r,o,a){let s=e,c={watchedPath:t,...n,...r},u=Eu.get(s);u||(u=new Map,Eu.set(s,u));let l=u.get(i);l?!l.previous&&o&&(l.previous=o):(l={resource:s,generation:ny(),scheduler:i,subscribers:new Set,interval:n.interval,persistent:n.persistent,previous:o,running:!1,closed:!1,sequence:0},u.set(i,l)),l.subscribers.add(c),XS(l);let d=!1,p,m={resource:s,close:()=>p||(p=(async()=>{if(d)return;if(d=!0,l.subscribers.delete(c),l.subscribers.size>0){XS(l);return}if(l.closed)return;l.closed=!0,l.timer&&l.scheduler.clearTimeout(l.timer),l.timer=void 0;let f=Eu.get(s);f?.get(i)===l&&(f.delete(i),f.size===0&&Eu.delete(s)),l.currentPoll&&await Promise.allSettled([l.currentPoll])})(),p)};if(a.aborted){m.close();return}return m}var cy=require("node:fs/promises"),ut=rt(require("node:path"),1);var fr=rt(require("node:path"),1);var Ou=class{state="OPEN";generation=0;abortController=new AbortController;tasks=new Set;closers=new Map;onTaskSettled;onTaskError;constructor(e,n){this.onTaskSettled=e,this.onTaskError=n}isActive(e){return this.state==="OPEN"&&this.generation===e}track(e){let n=Promise.resolve(e).finally(()=>{this.tasks.delete(n),this.onTaskSettled()});return this.tasks.add(n),n.catch(this.onTaskError),n}addCloser(e,n){let i=this.closers.get(e);i?i.push(n):this.closers.set(e,[n])}takeClosers(e){let n=this.closers.get(e)??[];return this.closers.delete(e),n}beginClose(){if(this.state!=="OPEN")return[];this.state="CLOSING",this.generation+=1,this.abortController.abort();let e=[];return this.closers.forEach(n=>{n.forEach(i=>{try{e.push(Promise.resolve(i()))}catch(r){e.push(Promise.reject(r))}})}),this.closers.clear(),e}async drain(){for(;this.tasks.size>0;)await Promise.allSettled([...this.tasks])}finishClose(){this.state="CLOSED"}};function UN(){}function va(t,e){if(fr.isAbsolute(e))return;let n=fr.resolve(t),i=fr.resolve(n,e);if(mn(n,i))return fr.join(t,e)}var Tu=class{queues=new Map;pending=new Map;lifecycle;constructor(e){this.lifecycle=e}enqueue(e,n,i=e){let r=L(e),o=i===!1?void 0:`${r}\0${L(i)}`,a=o?this.pending.get(o):void 0;if(a)return a.work=n,a.replay=!0,a.promise;let s=this.lifecycle.generation,c={promise:Promise.resolve(),work:n,replay:!1},l=(this.queues.get(r)??Promise.resolve()).catch(UN).then(async()=>{do{let p=c.work;if(c.replay=!1,!this.lifecycle.isActive(s))return;await p()}while(c.replay)}).finally(()=>{this.queues.get(r)===l&&this.queues.delete(r),o&&this.pending.get(o)===c&&this.pending.delete(o)});this.queues.set(r,l);let d=this.lifecycle.track(l);return c.promise=d,o&&this.pending.set(o,c),d}forgetPending(e){for(let n of this.pending.keys()){let[i,r]=n.split("\0",2);e(i,r)&&this.pending.delete(n)}}clear(){this.queues.clear(),this.pending.clear()}},LN=".",MN="..",FN=25,ZN=10,qN=Object.freeze({size:0,mtimeMs:0,ino:0,kind:"other",initialRecursive:!0});function ay(t){return t.isSymbolicLink()?"symlink":t.isDirectory()?"directory":t.isFile()?"file":"other"}function uk(t,e){let n=Tr(e);return t?.size===n.size&&t.mtimeMs===n.mtimeMs&&t.ino===n.ino&&t.kind===ay(e)}function lk(t,e,n){return t?.observedAt!==void 0&&e.observedAt>=t.observedAt&&e.observedAt-t.observedAt<=n}var sy=class{path;items=new Set;constructor(e){this.path=e}add(e){e!==LN&&e!==MN&&e!==""&&this.items.add(e)}remove(e){return this.items.delete(e)&&this.items.size===0}has(e){return this.items.has(e)}getChildren(){return[...this.items]}dispose(){this.items.clear(),this.path=""}},Cu=class{watched=new Map;observed=new Map;symlinkPaths=new Map;recursiveRoots=new Set;observesNative;constructor(e){this.observesNative=e}getDirectory(e){let n=fr.resolve(e),i=L(n),r=this.watched.get(i);return r||(r=new sy(n),this.watched.set(i,r)),r}peekDirectory(e){return this.watched.get(L(fr.resolve(e)))}recordObserved(e,n,i,r,o=!1,a=!1){if(!this.observesNative()||!r&&!o&&!a)return;let{size:s,mtimeMs:c,ino:u}=Tr(n);this.observed.set(L(e),{size:s,mtimeMs:c,ino:u,kind:ay(n),transition:i,rawEvent:r?.rawEvent,relativePath:r?.relativePath,observedAt:r?.observedAt,initialRecursive:o})}consumeInitialCreate(e,n,i,r){if(!(!this.observed.get(L(e))?.initialRecursive||i.rawEvent!=="rename"))return this.recordObserved(e,n,"add",i),r?n.isDirectory()?ee.ADD_DIR:ee.ADD:!1}markInitialCreate(e){let n=L(e),i=this.observed.get(n);i?i.initialRecursive=!0:this.observed.set(n,{...qN})}clearInitialCreate(e){let n=this.observed.get(L(e));n&&(n.initialRecursive=!1)}clearInitialCreates(e){let n=L(e);for(let[i,r]of this.observed)mn(n,i)&&r.initialRecursive&&(r.initialRecursive=!1)}replacedSinceObserved(e,n){let i=this.observed.get(L(e)),{ino:r}=Tr(n);return i?.kind==="directory"&&n.isDirectory()&&i.ino!==0&&r!==0&&i.ino!==r}changedSinceObserved(e,n){let i=this.observed.get(L(e));return i!==void 0&&i.kind===ay(n)&&!uk(i,n)}isDuplicateObservation(e,n,i){let r=this.observed.get(L(e)),o=uk(r,n),a=o&&r?.transition==="add"&&r?.relativePath===i.relativePath&&r.rawEvent==="rename"&&i.rawEvent==="change"&&lk(r,i,FN),s=o&&n.isFile()&&!r?.initialRecursive&&(r?.transition==="add"||i.relativePath===null),c=o&&r?.transition==="change"&&r.relativePath===i.relativePath&&lk(r,i,ZN)&&r.rawEvent===i.rawEvent,u=s||a||c,l=c?void 0:s?r?.transition:"change";return this.recordObserved(e,n,l,i),u}dispose(){this.watched.forEach(e=>e.dispose()),this.watched.clear(),this.observed.clear(),this.symlinkPaths.clear(),this.recursiveRoots.clear()}};var dk=10;function Au(t){return t!==void 0&&t.isFile()&&Tr(t).size===0}function VN(t,e){if(t===void 0||e===void 0)return!1;let n=Tr(t),i=Tr(e);return n.size===i.size&&n.mtimeMs===i.mtimeMs&&n.ino===i.ino}var Nu=class{pendingWrites=new Map;pendingUnlinks=new Map;pendingChanges=new Map;heldAdds=new Map;throttled=new Map;context;constructor(e){this.context=e}presentPath(e){return ct&&(e=ut.normalize(e)),this.context.options.cwd?ut.relative(this.context.options.cwd,e):e}dropHeldAdd(e){let n=this.heldAdds.get(e);n&&this.context.scheduler.clearTimeout(n.timer),this.heldAdds.delete(e)}dropPendingChange(e){let n=this.pendingChanges.get(e);n?.held&&this.context.scheduler.clearTimeout(n.held.timer),this.pendingChanges.delete(e)}setTimeout(e,n){let i=this.context.scheduler.setTimeout(e,n);return this.context.options.persistent||i.unref(),i}async emit(e,n,i){if(this.context.isClosed())return;let{options:r,scheduler:o}=this.context,a=n,s=L(n),c=this.context.lifecycle.generation,u=this.context.capturePathGeneration();n=this.presentPath(n);let l=[n];i!=null&&l.push(i);let d=this.heldAdds.get(s);if(d){if(e===ee.CHANGE){d.path=a,i&&(d.stats=i),Au(i)||d.release();return}d.release()}(e===ee.UNLINK||e===ee.UNLINK_DIR)&&(this.dropPendingChange(s),this.throttled.get(ee.CHANGE)?.get(s)?.clear(!1));let p=r.awaitWriteFinish,m=p?this.pendingWrites.get(s):void 0;if(m){m.lastChange=o.now();return}if(r.atomic){if(e===ee.UNLINK){let h=this.pendingUnlinks.get(s);h&&o.clearTimeout(h.timer);let g=[e,...l],y=this.setTimeout(()=>{let v=this.pendingUnlinks.get(s);if(!v||v.timer!==y||(this.pendingUnlinks.delete(s),this.context.isClosed()))return;let[b,..._]=v.event;this.context.publish(b,_)},typeof r.atomic=="number"?r.atomic:100);this.pendingUnlinks.set(s,{event:g,timer:y});return}let f=this.pendingUnlinks.get(s);e===ee.ADD&&f&&(e=ee.CHANGE,o.clearTimeout(f.timer),this.pendingUnlinks.delete(s))}if(p&&(e===ee.ADD||e===ee.CHANGE)&&this.context.isReady()){let f=(h,g)=>{this.context.isClosed()||(h?(e=ee.ERROR,l[0]=h,this.context.publish(e,l)):g&&(l.length>1?l[1]=g:l.push(g),this.context.publish(e,l)))};this.awaitWriteFinish(n,p.stabilityThreshold,e,f,s);return}if(e===ee.ADD&&Au(i)&&this.context.isReady()){let f={path:a,stats:i,release:()=>{if(this.context.scheduler.clearTimeout(f.timer),this.heldAdds.get(s)!==f||(this.heldAdds.delete(s),this.context.isClosed()||!this.context.lifecycle.isActive(c)||!this.context.isPathGenerationActive(s,u)))return;let h=[this.presentPath(f.path)];f.stats&&h.push(f.stats),this.context.publish(ee.ADD,h)}};f.timer=this.setTimeout(f.release,dk),this.heldAdds.set(s,f);return}if(e===ee.CHANGE){if(!this.throttle(ee.CHANGE,a,50,g=>{let y=this.pendingChanges.get(s);this.dropPendingChange(s),g>0&&y?.replay&&this.context.lifecycle.isActive(c)&&this.context.isPathGenerationActive(s,u)&&this.emit(ee.CHANGE,y.path,y.stats)})){let g=this.pendingChanges.get(s);g&&!VN(g.stats,i)&&(g.path=a,g.stats=i,g.replay=!0,g.held&&!Au(i)&&g.held.release());return}let h={path:a,stats:i,replay:!1};if(this.pendingChanges.set(s,h),Au(i)){let g=()=>{if(h.held&&this.context.scheduler.clearTimeout(h.held.timer),h.held=void 0,this.pendingChanges.get(s)!==h||this.context.isClosed()||!this.context.lifecycle.isActive(c)||!this.context.isPathGenerationActive(s,u))return;h.replay=!1;let y=[this.presentPath(h.path)];h.stats&&y.push(h.stats),this.context.publish(ee.CHANGE,y)};h.held={timer:this.setTimeout(g,dk),release:g};return}}if(r.alwaysStat&&i===void 0&&(e===ee.ADD||e===ee.ADD_DIR||e===ee.CHANGE)){let f=r.cwd?ut.join(r.cwd,n):n;try{i=await(0,cy.stat)(f)}catch(h){this.context.handleError(h)}if(!i||!this.context.lifecycle.isActive(c)||!this.context.isPathGenerationActive(s,u))return;l.push(i)}this.context.publish(e,l)}throttle(e,n,i,r){let o=this.throttled.get(e);o||(o=new Map,this.throttled.set(e,o));let a=e==="readdir"?n:L(n),s=o.get(a);if(s)return s.count+=1,!1;let c,u=(d=!0)=>{let p=o.get(a),m=p?.count??0;return o.delete(a),this.context.scheduler.clearTimeout(c),p&&this.context.scheduler.clearTimeout(p.timeoutObject),d&&r&&r(m),m};c=this.setTimeout(u,i);let l={timeoutObject:c,clear:u,count:0};return o.set(a,l),l}awaitWriteFinish(e,n,i,r,o){let a=this.context.options.awaitWriteFinish;if(typeof a!="object")return;let s=a.pollInterval,c,u=e;this.context.options.cwd&&!ut.isAbsolute(e)&&(u=ut.join(this.context.options.cwd,e));let l=o??L(u);if(this.pendingWrites.has(l))return;let d=this.context.lifecycle.generation,p={lastChange:this.context.scheduler.now(),cancelWait:()=>(this.pendingWrites.get(l)===p&&this.pendingWrites.delete(l),this.context.scheduler.clearTimeout(c),i)},m=()=>this.context.lifecycle.isActive(d)&&this.pendingWrites.get(l)===p,f=h=>{let g=(async()=>{let y;try{y=await(0,cy.stat)(u)}catch(b){if(!m())return;ze(b)?(this.context.remove(ut.dirname(u),ut.basename(u)),this.pendingWrites.get(l)===p&&p.cancelWait()):(this.pendingWrites.delete(l),r(b));return}if(!m())return;let v=this.context.scheduler.now();h&&y.size!==h.size&&(p.lastChange=v),v-p.lastChange>=n?(this.pendingWrites.delete(l),r(void 0,y)):c=this.setTimeout(()=>f(y),s)})();this.context.lifecycle.track(g)};this.pendingWrites.set(l,p),c=this.setTimeout(f,s)}cancelPath(e){let n=L(e),i=this.pendingUnlinks.get(n);i&&(this.context.scheduler.clearTimeout(i.timer),this.pendingUnlinks.delete(n)),this.pendingWrites.get(n)?.cancelWait(),this.dropPendingChange(n),this.dropHeldAdd(n),["watch","add","remove","change"].forEach(o=>{this.throttled.get(o)?.get(n)?.clear(!1)});let r=this.throttled.get("readdir");r?.get(n)?.clear(!1),r?.get(`${L(ut.dirname(n))}\0${ut.basename(n)}`)?.clear(!1)}cancelWhere(e){[...new Set([...this.pendingUnlinks.keys(),...this.pendingWrites.keys(),...this.pendingChanges.keys(),...this.heldAdds.keys()])].filter(e).forEach(i=>this.cancelPath(i)),this.throttled.forEach((i,r)=>{[...i.keys()].filter(o=>e(r==="readdir"?o.split("\0",1)[0]:o)).forEach(o=>i.get(o)?.clear(!1))})}close(){this.pendingWrites.forEach(e=>e.cancelWait()),this.pendingUnlinks.forEach(({timer:e})=>this.context.scheduler.clearTimeout(e)),this.pendingUnlinks.clear(),this.pendingChanges.forEach(({held:e})=>this.context.scheduler.clearTimeout(e?.timer)),this.pendingChanges.clear(),this.heldAdds.forEach(({timer:e})=>this.context.scheduler.clearTimeout(e)),this.heldAdds.clear(),this.throttled.forEach(e=>{e.forEach(n=>n.clear(!1))}),this.throttled.clear()}};var be=require("node:fs/promises"),O=rt(require("node:path"),1);var Be=ee,fk=1024,pk=3,BN=16,HN=Object.freeze({});function uy(t){return{kind:"native",resource:t,rawEvent:Be.CHANGE,relativePath:null,sequence:Number.MAX_SAFE_INTEGER,observedAt:ya()}}function GN(t,e){return t===!1||e===!1?t===e:t.size===e.size&&t.mtimeMs===e.mtimeMs&&t.ctimeMs===e.ctimeMs&&t.ino===e.ino&&t.mode===e.mode}var ju=class{entries=[];overflow;limit;constructor(e){this.limit=e}get overflowed(){return this.overflow!==void 0}push(e){this.entries.length<this.limit&&!this.overflowed?this.entries.push(e):this.overflow=e}clear(){this.entries.length=0,this.overflow=void 0}};function mk(t,e){let n=[];return t.on("data",i=>{let r;try{r=e(i)}catch(o){r=Promise.reject(o)}r&&n.push(Promise.resolve(r))}),new Promise(i=>{t.once("end",()=>i({complete:!0})),t.once("close",()=>i({complete:!1})),t.once(Be.ERROR,r=>i({complete:!1,error:r}))}).then(async({complete:i,error:r})=>{let a=(await Promise.allSettled(n)).filter(s=>s.status==="rejected").map(s=>s.reason);return{complete:i&&a.length===0,error:r,failures:a}})}var JN=new Set("3dm 3ds 3g2 3gp 7z a aac adp afdesign afphoto afpub ai aif aiff alz ape apk appimage ar arj asf au avi bak baml bh bin bk bmp btif bz2 bzip2 cab caf cgm class cmx cpio cr2 cur dat dcm deb dex djvu dll dmg dng doc docm docx dot dotm dra ds_store dsk dts dtshd dvb dwg dxf ecelp4800 ecelp7470 ecelp9600 egg eol eot epub exe f4v fbs fh fla flac flatpak fli flv fpx fst fvt g3 gh gif graffle gz gzip h261 h263 h264 icns ico ief img ipa iso jar jpeg jpg jpgv jpm jxr key ktx lha lib lvp lz lzh lzma lzo m3u m4a m4v mar mdi mht mid midi mj2 mka mkv mmr mng mobi mov movie mp3 mp4 mp4a mpeg mpg mpga mxu nef npx numbers nupkg o odp ods odt oga ogg ogv otf ott pages pbm pcx pdb pdf pea pgm pic png pnm pot potm potx ppa ppam ppm pps ppsm ppsx ppt pptm pptx psd pya pyc pyo pyv qt rar ras raw resources rgb rip rlc rmf rmvb rpm rtf rz s3m s7z scpt sgi shar snap sil sketch slk smv snk so stl suo sub swf tar tbz tbz2 tga tgz thmx tif tiff tlz ttc ttf txz udf uvh uvi uvm uvp uvs uvu viv vob war wav wax wbmp wdp weba webm webp whl wim wm wma wmv wmx woff woff2 wrm wvx xbm xif xla xlam xls xlsb xlsm xlsx xlt xltm xltx xm xmind xpi xpm xwd xz z zip zipx".split(" "));function KN(t){return JN.has(O.extname(t).slice(1).toLowerCase())}var Ru=class{fsw;reportError;constructor(e){this.fsw=e,this.reportError=n=>e.handleError(n)}subscribePath(e,n,i,r=!1,o=e){let a=this.fsw.options,s=O.basename(e),c=O.resolve(e),u={persistent:a.persistent},l=this.fsw.lifecycle.generation,d=!0,p=(y,v,b)=>{if(!(!d||!this.fsw.lifecycle.isActive(l)))return n(y,v,b)},m=y=>{this.reconcileBackendTrigger(e,r,y,v=>p(v,y.kind==="poll"&&!ha(y.current)?y.current:void 0,y),()=>d&&this.fsw.lifecycle.isActive(l),!0,o)},f,h=0,g=()=>Du(e,c,u,{publish:y=>{h=0,m(y)},errHandler:this.reportError,rawEmitter:(...y)=>this.fsw.emitRaw(...y),failure:()=>{!d||!this.fsw.lifecycle.isActive(l)||(f=h++<pk?g():void 0,m(uy(c)))}},this.fsw.lifecycle.abortController.signal);if(a.backendCapabilities.polling){let v=a.pollingInterval!==a.pollingBinaryInterval&&KN(s)?a.pollingBinaryInterval:a.pollingInterval;f=ck(e,c,{interval:v,persistent:a.persistent},this.fsw.scheduler,{publish:m,errHandler:this.reportError,rawEmitter:(...b)=>this.fsw.emitRaw(...b)},i,this.fsw.lifecycle.abortController.signal)}else f=g();if(f)return()=>{if(d)return d=!1,f?.close()}}subscribeMappedFile(e,n,i,r,o=pn){if(this.fsw.options.backendCapabilities.polling)return;let a=O.dirname(n),s=L(n),c=O.dirname(e),u=this.fsw.lifecycle.generation,l=!0,d=o,p=!1,m,f,h,g=()=>l&&this.fsw.lifecycle.isActive(u)&&this.isHelperActive(i,e),y=D=>{if(D===null)return!0;let A=O.isAbsolute(D)?D:O.resolve(a,D),F=L(A);return ct?F.toLowerCase()===s.toLowerCase():F===s},v=()=>{d&&(d=!1,h&&h.close())},b=(D,A)=>{if(A.kind!=="native"||!y(A.relativePath)||!g())return;let F=D==="directory"&&p;D==="directory"?(p=!1,v()):f&&(p=!0,v()),this.reconcileBackendTrigger(a,!0,A,async()=>{if(F&&m!==void 0){let se=await this.mappedFileSnapshot(n);if(se!==void 0&&GN(m,se))return}await this.reconcileNativeTrigger(c,i,A,e,r-1,HN),D==="exact"&&(m=await this.mappedFileSnapshot(n))},g,!1,e)},_=0,x=D=>({publish:A=>{D==="directory"&&(_=0),b(D,A)},errHandler:this.reportError,rawEmitter:(A,F)=>{(D==="directory"||d)&&y(F)&&g()&&this.fsw.emitRaw(A,F,{watchedPath:e})},failure:()=>{if(D==="exact"){h=void 0,d=!1;return}f=void 0,g()&&(_++<pk&&(f=k(D)),b(D,uy(O.resolve(a))))}}),k=D=>{let A=D==="directory"?a:n;return Du(A,O.resolve(A),{persistent:this.fsw.options.persistent},x(D),this.fsw.lifecycle.abortController.signal)};if(f=k("directory"),h=o?k("exact"):void 0,h||(d=!1),!(!f&&!h))return async()=>{if(!l)return;l=!1;let D=[f,h].filter(A=>A!==void 0);await Promise.allSettled(D.map(A=>A.close()))}}async mappedFileSnapshot(e){try{return await(0,be.lstat)(e)}catch(n){if(ze(n))return!1;this.reportError(n);return}}watchSymlinkDeletion(e,n=!1){if(!pn&&!n||this.fsw.options.backendCapabilities.polling)return;let i=this.fsw,r=i.lifecycle.generation,o=O.dirname(e),a=O.basename(e),s=!0,c,u=()=>{c=i.scheduler.setTimeout(()=>{c=void 0,(async()=>{try{await(0,be.lstat)(e)}catch(l){if(!s||!i.lifecycle.isActive(r))return;if(ze(l)){s=!1,i.removePath(o,a);return}this.reportError(l)}s&&i.lifecycle.isActive(r)&&u()})()},i.options.pollingInterval),i.options.persistent||c.unref()};return u(),()=>{s&&(s=!1,i.scheduler.clearTimeout(c),c=void 0)}}reconcileBackendTrigger(e,n,i,r,o=()=>!0,a=!0,s=e){let c=e;if(n&&i.kind==="native"&&i.relativePath!==null){let d=va(e,i.relativePath);if(!d)return this.reportError(new Error(`Watcher reported a path outside its root: ${i.relativePath}`)),Promise.resolve();c=d}if(!o()||this.fsw.isUnwatched(c))return Promise.resolve();let u=L(s),l=L(c);return this.fsw.reconciliation.enqueue(u,async()=>{!o()||this.fsw.isUnwatched(l)||await r(c)},a?l:!1)}handleFile(e,n,i,r=!0,o,a=!1,s=!1){if(this.fsw.closed)return;let c=O.dirname(e),u=O.basename(e),l=this.fsw.tree.getDirectory(c),d=n;if(l.has(u))return;let p=this.fsw.capturePathGeneration(),m=()=>this.fsw.isPathGenerationActive(e,p),f=async(y,v)=>{if(!v||v.mtimeMs===0)try{let b=d.isSymbolicLink()&&!this.fsw.options.followSymlinks?await(0,be.lstat)(e):await(0,be.stat)(e);if(!m())return;let _=b.atimeMs,x=b.mtimeMs;(!_||_<=x||x!==d.mtimeMs)&&this.fsw.emitEvent(Be.CHANGE,e,b),this.fsw.tree.recordObserved(e,b,"change"),d=b}catch(b){if(!m())return;ze(b)?this.fsw.removePath(c,u):this.reportError(b)}else if(l.has(u)){let b=v.atimeMs,_=v.mtimeMs;(!b||b<=_||_!==d.mtimeMs)&&this.fsw.emitEvent(Be.CHANGE,e,v),this.fsw.tree.recordObserved(e,v,"change"),d=v}},g=r&&this.fsw.options.backendCapabilities.polling?this.subscribePath(e,f,n):void 0;return l.add(u),this.fsw.tree.recordObserved(e,n,"add",o,a,s),!(i&&this.fsw.options.ignoreInitial)&&!this.fsw.isIgnored(e,n)&&this.fsw.emitEvent(Be.ADD,e,n),g}async handleSymlink(e,n,i,r,o,a){if(this.fsw.closed||a&&!this.isHelperActive(a,i))return;let s=L(e.fullPath),c=this.fsw.tree.getDirectory(n);if(!this.fsw.options.followSymlinks){let u;try{u=await(0,be.readlink)(i)}catch(l){return ze(l)||this.reportError(l),!0}return this.fsw.closed||a&&!this.isHelperActive(a,i)||(c.has(r)?this.fsw.tree.symlinkPaths.get(s)!==u&&(this.fsw.tree.symlinkPaths.set(s,u),this.fsw.emitEvent(Be.CHANGE,i,e.stats)):(c.add(r),this.fsw.tree.symlinkPaths.set(s,u),this.fsw.tree.recordObserved(i,e.stats,"add",a?.observationTrigger,o&&!!a?.recursiveRoot),o&&this.fsw.options.ignoreInitial||this.fsw.emitEvent(Be.ADD,i,e.stats))),!0}if(this.fsw.tree.symlinkPaths.has(s))return!0;this.fsw.tree.symlinkPaths.set(s,!0)}readDirectory(e,n,i,r,o,a){if(!this.isHelperActive(i,e))return;e=O.join(e,"");let s=L(e),c=this.fsw.tree.getDirectory(i.watchPath),u=new Set,l=this.fsw.createScanStream(e,{fileFilter:p=>i.filterPath(p),directoryFilter:p=>i.filterDir(p)});return l?mk(l,p=>{if(!this.isHelperActive(i,e))return;let m=p.stats;if(!m)return;let f=p.path,h=O.join(e,f);if(!this.isHelperActive(i,h))return;u.add(f);let g=f===r||!r&&!c.has(f);if(r===void 0&&!m.isSymbolicLink()&&!m.isDirectory()){if(!g)return;h=O.join(o,O.relative(o,h));let y=this.handleFile(h,m,n,!i.recursiveRoot,i.observationTrigger,n&&!!i.recursiveRoot);y&&this.fsw.addPathCloser(h,y);return}return(async()=>{m.isSymbolicLink()&&await this.handleSymlink(p,e,h,f,n,i)||this.isHelperActive(i,h)&&g&&(h=O.join(o,O.relative(o,h)),await this.addPathOnce(h,n,i,a+1))})()}).then(async({complete:p,error:m,failures:f})=>{if(f.forEach(this.reportError),m)if(ze(m)&&this.isHelperActive(i,e)){let h=r?O.join(e,r):e,g=!1,y=!1;try{let v=r?await(0,be.lstat)(h):await(0,be.stat)(h);y=!r&&!v.isDirectory()}catch(v){ze(v)?g=!0:this.reportError(v)}r?g&&c.has(r)&&this.fsw.removePath(e,r):(g||y)&&this.fsw.tree.watched.has(s)&&(this.fsw.removePath(O.dirname(e),O.basename(e),!0),y&&await this.addPathOnce(e,!1,i,a))}else this.reportError(m);!p||!this.isHelperActive(i,e)||await Promise.all(c.getChildren().filter(h=>!u.has(h)).map(h=>this.removeIfMissing(i,e,h,c)))}):void 0}async removeIfMissing(e,n,i,r){let o=O.join(n,i);if(this.isHelperActive(e,o)){try{await(0,be.lstat)(o);return}catch(a){if(!ze(a))return}this.isHelperActive(e,o)&&r.has(i)&&this.fsw.removePath(n,i)}}scanRecursiveTree(e,n,i,r,o){if(!this.isHelperActive(i,e))return;let a=this.fsw,s=a.options.depth,c=s===void 0?void 0:s-r,u=a.createScanStream(e,{fileFilter:l=>i.filterPath(l),directoryFilter:l=>!l.stats?.isSymbolicLink()&&i.filterDir(l),depth:c});if(u)return mk(u,l=>{if(!this.isHelperActive(i,e))return;let d=l.stats;if(!d)return;let p=O.join(e,l.path);if(!this.isHelperActive(i,p))return;let m=O.dirname(p),f=O.basename(p);if(o&&(o.seen.add(L(p)),d.isDirectory()&&o.directories.push(p)),d.isSymbolicLink())return(async()=>{if(await this.handleSymlink(l,m,p,f,n,i)||!this.isHelperActive(i,p))return;let y=r+l.path.split(/[/\\]/).length;await this.addPathOnce(p,n,i,y)})();let h=a.tree.getDirectory(m);if(h.has(f)){o&&d.isFile()&&a.tree.changedSinceObserved(p,d)&&(a.tree.recordObserved(p,d,"change",void 0,!1,!0),a.emitEvent(Be.CHANGE,p,d));return}h.add(f);let g=d.isDirectory();g&&a.tree.getDirectory(p),a.tree.recordObserved(p,d,"add",i.observationTrigger,n),n&&a.options.ignoreInitial||a.emitEvent(g?Be.ADD_DIR:Be.ADD,p,d)}).then(l=>{l.error&&this.reportError(l.error),l.failures.forEach(this.reportError),o&&(o.complete=l.complete)})}async rescanRecursiveTree(e,n,i){let r={seen:new Set,directories:[e],complete:!1};if(await this.scanRecursiveTree(e,!1,n,i,r),!r.complete||!this.isHelperActive(n,e))return;let o=[];for(let a of r.directories)for(let s of this.fsw.tree.peekDirectory(a)?.getChildren()??[]){let c=O.join(a,s);r.seen.has(L(c))||o.push(c)}o.sort((a,s)=>a.length-s.length);for(let a of o){let s=this.fsw.tree.peekDirectory(O.dirname(a));s?.has(O.basename(a))&&await this.removeIfMissing(n,O.dirname(a),O.basename(a),s)}}isHelperActive(e,n=e.watchPath){return this.fsw.isPathGenerationActive(n,e.pathGeneration)}candidateDepth(e,n){let i=O.relative(e,n);return i?i.split(O.sep).length:0}candidateIgnored(e,n,i){let r=O.relative(e,n),o=e;if(this.fsw.isIgnored(o))return!0;if(r){let a=r.split(O.sep);for(let s=0;s<a.length-1;s++)if(o=O.join(o,a[s]),this.fsw.isIgnored(o))return!0}return this.fsw.isIgnored(n,i)}async highestMissingPath(e,n){let i=n,r=O.dirname(n);for(;;){try{return await(0,be.lstat)(r),i}catch(a){if(!ze(a))return this.reportError(a),i}if(i=r,r===e)return i;let o=O.dirname(r);if(o===r)return i;r=o}}async reconcileNativeTrigger(e,n,i,r,o=0,a){let s=this.fsw;if(!this.isHelperActive(n,e))return;let c,u=()=>c??=n.withObservation(i),l=r??(i.relativePath===null?e:va(e,i.relativePath));if(!l){this.reportError(new Error(`Native watcher reported a path outside its root: ${i.relativePath}`));return}let d=o+this.candidateDepth(e,l),p=s.options.depth;if(p!==void 0&&d>p+1||this.candidateIgnored(e,l))return;let m;try{m=await(0,be.lstat)(l)}catch(v){if(!ze(v)){if(this.reportError(v),a)return;let k=l===e?e:O.dirname(l),D=Math.max(0,o+this.candidateDepth(e,k));await this.readDirectory(k,!1,u().fork(k),void 0,k,D);return}if(s.closed)return;let b=l===e?e:await this.highestMissingPath(e,l);if(s.closed)return;if(b===e){s.removePath(O.dirname(e),O.basename(e),!0),a?.onRootMissing?.();return}let _=O.dirname(b),x=O.basename(b);s.tree.getDirectory(_).has(x)?s.removePath(_,x):a||await this.readDirectory(_,!1,u().fork(_),void 0,_,Math.max(0,o+this.candidateDepth(e,_)));return}if(!this.isHelperActive(n,l)||this.candidateIgnored(e,l,m))return;if(!m.isDirectory()&&!(m.isSymbolicLink()&&s.options.followSymlinks)){let v=s.tree.consumeInitialCreate(l,m,i,s.options.ignoreInitial);if(v!==void 0){v&&s.emitEvent(v,l,m);return}}if(l===e){if(!m.isDirectory())return;n.recursiveRoot===e?await this.rescanRecursiveTree(e,u(),o):await this.readDirectory(e,!1,u(),void 0,e,o);return}let f=O.dirname(l),h=O.basename(l),g=s.tree.getDirectory(f),y=g.has(h);if(m.isSymbolicLink()){if(!s.options.followSymlinks){let D=!0;try{D=await(0,be.readlink)(l)}catch{}y||g.add(h),s.tree.symlinkPaths.set(L(l),D),(!y||!s.tree.isDuplicateObservation(l,m,i))&&s.emitEvent(y?Be.CHANGE:Be.ADD,l,m),y||s.tree.recordObserved(l,m,"add",i);return}let v=L(l),b=s.tree.symlinkPaths.get(v),_;try{_=await(0,be.realpath)(l)}catch(D){if(!ze(D)){this.reportError(D);return}}if(y&&typeof b=="string"&&(_===void 0||L(b)!==L(_))){let D=s.tree.observed.get(v)?.kind;if(s.removePath(f,h,D==="directory"),!_||!this.isHelperActive(n,l))return;let A=u().fork(l);A.recursiveRoot=void 0,await this.addPathOnce(l,!1,A,d);return}let k=s.tree.consumeInitialCreate(l,m,i,s.options.ignoreInitial);if(k!==void 0){if(k){s.closePath(l,!0);let D=u().fork(l);D.recursiveRoot=void 0,await this.addPathOnce(l,!1,D,d)}return}if(y)s.emitEvent(Be.CHANGE,l,m);else{let D=u().fork(l);D.recursiveRoot=void 0,await this.addPathOnce(l,!1,D,d)}return}if(m.isDirectory()){let v=u().fork(l),b=s.tree.consumeInitialCreate(l,m,i,s.options.ignoreInitial);if(b!==void 0){b&&(s.closePath(l,!0),await this.addPathOnce(l,!1,v,d));return}y?s.tree.replacedSinceObserved(l,m)?(s.removePath(f,h,!0),await this.addPathOnce(l,!1,v,d)):(p===void 0||d<=p)&&await this.readDirectory(l,!1,v,void 0,l,d):await this.addPathOnce(l,!1,v,d);return}y?s.tree.isDuplicateObservation(l,m,i)||s.emitEvent(Be.CHANGE,l,m):await this.addPathOnce(l,!1,u(),d)}watchRootParent(e,n){if(!this.fsw.options.backendCapabilities.perDirectory||!ct)return;let i=O.dirname(e);if(O.resolve(i)===O.resolve(e))return;let r=O.normalize(O.toNamespacedPath(O.resolve(i))).toLowerCase(),o=O.basename(e).toLowerCase(),a=this.fsw.lifecycle.generation,s=!0,c=p=>{if(p===null)return!0;let m=O.isAbsolute(p)?O.resolve(p):O.resolve(i,p);return O.normalize(O.toNamespacedPath(O.dirname(m))).toLowerCase()===r&&O.basename(m).toLowerCase()===o},u=()=>s&&this.fsw.lifecycle.isActive(a)&&this.isHelperActive(n,e),l=p=>{p.kind!=="native"||!c(p.relativePath)||!u()||this.reconcileBackendTrigger(e,!1,p,async()=>{let m;try{m=await(0,be.lstat)(e)}catch(f){ze(f)?this.fsw.removePath(i,O.basename(e),!0):this.reportError(f);return}if(u()){if(!m.isDirectory()){this.fsw.removePath(i,O.basename(e),!0),await this.addPathOnce(e,!1,n,0);return}await this.readDirectory(e,!1,n,void 0,e,0)}},u)},d=Du(i,O.resolve(i),{persistent:this.fsw.options.persistent},{publish:l,errHandler:this.reportError,rawEmitter:(p,m,f)=>{c(m)&&this.fsw.emitRaw(p,m,f)}},this.fsw.lifecycle.abortController.signal);if(d)return()=>{if(s)return s=!1,d.close()}}async watchRecursiveDirectory(e,n,i,r){let o=this.fsw,a=o.lifecycle.generation,s=L(e),c=new ju(fk),u=[],l="scanning",d,p=!1,m,f,h=(k=e)=>o.lifecycle.isActive(a)&&o.isPathGenerationActive(k,r.pathGeneration),g=(k=e)=>l!=="recovering"&&l!=="closed"&&h(k),y=async k=>{if(!h())return;r.recursiveRoot=void 0,r.recursiveDisabled=!0;let D;try{D=await(0,be.lstat)(e)}catch(F){ze(F)?o.removePath(O.dirname(e),O.basename(e),!0):this.reportError(F),this.reportError(k);return}let A=await this.handleDirectory(e,D,!1,i,void 0,r);if(!h()){A&&await A();return}A&&u.push(A),await this.subscribeTrackedDirectories(e,r,i),this.reportError(k)},v=k=>{if(!g())return;let D=l!=="live";l="recovering",o.tree.recursiveRoots.delete(s),d=k,p=!0,D||(m=o.reconciliation.enqueue(e,()=>y(k),!1))},b=k=>{if(!g())return;if(l!=="live"){c.push(k);return}let D=k.relativePath===null?e:va(e,k.relativePath)??e;this.reconcileBackendTrigger(e,!0,k,()=>g()?this.reconcileNativeTrigger(e,r,k):void 0,()=>g(D))},_=ik(e,o.options.persistent,{publish:b,failure:v,rawEmitter:(...k)=>o.emitRaw(...k)},o.lifecycle.abortController.signal);if(_.kind==="unsupported")return!1;if(_.kind==="failed")throw _.error;f=_.subscription,o.tree.recursiveRoots.add(s),r.recursiveRoot=e;let x=async()=>{l!=="closed"&&(l="closed",o.tree.recursiveRoots.delete(s),c.clear(),await f?.close(),m&&await Promise.allSettled([m]),await Promise.allSettled(u.map(k=>k())))};try{if(await this.scanRecursiveTree(e,n,r,i),!p){l="replaying";let k=0;for(;g();){if(c.overflowed){c.clear(),k=0;let A={kind:"native",resource:f.resource,rawEvent:Be.CHANGE,relativePath:null,sequence:Number.MAX_SAFE_INTEGER,observedAt:ya()};await this.reconcileBackendTrigger(e,!0,A,()=>this.reconcileNativeTrigger(e,r,A),()=>g(),!1);continue}if(k>=c.entries.length)break;let D=c.entries[k++];if(D.rawEvent==="rename"&&D.relativePath!==null){let A=va(e,D.relativePath);A&&A!==e&&o.tree.getDirectory(O.dirname(A)).has(O.basename(A))&&o.tree.markInitialCreate(A)}await this.reconcileBackendTrigger(e,!0,D,()=>this.reconcileNativeTrigger(e,r,D),()=>g(),!1)}l!=="recovering"&&(l="live")}p&&(c.clear(),await y(d)),c.clear(),o.tree.clearInitialCreates(e)}catch(k){throw await x(),k}if(!h()){await x();return}return x}async subscribeTrackedDirectories(e,n,i){let r=this.fsw,o=O.resolve(e),a=d=>{let p=L(d);return this.isHelperActive(n,d)&&!r.lifecycle.closers.has(p)&&!r.tree.symlinkPaths.has(p)&&(r.tree.peekDirectory(O.dirname(d))?.has(O.basename(d))??!1)},s=[...r.tree.watched.values()].filter(d=>fa(o,d.path)).map(d=>O.join(e,O.relative(o,d.path))).filter(a).sort((d,p)=>d.length-p.length),c=0,u=async()=>{for(;c<s.length;){let d=s[c++];a(d)&&await this.addPathOnce(d,!1,n,i+this.candidateDepth(e,d))}},l=Math.min(BN,s.length);await Promise.all(Array.from({length:l},u))}async handleDirectory(e,n,i,r,o,a){if(!this.isHelperActive(a,e))return;if(o)this.fsw.tree.getDirectory(e);else{let u=this.fsw.tree.getDirectory(O.dirname(e)),l=u.has(O.basename(e));!(i&&this.fsw.options.ignoreInitial)&&!l&&this.fsw.emitEvent(Be.ADD_DIR,e,n),u.add(O.basename(e)),this.fsw.tree.getDirectory(e),this.fsw.tree.recordObserved(e,n,l?void 0:"add",a.observationTrigger,i&&!!a.recursiveRoot,!0)}let s,c=this.fsw.options.depth;if(c==null||r<=c){if(this.fsw.options.backendCapabilities.recursive&&r===0&&!o&&!a.recursiveRoot&&!a.recursiveDisabled){let _=await this.watchRecursiveDirectory(e,i,r,a);if(_!==!1)return _}if(a.recursiveRoot){o||await this.scanRecursiveTree(e,i,a,r);return}let u=new ju(fk),l=new Set,d=!o,p=!0,m=pn&&!o,f=o?O.join(e,o):void 0,h=()=>{f&&p&&this.isHelperActive(a,f)&&this.fsw.rewatchMissingPath(f)},g=_=>{if(o){this.fsw.tree.getDirectory(_).has(o)&&this.fsw.removePath(_,o),h();return}this.fsw.removePath(O.dirname(_),O.basename(_),!0)},y=async(_,x,k)=>{if(!(!p||!this.isHelperActive(a,_))){if(this.fsw.options.backendCapabilities.polling&&!x){g(_);return}if(k.kind==="native"){let D;try{let A=await(0,be.lstat)(_);D=A.isSymbolicLink()&&this.fsw.options.followSymlinks?await(0,be.stat)(_):A}catch(A){ze(A)?g(_):this.reportError(A);return}if(!D.isDirectory()){g(_),o||await this.addPathOnce(_,!1,a,r);return}}await this.readDirectory(_,!1,a,o,e,r)}},v=(_,x,k)=>{if(!(!p||!this.isHelperActive(a,_))){if(d){u.push({path:_,stats:x,trigger:k});return}return k.kind==="native"&&!o?m?(m=!1,(async()=>{await this.reconcileNativeTrigger(e,a,k,_,r),await y(e,void 0,k)})()):this.reconcileNativeTrigger(e,a,k,_,r):k.kind==="native"&&o&&(_===e||(ct?O.basename(_).toLowerCase()===o.toLowerCase():O.basename(_)===o))?this.reconcileNativeTrigger(e,a,k,f,r,{onRootMissing:h}):y(e,x,k)}},b=r===0&&!o?this.watchRootParent(e,a):void 0;if(s=this.subscribePath(e,v,n.isDirectory()?n:void 0,!0,o?O.join(e,o):e),o&&f&&s){let _=uy(O.resolve(e));await this.fsw.reconciliation.enqueue(f,async()=>{this.fsw.tree.getDirectory(e).has(o)||await v(f,void 0,_)},f)}if(!o){await this.readDirectory(e,i,a,o,e,r);let _=0;for(;!this.fsw.closed;){if(u.overflow){let k=u.overflow;u.clear(),_=0,await y(e,k.stats,k.trigger);continue}if(_>=u.entries.length)break;let x=u.entries[_++];x.trigger.kind==="native"&&x.trigger.rawEvent==="rename"&&x.path!==e&&this.fsw.tree.getDirectory(O.dirname(x.path)).has(O.basename(x.path))&&(this.fsw.tree.markInitialCreate(x.path),l.add(x.path)),await this.reconcileBackendTrigger(e,!0,x.trigger,()=>x.trigger.kind==="native"&&!o?this.reconcileNativeTrigger(e,a,x.trigger,x.path,r):y(e,x.stats,x.trigger),()=>p&&this.isHelperActive(a,x.path),!1)}u.clear(),l.forEach(x=>this.fsw.tree.clearInitialCreate(x)),d=!1}if(!this.isHelperActive(a,e)){p=!1,s&&await s(),b&&await b();return}if(s||b){let _=[s,b].filter(x=>x!==void 0);s=async()=>{p&&(p=!1,u.clear(),await Promise.allSettled(_.map(x=>x())))}}}return s}async addRoot(e,n,i,r){let o=e,a=r,s=this.fsw.lifecycle.generation;for(;this.fsw.lifecycle.isActive(s);){if(await this.addPathOnce(o,n,void 0,0,a,i)==="complete")return;let u=O.dirname(o);if(u===o)return;a=O.basename(o),o=u}}async addPathOnce(e,n,i,r,o,a){if(this.fsw.isIgnored(e)||this.fsw.closed)return"complete";let s=i?i.fork(e):this.fsw.createHelper(e);if(!i&&a!==void 0&&(s.pathGeneration=a),!this.isHelperActive(s))return"complete";try{let c=await(0,be.lstat)(s.watchPath);if(!this.isHelperActive(s)||this.fsw.isIgnored(s.watchPath,c))return"complete";let u=this.fsw.options.followSymlinks,l=c.isSymbolicLink(),d=l&&u?await(0,be.stat)(s.watchPath):c,p=l&&u?await(0,be.realpath)(e):void 0,m;if(d.isDirectory()){let f=L(e),h=u?await(0,be.realpath)(e):e,g=p??e,y=L(h);if(!this.isHelperActive(s))return"complete";if(l&&s.realpathAncestry.has(y))return this.fsw.tree.getDirectory(O.dirname(s.watchPath)).add(O.basename(s.watchPath)),this.fsw.tree.getDirectory(s.watchPath),this.fsw.tree.symlinkPaths.set(f,g),this.fsw.tree.recordObserved(s.watchPath,d,"add",s.observationTrigger,n&&!!s.recursiveRoot),n&&this.fsw.options.ignoreInitial||this.fsw.emitEvent(Be.ADD_DIR,s.watchPath,d),"complete";if(s.realpathAncestry.add(y),s.recursiveRoot&&l&&(s.recursiveRoot=void 0),l&&(s.recursiveDisabled=!0),m=await this.handleDirectory(s.watchPath,d,n,r,o,s),!this.isHelperActive(s))return m&&await m(),"complete";if(o&&!m)return"watch-parent";l&&this.fsw.tree.symlinkPaths.set(f,g)}else if(l&&!u){let f=await(0,be.readlink)(e),h=!this.fsw.options.backendCapabilities.polling&&!s.recursiveRoot&&!i,g=this.handleFile(s.watchPath,d,n,!s.recursiveRoot,s.observationTrigger,n&&!!s.recursiveRoot,h);if(s.recursiveRoot)return this.fsw.tree.symlinkPaths.set(L(e),f),"complete";let y=O.dirname(s.watchPath),v=await(0,be.stat)(y),b=this.fsw.createHelper(y);b.pathGeneration=s.pathGeneration;let _=await this.handleDirectory(y,v,n,r,O.basename(s.watchPath),b),x=this.watchSymlinkDeletion(s.watchPath);if(!this.isHelperActive(s))return g&&await g(),_&&await _(),x&&x(),"complete";m=async()=>{await Promise.allSettled([g,_,x].filter(k=>k!==void 0).map(k=>k()))},this.fsw.tree.symlinkPaths.set(L(e),f)}else{p&&this.fsw.tree.symlinkPaths.set(L(e),p);let f=!this.fsw.options.backendCapabilities.polling&&!s.recursiveRoot&&!i,h=this.handleFile(s.watchPath,d,n,!s.recursiveRoot,s.observationTrigger,n&&!!s.recursiveRoot,f),g=p??(f?s.watchPath:void 0),y=g?this.subscribeMappedFile(s.watchPath,g,s,r,pn&&d.isFile()):void 0,v;if(f&&p){let _=O.dirname(s.watchPath),x=await(0,be.stat)(_),k=this.fsw.createHelper(_);k.pathGeneration=s.pathGeneration,v=await this.handleDirectory(_,x,n,r,O.basename(s.watchPath),k)}let b=[h,y,v].filter(_=>_!==void 0);m=b.length===0?void 0:async()=>{await Promise.allSettled(b.map(_=>_()))}}return this.isHelperActive(s)?(m&&this.fsw.addPathCloser(o?O.join(e,o):e,m),"complete"):(m&&await m(),"complete")}catch(c){return this.isHelperActive(s)?(this.fsw.handleError(c),"watch-parent"):"complete"}}};var WN=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,XN=new Set(["auto","native","native-recursive","polling"]),hk=Object.freeze({stabilityThreshold:2e3,pollInterval:100});function*gk(t){let e=Oe.resolve(t);for(let n=Oe.dirname(e);n!==e;n=Oe.dirname(n))yield L(n),e=n}function xk(t){return Array.isArray(t)?t:[t]}function yk(t){let e=xk(t).flat();if(!e.every(n=>typeof n=="string"))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Ii)}function vk(t,e){return Oe.isAbsolute(t)?t:Oe.join(e,t)}function ly(t,e){if(!Number.isFinite(e)||e<=0)throw new TypeError(`${t} must be a finite number greater than zero`)}function bk(t,e){if(!Number.isFinite(e)||e<0)throw new TypeError(`${t} must be a finite non-negative number`)}function YN(t){if(ly("pollingInterval",t.pollingInterval),ly("pollingBinaryInterval",t.pollingBinaryInterval),typeof t.atomic=="number")bk("atomic",t.atomic);else if(typeof t.atomic!="boolean")throw new TypeError("atomic must be a boolean or finite non-negative number");if(t.depth!==void 0&&(!Number.isSafeInteger(t.depth)||t.depth<0))throw new TypeError("depth must be a non-negative safe integer");t.awaitWriteFinish&&(ly("awaitWriteFinish.pollInterval",t.awaitWriteFinish.pollInterval),bk("awaitWriteFinish.stabilityThreshold",t.awaitWriteFinish.stabilityThreshold))}var dy=class extends _k.EventEmitter{options;lifecycle;tree;reconciliation;events;scheduler;handler;readyEmitted;streams;get closed(){return this.lifecycle!==void 0&&this.lifecycle.state!=="OPEN"}#e;#r;#d;#a;#c;#u;#n;#o;#i;#t;#s;#l;constructor(e={},n=BS){if(super(),e.backend!==void 0&&!XN.has(e.backend))throw new TypeError("backend must be auto, native, native-recursive, or polling");this.#e=new Set,this.streams=new Set,this.#r=new Map,this.#d=0,this.#a=new Map,this.#n=new Map,this.#o=new Set,this.#i=new Map,this.readyEmitted=!1,this.#s=!1,this.#l=!1,this.scheduler=n;let i=e.awaitWriteFinish,r={...e,persistent:e.persistent??!0,ignoreInitial:e.ignoreInitial??!1,ignorePermissionErrors:e.ignorePermissionErrors??!1,pollingInterval:e.pollingInterval??e.interval??100,pollingBinaryInterval:e.pollingBinaryInterval??e.binaryInterval??300,interval:100,binaryInterval:300,followSymlinks:e.followSymlinks??!0,backend:e.backend??"auto",usePolling:e.usePolling??!1,depth:e.depth===Number.POSITIVE_INFINITY?void 0:e.depth,backendStrategy:"native-per-directory",backendCapabilities:void 0,atomic:e.atomic??!0,ignored:Object.freeze(e.ignored?xk(e.ignored).map(GS):[]),awaitWriteFinish:i===!0?hk:typeof i=="object"?Object.freeze({...hk,...i}):!1};(e.usePolling===!0||ZS)&&(r.backend="polling");let o=process.env.CHOKIDAR_USEPOLLING;if(o!==void 0){let s=o.toLowerCase();(s==="false"||s==="0"?!1:s==="true"||s==="1"?!0:!!s)?r.backend="polling":r.backend==="polling"&&(r.backend="auto")}let a=process.env.CHOKIDAR_INTERVAL;a!==void 0&&(r.pollingInterval=Number(a)),r.interval=r.pollingInterval,r.binaryInterval=r.pollingBinaryInterval,r.usePolling=r.backend==="polling",r.backendCapabilities=tk(r),r.backendStrategy=r.backendCapabilities.kind,e.atomic===void 0&&(r.atomic=!r.usePolling),YN(r),this.options=r,this.lifecycle=new Ou(()=>{this.#s&&this.queueReady()},s=>{this.closed||this.handleError(s instanceof Error?s:new Error(String(s)))}),this.tree=new Cu(()=>!this.options.backendCapabilities.polling),this.reconciliation=new Tu(this.lifecycle),this.events=new Nu({options:this.options,scheduler:this.scheduler,lifecycle:this.lifecycle,isClosed:()=>this.closed,capturePathGeneration:()=>this.capturePathGeneration(),isPathGenerationActive:(s,c)=>this.isPathGenerationActive(s,c),isReady:()=>this.readyEmitted,remove:(s,c)=>this.removePath(s,c),handleError:s=>this.handleError(s),publish:(s,c)=>this.emitWithAll(s,c)}),this.handler=new Ru(this),Object.freeze(r)}addIgnoredPath(e){if(e=this.ignoredMatcher(e),dr(e)){for(let n of this.#e)if(dr(n)&&n.path===e.path&&n.recursive===e.recursive)return}this.#e.add(e),this.#t=void 0}removeIgnoredPath(e){if(e=this.ignoredMatcher(e),this.#e.delete(e),typeof e=="string")for(let n of this.#e)dr(n)&&n.path===e&&this.#e.delete(n);this.#t=void 0}ignoredMatcher(e){return typeof e=="string"?L(e):dr(e)?{path:L(e.path),recursive:e.recursive}:e}capturePathGeneration(){return this.#d}invalidatePath(e){this.#a.set(L(e),++this.#d)}isPathGenerationActive(e,n){if(this.lifecycle.state!=="OPEN")return!1;if(this.#a.size===0)return!0;let i=L(e);for(let[r,o]of this.#a)if(!(o<=n)&&mn(r,i))return!1;return!0}queueReady(){this.closed||this.readyEmitted||(this.#s=!0,!(this.lifecycle.tasks.size>0||this.#l)&&(this.#l=!0,process.nextTick(()=>{this.#l=!1,!(this.closed||this.readyEmitted||this.lifecycle.tasks.size>0)&&(this.#s=!1,this.readyEmitted=!0,this.emit(ee.READY))})))}add(e){if(this.closed)throw new Error("Cannot add paths after FSWatcher.close() has been called");let{cwd:n}=this.options,i=yk(e);n&&(i=i.map(o=>vk(o,n))),i.forEach(o=>{this.removeIgnoredPath(o),this.addRootAncestors(o)}),this.readyEmitted||(this.#s=!0);let r=Promise.all(i.map(async o=>{let a=L(o);if(this.lifecycle.closers.has(a)||this.#r.has(a))return;let s=Symbol(a),c=this.capturePathGeneration();this.#r.set(a,s);try{await this.handler.addRoot(o,!0,c)}finally{this.#r.get(a)===s&&this.#r.delete(a)}}));return this.lifecycle.track(r),this.readyEmitted||this.queueReady(),this}unwatch(e){if(this.closed)return this;let n=yk(e),{cwd:i}=this.options;return i&&(n=n.map(r=>vk(r,i))),n.forEach(r=>{let o=L(r),a=this.tree.watched.has(o);this.invalidatePath(o),this.removeRootAncestors(o),this.#r.delete(o),this.events.cancelPath(o),this.closePath(o,a),this.addIgnoredPath(o),a&&this.addIgnoredPath({path:o,recursive:!0}),this.#t=void 0}),this}close(){if(this.#c)return this.#c;let e=this.lifecycle.beginClose();return this.removeAllListeners(),this.events.close(),this.#r.clear(),this.#o.clear(),this.#i.clear(),this.streams.forEach(n=>n.destroy()),this.#u=void 0,this.#t=void 0,this.readyEmitted=!1,this.tree.dispose(),this.#a.clear(),this.streams.clear(),this.reconciliation.clear(),this.#n.clear(),this.#c=(async()=>{let n=await Promise.allSettled(e);await this.lifecycle.drain(),this.lifecycle.finishClose();let i=n.find(r=>r.status==="rejected");if(i)throw i.reason})(),this.#c}getWatched(){let e=Object.create(null);return this.tree.watched.forEach(n=>{let i=n.path,o=(this.options.cwd?Oe.relative(this.options.cwd,i):i)||".";e[o]=n.getChildren().sort()}),e}emitRaw(...e){this.closed||this.emit(ee.RAW,...e)}emitWithAll(e,n){this.emit(e,...n),e!==ee.ERROR&&this.emit(ee.ALL,e,...n)}async emitEvent(e,n,i){this.closed||await this.events.emit(e,n,i)}handleError(e){if(this.closed)return;let n=e instanceof Error?e:new Error(String(e));!ze(n)&&(!this.options.ignorePermissionErrors||!qS(n))&&this.emit(ee.ERROR,n)}isIgnored(e,n){if(this.options.atomic&&WN.test(e))return!0;if(!this.#u){let{cwd:i}=this.options,o=(this.options.ignored||[]).map(u=>JS(u,i)),a=pa(o),s=o.filter(u=>typeof u=="string"||dr(u)),c=pa(s);this.#u=(u,l)=>{if(a(u,l))return!0;if(ct||s.length===0)return!1;let d=Oe.resolve(u),p;if(l?.isDirectory())p=this.realDirectory(d);else{let m=this.realDirectory(Oe.dirname(d));m!==void 0&&(p=Oe.join(m,Oe.basename(d)))}return p!==void 0&&p!==d&&c(p,l)}}return this.#u(e,n)&&!this.isRootAncestor(e,n)?!0:this.#e.size===0?!1:(this.#t||(this.#t=pa([...this.#e])),this.#t(L(e),n))}isRootAncestor(e,n){return n?.isFile()?!1:this.#i.has(L(e))}addRootAncestors(e){let n=L(e);if(!this.#o.has(n)){this.#o.add(n);for(let i of gk(e))this.#i.set(i,(this.#i.get(i)??0)+1)}}removeRootAncestors(e){if(this.#o.delete(L(e)))for(let n of gk(e)){let i=(this.#i.get(n)??1)-1;i>0?this.#i.set(n,i):this.#i.delete(n)}}realDirectory(e){let n=L(e);if(this.#n.has(n))return this.#n.get(n);let i;try{i=$k.realpathSync.native(e)}catch{}return this.#n.set(n,i),i}isUnwatched(e){return this.#e.size===0?!1:(this.#t||(this.#t=pa([...this.#e])),this.#t(L(e)))}createHelper(e){return new zu(e,this.options.followSymlinks,{capturePathGeneration:()=>this.capturePathGeneration(),isntIgnored:(n,i)=>!this.isIgnored(n,i)})}removeTreeItem(e,n){let i=this.tree.peekDirectory(e);if(!i?.remove(n))return;let r=i.path,o=this.lifecycle.generation;this.lifecycle.track((async()=>{try{await(0,wk.readdir)(r)}catch(a){ze(a)&&this.lifecycle.isActive(o)&&this.removePath(Oe.dirname(r),Oe.basename(r))}})())}removePath(e,n,i){let r=Oe.join(e,n),o=L(r);i=i??this.tree.watched.has(o);let a=this.tree.peekDirectory(r)?.getChildren()??[];for(let p of a)this.removePath(r,p);let s=this.tree.peekDirectory(e)?.has(n)??!1,c=this.lifecycle.closers.has(o);this.removeTreeItem(e,n),this.tree.symlinkPaths.has(o)&&this.tree.symlinkPaths.delete(o);let u=this.events.pendingWrites.get(o),l=!1;this.options.awaitWriteFinish&&u&&(l=u.cancelWait()===ee.ADD),this.tree.watched.delete(o),this.tree.observed.delete(o);let d=i?ee.UNLINK_DIR:ee.UNLINK;s&&!l&&!this.isIgnored(r)&&this.emitEvent(d,r),this.closePath(r),(s||c)&&this.#o.has(o)&&this.rewatchMissingPath(r)}rewatchMissingPath(e){this.closed||this.isUnwatched(e)||(this.closePath(e),this.lifecycle.track(this.handler.addRoot(e,!1,this.capturePathGeneration())))}closePath(e,n=!1){let i=L(e),r=a=>a===i?!0:n?fa(i,a):!1;if([...this.lifecycle.closers.keys()].filter(r).forEach(a=>this.closeFile(a)),this.#n.delete(i)||n){let a=i.endsWith("/")?i:`${i}/`;for(let s of this.#n.keys())s.startsWith(a)&&this.#n.delete(s)}if(n){for(let[a,s]of this.tree.watched)r(a)&&(s.dispose(),this.tree.watched.delete(a));for(let a of this.tree.observed.keys())r(a)&&this.tree.observed.delete(a);for(let a of this.tree.symlinkPaths.keys())r(a)&&this.tree.symlinkPaths.delete(a);this.events.cancelWhere(r),this.reconciliation.forgetPending((a,s)=>r(a)||r(s));for(let a of this.#r.keys())r(a)&&this.#r.delete(a)}let o=Oe.dirname(i);this.removeTreeItem(o,Oe.basename(i))}closeFile(e){let n=L(e),i=this.lifecycle.takeClosers(n);i.length!==0&&i.forEach(r=>{try{let o=r();o instanceof Promise&&this.lifecycle.track(o)}catch(o){this.lifecycle.track(Promise.reject(o))}})}addPathCloser(e,n){if(!n)return;if(this.closed||this.isUnwatched(e)){try{let r=n();r instanceof Promise&&this.lifecycle.track(r)}catch(r){this.lifecycle.track(Promise.reject(r))}return}let i=L(e);this.lifecycle.addCloser(i,n)}createScanStream(e,n){if(this.closed)return;let i={type:ee.ALL,alwaysStat:!0,lstat:!0,depth:0,...n},r=LS(e,i);this.streams.add(r);let o=()=>this.streams.delete(r);return r.once("close",o),r.once("end",o),r.once(ee.ERROR,o),r}};function Sk(t,e={}){let n=new dy(e);return n.add(t),n}var iv=rt(jI()),Sa=class t{pino;context;constructor(e){this.context=e.context,this.pino=(0,iv.default)({level:e.level},iv.default.destination({dest:2,sync:!0}))}child(e){let n=new t({level:this.pino.level,format:"json",context:this.context?`${this.context}:${e}`:e});return n.pino=this.pino.child({context:e}),n}setLevel(e){this.pino.level=e}debug(e,n){this.pino.debug(n||{},e)}info(e,n){this.pino.info(n||{},e)}warn(e,n){this.pino.warn(n||{},e)}error(e,n,i){let r=i&&typeof i=="object"?i:{};this.pino.error({err:n,...r},e)}},xa=null;function ov(t){return xa=new Sa(t),xa}function fe(){return xa||(xa=new Sa({level:"info",format:"text"})),xa}var RU={failureThreshold:5,successThreshold:2,timeout:1e4,resetTimeout:6e4},nl=class{state="CLOSED";failureCount=0;successCount=0;nextAttempt=Date.now();options;name;constructor(e,n={}){this.name=e,this.options={...RU,...n}}getState(){return this.state}getStats(){return{state:this.state,failureCount:this.failureCount,successCount:this.successCount,nextAttempt:this.nextAttempt}}async execute(e){let n=fe();if(this.state==="OPEN"){if(Date.now()<this.nextAttempt){let i=new Error(`Circuit breaker '${this.name}' is OPEN. Next attempt at ${new Date(this.nextAttempt).toISOString()}`);throw n.warn("Circuit breaker is open",{name:this.name,nextAttempt:this.nextAttempt}),i}this.state="HALF_OPEN",this.successCount=0,n.info("Circuit breaker transitioning to HALF_OPEN",{name:this.name})}try{let i=await this.executeWithTimeout(e);return this.onSuccess(),i}catch(i){throw this.onFailure(),i}}async executeWithTimeout(e){return Promise.race([e(),new Promise((n,i)=>setTimeout(()=>i(new Error(`Operation timed out after ${this.options.timeout}ms`)),this.options.timeout))])}onSuccess(){let e=fe();this.failureCount=0,this.state==="HALF_OPEN"&&(this.successCount++,e.debug("Circuit breaker success in HALF_OPEN",{name:this.name,successCount:this.successCount,threshold:this.options.successThreshold}),this.successCount>=this.options.successThreshold&&(this.state="CLOSED",this.successCount=0,e.info("Circuit breaker closed",{name:this.name})))}onFailure(){let e=fe();this.failureCount++,e.debug("Circuit breaker failure",{name:this.name,failureCount:this.failureCount,threshold:this.options.failureThreshold,state:this.state}),(this.state==="HALF_OPEN"||this.failureCount>=this.options.failureThreshold)&&(this.state="OPEN",this.nextAttempt=Date.now()+this.options.resetTimeout,e.warn("Circuit breaker opened",{name:this.name,failureCount:this.failureCount,nextAttempt:this.nextAttempt}))}reset(){let e=fe();this.state="CLOSED",this.failureCount=0,this.successCount=0,this.nextAttempt=Date.now(),e.info("Circuit breaker manually reset",{name:this.name})}},il=class{breakers=new Map;get(e,n){return this.breakers.has(e)||this.breakers.set(e,new nl(e,n)),this.breakers.get(e)}getAll(){return new Map(this.breakers)}resetAll(){this.breakers.forEach(e=>{e.reset()})}getAllStats(){let e={};return this.breakers.forEach((n,i)=>{e[i]=n.getStats()}),e}},UU=new il;var ol=class{filePath;watchForChanges;reloadDebounce;watcher;reloadTimer;onReloadCallback;onErrorCallback;currentData;constructor(e){this.filePath=RI.resolve(e.path),this.watchForChanges=e.watchForChanges,this.reloadDebounce=e.reloadDebounce,this.onReloadCallback=e.onReload,this.onErrorCallback=e.onError}async load(){try{if(!ka.existsSync(this.filePath))return{success:!1,error:`Documentation file not found: ${this.filePath}`};let e;if(this.filePath.endsWith(".gz")){let r=await ka.promises.readFile(this.filePath);e=(0,UI.gunzipSync)(r).toString("utf-8")}else e=await ka.promises.readFile(this.filePath,"utf-8");let n;try{n=JSON.parse(e)}catch(r){return{success:!1,error:`Failed to parse JSON: ${r instanceof Error?r.message:String(r)}`}}let i=this.validateStructure(n);return i?{success:!1,error:i}:(this.currentData=n,this.watchForChanges&&!this.watcher&&this.startMonitoring(),{success:!0,data:n})}catch(e){return{success:!1,error:`Failed to load documentation: ${e instanceof Error?e.message:String(e)}`}}}startMonitoring(){!this.watchForChanges||this.watcher||this.startWatching()}async stopMonitoring(){this.reloadTimer&&(clearTimeout(this.reloadTimer),this.reloadTimer=void 0),this.watcher&&(await this.watcher.close(),this.watcher=void 0,fe().info("Stopped watching documentation file"))}getCurrentData(){return this.currentData}async dispose(){await this.stopMonitoring(),this.currentData=void 0,this.onReloadCallback=void 0,this.onErrorCallback=void 0}validateStructure(e){if(!e||typeof e!="object")return"Documentation must be an object";let n=e,i=["pipes","components","directives","injectables","interfaces","classes","modules"];for(let r of i){let o=n[r];if(o!==void 0&&!Array.isArray(o))return`${r} must be an array`}return null}startWatching(){this.watcher||(this.watcher=Sk(this.filePath,{persistent:!0,ignoreInitial:!0}),this.watcher.on("change",()=>{this.scheduleReload()}),this.watcher.on("error",e=>{let n=e instanceof Error?e:new Error(String(e));fe().error("File watcher error",n),this.onErrorCallback&&this.onErrorCallback(n)}),fe().info(`Watching for changes: ${this.filePath}`))}scheduleReload(){this.reloadTimer&&clearTimeout(this.reloadTimer),this.reloadTimer=setTimeout(()=>{this.reload()},this.reloadDebounce)}async reload(){fe().info("Reloading documentation...");let e=await this.load();e.success&&e.data?(fe().info("Documentation reloaded successfully"),this.onReloadCallback&&this.onReloadCallback(e.data)):(fe().error("Failed to reload documentation",new Error(e.error)),this.onErrorCallback&&this.onErrorCallback(new Error(e.error)))}};var xn=class{options;constructor(e){this.options=e}async fetch(e,n){let i;for(let r=0;r<=this.options.maxRetries;r++)try{let o=await this.fetchOnce(e,n);if(!this.isRetryableError(void 0,o.status)||r>=this.options.maxRetries)return o;let a=this.calculateBackoff(r);await this.sleep(a)}catch(o){if(i=o instanceof Error?o:new Error(String(o)),r<this.options.maxRetries&&this.isRetryableError(i)){let a=this.calculateBackoff(r);await this.sleep(a);continue}throw i}throw i||new Error("Unknown error during fetch")}async fetchOnce(e,n){let i=new AbortController,r=setTimeout(()=>i.abort(),this.options.timeout);try{let o={Accept:"application/json","User-Agent":this.options.userAgent||"DocumentationLoader/1.0"};n&&n.forEach((u,l)=>{o[l]=u});let a=await fetch(e,{signal:i.signal,headers:o});clearTimeout(r);let s=new Map;a.headers.forEach((u,l)=>{s.set(l,u)});let c=await a.text();return{status:a.status,statusText:a.statusText,data:c,headers:s}}catch(o){throw clearTimeout(r),o instanceof Error&&o.name==="AbortError"?new Error(`Request timeout after ${this.options.timeout}ms`):o}}isRetryableError(e,n){if(n!==void 0){if(n>=200&&n<400)return!1;if(n>=500||n===408||n===429)return!0;if(n>=400&&n<500)return!1}if(e){let i=e.message.toLowerCase();if(i.includes("timeout")||i.includes("network")||i.includes("econnrefused")||i.includes("enotfound")||i.includes("econnreset"))return!0}return!0}calculateBackoff(e){return this.options.retryDelay*Math.pow(2,e)}sleep(e){return new Promise(n=>setTimeout(n,e))}};var al=class{cache;constructor(){this.cache=new Map}set(e,n,i){let r={data:n,timestamp:Date.now()},o=this.getHeaderCaseInsensitive(i,"etag");o&&(r.etag=o);let a=this.getHeaderCaseInsensitive(i,"last-modified");a&&(r.lastModified=a),this.cache.set(e,r)}get(e){return this.cache.get(e)}getConditionalHeaders(e){let n=new Map,i=this.cache.get(e);return i&&(i.etag&&n.set("If-None-Match",i.etag),i.lastModified&&n.set("If-Modified-Since",i.lastModified)),n}clear(e){this.cache.delete(e)}clearAll(){this.cache.clear()}getHeaderCaseInsensitive(e,n){let i=n.toLowerCase();for(let[r,o]of e.entries())if(r.toLowerCase()===i)return o}};var av=class t extends Error{constructor(n,i,r){super(n);this.url=i;this.cause=r;this.name="NetworkError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}url;cause};var Ia=class t extends av{constructor(n,i,r,o){super(n,i);this.statusCode=r;this.statusText=o;this.name="HttpError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}statusCode;statusText},Pa=class t extends Error{constructor(n,i){super(n);this.content=i;this.name="ParseError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}content};var sl=class{url;httpClient;cacheManager;pollingTimer;currentData;pollingInterval;onReloadCallback;onErrorCallback;constructor(e){this.url=e.url,this.pollingInterval=e.pollingInterval,this.onReloadCallback=e.onReload,this.onErrorCallback=e.onError;let n={timeout:e.timeout,maxRetries:e.maxRetries,retryDelay:1e3,userAgent:"DocumentationLoader/1.0"};this.httpClient=new xn(n),this.cacheManager=new al}async load(){return this.fetchDocumentation()}startMonitoring(){this.pollingTimer||(this.pollingTimer=setInterval(()=>{this.poll()},this.pollingInterval),fe().info(`Started polling ${this.url} every ${this.pollingInterval}ms`))}async stopMonitoring(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=void 0,fe().info(`Stopped polling ${this.url}`))}getCurrentData(){return this.currentData}async dispose(){await this.stopMonitoring(),this.cacheManager.clear(this.url),this.currentData=void 0,this.onReloadCallback=void 0,this.onErrorCallback=void 0}async poll(){try{fe().debug(`Polling ${this.url} for updates...`);let e=this.cacheManager.getConditionalHeaders(this.url),n=await this.httpClient.fetch(this.url,e);if(n.status===304){fe().debug("No changes detected (304 Not Modified)");return}if(n.status===200){let i=this.parseJson(n.data),r=this.validateStructure(i);if(r)throw new Pa(r,n.data);this.cacheManager.set(this.url,i,n.headers),this.currentData=i,fe().info(`Documentation updated from ${this.url}`),this.onReloadCallback&&this.onReloadCallback(i);return}throw new Ia(`HTTP ${n.status}: ${n.statusText}`,this.url,n.status,n.statusText)}catch(e){let n=e instanceof Error?e.message:String(e);fe().error(`Polling error for ${this.url}`,e instanceof Error?e:new Error(n)),this.onErrorCallback&&this.onErrorCallback(e instanceof Error?e:new Error(n))}}async fetchDocumentation(){try{let e=this.cacheManager.get(this.url),n=e?this.cacheManager.getConditionalHeaders(this.url):void 0,i=await this.httpClient.fetch(this.url,n);if(i.status===304&&e)return fe().debug("Using cached documentation (304 Not Modified)"),this.currentData=e.data,{success:!0,data:e.data};if(i.status!==200)return{success:!1,error:`${new Ia(`HTTP ${i.status}: ${i.statusText}`,this.url,i.status,i.statusText).message} (URL: ${this.url})`};let r=this.parseJson(i.data),o=this.validateStructure(r);return o?{success:!1,error:o}:(this.cacheManager.set(this.url,r,i.headers),this.currentData=r,{success:!0,data:r})}catch(e){let n=e instanceof Error?e.message:String(e);return{success:!1,error:`Failed to fetch documentation from ${this.url}: ${n}`}}}parseJson(e){try{return JSON.parse(e)}catch(n){let i=n instanceof Error?n.message:String(n);throw new Pa(`Failed to parse JSON: ${i}`,e)}}validateStructure(e){if(!e||typeof e!="object")return"Documentation must be an object";let n=e,i=["pipes","components","directives","injectables","interfaces","classes","modules"];for(let r of i){let o=n[r];if(o!==void 0&&!Array.isArray(o))return`${r} must be an array`}return null}};var za=class{source;constructor(e){this.source=this.createSource(e)}async load(){let e=await this.source.load();return e.success&&this.source.startMonitoring(),e}getCurrentData(){return this.source.getCurrentData()}async stopWatching(){await this.source.stopMonitoring()}async dispose(){await this.source.dispose()}createSource(e){let n=ur.detect(e.path);return n.type==="local"?new ol({path:n.normalizedPath,watchForChanges:e.watchForChanges??!0,reloadDebounce:e.reloadDebounce??1e3,onReload:e.onReload,onError:e.onError}):new sl({url:n.normalizedPath,timeout:e.timeout??1e4,maxRetries:e.maxRetries??3,pollingInterval:e.pollingInterval??6e4,onReload:e.onReload,onError:e.onError})}};var Ea=class{build(e){let n={byName:new Map,bySelector:new Map,searchIndex:new Map,components:[],directives:[],pipes:[],services:[],lastUpdated:new Date,totalCount:0},i=new Map;if(e.components)for(let r of e.components){if(i.has(r.name))throw new Error(`Duplicate name detected: "${r.name}" exists as both ${i.get(r.name)} and component. All component, directive, pipe, and service names must be unique across the entire documentation.`);i.set(r.name,"component"),this.indexComponent(r,n)}if(e.directives)for(let r of e.directives){if(i.has(r.name))throw new Error(`Duplicate name detected: "${r.name}" exists as both ${i.get(r.name)} and directive. All component, directive, pipe, and service names must be unique across the entire documentation.`);i.set(r.name,"directive"),this.indexDirective(r,n)}if(e.pipes)for(let r of e.pipes){if(i.has(r.name))throw new Error(`Duplicate name detected: "${r.name}" exists as both ${i.get(r.name)} and pipe. All component, directive, pipe, and service names must be unique across the entire documentation.`);i.set(r.name,"pipe"),this.indexPipe(r,n)}if(e.injectables)for(let r of e.injectables){if(i.has(r.name))throw new Error(`Duplicate name detected: "${r.name}" exists as both ${i.get(r.name)} and injectable. All component, directive, pipe, and service names must be unique across the entire documentation.`);i.set(r.name,"injectable"),this.indexInjectable(r,n)}return n.totalCount=n.components.length+n.directives.length+n.pipes.length+n.services.length,n}indexComponent(e,n){n.components.push(e),n.byName.set(e.name,e),e.selector&&n.bySelector.set(e.selector,e),this.addToSearchIndex(e,n)}indexDirective(e,n){n.directives.push(e),n.byName.set(e.name,e),e.selector&&n.bySelector.set(e.selector,e),this.addToSearchIndex(e,n)}indexPipe(e,n){n.pipes.push(e),n.byName.set(e.name,e),this.addToSearchIndex(e,n)}indexInjectable(e,n){n.services.push(e),n.byName.set(e.name,e),this.addToSearchIndex(e,n)}addToSearchIndex(e,n){let i=new Set;if(this.extractWords(e.name,i),"selector"in e&&e.selector&&this.extractWords(e.selector,i),e.description&&this.extractWords(e.description,i),"inputs"in e&&e.inputs)for(let r of e.inputs)this.extractWords(r.name,i),r.description&&this.extractWords(r.description,i);if("outputs"in e&&e.outputs)for(let r of e.outputs)this.extractWords(r.name,i),r.description&&this.extractWords(r.description,i);if("methods"in e&&e.methods)for(let r of e.methods)this.extractWords(r.name,i);for(let r of i)n.searchIndex.has(r)||n.searchIndex.set(r,new Set),n.searchIndex.get(r).add(e.name)}extractWords(e,n){let i=e.toLowerCase(),r=i.split(/[^a-z0-9]+/).filter(o=>o.length>0);for(let o of r)n.add(o);r.length===0&&e.trim().length>0&&n.add(i.trim())}getStatistics(e){return{totalCount:e.totalCount,componentCount:e.components.length,directiveCount:e.directives.length,pipeCount:e.pipes.length,serviceCount:e.services.length,lastUpdated:e.lastUpdated}}rebuild(e,n){return this.build(e)}};function cl(t){return!!t._zod}function Ar(t,e){return cl(t)?Ps(t,e):t.safeParse(e)}function ul(t){if(!t)return;let e;if(cl(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function ll(t){if(cl(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 n=t._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let i=t.value;if(i!==void 0)return i}var cv="2025-11-25";var LI=[cv,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Nr="io.modelcontextprotocol/related-task",fl="2.0",je=ku(t=>t!==null&&(typeof t=="object"||typeof t=="function")),MI=de([S(),oe().int()]),FI=S(),KW=qe({ttl:oe().optional(),pollInterval:oe().optional()}),FU=j({ttl:oe().optional()}),ZU=j({taskId:S()}),uv=qe({progressToken:MI.optional(),[Nr]:ZU.optional()}),kt=j({_meta:uv.optional()}),Da=kt.extend({task:FU.optional()}),ZI=t=>Da.safeParse(t).success,He=j({method:S(),params:kt.loose().optional()}),Ot=j({_meta:uv.optional()}),Tt=j({method:S(),params:Ot.loose().optional()}),Ge=qe({_meta:uv.optional()}),pl=de([S(),oe().int()]),qI=j({jsonrpc:R(fl),id:pl,...He.shape}).strict(),lv=t=>qI.safeParse(t).success,VI=j({jsonrpc:R(fl),...Tt.shape}).strict(),BI=t=>VI.safeParse(t).success,dv=j({jsonrpc:R(fl),id:pl,result:Ge}).strict(),Oa=t=>dv.safeParse(t).success;var X;(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"})(X||(X={}));var fv=j({jsonrpc:R(fl),id:pl.optional(),error:j({code:oe().int(),message:S(),data:ye().optional()})}).strict();var HI=t=>fv.safeParse(t).success;var GI=de([qI,VI,dv,fv]),WW=de([dv,fv]),ml=Ge.strict(),qU=Ot.extend({requestId:pl.optional(),reason:S().optional()}),hl=Tt.extend({method:R("notifications/cancelled"),params:qU}),VU=j({src:S(),mimeType:S().optional(),sizes:W(S()).optional(),theme:Ve(["light","dark"]).optional()}),Ta=j({icons:W(VU).optional()}),Ei=j({name:S(),title:S().optional()}),JI=Ei.extend({...Ei.shape,...Ta.shape,version:S(),websiteUrl:S().optional(),description:S().optional()}),BU=wi(j({applyDefaults:De().optional()}),he(S(),ye())),HU=ca(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,wi(j({form:BU.optional(),url:je.optional()}),he(S(),ye()).optional())),GU=qe({list:je.optional(),cancel:je.optional(),requests:qe({sampling:qe({createMessage:je.optional()}).optional(),elicitation:qe({create:je.optional()}).optional()}).optional()}),JU=qe({list:je.optional(),cancel:je.optional(),requests:qe({tools:qe({call:je.optional()}).optional()}).optional()}),KU=j({experimental:he(S(),je).optional(),sampling:j({context:je.optional(),tools:je.optional()}).optional(),elicitation:HU.optional(),roots:j({listChanged:De().optional()}).optional(),tasks:GU.optional(),extensions:he(S(),je).optional()}),WU=kt.extend({protocolVersion:S(),capabilities:KU,clientInfo:JI}),pv=He.extend({method:R("initialize"),params:WU});var XU=j({experimental:he(S(),je).optional(),logging:je.optional(),completions:je.optional(),prompts:j({listChanged:De().optional()}).optional(),resources:j({subscribe:De().optional(),listChanged:De().optional()}).optional(),tools:j({listChanged:De().optional()}).optional(),tasks:JU.optional(),extensions:he(S(),je).optional()}),YU=Ge.extend({protocolVersion:S(),capabilities:XU,serverInfo:JI,instructions:S().optional()}),mv=Tt.extend({method:R("notifications/initialized"),params:Ot.optional()});var gl=He.extend({method:R("ping"),params:kt.optional()}),QU=j({progress:oe(),total:pe(oe()),message:pe(S())}),eL=j({...Ot.shape,...QU.shape,progressToken:MI}),yl=Tt.extend({method:R("notifications/progress"),params:eL}),tL=kt.extend({cursor:FI.optional()}),Ca=He.extend({params:tL.optional()}),Aa=Ge.extend({nextCursor:FI.optional()}),rL=Ve(["working","input_required","completed","failed","cancelled"]),Na=j({taskId:S(),status:rL,ttl:de([oe(),Qo()]),createdAt:S(),lastUpdatedAt:S(),pollInterval:pe(oe()),statusMessage:pe(S())}),Di=Ge.extend({task:Na}),nL=Ot.merge(Na),ja=Tt.extend({method:R("notifications/tasks/status"),params:nL}),vl=He.extend({method:R("tasks/get"),params:kt.extend({taskId:S()})}),bl=Ge.merge(Na),_l=He.extend({method:R("tasks/result"),params:kt.extend({taskId:S()})}),XW=Ge.loose(),$l=Ca.extend({method:R("tasks/list")}),wl=Aa.extend({tasks:W(Na)}),xl=He.extend({method:R("tasks/cancel"),params:kt.extend({taskId:S()})}),KI=Ge.merge(Na),WI=j({uri:S(),mimeType:pe(S()),_meta:he(S(),ye()).optional()}),XI=WI.extend({text:S()}),hv=S().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),YI=WI.extend({blob:hv}),Ra=Ve(["user","assistant"]),Oi=j({audience:W(Ra).optional(),priority:oe().min(0).max(1).optional(),lastModified:dn.datetime({offset:!0}).optional()}),QI=j({...Ei.shape,...Ta.shape,uri:S(),description:pe(S()),mimeType:pe(S()),size:pe(oe()),annotations:Oi.optional(),_meta:pe(qe({}))}),iL=j({...Ei.shape,...Ta.shape,uriTemplate:S(),description:pe(S()),mimeType:pe(S()),annotations:Oi.optional(),_meta:pe(qe({}))}),oL=Ca.extend({method:R("resources/list")}),aL=Aa.extend({resources:W(QI)}),sL=Ca.extend({method:R("resources/templates/list")}),cL=Aa.extend({resourceTemplates:W(iL)}),gv=kt.extend({uri:S()}),uL=gv,lL=He.extend({method:R("resources/read"),params:uL}),dL=Ge.extend({contents:W(de([XI,YI]))}),fL=Tt.extend({method:R("notifications/resources/list_changed"),params:Ot.optional()}),pL=gv,mL=He.extend({method:R("resources/subscribe"),params:pL}),hL=gv,gL=He.extend({method:R("resources/unsubscribe"),params:hL}),yL=Ot.extend({uri:S()}),vL=Tt.extend({method:R("notifications/resources/updated"),params:yL}),bL=j({name:S(),description:pe(S()),required:pe(De())}),_L=j({...Ei.shape,...Ta.shape,description:pe(S()),arguments:pe(W(bL)),_meta:pe(qe({}))}),$L=Ca.extend({method:R("prompts/list")}),wL=Aa.extend({prompts:W(_L)}),xL=kt.extend({name:S(),arguments:he(S(),S()).optional()}),SL=He.extend({method:R("prompts/get"),params:xL}),yv=j({type:R("text"),text:S(),annotations:Oi.optional(),_meta:he(S(),ye()).optional()}),vv=j({type:R("image"),data:hv,mimeType:S(),annotations:Oi.optional(),_meta:he(S(),ye()).optional()}),bv=j({type:R("audio"),data:hv,mimeType:S(),annotations:Oi.optional(),_meta:he(S(),ye()).optional()}),kL=j({type:R("tool_use"),name:S(),id:S(),input:he(S(),ye()),_meta:he(S(),ye()).optional()}),IL=j({type:R("resource"),resource:de([XI,YI]),annotations:Oi.optional(),_meta:he(S(),ye()).optional()}),PL=QI.extend({type:R("resource_link")}),_v=de([yv,vv,bv,PL,IL]),zL=j({role:Ra,content:_v}),EL=Ge.extend({description:S().optional(),messages:W(zL)}),DL=Tt.extend({method:R("notifications/prompts/list_changed"),params:Ot.optional()}),OL=j({title:S().optional(),readOnlyHint:De().optional(),destructiveHint:De().optional(),idempotentHint:De().optional(),openWorldHint:De().optional()}),TL=j({taskSupport:Ve(["required","optional","forbidden"]).optional()}),eP=j({...Ei.shape,...Ta.shape,description:S().optional(),inputSchema:j({type:R("object"),properties:he(S(),je).optional(),required:W(S()).optional()}).catchall(ye()),outputSchema:j({type:R("object"),properties:he(S(),je).optional(),required:W(S()).optional()}).catchall(ye()).optional(),annotations:OL.optional(),execution:TL.optional(),_meta:he(S(),ye()).optional()}),$v=Ca.extend({method:R("tools/list")}),CL=Aa.extend({tools:W(eP)}),Sl=Ge.extend({content:W(_v).default([]),structuredContent:he(S(),ye()).optional(),isError:De().optional()}),YW=Sl.or(Ge.extend({toolResult:ye()})),AL=Da.extend({name:S(),arguments:he(S(),ye()).optional()}),Ua=He.extend({method:R("tools/call"),params:AL}),NL=Tt.extend({method:R("notifications/tools/list_changed"),params:Ot.optional()}),QW=j({autoRefresh:De().default(!0),debounceMs:oe().int().nonnegative().default(300)}),La=Ve(["debug","info","notice","warning","error","critical","alert","emergency"]),jL=kt.extend({level:La}),wv=He.extend({method:R("logging/setLevel"),params:jL}),RL=Ot.extend({level:La,logger:S().optional(),data:ye()}),UL=Tt.extend({method:R("notifications/message"),params:RL}),LL=j({name:S().optional()}),ML=j({hints:W(LL).optional(),costPriority:oe().min(0).max(1).optional(),speedPriority:oe().min(0).max(1).optional(),intelligencePriority:oe().min(0).max(1).optional()}),FL=j({mode:Ve(["auto","required","none"]).optional()}),ZL=j({type:R("tool_result"),toolUseId:S().describe("The unique identifier for the corresponding tool call."),content:W(_v).default([]),structuredContent:j({}).loose().optional(),isError:De().optional(),_meta:he(S(),ye()).optional()}),qL=na("type",[yv,vv,bv]),dl=na("type",[yv,vv,bv,kL,ZL]),VL=j({role:Ra,content:de([dl,W(dl)]),_meta:he(S(),ye()).optional()}),BL=Da.extend({messages:W(VL),modelPreferences:ML.optional(),systemPrompt:S().optional(),includeContext:Ve(["none","thisServer","allServers"]).optional(),temperature:oe().optional(),maxTokens:oe().int(),stopSequences:W(S()).optional(),metadata:je.optional(),tools:W(eP).optional(),toolChoice:FL.optional()}),HL=He.extend({method:R("sampling/createMessage"),params:BL}),Ma=Ge.extend({model:S(),stopReason:pe(Ve(["endTurn","stopSequence","maxTokens"]).or(S())),role:Ra,content:qL}),xv=Ge.extend({model:S(),stopReason:pe(Ve(["endTurn","stopSequence","maxTokens","toolUse"]).or(S())),role:Ra,content:de([dl,W(dl)])}),GL=j({type:R("boolean"),title:S().optional(),description:S().optional(),default:De().optional()}),JL=j({type:R("string"),title:S().optional(),description:S().optional(),minLength:oe().optional(),maxLength:oe().optional(),format:Ve(["email","uri","date","date-time"]).optional(),default:S().optional()}),KL=j({type:Ve(["number","integer"]),title:S().optional(),description:S().optional(),minimum:oe().optional(),maximum:oe().optional(),default:oe().optional()}),WL=j({type:R("string"),title:S().optional(),description:S().optional(),enum:W(S()),default:S().optional()}),XL=j({type:R("string"),title:S().optional(),description:S().optional(),oneOf:W(j({const:S(),title:S()})),default:S().optional()}),YL=j({type:R("string"),title:S().optional(),description:S().optional(),enum:W(S()),enumNames:W(S()).optional(),default:S().optional()}),QL=de([WL,XL]),e6=j({type:R("array"),title:S().optional(),description:S().optional(),minItems:oe().optional(),maxItems:oe().optional(),items:j({type:R("string"),enum:W(S())}),default:W(S()).optional()}),t6=j({type:R("array"),title:S().optional(),description:S().optional(),minItems:oe().optional(),maxItems:oe().optional(),items:j({anyOf:W(j({const:S(),title:S()}))}),default:W(S()).optional()}),r6=de([e6,t6]),n6=de([YL,QL,r6]),i6=de([n6,GL,JL,KL]),o6=Da.extend({mode:R("form").optional(),message:S(),requestedSchema:j({type:R("object"),properties:he(S(),i6),required:W(S()).optional()})}),a6=Da.extend({mode:R("url"),message:S(),elicitationId:S(),url:S().url()}),s6=de([o6,a6]),c6=He.extend({method:R("elicitation/create"),params:s6}),u6=Ot.extend({elicitationId:S()}),l6=Tt.extend({method:R("notifications/elicitation/complete"),params:u6}),Ti=Ge.extend({action:Ve(["accept","decline","cancel"]),content:ca(t=>t===null?void 0:t,he(S(),de([S(),oe(),De(),W(S())])).optional())}),d6=j({type:R("ref/resource"),uri:S()});var f6=j({type:R("ref/prompt"),name:S()}),p6=kt.extend({ref:de([f6,d6]),argument:j({name:S(),value:S()}),context:j({arguments:he(S(),S()).optional()}).optional()}),m6=He.extend({method:R("completion/complete"),params:p6});var h6=Ge.extend({completion:qe({values:W(S()).max(100),total:pe(oe().int()),hasMore:pe(De())})}),g6=j({uri:S().startsWith("file://"),name:S().optional(),_meta:he(S(),ye()).optional()}),y6=He.extend({method:R("roots/list"),params:kt.optional()}),Sv=Ge.extend({roots:W(g6)}),v6=Tt.extend({method:R("notifications/roots/list_changed"),params:Ot.optional()}),e3=de([gl,pv,m6,wv,SL,$L,oL,sL,lL,mL,gL,Ua,$v,vl,_l,$l,xl]),t3=de([hl,yl,mv,v6,ja]),r3=de([ml,Ma,xv,Ti,Sv,bl,wl,Di]),n3=de([gl,HL,c6,y6,vl,_l,$l,xl]),i3=de([hl,yl,UL,vL,fL,NL,DL,ja,l6]),o3=de([ml,YU,h6,EL,wL,aL,cL,dL,Sl,CL,bl,wl,Di]),B=class t extends Error{constructor(e,n,i){super(`MCP error ${e}: ${n}`),this.code=e,this.data=i,this.name="McpError"}static fromError(e,n,i){if(e===X.UrlElicitationRequired&&i){let r=i;if(r.elicitations)return new sv(r.elicitations,n)}return new t(e,n,i)}},sv=class extends B{constructor(e,n=`URL elicitation${e.length>1?"s":""} required`){super(X.UrlElicitationRequired,n,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function jr(t){return t==="completed"||t==="failed"||t==="cancelled"}var U3=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function kv(t){let n=ul(t)?.method;if(!n)throw new Error("Schema is missing a method literal");let i=ll(n);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Iv(t,e){let n=Ar(t,e);if(!n.success)throw n.error;return n.data}var S6=6e4,kl=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(hl,n=>{this._oncancel(n)}),this.setNotificationHandler(yl,n=>{this._onprogress(n)}),this.setRequestHandler(gl,n=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(vl,async(n,i)=>{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new B(X.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(_l,async(n,i)=>{let r=async()=>{let o=n.params.taskId;if(!await this._taskStore.getTask(o,i.sessionId))throw new B(X.InvalidParams,`Task not found: ${o}`);if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(o,i.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),s.type==="response")l(c);else{let d=c,p=new B(d.error.code,d.error.message,d.error.data);l(p)}else{let d=s.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(s.message,{relatedRequestId:i.requestId})}}let a=await this._taskStore.getTask(o,i.sessionId);if(!a)throw new B(X.InvalidParams,`Task not found: ${o}`);if(!jr(a.status))return await this._waitForTaskUpdate(o,i.signal,i.sessionId),await r();if(jr(a.status)){let s=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o,i.sessionId),{...s,_meta:{...s._meta,[Nr]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler($l,async(n,i)=>{try{let{tasks:r,nextCursor:o}=await this._taskStore.listTasks(n.params?.cursor,i.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new B(X.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(xl,async(n,i)=>{try{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new B(X.InvalidParams,`Task not found: ${n.params.taskId}`);if(jr(r.status))throw new B(X.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(n.params.taskId,i.sessionId);let o=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!o)throw new B(X.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof B?r:new B(X.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,n,i,r,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:i,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(e){let n=this._timeoutInfo.get(e);if(!n)return!1;let i=Date.now()-n.startTime;if(n.maxTotalTimeout&&i>=n.maxTotalTimeout)throw this._timeoutInfo.delete(e),B.fromError(X.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:i});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(e){let n=this._timeoutInfo.get(e);n&&(clearTimeout(n.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 n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};let i=this.transport?.onerror;this._transport.onerror=o=>{i?.(o),this._onerror(o)};let r=this._transport?.onmessage;this._transport.onmessage=(o,a)=>{r?.(o,a),Oa(o)||HI(o)?this._onresponse(o):lv(o)?this._onrequest(o,a):BI(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 n=B.fromError(X.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let i of e.values())i(n)}_onerror(e){this.onerror?.(e)}_onnotification(e){let n=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(e,n){let i=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,o=e.params?._meta?.[Nr]?.taskId,a=r?.sessionId,s=this._taskStore,c=!0,u;if(o&&s&&this._taskMessageQueue&&a!==void 0&&(c=!1,u=(async()=>{if(!await s.getTask(o,a))throw new B(X.InvalidParams,`Task not found: ${o}`);c=!0})()),i===void 0){let f={jsonrpc:"2.0",id:e.id,error:{code:X.MethodNotFound,message:"Method not found"}};if(o&&u){let h={type:"error",message:f,timestamp:Date.now()};u.then(()=>this._enqueueTaskMessage(o,h,a),()=>r?.send(f)).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)))}else o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:f,timestamp:Date.now()},r?.sessionId).catch(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):r?.send(f).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}let l=new AbortController;this._requestHandlerAbortControllers.set(e.id,l);let d=ZI(e.params)?e.params.task:void 0,p=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,m={signal:l.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async f=>{if(l.signal.aborted)return;let h={relatedRequestId:e.id};o&&(h.relatedTask={taskId:o}),await this.notification(f,h)},sendRequest:async(f,h,g)=>{if(l.signal.aborted)throw new B(X.ConnectionClosed,"Request was cancelled");let y={...g,relatedRequestId:e.id};o&&!y.relatedTask&&(y.relatedTask={taskId:o});let v=y.relatedTask?.taskId??o;return v&&p&&await p.updateTaskStatus(v,"input_required"),await this.request(f,h,y)},authInfo:n?.authInfo,requestId:e.id,requestInfo:n?.requestInfo,taskId:o,taskStore:p,taskRequestedTtl:d?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};(u??Promise.resolve()).then(()=>{if(u&&l.signal.aborted)throw new B(X.ConnectionClosed,"Request was cancelled");d&&this.assertTaskHandlerCapability(e.method)}).then(()=>i(e,m)).then(async f=>{if(l.signal.aborted)return;let h={result:f,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)},async f=>{if(l.signal.aborted)return;let h={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(f.code)?f.code:X.InternalError,message:f.message??"Internal error",...f.data!==void 0&&{data:f.data}}};o&&this._taskMessageQueue&&c?await this._enqueueTaskMessage(o,{type:"error",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)}).catch(f=>this._onerror(new Error(`Failed to send response: ${f}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===l&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:n,...i}=e.params,r=Number(n),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),s=this._timeoutInfo.get(r);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(c){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(c);return}o(i)}_onresponse(e){let n=Number(e.id),i=this._requestResolvers.get(n);if(i){if(this._requestResolvers.delete(n),Oa(e))i(e);else{let a=new B(e.error.code,e.error.message,e.error.data);i(a)}return}let r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let o=!1;if(Oa(e)&&e.result&&typeof e.result=="object"){let a=e.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,n))}}if(o||this._progressHandlers.delete(n),Oa(e))r(e);else{let a=B.fromError(e.error.code,e.error.message,e.error.data);r(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,n,i){let{task:r}=i??{};if(!r){try{yield{type:"result",result:await this.request(e,n,i)}}catch(a){yield{type:"error",error:a instanceof B?a:new B(X.InternalError,String(a))}}return}let o;try{let a=await this.request(e,Di,i);if(a.task)o=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new B(X.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:s},jr(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)}:s.status==="failed"?yield{type:"error",error:new B(X.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new B(X.InternalError,`Task ${o} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),i?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof B?a:new B(X.InternalError,String(a))}}}request(e,n,i){let{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a,task:s,relatedTask:c}=i??{};return new Promise((u,l)=>{let d=v=>{l(v)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),s&&this.assertTaskCapability(e.method)}catch(v){d(v);return}i?.signal?.throwIfAborted();let p=this._requestMessageId++,m={...e,jsonrpc:"2.0",id:p};i?.onprogress&&(this._progressHandlers.set(p,i.onprogress),m.params={...e.params,_meta:{...e.params?._meta||{},progressToken:p}}),s&&(m.params={...m.params,task:s}),c&&(m.params={...m.params,_meta:{...m.params?._meta||{},[Nr]:c}});let f=v=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(v)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a}).catch(_=>this._onerror(new Error(`Failed to send cancellation: ${_}`)));let b=v instanceof B?v:new B(X.RequestTimeout,String(v));l(b)};this._responseHandlers.set(p,v=>{if(!i?.signal?.aborted){if(v instanceof Error)return l(v);try{let b=Ar(n,v.result);b.success?u(b.data):l(b.error)}catch(b){l(b)}}}),i?.signal?.addEventListener("abort",()=>{f(i?.signal?.reason)});let h=i?.timeout??S6,g=()=>f(B.fromError(X.RequestTimeout,"Request timed out",{timeout:h}));this._setupTimeout(p,h,i?.maxTotalTimeout,g,i?.resetTimeoutOnProgress??!1);let y=c?.taskId;if(y){let v=b=>{let _=this._responseHandlers.get(p);_?_(b):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,v),this._enqueueTaskMessage(y,{type:"request",message:m,timestamp:Date.now()}).catch(b=>{this._cleanupTimeout(p),l(b)})}else this._transport.send(m,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a}).catch(v=>{this._cleanupTimeout(p),l(v)})})}async getTask(e,n){return this.request({method:"tasks/get",params:e},bl,n)}async getTaskResult(e,n,i){return this.request({method:"tasks/result",params:e},n,i)}async listTasks(e,n){return this.request({method:"tasks/list",params:e},wl,n)}async cancelTask(e,n){return this.request({method:"tasks/cancel",params:e},KI,n)}async notification(e,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let i=n?.relatedTask?.taskId;if(i){let s={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[Nr]:n.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!n?.relatedRequestId&&!n?.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 s={...e,jsonrpc:"2.0"};n?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Nr]:n.relatedTask}}}),this._transport?.send(s,n).catch(c=>this._onerror(c))});return}let a={...e,jsonrpc:"2.0"};n?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Nr]:n.relatedTask}}}),await this._transport.send(a,n)}setRequestHandler(e,n){let i=kv(e);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(r,o)=>{let a=Iv(e,r);return Promise.resolve(n(a,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,n){let i=kv(e);this._notificationHandlers.set(i,r=>{let o=Iv(e,r);return Promise.resolve(n(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let n=this._taskProgressTokens.get(e);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,n,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,n,i??this._transport?.sessionId,r)}async _clearTaskQueue(e,n){if(this._taskMessageQueue){let i=await this._taskMessageQueue.dequeueAll(e,n);for(let r of i)if(r.type==="request"&&lv(r.message)){let o=r.message.id,a=this._requestResolvers.get(o);a?(a(new B(X.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,n,i){let r=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(e,i);o?.pollInterval&&(r=o.pollInterval)}catch{}return new Promise((o,a)=>{if(n.aborted){a(new B(X.InvalidRequest,"Request cancelled"));return}let s=setTimeout(o,r);n.addEventListener("abort",()=>{clearTimeout(s),a(new B(X.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,n){let i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async r=>{if(!e)throw new Error("No request provided");return await i.createTask(r,e.id,{method:e.method,params:e.params},n)},getTask:async r=>{let o=await i.getTask(r,n);if(!o)throw new B(X.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,a)=>{await i.storeTaskResult(r,o,a,n);let s=await i.getTask(r,n);if(s){let c=ja.parse({method:"notifications/tasks/status",params:s});await this.notification(c),jr(s.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>i.getTaskResult(r,n),updateTaskStatus:async(r,o,a)=>{let s=await i.getTask(r,n);if(!s)throw new B(X.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(jr(s.status))throw new B(X.InvalidParams,`Cannot update task "${r}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(r,o,a,n);let c=await i.getTask(r,n);if(c){let u=ja.parse({method:"notifications/tasks/status",params:c});await this.notification(u),jr(c.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>i.listTasks(r,n)}}};function tP(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function rP(t,e){let n={...t};for(let i in e){let r=i,o=e[r];if(o===void 0)continue;let a=n[r];tP(a)&&tP(o)?n[r]={...a,...o}:n[r]=o}return n}var uD=rt(v_(),1),lD=rt(cD(),1);function r9(){let t=new uD.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,lD.default)(t),t}var md=class{constructor(e){this._ajv=e??r9()}getValidator(e){let n="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return i=>n(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}};var hd=class{constructor(e){this._server=e}requestStream(e,n,i){return this._server.requestStream(e,n,i)}createMessageStream(e,n){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 r=e.messages[e.messages.length-1],o=Array.isArray(r.content)?r.content:[r.content],a=o.some(l=>l.type==="tool_result"),s=e.messages.length>1?e.messages[e.messages.length-2]:void 0,c=s?Array.isArray(s.content)?s.content:[s.content]:[],u=c.some(l=>l.type==="tool_use");if(a){if(o.some(l=>l.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){let l=new Set(c.filter(p=>p.type==="tool_use").map(p=>p.id)),d=new Set(o.filter(p=>p.type==="tool_result").map(p=>p.toolUseId));if(l.size!==d.size||![...l].every(p=>d.has(p)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:e},Ma,n)}elicitInputStream(e,n){let i=this._server.getClientCapabilities(),r=e.mode??"form";switch(r){case"url":{if(!i?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!i?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}let o=r==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:o},Ti,n)}async getTask(e,n){return this._server.getTask({taskId:e},n)}async getTaskResult(e,n,i){return this._server.getTaskResult({taskId:e},n,i)}async listTasks(e,n){return this._server.listTasks(e?{cursor:e}:void 0,n)}async cancelTask(e,n){return this._server.cancelTask({taskId:e},n)}};function dD(t,e,n){if(!t)throw new Error(`${n} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!t.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${e})`);break;default:break}}function fD(t,e,n){if(!t)throw new Error(`${n} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!t.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!t.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var gd=class extends kl{constructor(e,n){super(n),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(La.options.map((i,r)=>[i,r])),this.isMessageIgnored=(i,r)=>{let o=this._loggingLevels.get(r);return o?this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(o):!1},this._capabilities=n?.capabilities??{},this._instructions=n?.instructions,this._jsonSchemaValidator=n?.jsonSchemaValidator??new md,this.setRequestHandler(pv,i=>this._oninitialize(i)),this.setNotificationHandler(mv,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(wv,async(i,r)=>{let o=r.sessionId||r.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=i.params,s=La.safeParse(a);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new hd(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=rP(this._capabilities,e)}setRequestHandler(e,n){let r=ul(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=ll(r);if(typeof o!="string")throw new Error("Schema method literal must be a string");if(o==="tools/call"){let s=async(c,u)=>{let l=Ar(Ua,c);if(!l.success){let f=l.error instanceof Error?l.error.message:String(l.error);throw new B(X.InvalidParams,`Invalid tools/call request: ${f}`)}let{params:d}=l.data,p=await Promise.resolve(n(c,u));if(d.task){let f=Ar(Di,p);if(!f.success){let h=f.error instanceof Error?f.error.message:String(f.error);throw new B(X.InvalidParams,`Invalid task creation result: ${h}`)}return f.data}let m=Ar(Sl,p);if(!m.success){let f=m.error instanceof Error?m.error.message:String(m.error);throw new B(X.InvalidParams,`Invalid tools/call result: ${f}`)}return m.data};return super.setRequestHandler(e,s)}return super.setRequestHandler(e,n)}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){fD(this._clientCapabilities?.tasks?.requests,e,"Client")}assertTaskHandlerCapability(e){this._capabilities&&dD(this._capabilities.tasks?.requests,e,"Server")}async _oninitialize(e){let n=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:LI.includes(n)?n:cv,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"},ml)}async createMessage(e,n){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],r=Array.isArray(i.content)?i.content:[i.content],o=r.some(u=>u.type==="tool_result"),a=e.messages.length>1?e.messages[e.messages.length-2]:void 0,s=a?Array.isArray(a.content)?a.content:[a.content]:[],c=s.some(u=>u.type==="tool_use");if(o){if(r.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let u=new Set(s.filter(d=>d.type==="tool_use").map(d=>d.id)),l=new Set(r.filter(d=>d.type==="tool_result").map(d=>d.toolUseId));if(u.size!==l.size||![...u].every(d=>l.has(d)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return e.tools?this.request({method:"sampling/createMessage",params:e},xv,n):this.request({method:"sampling/createMessage",params:e},Ma,n)}async elicitInput(e,n){switch(e.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let r=e;return this.request({method:"elicitation/create",params:r},Ti,n)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let r=e.mode==="form"?e:{...e,mode:"form"},o=await this.request({method:"elicitation/create",params:r},Ti,n);if(o.action==="accept"&&o.content&&r.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(r.requestedSchema)(o.content);if(!s.valid)throw new B(X.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof B?a:new B(X.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return o}}}createElicitationCompletionNotifier(e,n){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},n)}async listRoots(e,n){return this.request({method:"roots/list",params:e},Sv,n)}async sendLoggingMessage(e,n){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,n))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 I_=rt(require("node:process"),1);var n9=10*1024*1024,yd=class{constructor(e){this._maxBufferSize=e?.maxBufferSize??n9}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
156
+ `);if(e===-1)return null;let n=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),i9(n)}clear(){this._buffer=void 0}};function i9(t){return GI.parse(JSON.parse(t))}function pD(t){return JSON.stringify(t)+`
157
+ `}var vd=class{constructor(e=I_.default.stdin,n=I_.default.stdout,i){this._stdin=e,this._stdout=n,this._started=!1,this._ondata=r=>{try{this._readBuffer.append(r),this.processReadBuffer()}catch(o){this.onerror?.(o),this.close().catch(()=>{})}},this._onerror=r=>{this.onerror?.(r)},this._readBuffer=new yd({maxBufferSize:i?.maxBufferSize})}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){for(;;)try{let 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(n=>{let i=pD(e);this._stdout.write(i)?n():this._stdout.once("drain",n)})}};var bs=class{index;constructor(e){this.index=e}getByName(e){return this.index.byName.get(e)}getBySelector(e){return this.index.bySelector.get(e)}getByType(e){switch(e){case"component":return this.index.components;case"directive":return this.index.directives;case"pipe":return this.index.pipes;case"service":return this.index.services;case"all":return[...this.index.components,...this.index.directives,...this.index.pipes,...this.index.services];default:return[]}}getAll(e=!1){let n=this.getByType("all");return e?n:n.filter(i=>!i.deprecated)}updateIndex(e){this.index=e}};var _s=class{index;constructor(e){this.index=e}search(e){let{query:n,types:i,includeDeprecated:r=!1,limit:o=50,offset:a=0}=e,s=n.toLowerCase().trim();if(s.length===0)return{items:[],total:0,hasMore:!1};let c=this.getCandidates(s,i),u=[];for(let m of c){if(!r&&m.deprecated)continue;let f=this.calculateRelevanceScore(m,s);f>0&&u.push({doc:m,relevanceScore:f})}u.sort((m,f)=>f.relevanceScore-m.relevanceScore);let l=u.length,d=u.slice(a,a+o),p=a+o<l;return{items:d,total:l,hasMore:p}}getCandidates(e,n){let i=e.split(/[^a-z0-9]+/).filter(a=>a.length>0),r=new Set;for(let a of i){if(this.index.searchIndex.has(a)){let s=this.index.searchIndex.get(a);for(let c of s)r.add(c)}for(let[s,c]of this.index.searchIndex.entries())if(s.startsWith(a))for(let u of c)r.add(u)}let o=[];for(let a of r){let s=this.index.byName.get(a);s&&(n&&n.length>0?n.includes(s.type)&&o.push(s):o.push(s))}return o}calculateRelevanceScore(e,n){let i=0,r=e.name.toLowerCase();if(r===n&&(i+=100),"selector"in e&&e.selector){let o=e.selector.toLowerCase();(o===n||o.includes(n))&&(i+=80)}if(r.startsWith(n)&&(i+=60),!r.startsWith(n)&&r.includes(n)&&(i+=30),e.description&&e.description.toLowerCase().includes(n)&&(i+=40),"inputs"in e&&e.inputs){for(let o of e.inputs)if(o.name.toLowerCase().includes(n)){i+=30;break}}if("outputs"in e&&e.outputs){for(let o of e.outputs)if(o.name.toLowerCase().includes(n)){i+=30;break}}if("methods"in e&&e.methods){for(let o of e.methods)if(o.name.toLowerCase().includes(n)){i+=20;break}}return e.deprecated&&(i=Math.floor(i*.5)),i}updateIndex(e){this.index=e}};var bd=class{getPreferredDescription(e){return e.rawdescription??e.description??""}formatList(e,n=!1){return e.filter(i=>n||!i.deprecated).map(i=>this.formatSummary(i))}formatSummary(e){let n=e.type==="injectable"?"service":e.type,i="selector"in e?e.selector:void 0;return{name:e.name,type:n,selector:i,description:this.getPreferredDescription(e),deprecated:e.deprecated}}formatDetails(e){let n=this.formatInputs(e),i=this.formatOutputs(e),r=this.formatMethods(e),o=this.formatExamples(e),a=e.type==="injectable"?"service":e.type,s="selector"in e?e.selector:void 0,c="standalone"in e?e.standalone:void 0,u="imports"in e?e.imports:void 0;return{name:e.name,type:a,selector:s,description:this.getPreferredDescription(e),inputs:n,outputs:i,methods:r,examples:o,deprecated:e.deprecated,deprecationMessage:e.deprecationMessage,standalone:c,imports:u}}formatInputs(e){let n=[];return"inputs"in e&&e.inputs&&n.push(...e.inputs.map(i=>this.formatProperty(i))),"inputsClass"in e&&e.inputsClass&&n.push(...e.inputsClass.map(i=>this.formatProperty(i))),n}formatOutputs(e){let n=[];return"outputs"in e&&e.outputs&&n.push(...e.outputs.map(i=>this.formatProperty(i))),"outputsClass"in e&&e.outputsClass&&n.push(...e.outputsClass.map(i=>this.formatProperty(i))),n}formatProperty(e){return{name:e.name,type:e.type||"any",required:!e.optional,description:this.getPreferredDescription(e),defaultValue:e.defaultValue}}formatMethods(e){return!("methods"in e)||!e.methods?[]:e.methods.map(n=>this.formatMethod(n))}formatMethod(e){let n=(e.args||[]).map(o=>({name:o.name,type:o.type||"any",optional:o.optional||!1,defaultValue:o.defaultValue})),i=n.map(o=>{let a=o.optional?"?":"",s=o.defaultValue?` = ${o.defaultValue}`:"";return`${o.name}${a}: ${o.type}${s}`}).join(", "),r=`${e.name}(${i}): ${e.returnType||"void"}`;return{name:e.name,signature:r,description:this.getPreferredDescription(e),parameters:n,returnType:e.returnType||"void"}}formatExamples(e){return!("examples"in e)||!e.examples?[]:e.examples}formatSearchResults(e){return e.map(n=>{let i=n.doc.type==="injectable"?"service":n.doc.type,r="selector"in n.doc?n.doc.selector:void 0;return{name:n.doc.name,type:i,selector:r,description:this.getPreferredDescription(n.doc),deprecated:n.doc.deprecated,relevanceScore:n.relevanceScore}})}toJSON(e){return JSON.stringify(e,null,2)}formatDeprecatedList(e,n){if(e.length===0)return"No deprecated items found.";let i=e.reduce((o,a)=>(o[a.type]||(o[a.type]=[]),o[a.type].push(a),o),{}),r=`Found ${e.length} deprecated item(s):
155
158
 
156
- `;for(let[s,i]of Object.entries(n)){o+=`## ${s.charAt(0).toUpperCase()+s.slice(1)}s
159
+ `;for(let[o,a]of Object.entries(i)){r+=`## ${o.charAt(0).toUpperCase()+o.slice(1)}s
157
160
 
158
- `;for(let a of i)o+=`### ${a.name}
159
- `,o+=`- **Message**: ${a.deprecationMessage}
160
- `,a.versionDeprecated&&(o+=`- **Deprecated in**: v${a.versionDeprecated}
161
- `),r&&a.replacementSuggestion&&(o+=`- **Replacement**: ${a.replacementSuggestion}
162
- `),o+=`
163
- `}return o}formatDeprecationInfo(e){if(!e.isDeprecated)return`${e.name} (${e.type}) is not deprecated.`;let r=`# ${e.name} (${e.type})
161
+ `;for(let s of a)r+=`### ${s.name}
162
+ `,r+=`- **Message**: ${s.deprecationMessage}
163
+ `,s.versionDeprecated&&(r+=`- **Deprecated in**: v${s.versionDeprecated}
164
+ `),n&&s.replacementSuggestion&&(r+=`- **Replacement**: ${s.replacementSuggestion}
165
+ `),r+=`
166
+ `}return r}formatDeprecationInfo(e){if(!e.isDeprecated)return`${e.name} (${e.type}) is not deprecated.`;let n=`# ${e.name} (${e.type})
164
167
 
165
- `;return r+=`**Status**: DEPRECATED
168
+ `;return n+=`**Status**: DEPRECATED
166
169
 
167
- `,e.deprecationMessage&&(r+=`**Message**: ${e.deprecationMessage}
170
+ `,e.deprecationMessage&&(n+=`**Message**: ${e.deprecationMessage}
168
171
 
169
- `),e.versionDeprecated&&(r+=`**Deprecated in**: v${e.versionDeprecated}
172
+ `),e.versionDeprecated&&(n+=`**Deprecated in**: v${e.versionDeprecated}
170
173
 
171
- `),e.replacementSuggestion&&(r+=`**Recommended replacement**: ${e.replacementSuggestion}
174
+ `),e.replacementSuggestion&&(n+=`**Recommended replacement**: ${e.replacementSuggestion}
172
175
 
173
- `),r}};var Fn=class{query;formatter;constructor(e,r){this.query=e,this.formatter=r}execute(e={}){let{includeDeprecated:r=!1,type:n="all",limit:o=50,offset:s=0}=e;if(o<1||o>1e3)throw new Error("Limit must be between 1 and 1000");if(s<0)throw new Error("Offset must be non-negative");let i=this.query.getByType(n),a=r?i:i.filter(p=>!p.deprecated),c=a.length,u=a.slice(s,s+o),l=s+o<c;return{items:this.formatter.formatList(u,!0),total:c,hasMore:l,offset:s,limit:o}}static getToolDefinition(){return{name:"list-components",description:"Lists all available components, directives, pipes, and services from the EUI component library. Supports filtering by type and deprecated status, with pagination for large result sets.",inputSchema:{type:"object",properties:{includeDeprecated:{type:"boolean",description:"Whether to include deprecated components in the results (default: false)",default:!1},type:{type:"string",enum:["component","directive","pipe","service","all"],description:"Filter by type (default: all)",default:"all"},limit:{type:"number",description:"Maximum number of results to return (default: 50, max: 1000)",default:50,minimum:1,maximum:1e3},offset:{type:"number",description:"Number of results to skip for pagination (default: 0)",default:0,minimum:0}}}}}};var Un=class{query;formatter;constructor(e,r){this.query=e,this.formatter=r}execute(e){let{name:r}=e;if(!r||typeof r!="string"||r.trim().length===0)throw new Error("Component name is required and must be a non-empty string");let n=this.query.getByName(r.trim());if(!n)throw new Error(`Component "${r}" not found in documentation`);return{component:this.formatter.formatDetails(n)}}static getToolDefinition(){return{name:"get-component-docs",description:"Retrieves detailed documentation for a specific component, directive, pipe, or service by name. Returns complete metadata including inputs, outputs, methods, examples, selector information, standalone flag, and module import requirements.",inputSchema:{type:"object",properties:{name:{type:"string",description:"The name of the component, directive, pipe, or service to retrieve"}},required:["name"]}}}};var Vn=class{searchEngine;formatter;constructor(e,r){this.searchEngine=e,this.formatter=r}execute(e){let{query:r,types:n,includeDeprecated:o=!1,limit:s=50}=e;if(r==null||typeof r!="string")throw new Error("Query is required and must be a string");let i=r.trim();if(i.length===0)throw new Error("Query cannot be empty");if(s<1||s>1e3)throw new Error("Limit must be between 1 and 1000");if(n&&n.length>0){let l=["component","directive","pipe","service"];for(let d of n)if(!l.includes(d))throw new Error(`Invalid type "${d}". Must be one of: ${l.join(", ")}`)}let a={query:i,types:n,includeDeprecated:o,limit:s,offset:0},c=this.searchEngine.search(a);return{items:this.formatter.formatSearchResults(c.items),total:c.total,hasMore:c.hasMore,query:i}}static getToolDefinition(){return{name:"search-components",description:"Searches for components, directives, pipes, and services by keyword or functionality. Returns results ranked by relevance, matching against component names, selectors, descriptions, inputs, outputs, and methods. Supports filtering by type and deprecated status.",inputSchema:{type:"object",properties:{query:{type:"string",description:"Search query to match against component metadata"},types:{type:"array",items:{type:"string",enum:["component","directive","pipe","service"]},description:"Filter results by type (optional). If not specified, searches all types."},includeDeprecated:{type:"boolean",description:"Whether to include deprecated components in results (default: false)",default:!1},limit:{type:"number",description:"Maximum number of results to return (default: 50, max: 1000)",default:50,minimum:1,maximum:1e3}},required:["query"]}}}};var Bn=class{query;formatter;constructor(e,r){this.query=e,this.formatter=r}execute(e){let{name:r}=e;if(!r||typeof r!="string"||r.trim().length===0)throw new Error("Component name is required and must be a non-empty string");let n=this.query.getByName(r.trim());if(!n)throw new Error(`Component "${r}" not found in documentation`);let o=this.formatter.formatInputs(n);return{componentName:n.name,inputs:o}}static getToolDefinition(){return{name:"get-component-inputs",description:"Retrieves all input properties for a specific component, directive, pipe, or service by name. Returns detailed information about each input including name, type, description, default value, and required flag.",inputSchema:{type:"object",properties:{name:{type:"string",description:"The name of the component, directive, pipe, or service"}},required:["name"]}}}};var Hn=class{query;formatter;constructor(e,r){this.query=e,this.formatter=r}execute(e){let{name:r}=e;if(!r||typeof r!="string"||r.trim().length===0)throw new Error("Component name is required and must be a non-empty string");let n=this.query.getByName(r.trim());if(!n)throw new Error(`Component "${r}" not found in documentation`);let o=this.formatter.formatOutputs(n);return{componentName:n.name,outputs:o}}static getToolDefinition(){return{name:"get-component-outputs",description:"Retrieves all output events for a specific component, directive, pipe, or service by name. Returns detailed information about each output including name, type, and description.",inputSchema:{type:"object",properties:{name:{type:"string",description:"The name of the component, directive, pipe, or service"}},required:["name"]}}}};var Wn=class{query;formatter;constructor(e,r){this.query=e,this.formatter=r}execute(e){let{name:r}=e;if(!r||typeof r!="string"||r.trim().length===0)throw new Error("Component name is required and must be a non-empty string");let n=this.query.getByName(r.trim());if(!n)throw new Error(`Component "${r}" not found in documentation`);let o=this.formatter.formatExamples(n);return{componentName:n.name,examples:o}}static getToolDefinition(){return{name:"get-component-examples",description:"Retrieves all usage examples for a specific component, directive, pipe, or service by name. Returns code examples with HTML templates and TypeScript code, preserving formatting. Returns an empty array if no examples are available.",inputSchema:{type:"object",properties:{name:{type:"string",description:"The name of the component, directive, pipe, or service"}},required:["name"]}}}};var Gn=class{async execute(e={}){try{let r=await fetch("https://registry.npmjs.org/@eui/components");if(!r.ok)throw r.status===404?new Error('Package "@eui/components" not found in npm registry'):new Error(`npm registry returned status ${r.status}`);let n=await r.json();if(!n["dist-tags"]||!n["dist-tags"].latest)throw new Error("Invalid response: missing dist-tags.latest");if(!n.time)throw new Error("Invalid response: missing time field");let o=n["dist-tags"].latest,s=n.time[o];if(!s)throw new Error(`Invalid response: no publish date for version ${o}`);return{packageName:"@eui/components",version:o,publishDate:s}}catch(r){throw r instanceof Error?r:new Error(`Unexpected error querying npm registry: ${String(r)}`)}}static getToolDefinition(){return{name:"get-library-version",description:"Queries the npm registry to retrieve the latest version information for the @eui/components package, including the version number and publish date.",inputSchema:{type:"object",properties:{}}}}};var Aa=class{isDeprecated(e){return!!(e.deprecated===!0||e.decorators&&e.decorators.some(r=>r.name==="deprecated")||e.jsdoctags&&e.jsdoctags.some(r=>r.tagName?.text==="deprecated"))}extractDeprecationMessage(e){let r=e.jsdoctags?.find(n=>n.tagName?.text==="deprecated");return r?.comment?r.comment:e.deprecationMessage?e.deprecationMessage:"This item is deprecated."}extractVersion(e){let r=[/since\s+v?(\d+\.\d+\.\d+)/i,/deprecated\s+in\s+v?(\d+\.\d+\.\d+)/i,/v(\d+\.\d+\.\d+)/i];for(let n of r){let o=e.match(n);if(o)return o[1]}}extractReplacement(e){let r=[/use\s+([A-Za-z0-9_-]+)\s+instead/i,/replaced\s+by\s+([A-Za-z0-9_-]+)/i,/migrate\s+to\s+([A-Za-z0-9_-]+)/i,/see\s+([A-Za-z0-9_-]+)/i];for(let n of r){let o=e.match(n);if(o)return o[1]}}parseDeprecationInfo(e){let r=this.extractDeprecationMessage(e);return{deprecationMessage:r,versionDeprecated:this.extractVersion(r),replacementSuggestion:this.extractReplacement(r),filePath:e.file}}};var Jn=class{constructor(e){this.index=e;this.parser=new Aa}index;parser;listDeprecated(e={}){let r=[],n=[{items:this.index.components,type:"component"},{items:this.index.directives,type:"directive"},{items:this.index.pipes,type:"pipe"},{items:this.index.services,type:"injectable"}];for(let{items:o,type:s}of n)if(!(e.type&&e.type!==s)){for(let i of o)if(this.parser.isDeprecated(i)){let a=this.parser.parseDeprecationInfo(i),c=e.includeReplacements?a.replacementSuggestion:void 0;r.push({name:i.name,type:s,deprecationMessage:a.deprecationMessage,versionDeprecated:a.versionDeprecated,replacementSuggestion:c,filePath:a.filePath})}}return r}getDeprecationInfo(e){let r=this.index.byName.get(e);if(!r)return null;if(!this.parser.isDeprecated(r))return{name:e,type:r.type,isDeprecated:!1};let o=this.parser.parseDeprecationInfo(r);return{name:e,type:r.type,isDeprecated:!0,deprecationMessage:o.deprecationMessage,versionDeprecated:o.versionDeprecated,replacementSuggestion:o.replacementSuggestion}}};var Kn=class{query;formatter;constructor(e,r){this.query=new Jn(e),this.formatter=r}execute(e={}){let{type:r,includeReplacements:n=!1}=e,o=this.query.listDeprecated({type:r,includeReplacements:n});return{content:[{type:"text",text:this.formatter.formatDeprecatedList(o,n)}]}}static getToolDefinition(){return{name:"list-deprecated",description:"Lists all deprecated items in the library (components, directives, pipes, services). Supports filtering by type and optionally includes replacement suggestions.",inputSchema:{type:"object",properties:{type:{type:"string",description:"Filter by type (component, directive, pipe, injectable)"},includeReplacements:{type:"boolean",description:"Include replacement suggestions in results (default: false)",default:!1}}}}}};var Yn=class{query;formatter;constructor(e,r){this.query=new Jn(e),this.formatter=r}execute(e){let{componentName:r}=e;if(!r||typeof r!="string"||r.trim().length===0)throw new Error("Component name is required and must be a non-empty string");let n=this.query.getDeprecationInfo(r.trim());if(!n)throw new Error(`Component "${r}" not found in documentation`);return{content:[{type:"text",text:this.formatter.formatDeprecationInfo(n)}]}}static getToolDefinition(){return{name:"get-deprecation-info",description:"Retrieves detailed deprecation information for a specific component, directive, pipe, or service. Returns deprecation status, message, version deprecated, and replacement suggestions.",inputSchema:{type:"object",properties:{componentName:{type:"string",description:"The name of the component or library element to check"}},required:["componentName"]}}}};var Qn=class{execute(e={}){return Promise.resolve({content:y1,format:"markdown"})}static getToolDefinition(){return{name:"get-eui-cli-guide",description:"Returns a comprehensive markdown guide for getting started with EUI CLI, including installation, project creation, and basic usage instructions.",inputSchema:{type:"object",properties:{}}}}},y1=`# Getting Started with EUI CLI
176
+ `),n}};var Wi=class{query;formatter;constructor(e,n){this.query=e,this.formatter=n}execute(e={}){let{includeDeprecated:n=!1,type:i="all",limit:r=50,offset:o=0}=e;if(r<1||r>1e3)throw new Error("Limit must be between 1 and 1000");if(o<0)throw new Error("Offset must be non-negative");let a=this.query.getByType(i),s=n?a:a.filter(p=>!p.deprecated),c=s.length,u=s.slice(o,o+r),l=o+r<c;return{items:this.formatter.formatList(u,!0),total:c,hasMore:l,offset:o,limit:r}}static getToolDefinition(){return{name:"list-components",description:"Lists all available components, directives, pipes, and services from the EUI component library. Supports filtering by type and deprecated status, with pagination for large result sets.",inputSchema:{type:"object",properties:{includeDeprecated:{type:"boolean",description:"Whether to include deprecated components in the results (default: false)",default:!1},type:{type:"string",enum:["component","directive","pipe","service","all"],description:"Filter by type (default: all)",default:"all"},limit:{type:"number",description:"Maximum number of results to return (default: 50, max: 1000)",default:50,minimum:1,maximum:1e3},offset:{type:"number",description:"Number of results to skip for pagination (default: 0)",default:0,minimum:0}}}}}};var Xi=class{query;formatter;constructor(e,n){this.query=e,this.formatter=n}execute(e){let{name:n}=e;if(!n||typeof n!="string"||n.trim().length===0)throw new Error("Component name is required and must be a non-empty string");let i=this.query.getByName(n.trim());if(!i)throw new Error(`Component "${n}" not found in documentation`);return{component:this.formatter.formatDetails(i)}}static getToolDefinition(){return{name:"get-component-docs",description:"Retrieves detailed documentation for a specific component, directive, pipe, or service by name. Returns complete metadata including inputs, outputs, methods, examples, selector information, standalone flag, and module import requirements.",inputSchema:{type:"object",properties:{name:{type:"string",description:"The name of the component, directive, pipe, or service to retrieve"}},required:["name"]}}}};var Yi=class{searchEngine;formatter;constructor(e,n){this.searchEngine=e,this.formatter=n}execute(e){let{query:n,types:i,includeDeprecated:r=!1,limit:o=50}=e;if(n==null||typeof n!="string")throw new Error("Query is required and must be a string");let a=n.trim();if(a.length===0)throw new Error("Query cannot be empty");if(o<1||o>1e3)throw new Error("Limit must be between 1 and 1000");if(i&&i.length>0){let l=["component","directive","pipe","service"];for(let d of i)if(!l.includes(d))throw new Error(`Invalid type "${d}". Must be one of: ${l.join(", ")}`)}let s={query:a,types:i,includeDeprecated:r,limit:o,offset:0},c=this.searchEngine.search(s);return{items:this.formatter.formatSearchResults(c.items),total:c.total,hasMore:c.hasMore,query:a}}static getToolDefinition(){return{name:"search-components",description:"Searches for components, directives, pipes, and services by keyword or functionality. Returns results ranked by relevance, matching against component names, selectors, descriptions, inputs, outputs, and methods. Supports filtering by type and deprecated status.",inputSchema:{type:"object",properties:{query:{type:"string",description:"Search query to match against component metadata"},types:{type:"array",items:{type:"string",enum:["component","directive","pipe","service"]},description:"Filter results by type (optional). If not specified, searches all types."},includeDeprecated:{type:"boolean",description:"Whether to include deprecated components in results (default: false)",default:!1},limit:{type:"number",description:"Maximum number of results to return (default: 50, max: 1000)",default:50,minimum:1,maximum:1e3}},required:["query"]}}}};var Qi=class{query;formatter;constructor(e,n){this.query=e,this.formatter=n}execute(e){let{name:n}=e;if(!n||typeof n!="string"||n.trim().length===0)throw new Error("Component name is required and must be a non-empty string");let i=this.query.getByName(n.trim());if(!i)throw new Error(`Component "${n}" not found in documentation`);let r=this.formatter.formatInputs(i);return{componentName:i.name,inputs:r}}static getToolDefinition(){return{name:"get-component-inputs",description:"Retrieves all input properties for a specific component, directive, pipe, or service by name. Returns detailed information about each input including name, type, description, default value, and required flag.",inputSchema:{type:"object",properties:{name:{type:"string",description:"The name of the component, directive, pipe, or service"}},required:["name"]}}}};var eo=class{query;formatter;constructor(e,n){this.query=e,this.formatter=n}execute(e){let{name:n}=e;if(!n||typeof n!="string"||n.trim().length===0)throw new Error("Component name is required and must be a non-empty string");let i=this.query.getByName(n.trim());if(!i)throw new Error(`Component "${n}" not found in documentation`);let r=this.formatter.formatOutputs(i);return{componentName:i.name,outputs:r}}static getToolDefinition(){return{name:"get-component-outputs",description:"Retrieves all output events for a specific component, directive, pipe, or service by name. Returns detailed information about each output including name, type, and description.",inputSchema:{type:"object",properties:{name:{type:"string",description:"The name of the component, directive, pipe, or service"}},required:["name"]}}}};function o9(t){let e=t.replace(/Component$/,"").replace(/Directive$/,"").replace(/Pipe$/,"").replace(/Service$/,"");return e=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase(),e}var to=class{data;constructor(e){this.data=e}updateData(e){this.data=e}execute(e){let{name:n}=e;if(!n||typeof n!="string"||n.trim().length===0)throw new Error("Component name is required and must be a non-empty string");if(!this.data||this.data.length===0)return{componentName:n.trim(),examples:[]};let i=o9(n.trim()),r=n.trim().toLowerCase(),o=this.data.find(a=>a.component===i)??this.data.find(a=>a.component===`eui-${i}`)??this.data.find(a=>a.component===`ecl-${i}`)??this.data.find(a=>a.component===`eds-${i}`)??this.data.find(a=>a.component===r);return{componentName:o?.component??n.trim(),examples:o?.examples??[]}}static getToolDefinition(){return{name:"get-component-examples",description:"Retrieves all usage examples for a specific component, directive, pipe, or service by name. Returns code examples with HTML templates and TypeScript code, preserving formatting. Returns an empty array if no examples are available.",inputSchema:{type:"object",properties:{name:{type:"string",description:"The name of the component, directive, pipe, or service"}},required:["name"]}}}};var ro=class{async execute(e={}){try{let n=await fetch("https://registry.npmjs.org/@eui/components");if(!n.ok)throw n.status===404?new Error('Package "@eui/components" not found in npm registry'):new Error(`npm registry returned status ${n.status}`);let i=await n.json();if(!i["dist-tags"]||!i["dist-tags"].latest)throw new Error("Invalid response: missing dist-tags.latest");if(!i.time)throw new Error("Invalid response: missing time field");let r=i["dist-tags"].latest,o=i.time[r];if(!o)throw new Error(`Invalid response: no publish date for version ${r}`);return{packageName:"@eui/components",version:r,publishDate:o}}catch(n){throw n instanceof Error?n:new Error(`Unexpected error querying npm registry: ${String(n)}`)}}static getToolDefinition(){return{name:"get-library-version",description:"Queries the npm registry to retrieve the latest version information for the @eui/components package, including the version number and publish date.",inputSchema:{type:"object",properties:{}}}}};var _d=class{isDeprecated(e){return!!(e.deprecated===!0||e.decorators&&e.decorators.some(n=>n.name==="deprecated")||e.jsdoctags&&e.jsdoctags.some(n=>n.tagName?.text==="deprecated"))}extractDeprecationMessage(e){let n=e.jsdoctags?.find(i=>i.tagName?.text==="deprecated");return n?.comment?n.comment:e.deprecationMessage?e.deprecationMessage:"This item is deprecated."}extractVersion(e){let n=[/since\s+v?(\d+\.\d+\.\d+)/i,/deprecated\s+in\s+v?(\d+\.\d+\.\d+)/i,/v(\d+\.\d+\.\d+)/i];for(let i of n){let r=e.match(i);if(r)return r[1]}}extractReplacement(e){let n=[/use\s+([A-Za-z0-9_-]+)\s+instead/i,/replaced\s+by\s+([A-Za-z0-9_-]+)/i,/migrate\s+to\s+([A-Za-z0-9_-]+)/i,/see\s+([A-Za-z0-9_-]+)/i];for(let i of n){let r=e.match(i);if(r)return r[1]}}parseDeprecationInfo(e){let n=this.extractDeprecationMessage(e);return{deprecationMessage:n,versionDeprecated:this.extractVersion(n),replacementSuggestion:this.extractReplacement(n),filePath:e.file}}};var no=class{constructor(e){this.index=e;this.parser=new _d}index;parser;listDeprecated(e={}){let n=[],i=[{items:this.index.components,type:"component"},{items:this.index.directives,type:"directive"},{items:this.index.pipes,type:"pipe"},{items:this.index.services,type:"injectable"}];for(let{items:r,type:o}of i)if(!(e.type&&e.type!==o)){for(let a of r)if(this.parser.isDeprecated(a)){let s=this.parser.parseDeprecationInfo(a),c=e.includeReplacements?s.replacementSuggestion:void 0;n.push({name:a.name,type:o,deprecationMessage:s.deprecationMessage,versionDeprecated:s.versionDeprecated,replacementSuggestion:c,filePath:s.filePath})}}return n}getDeprecationInfo(e){let n=this.index.byName.get(e);if(!n)return null;if(!this.parser.isDeprecated(n))return{name:e,type:n.type,isDeprecated:!1};let r=this.parser.parseDeprecationInfo(n);return{name:e,type:n.type,isDeprecated:!0,deprecationMessage:r.deprecationMessage,versionDeprecated:r.versionDeprecated,replacementSuggestion:r.replacementSuggestion}}};var io=class{query;formatter;constructor(e,n){this.query=new no(e),this.formatter=n}execute(e={}){let{type:n,includeReplacements:i=!1}=e,r=this.query.listDeprecated({type:n,includeReplacements:i});return{content:[{type:"text",text:this.formatter.formatDeprecatedList(r,i)}]}}static getToolDefinition(){return{name:"list-deprecated",description:"Lists all deprecated items in the library (components, directives, pipes, services). Supports filtering by type and optionally includes replacement suggestions.",inputSchema:{type:"object",properties:{type:{type:"string",description:"Filter by type (component, directive, pipe, injectable)"},includeReplacements:{type:"boolean",description:"Include replacement suggestions in results (default: false)",default:!1}}}}}};var oo=class{query;formatter;constructor(e,n){this.query=new no(e),this.formatter=n}execute(e){let{componentName:n}=e;if(!n||typeof n!="string"||n.trim().length===0)throw new Error("Component name is required and must be a non-empty string");let i=this.query.getDeprecationInfo(n.trim());if(!i)throw new Error(`Component "${n}" not found in documentation`);return{content:[{type:"text",text:this.formatter.formatDeprecationInfo(i)}]}}static getToolDefinition(){return{name:"get-deprecation-info",description:"Retrieves detailed deprecation information for a specific component, directive, pipe, or service. Returns deprecation status, message, version deprecated, and replacement suggestions.",inputSchema:{type:"object",properties:{componentName:{type:"string",description:"The name of the component or library element to check"}},required:["componentName"]}}}};var ao=class{execute(e={}){return Promise.resolve({content:a9,format:"markdown"})}static getToolDefinition(){return{name:"get-eui-cli-guide",description:"Returns a comprehensive markdown guide for getting started with EUI CLI, including installation, project creation, and basic usage instructions.",inputSchema:{type:"object",properties:{}}}}},a9=`# Getting Started with EUI CLI
174
177
 
175
178
  The EUI CLI is a command-line tool for scaffolding and managing EUI applications.
176
179
 
@@ -295,7 +298,7 @@ my-app/
295
298
  \`\`\`
296
299
 
297
300
  The application will be available at \`http://localhost:4200\`
298
- `;var Xn=class{execute(e={}){return Promise.resolve({content:_1,format:"markdown"})}static getToolDefinition(){return{name:"get-eui-cli-instructions",description:"Returns complete EUI CLI instructions including all commands, options, headless mode configuration, CI/CD usage, and best practices for automated scaffolding and building.",inputSchema:{type:"object",properties:{}}}}},_1=`# eUI CLI - Complete Options Report
301
+ `;var so=class{execute(e={}){return Promise.resolve({content:s9,format:"markdown"})}static getToolDefinition(){return{name:"get-eui-cli-instructions",description:"Returns complete EUI CLI instructions including all commands, options, headless mode configuration, CI/CD usage, and best practices for automated scaffolding and building.",inputSchema:{type:"object",properties:{}}}}},s9=`# eUI CLI - Complete Options Report
299
302
 
300
303
  ## Overview
301
304
 
@@ -635,9 +638,9 @@ eui-cli serve-app --maxSpaceSize
635
638
 
636
639
  - **Node.js**: >=24.0.0
637
640
  - **Yarn**: >=1.22.4 <2
638
- `;function v1(t){let e=t.replace(/Component$/,"").replace(/Directive$/,"").replace(/Pipe$/,"").replace(/Service$/,"");return e=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase(),e}var eo=class{data;constructor(e){this.data=e}updateData(e){this.data=e}execute(e){let{name:r}=e;if(!r||typeof r!="string"||r.trim().length===0)throw new Error("Component name is required and must be a non-empty string");if(!this.data||this.data.length===0)throw new Error("Accessibility data is not available. Ensure --a11y-path is configured pointing to a valid accessibility.json URL or file path.");let n=v1(r.trim()),o=this.data.find(s=>s.component===n);if(o||(o=this.data.find(s=>s.component===`eui-${n}`)),!o){let s=r.trim().toLowerCase();o=this.data.find(i=>i.component===s)}if(!o){let s=this.data.map(a=>a.component).sort().slice(0,20),i=this.data.length-20;throw new Error(`Accessibility documentation not found for "${r}". Available components: ${s.join(", ")}`+(i>0?` and ${i} more.`:"."))}return{componentName:o.component,accessibility:o.content}}static getToolDefinition(){return{name:"get-component-accessibility",description:"Retrieves accessibility (a11y) documentation for a specific EUI component. Returns plain-text accessibility guidelines, ARIA requirements, and keyboard interaction details.",inputSchema:{type:"object",properties:{name:{type:"string",description:'The name of the component (e.g. "ButtonComponent", "DatePickerComponent", or just "button")'}},required:["name"]}}}};var xs=class{server;index;query;searchEngine;formatter;accessibilityData;tools;isRunning=!1;constructor(e,r,n){this.index=r,this.accessibilityData=n??null,this.query=new bs(r),this.searchEngine=new ws(r),this.formatter=new Na,this.tools=new Map,this.server=new Ia({name:e.name,version:e.version},{capabilities:{tools:{}}}),this.registerTools(),this.setupHandlers()}registerTools(){let e=new Fn(this.query,this.formatter),r=new Un(this.query,this.formatter),n=new Vn(this.searchEngine,this.formatter),o=new Bn(this.query,this.formatter),s=new Hn(this.query,this.formatter),i=new Wn(this.query,this.formatter),a=new Gn,c=new Kn(this.index,this.formatter),u=new Yn(this.index,this.formatter),l=new Qn,d=new Xn,p=new eo(this.accessibilityData);this.tools.set("list-components",e),this.tools.set("get-component-docs",r),this.tools.set("search-components",n),this.tools.set("get-component-inputs",o),this.tools.set("get-component-outputs",s),this.tools.set("get-component-examples",i),this.tools.set("get-library-version",a),this.tools.set("list-deprecated",c),this.tools.set("get-deprecation-info",u),this.tools.set("get-eui-cli-guide",l),this.tools.set("get-eui-cli-instructions",d),this.tools.set("get-component-accessibility",p)}setupHandlers(){this.server.setRequestHandler(il,()=>({tools:[Fn.getToolDefinition(),Un.getToolDefinition(),Vn.getToolDefinition(),Bn.getToolDefinition(),Hn.getToolDefinition(),Wn.getToolDefinition(),Gn.getToolDefinition(),Kn.getToolDefinition(),Yn.getToolDefinition(),Qn.getToolDefinition(),Xn.getToolDefinition(),eo.getToolDefinition()]})),this.server.setRequestHandler(Fo,async e=>{let{name:r,arguments:n}=e.params;try{let o=this.tools.get(r);if(!o)return{content:[{type:"text",text:JSON.stringify({error:{code:"TOOL_NOT_FOUND",message:`Tool '${r}' does not exist. Available tools: ${Array.from(this.tools.keys()).join(", ")}`}})}],isError:!0};if(n==null)return{content:[{type:"text",text:JSON.stringify({error:{code:"INVALID_PARAMETERS",message:"Tool parameters are required"}})}],isError:!0};let s=await o.execute(n??{});return{content:[{type:"text",text:JSON.stringify(s,null,2)}]}}catch(o){let s=o instanceof Error?o.message:"Unknown error occurred",i=this.categorizeError(o);return{content:[{type:"text",text:JSON.stringify({error:{code:i,message:s}})}],isError:!0}}})}categorizeError(e){if(e instanceof Error){let r=e.message.toLowerCase();if(r.includes("not found")||r.includes("does not exist"))return"NOT_FOUND";if(r.includes("invalid")||r.includes("must be")||r.includes("required")||r.includes("limit")||r.includes("offset"))return"INVALID_PARAMETERS"}return"INTERNAL_ERROR"}async start(){if(this.isRunning)throw new Error("Server is already running");let e=new Da;await this.server.connect(e),this.isRunning=!0}async stop(){this.isRunning&&(await this.server.close(),this.isRunning=!1)}isHealthy(){return this.isRunning}getStats(){return{isRunning:this.isRunning,toolCount:this.tools.size,indexStats:{totalComponents:this.index.totalCount,lastUpdated:this.index.lastUpdated}}}updateIndex(e){this.index=e,this.query=new bs(e),this.searchEngine=new ws(e),this.registerTools()}updateAccessibilityData(e){this.accessibilityData=e;let r=this.tools.get("get-component-accessibility");r&&r.updateData(e)}};var px=gt(require("fs")),yr=null,Ma=null,fx=!1;async function b1(t,e){let r=er.detect(t);if(r.type==="local"){let s=px.readFileSync(r.normalizedPath,"utf-8");return JSON.parse(s)}let o=await new mn({timeout:e,maxRetries:2,retryDelay:1e3,userAgent:"EUI-MCP-Server/1.0"}).fetch(r.normalizedPath);if(o.status!==200)throw new Error(`HTTP ${o.status}: ${o.statusText}`);return JSON.parse(o.data)}async function w1(){try{let t=Wa();(!t.success||!t.config)&&(process.stderr.write(`Failed to load configuration
639
- `),t.errors&&t.errors.forEach(c=>process.stderr.write(` - ${c}
640
- `)),process.exit(1));let e=t.config,r=Qc({level:e.logging.level,format:e.logging.format});r.info("Starting EUI Compodoc MCP Server",{version:e.server.version,documentationPath:e.documentation.path}),r.info("Loading documentation...",{path:e.documentation.path}),Ma=new yo({path:e.documentation.path,watchForChanges:e.documentation.watchForChanges,reloadDebounce:e.documentation.reloadDebounce,onReload:x1,onError:S1});let n=await Ma.load();(!n.success||!n.data)&&(r.error("Failed to load documentation",void 0,{error:n.error}),process.exit(1)),r.info("Documentation loaded successfully",{path:e.documentation.path}),r.info("Building component index...");let o=new _o,s;try{s=o.build(n.data);let c=o.getStatistics(s);r.info("Index built successfully",{totalCount:c.totalCount,components:c.componentCount,directives:c.directiveCount,pipes:c.pipeCount,services:c.serviceCount})}catch(c){r.error("Failed to build index",c instanceof Error?c:new Error(String(c))),process.exit(1)}r.info("Initializing MCP server...");let i=null;if(e.accessibility?.path){r.info("Loading accessibility data...",{path:e.accessibility.path});try{i=await b1(e.accessibility.path,e.documentation.timeout),r.info("Accessibility data loaded successfully",{entries:i.length})}catch(c){r.warn("Failed to load accessibility data - tool will be unavailable",{error:c instanceof Error?c.message:String(c)})}}else r.info("No accessibility path configured - get-component-accessibility tool will report not configured");yr=new xs({name:e.server.name,version:e.server.version},s,i),r.info("Starting MCP server..."),await yr.start(),r.info("MCP server started successfully",{name:e.server.name,version:e.server.version,watchForChanges:e.documentation.watchForChanges}),yr.isHealthy()?r.info("Health check passed"):r.warn("Health check failed - server may not be fully operational");let a=yr.getStats();r.debug("Server statistics",a),r.info("Server is ready to accept requests")}catch(t){ne().error("Fatal error during startup",t instanceof Error?t:new Error(String(t))),process.exit(1)}}function x1(t){let e=ne();e.info("Documentation file changed, reloading...");try{let r=new _o,n=r.build(t);if(yr){yr.updateIndex(n);let o=r.getStatistics(n);e.info("Index updated successfully",{totalCount:o.totalCount,components:o.componentCount,directives:o.directiveCount,pipes:o.pipeCount,services:o.serviceCount})}}catch(r){e.error("Failed to reload documentation",r instanceof Error?r:new Error(String(r)))}}function S1(t){ne().error("Documentation loader error",t)}async function ja(t){if(fx)return;fx=!0;let e=ne();e.info(`Received ${t}, shutting down gracefully...`);try{yr&&(e.info("Stopping MCP server..."),await yr.stop(),e.info("MCP server stopped")),Ma&&(e.info("Stopping documentation loader..."),await Ma.dispose(),e.info("Documentation loader stopped")),e.info("Shutdown complete"),process.exit(0)}catch(r){e.error("Error during shutdown",r instanceof Error?r:new Error(String(r))),process.exit(1)}}function $1(){process.on("SIGINT",()=>{ja("SIGINT")}),process.on("SIGTERM",()=>{ja("SIGTERM")}),process.on("uncaughtException",t=>{ne().error("Uncaught exception",t),ja("uncaughtException")}),process.on("unhandledRejection",t=>{ne().error("Unhandled promise rejection",t instanceof Error?t:new Error(String(t))),ja("unhandledRejection")})}$1();w1().catch(t=>{process.stderr.write(`Fatal error: ${t}
641
+ `;function c9(t){let e=t.replace(/Component$/,"").replace(/Directive$/,"").replace(/Pipe$/,"").replace(/Service$/,"");return e=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase(),e}var co=class{data;constructor(e){this.data=e}updateData(e){this.data=e}execute(e){let{name:n}=e;if(!n||typeof n!="string"||n.trim().length===0)throw new Error("Component name is required and must be a non-empty string");if(!this.data||this.data.length===0)throw new Error("Accessibility data is not available. Ensure --a11y-path is configured pointing to a valid accessibility.json URL or file path.");let i=c9(n.trim()),r=this.data.find(o=>o.component===i);if(r||(r=this.data.find(o=>o.component===`eui-${i}`)),!r){let o=n.trim().toLowerCase();r=this.data.find(a=>a.component===o)}if(!r){let o=this.data.map(s=>s.component).sort().slice(0,20),a=this.data.length-20;throw new Error(`Accessibility documentation not found for "${n}". Available components: ${o.join(", ")}`+(a>0?` and ${a} more.`:"."))}return{componentName:r.component,accessibility:r.content}}static getToolDefinition(){return{name:"get-component-accessibility",description:"Retrieves accessibility (a11y) documentation for a specific EUI component. Returns plain-text accessibility guidelines, ARIA requirements, and keyboard interaction details.",inputSchema:{type:"object",properties:{name:{type:"string",description:'The name of the component (e.g. "ButtonComponent", "DatePickerComponent", or just "button")'}},required:["name"]}}}};var $s=class{server;index;query;searchEngine;formatter;accessibilityData;examplesData;tools;isRunning=!1;constructor(e,n,i,r){this.index=n,this.accessibilityData=i??null,this.examplesData=r??null,this.query=new bs(n),this.searchEngine=new _s(n),this.formatter=new bd,this.tools=new Map,this.server=new gd({name:e.name,version:e.version},{capabilities:{tools:{}}}),this.registerTools(),this.setupHandlers()}registerTools(){let e=new Wi(this.query,this.formatter),n=new Xi(this.query,this.formatter),i=new Yi(this.searchEngine,this.formatter),r=new Qi(this.query,this.formatter),o=new eo(this.query,this.formatter),a=new to(this.examplesData),s=new ro,c=new io(this.index,this.formatter),u=new oo(this.index,this.formatter),l=new ao,d=new so,p=new co(this.accessibilityData);this.tools.set("list-components",e),this.tools.set("get-component-docs",n),this.tools.set("search-components",i),this.tools.set("get-component-inputs",r),this.tools.set("get-component-outputs",o),this.tools.set("get-component-examples",a),this.tools.set("get-library-version",s),this.tools.set("list-deprecated",c),this.tools.set("get-deprecation-info",u),this.tools.set("get-eui-cli-guide",l),this.tools.set("get-eui-cli-instructions",d),this.tools.set("get-component-accessibility",p)}setupHandlers(){this.server.setRequestHandler($v,()=>({tools:[Wi.getToolDefinition(),Xi.getToolDefinition(),Yi.getToolDefinition(),Qi.getToolDefinition(),eo.getToolDefinition(),to.getToolDefinition(),ro.getToolDefinition(),io.getToolDefinition(),oo.getToolDefinition(),ao.getToolDefinition(),so.getToolDefinition(),co.getToolDefinition()]})),this.server.setRequestHandler(Ua,async e=>{let{name:n,arguments:i}=e.params;try{let r=this.tools.get(n);if(!r)return{content:[{type:"text",text:JSON.stringify({error:{code:"TOOL_NOT_FOUND",message:`Tool '${n}' does not exist. Available tools: ${Array.from(this.tools.keys()).join(", ")}`}})}],isError:!0};if(i==null)return{content:[{type:"text",text:JSON.stringify({error:{code:"INVALID_PARAMETERS",message:"Tool parameters are required"}})}],isError:!0};let o=await r.execute(i??{});return{content:[{type:"text",text:JSON.stringify(o,null,2)}]}}catch(r){let o=r instanceof Error?r.message:"Unknown error occurred",a=this.categorizeError(r);return{content:[{type:"text",text:JSON.stringify({error:{code:a,message:o}})}],isError:!0}}})}categorizeError(e){if(e instanceof Error){let n=e.message.toLowerCase();if(n.includes("not found")||n.includes("does not exist"))return"NOT_FOUND";if(n.includes("invalid")||n.includes("must be")||n.includes("required")||n.includes("limit")||n.includes("offset"))return"INVALID_PARAMETERS"}return"INTERNAL_ERROR"}async start(){if(this.isRunning)throw new Error("Server is already running");let e=new vd;await this.server.connect(e),this.isRunning=!0}async stop(){this.isRunning&&(await this.server.close(),this.isRunning=!1)}isHealthy(){return this.isRunning}getStats(){return{isRunning:this.isRunning,toolCount:this.tools.size,indexStats:{totalComponents:this.index.totalCount,lastUpdated:this.index.lastUpdated}}}updateIndex(e){this.index=e,this.query=new bs(e),this.searchEngine=new _s(e),this.registerTools()}updateAccessibilityData(e){this.accessibilityData=e;let n=this.tools.get("get-component-accessibility");n&&n.updateData(e)}updateExamplesData(e){this.examplesData=e;let n=this.tools.get("get-component-examples");n&&n.updateData(e)}};var P_=rt(require("fs")),Hr=null,wd=null,mD=!1;async function u9(t,e){let n=ur.detect(t);if(n.type==="local"){let o=P_.readFileSync(n.normalizedPath,"utf-8");return JSON.parse(o)}let r=await new xn({timeout:e,maxRetries:2,retryDelay:1e3,userAgent:"EUI-MCP-Server/1.0"}).fetch(n.normalizedPath);if(r.status!==200)throw new Error(`HTTP ${r.status}: ${r.statusText}`);return JSON.parse(r.data)}async function l9(t,e){let n=ur.detect(t);if(n.type==="local"){let o=P_.readFileSync(n.normalizedPath,"utf-8");return JSON.parse(o)}let r=await new xn({timeout:e,maxRetries:2,retryDelay:1e3,userAgent:"EUI-MCP-Server/1.0"}).fetch(n.normalizedPath);if(r.status!==200)throw new Error(`HTTP ${r.status}: ${r.statusText}`);return JSON.parse(r.data)}async function d9(){try{let t=Xg();(!t.success||!t.config)&&(process.stderr.write(`Failed to load configuration
642
+ `),t.errors&&t.errors.forEach(u=>process.stderr.write(` - ${u}
643
+ `)),process.exit(1));let e=t.config,n=ov({level:e.logging.level,format:e.logging.format});n.info("Starting EUI Compodoc MCP Server",{version:e.server.version,documentationPath:e.documentation.path}),n.info("Loading documentation...",{path:e.documentation.path}),wd=new za({path:e.documentation.path,watchForChanges:e.documentation.watchForChanges,reloadDebounce:e.documentation.reloadDebounce,onReload:f9,onError:p9});let i=await wd.load();(!i.success||!i.data)&&(n.error("Failed to load documentation",void 0,{error:i.error}),process.exit(1)),n.info("Documentation loaded successfully",{path:e.documentation.path}),n.info("Building component index...");let r=new Ea,o;try{o=r.build(i.data);let u=r.getStatistics(o);n.info("Index built successfully",{totalCount:u.totalCount,components:u.componentCount,directives:u.directiveCount,pipes:u.pipeCount,services:u.serviceCount})}catch(u){n.error("Failed to build index",u instanceof Error?u:new Error(String(u))),process.exit(1)}n.info("Initializing MCP server...");let a=null;if(e.accessibility?.path){n.info("Loading accessibility data...",{path:e.accessibility.path});try{a=await u9(e.accessibility.path,e.documentation.timeout),n.info("Accessibility data loaded successfully",{entries:a.length})}catch(u){n.warn("Failed to load accessibility data - tool will be unavailable",{error:u instanceof Error?u.message:String(u)})}}else n.info("No accessibility path configured - get-component-accessibility tool will report not configured");let s=null;if(e.examples?.path){n.info("Loading examples data...",{path:e.examples.path});try{s=await l9(e.examples.path,e.documentation.timeout),n.info("Examples data loaded successfully",{entries:s.length})}catch(u){n.warn("Failed to load examples data - get-component-examples will return empty results",{error:u instanceof Error?u.message:String(u)})}}else n.info("No examples path configured - get-component-examples will return empty results");Hr=new $s({name:e.server.name,version:e.server.version},o,a,s),n.info("Starting MCP server..."),await Hr.start(),n.info("MCP server started successfully",{name:e.server.name,version:e.server.version,watchForChanges:e.documentation.watchForChanges}),Hr.isHealthy()?n.info("Health check passed"):n.warn("Health check failed - server may not be fully operational");let c=Hr.getStats();n.debug("Server statistics",c),n.info("Server is ready to accept requests")}catch(t){fe().error("Fatal error during startup",t instanceof Error?t:new Error(String(t))),process.exit(1)}}function f9(t){let e=fe();e.info("Documentation file changed, reloading...");try{let n=new Ea,i=n.build(t);if(Hr){Hr.updateIndex(i);let r=n.getStatistics(i);e.info("Index updated successfully",{totalCount:r.totalCount,components:r.componentCount,directives:r.directiveCount,pipes:r.pipeCount,services:r.serviceCount})}}catch(n){e.error("Failed to reload documentation",n instanceof Error?n:new Error(String(n)))}}function p9(t){fe().error("Documentation loader error",t)}async function $d(t){if(mD)return;mD=!0;let e=fe();e.info(`Received ${t}, shutting down gracefully...`);try{Hr&&(e.info("Stopping MCP server..."),await Hr.stop(),e.info("MCP server stopped")),wd&&(e.info("Stopping documentation loader..."),await wd.dispose(),e.info("Documentation loader stopped")),e.info("Shutdown complete"),process.exit(0)}catch(n){e.error("Error during shutdown",n instanceof Error?n:new Error(String(n))),process.exit(1)}}function m9(){process.on("SIGINT",()=>{$d("SIGINT")}),process.on("SIGTERM",()=>{$d("SIGTERM")}),process.on("uncaughtException",t=>{fe().error("Uncaught exception",t),$d("uncaughtException")}),process.on("unhandledRejection",t=>{fe().error("Unhandled promise rejection",t instanceof Error?t:new Error(String(t))),$d("unhandledRejection")})}m9();d9().catch(t=>{process.stderr.write(`Fatal error: ${t}
641
644
  `),process.exit(1)});
642
645
  /*! Bundled license information:
643
646