@eui/mcp 22.0.0-alpha.58 → 22.0.0-alpha.59
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/documentation.json.gz +0 -0
- package/main.js +111 -106
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -1,39 +1,100 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var
|
|
3
|
-
causes have become circular...`;let
|
|
4
|
-
caused by: `+Qp(n,e)):r},rE=t=>Qp(t,new Set),em=(t,e,r)=>{if(!wo(t))return"";let n=r?"":t.message||"";if(e.has(t))return n+": ...";let o=Kc(t);if(o){e.add(t);let s=typeof t.cause=="function";return n+(s?"":": ")+em(o,e,s)}else return n},nE=t=>em(t,new Set);tm.exports={isErrorLike:wo,getErrorCause:Kc,stackWithCauses:rE,messageWithCauses:nE}});var Xc=$((uZ,nm)=>{"use strict";var oE=Symbol("circular-ref-tag"),ci=Symbol("pino-raw-err-ref"),rm=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[ci]},set:function(t){this[ci]=t}}});Object.defineProperty(rm,ci,{writable:!0,value:{}});nm.exports={pinoErrProto:rm,pinoErrorSymbols:{seen:oE,rawSymbol:ci}}});var im=$((lZ,sm)=>{"use strict";sm.exports=eu;var{messageWithCauses:sE,stackWithCauses:iE,isErrorLike:om}=Yc(),{pinoErrProto:aE,pinoErrorSymbols:cE}=Xc(),{seen:Qc}=cE,{toString:uE}=Object.prototype;function eu(t){if(!om(t))return t;t[Qc]=void 0;let e=Object.create(aE);e.type=uE.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=sE(t),e.stack=iE(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(r=>eu(r)));for(let r in t)if(e[r]===void 0){let n=t[r];om(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,Qc)&&(e[r]=eu(n)):e[r]=n}return delete t[Qc],e.raw=t,e}});var cm=$((dZ,am)=>{"use strict";am.exports=li;var{isErrorLike:tu}=Yc(),{pinoErrProto:lE,pinoErrorSymbols:dE}=Xc(),{seen:ui}=dE,{toString:fE}=Object.prototype;function li(t){if(!tu(t))return t;t[ui]=void 0;let e=Object.create(lE);e.type=fE.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=>li(r))),tu(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,ui)&&(e.cause=li(t.cause));for(let r in t)if(e[r]===void 0){let n=t[r];tu(n)?Object.prototype.hasOwnProperty.call(n,ui)||(e[r]=li(n)):e[r]=n}return delete t[ui],e.raw=t,e}});var fm=$((fZ,dm)=>{"use strict";dm.exports={mapHttpRequest:pE,reqSerializer:lm};var ru=Symbol("pino-raw-req-ref"),um=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[ru]},set:function(t){this[ru]=t}}});Object.defineProperty(um,ru,{writable:!0,value:{}});function lm(t){let e=t.info||t.socket,r=Object.create(um);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 pE(t){return{req:lm(t)}}});var gm=$((pZ,hm)=>{"use strict";hm.exports={mapHttpResponse:mE,resSerializer:mm};var nu=Symbol("pino-raw-res-ref"),pm=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[nu]},set:function(t){this[nu]=t}}});Object.defineProperty(pm,nu,{writable:!0,value:{}});function mm(t){let e=Object.create(pm);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function mE(t){return{res:mm(t)}}});var su=$((mZ,ym)=>{"use strict";var ou=im(),hE=cm(),di=fm(),fi=gm();ym.exports={err:ou,errWithCause:hE,mapHttpRequest:di.mapHttpRequest,mapHttpResponse:fi.mapHttpResponse,req:di.reqSerializer,res:fi.resSerializer,wrapErrorSerializer:function(e){return e===ou?e:function(n){return e(ou(n))}},wrapRequestSerializer:function(e){return e===di.reqSerializer?e:function(n){return e(di.reqSerializer(n))}},wrapResponseSerializer:function(e){return e===fi.resSerializer?e:function(n){return e(fi.resSerializer(n))}}}});var iu=$((hZ,_m)=>{"use strict";function gE(t,e){return e}_m.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=gE;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 $m=$((gZ,Sm)=>{"use strict";function au(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]=au(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]=au(t[r]));return e}return t}function vm(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 bm(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 wm(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 pi=Symbol("PATH_NOT_FOUND");function yE(t,e){let r=t;for(let n of e){if(r==null||typeof r!="object"||r===null||!(n in r))return pi;r=r[n]}return r}function _E(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 vE(t,e,r,n=!1){for(let o of e){let s=vm(o);if(s.includes("*"))xm(t,s,r,o,n);else if(n)wm(t,s);else{let i=yE(t,s);if(i===pi)continue;let a=typeof r=="function"?r(i,s):r;bm(t,s,a)}}}function xm(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 bE(t,e,r,s,n,o)}function bE(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("*"))xm(l,a,typeof r=="function"?(m,f)=>{let h=[...c.slice(0,d),...f];return r(m,h)}:r,o,s);else if(s)wm(l,a);else{let p=typeof r=="function"?r(_E(l,a),[...c.slice(0,d),...a]):r;bm(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 wE(t){if(t.length===0)return null;let e=new Map;for(let r of t){let n=vm(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 xE(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 SE(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 $E(t){if(!Array.isArray(t))throw new TypeError("paths must be an array");for(let e of t)SE(e)}function EE(t={}){let{paths:e=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:o=!0,remove:s=!1}=t;$E(e);let i=wE(e);return function(c){if(o&&(c===null||typeof c!="object")&&(c==null||typeof c!="object"))return n?n(c):c;let u=xE(c,i),l=c,d=r;return typeof r=="function"&&(d=r),vE(u,e,d,s),n===!1?(u.restore=function(){return au(l)},u):typeof n=="function"?n(u):JSON.stringify(u)}}Sm.exports=EE});var wn=$((yZ,Em)=>{"use strict";var kE=Symbol("pino.setLevel"),PE=Symbol("pino.getLevel"),zE=Symbol("pino.levelVal"),TE=Symbol("pino.levelComp"),CE=Symbol("pino.useLevelLabels"),OE=Symbol("pino.useOnlyCustomLevels"),IE=Symbol("pino.mixin"),RE=Symbol("pino.lsCache"),DE=Symbol("pino.chindings"),AE=Symbol("pino.asJson"),NE=Symbol("pino.write"),jE=Symbol("pino.redactFmt"),ME=Symbol("pino.time"),LE=Symbol("pino.timeSliceIndex"),ZE=Symbol("pino.stream"),FE=Symbol("pino.stringify"),qE=Symbol("pino.stringifySafe"),UE=Symbol("pino.stringifiers"),VE=Symbol("pino.end"),BE=Symbol("pino.formatOpts"),HE=Symbol("pino.messageKey"),WE=Symbol("pino.errorKey"),GE=Symbol("pino.nestedKey"),JE=Symbol("pino.nestedKeyStr"),KE=Symbol("pino.mixinMergeStrategy"),YE=Symbol("pino.msgPrefix"),XE=Symbol("pino.wildcardFirst"),QE=Symbol.for("pino.serializers"),ek=Symbol.for("pino.formatters"),tk=Symbol.for("pino.hooks"),rk=Symbol.for("pino.metadata");Em.exports={setLevelSym:kE,getLevelSym:PE,levelValSym:zE,levelCompSym:TE,useLevelLabelsSym:CE,mixinSym:IE,lsCacheSym:RE,chindingsSym:DE,asJsonSym:AE,writeSym:NE,serializersSym:QE,redactFmtSym:jE,timeSym:ME,timeSliceIndexSym:LE,streamSym:ZE,stringifySym:FE,stringifySafeSym:qE,stringifiersSym:UE,endSym:VE,formatOptsSym:BE,messageKeySym:HE,errorKeySym:WE,nestedKeySym:GE,wildcardFirstSym:XE,needsMetadataGsym:rk,useOnlyCustomLevelsSym:OE,formattersSym:ek,hooksSym:tk,nestedKeyStrSym:JE,mixinMergeStrategySym:KE,msgPrefixSym:YE}});var uu=$((_Z,Tm)=>{"use strict";var km=$m(),{redactFmtSym:nk,wildcardFirstSym:mi}=wn(),cu=/[^.[\]]+|\[([^[\]]*?)\]/g,Pm="[Redacted]",zm=!1;function ok(t,e){let{paths:r,censor:n,remove:o}=sk(t),s=r.reduce((c,u)=>{cu.lastIndex=0;let l=cu.exec(u),d=cu.exec(u),p=l[1]!==void 0?l[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):l[0];if(p==="*"&&(p=mi),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!==mi&&c[p].length===0&&c[p].push(...c[mi]||[]),p===mi&&Object.keys(c).forEach(function(h){c[h]&&c[h].push(f)}),c[p].push(f),c},{}),i={[nk]:km({paths:r,censor:n,serialize:e,strict:zm,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]=km({paths:s[u],censor:l,serialize:e,strict:zm,remove:o})}return c},i)}function sk(t){if(Array.isArray(t))return t={paths:t,censor:Pm},t;let{paths:e,censor:r=Pm,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}}Tm.exports=ok});var Im=$((vZ,Om)=>{"use strict";var ik=()=>"",ak=()=>`,"time":${Date.now()}`,ck=()=>`,"time":${Math.round(Date.now()/1e3)}`,uk=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,lk=1000000n,Cm=1000000000n,dk=BigInt(Date.now())*lk,fk=process.hrtime.bigint(),pk=()=>{let t=process.hrtime.bigint()-fk,e=dk+t,r=e/Cm,n=e%Cm,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"`};Om.exports={nullTime:ik,epochTime:ak,unixTime:ck,isoTime:uk,isoTimeNano:pk}});var Dm=$((bZ,Rm)=>{"use strict";function mk(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}Rm.exports=hk;function hk(t,e,r){var n=r&&r.stringify||mk,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 du=$((wZ,lu)=>{"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));lu.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(););};lu.exports=t}});var qm=$((xZ,Fm)=>{"use strict";var le=require("fs"),gk=require("events"),yk=require("util").inherits,Am=require("path"),pu=du(),_k=require("assert"),hi=100,gi=Buffer.allocUnsafe(0),vk=16*1024,Nm="buffer",jm="utf8",[bk,wk]=(process.versions.node||"0.0").split(".").map(Number),xk=bk>=22&&wk>=7;function Mm(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&&le.mkdirSync(Am.dirname(t),{recursive:!0});let s=le.openSync(t,n,o);r(null,s)}catch(s){throw r(s),s}else e.mkdir?le.mkdir(Am.dirname(t),{recursive:!0},s=>{if(s)return r(s);le.open(t,n,o,r)}):le.open(t,n,o,r)}function St(t){if(!(this instanceof St))return new St(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||vk,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===Nm)this._writingBuf=gi,this.write=Ek,this.flush=Pk,this.flushSync=Tk,this._actualWrite=Ok,f=()=>le.writeSync(this.fd,this._writingBuf),h=()=>le.write(this.fd,this._writingBuf,this.release);else if(p===void 0||p===jm)this._writingBuf="",this.write=$k,this.flush=kk,this.flushSync=zk,this._actualWrite=Ck,f=()=>Buffer.isBuffer(this._writingBuf)?le.writeSync(this.fd,this._writingBuf):le.writeSync(this.fd,this._writingBuf,"utf8"),h=()=>Buffer.isBuffer(this._writingBuf)?le.write(this.fd,this._writingBuf,this.release):le.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${jm}" and "${Nm}", but passed ${p}`);if(typeof e=="number")this.fd=e,process.nextTick(()=>this.emit("ready"));else if(typeof e=="string")Mm(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{pu(hi),this.release(void 0,0)}catch(S){this.release(S)}else setTimeout(h,hi);else this._writing=!1,this.emit("error",g);return}this.emit("write",y);let v=fu(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 S=f(),E=fu(this._writingBuf,this._len,S);this._len=E.len,this._writingBuf=E.writingBuf}while(this._writingBuf.length)}catch(S){this.release(S);return}}this._fsync&&le.fsyncSync(this.fd);let x=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):x>this.minLength?this._actualWrite():this._ending?x>0?this._actualWrite():(this._writing=!1,yi(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Sk,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 fu(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 Sk(t){t.listenerCount("drain")>0&&(t._asyncDrainScheduled=!1,t.emit("drain"))}yk(St,gk);function Lm(t,e){return t.length===0?gi:t.length===1?t[0]:Buffer.concat(t,e)}function $k(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 Ek(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 Zm(t){this._flushPending=!0;let e=()=>{if(this._fsync)this._flushPending=!1,t();else try{le.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 kk(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&&Zm.call(this,t),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function Pk(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&&Zm.call(this,t),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}St.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&&le.close(e,r=>{if(r)return this.emit("error",r)})}),Mm(this.file,this)};St.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():yi(this)))};function zk(){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)?le.writeSync(this.fd,t):le.writeSync(this.fd,t,"utf8"),r=fu(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;pu(hi)}}try{le.fsyncSync(this.fd)}catch{}}function Tk(){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=gi);let t=gi;for(;this._bufs.length||t.length;){t.length<=0&&(t=Lm(this._bufs[0],this._lens[0]));try{let e=le.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;pu(hi)}}}St.prototype.destroy=function(){this.destroyed||yi(this)};function Ck(){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)?le.writeSync(this.fd,this._writingBuf):le.writeSync(this.fd,this._writingBuf,"utf8");t(null,e)}catch(e){t(e)}else le.write(this.fd,this._writingBuf,t)}function Ok(){let t=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Lm(this._bufs.shift(),this._lens.shift()),this.sync)try{let e=le.writeSync(this.fd,this._writingBuf);t(null,e)}catch(e){t(e)}else xk&&(this._writingBuf=Buffer.from(this._writingBuf)),le.write(this.fd,this._writingBuf,t)}function yi(t){if(t.fd===-1){t.once("ready",yi.bind(null,t));return}t._periodicFlushTimer!==void 0&&clearInterval(t._periodicFlushTimer),t.destroyed=!0,t._bufs=[],t._lens=[],_k(typeof t.fd=="number",`sonic.fd must be a number, got ${typeof t.fd}`);try{le.fsync(t.fd,e)}catch{}function e(){t.fd!==1&&t.fd!==2?le.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")}}St.SonicBoom=St;St.default=St;Fm.exports=St});var mu=$((SZ,Wm)=>{"use strict";var $t={exit:[],beforeExit:[]},Um={exit:Dk,beforeExit:Ak},xn;function Ik(){xn===void 0&&(xn=new FinalizationRegistry(Nk))}function Rk(t){$t[t].length>0||process.on(t,Um[t])}function Vm(t){$t[t].length>0||(process.removeListener(t,Um[t]),$t.exit.length===0&&$t.beforeExit.length===0&&(xn=void 0))}function Dk(){Bm("exit")}function Ak(){Bm("beforeExit")}function Bm(t){for(let e of $t[t]){let r=e.deref(),n=e.fn;r!==void 0&&n(r,t)}$t[t]=[]}function Nk(t){for(let e of["exit","beforeExit"]){let r=$t[e].indexOf(t);$t[e].splice(r,r+1),Vm(e)}}function Hm(t,e,r){if(e===void 0)throw new Error("the object can't be undefined");Rk(t);let n=new WeakRef(e);n.fn=r,Ik(),xn.register(e,n),$t[t].push(n)}function jk(t,e){Hm("exit",t,e)}function Mk(t,e){Hm("beforeExit",t,e)}function Lk(t){if(xn!==void 0){xn.unregister(t);for(let e of["exit","beforeExit"])$t[e]=$t[e].filter(r=>{let n=r.deref();return n&&n!==t}),Vm(e)}}Wm.exports={register:jk,registerBeforeExit:Mk,unregister:Lk}});var Gm=$(($Z,Zk)=>{Zk.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 Km=$((EZ,Jm)=>{"use strict";function Fk(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 qk(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()}Jm.exports={wait:Fk,waitDiff:qk}});var Xm=$((kZ,Ym)=>{"use strict";Ym.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var lh=$((PZ,uh)=>{"use strict";var{version:Uk}=Gm(),{EventEmitter:Vk}=require("events"),{Worker:Bk}=require("worker_threads"),{join:Hk}=require("path"),{pathToFileURL:Wk}=require("url"),{wait:Gk}=Km(),{WRITE_INDEX:Ht,READ_INDEX:qr,SEQ_INDEX:hu}=Xm(),Jk=require("buffer"),Kk=require("assert"),w=Symbol("kImpl"),Yk=Jk.constants.MAX_STRING_LENGTH;function Qm(){}function vu(t,e){Atomics.add(t[w].state,hu,1),e(),Atomics.add(t[w].state,hu,1),Atomics.notify(t[w].state,hu)}function eh(t){vu(t,()=>{Atomics.store(t[w].state,qr,0),Atomics.store(t[w].state,Ht,0)})}var xo=class{constructor(e){this._value=e}deref(){return this._value}},_i=class{register(){}unregister(){}},Xk=process.env.NODE_V8_COVERAGE?_i:global.FinalizationRegistry||_i,Qk=process.env.NODE_V8_COVERAGE?xo:global.WeakRef||xo,th=new Xk(t=>{t.exited||t.terminate()});function eP(t,e){let{filename:r,workerData:n}=e,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Hk(__dirname,"lib","worker.js"),i=new Bk(s,{...e.workerOpts,name:e.workerOpts?.name||"thread-stream",trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:Wk(r).href,dataBuf:t[w].dataBuf,stateBuf:t[w].stateBuf,workerData:{$context:{threadStreamVersion:Uk},...n}}});return i.stream=new xo(t),i.on("message",tP),i.on("exit",oh),th.register(t,i),i}function rh(t){Kk(!t[w].sync),t[w].needDrain&&(t[w].needDrain=!1,t.emit("drain"))}function nh(t){for(;;){let e=Atomics.load(t[w].state,Ht),r=t[w].data.length-e;if(r>0){if(t[w].bufLen===0){t[w].flushing=!1,t[w].ending?bu(t):t[w].needDrain&&process.nextTick(rh,t);return}ah(t,r,Qm);continue}if(r===0){if(e===0&&t[w].bufLen===0)return;vi(t,()=>{t.destroyed||(eh(t),nh(t))});return}ut(t,new Error("overwritten"));return}}function tP(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 Qk(e),vi(e,()=>{e[w].ready=!0,e.emit("ready")});break;case"ERROR":ut(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"){ut(e,new Error("this should not happen: "+t.code));break}let r=e[w].flushCallbacks.get(t.id);r&&(e[w].flushCallbacks.delete(t.id),process.nextTick(r));break}case"WARNING":process.emitWarning(t.err);break;default:ut(e,new Error("this should not happen: "+t.code))}}function oh(t){let e=this.stream.deref();e!==void 0&&(th.unregister(e),e.worker.exited=!0,e.worker.off("exit",oh),ut(e,t!==0?new Error("the worker thread exited"):null))}var yu=class extends Vk{constructor(e={}){if(super(),e.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[w]={},this[w].stateBuf=new SharedArrayBuffer(128),this[w].state=new Int32Array(this[w].stateBuf),this[w].dataBuf=new SharedArrayBuffer(e.bufferSize||4*1024*1024),this[w].data=Buffer.from(this[w].dataBuf),this[w].sync=e.sync||!1,this[w].ending=!1,this[w].ended=!1,this[w].needDrain=!1,this[w].destroyed=!1,this[w].flushing=!1,this[w].ready=!1,this[w].finished=!1,this[w].errored=null,this[w].closed=!1,this[w].buf=[],this[w].bufHead=0,this[w].bufLen=0,this[w].flushCallbacks=new Map,this[w].nextFlushId=0,this.worker=eP(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[w].destroyed)return _u(this,new Error("the worker has exited")),!1;if(this[w].ending)return _u(this,new Error("the worker is ending")),!1;if(this[w].flushing&&this[w].bufLen+r.length>=Yk)try{gu(this),this[w].flushing=!0}catch(n){return ut(this,n),!1}if(this[w].buf.push(r),this[w].bufLen+=r.length,this[w].sync)try{return gu(this),!0}catch(n){return ut(this,n),!1}return this[w].flushing||(this[w].flushing=!0,setImmediate(nh,this)),this[w].needDrain=this[w].data.length-this[w].bufLen-Atomics.load(this[w].state,Ht)<=0,!this[w].needDrain}end(){this[w].destroyed||(this[w].ending=!0,bu(this))}flush(e){e=typeof e=="function"?e:Qm,sh(this,r=>{if(r){process.nextTick(e,r);return}ih(this,e)})}flushSync(){this[w].destroyed||(gu(this),ch(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[w].ready}get destroyed(){return this[w].destroyed}get closed(){return this[w].closed}get writable(){return!this[w].destroyed&&!this[w].ending}get writableEnded(){return this[w].ending}get writableFinished(){return this[w].finished}get writableNeedDrain(){return this[w].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[w].errored}};function sh(t,e){if(t[w].destroyed){process.nextTick(e,new Error("the worker has exited"));return}if(!t[w].sync&&(t[w].flushing||t[w].bufLen>0)){setImmediate(sh,t,e);return}vi(t,e)}function vi(t,e){let r=Atomics.load(t[w].state,Ht);Gk(t[w].state,qr,r,1/0,(n,o)=>{if(n){ut(t,n),e(n);return}if(o!=="ok"){vi(t,e);return}e()})}function ih(t,e){if(t[w].destroyed){process.nextTick(e,new Error("the worker has exited"));return}if(!t[w].ready){let n=()=>{s(),ih(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[w].nextFlushId;t[w].flushCallbacks.set(r,e);try{t.worker.postMessage({code:"FLUSH",context:"thread-stream",id:r})}catch(n){t[w].flushCallbacks.delete(r),ut(t,n),process.nextTick(e,n)}}function rP(t,e){let r=t[w].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 _u(t,e){setImmediate(()=>{t.emit("error",e)})}function ut(t,e){t[w].destroyed||(t[w].destroyed=!0,rP(t,e),e&&(t[w].errored=e,_u(t,e)),t.worker.exited?setImmediate(()=>{t[w].closed=!0,t.emit("close")}):t.worker.terminate().catch(()=>{}).then(()=>{t[w].closed=!0,t.emit("close")}))}function ah(t,e,r){let o=Atomics.load(t[w].state,Ht),s=e;for(;s>0&&t[w].bufLen!==0;){let i=t[w].bufHead,a=t[w].buf[i];if(a.length<=s){a.copy(t[w].data,o),o+=a.length,s-=a.length,t[w].bufLen-=a.length,t[w].bufHead=i+1,t[w].bufHead===t[w].buf.length?(t[w].buf.length=0,t[w].bufHead=0):t[w].bufHead>=1024&&t[w].bufHead*2>=t[w].buf.length&&(t[w].buf.splice(0,t[w].bufHead),t[w].bufHead=0);continue}a.copy(t[w].data,o,0,s),t[w].buf[i]=a.subarray(s),t[w].bufLen-=s,o+=s,s=0}return vu(t,()=>{Atomics.store(t[w].state,Ht,o)}),r(),!0}function bu(t){if(!(t[w].ended||!t[w].ending||t[w].flushing)){t[w].ended=!0;try{t.flushSync();let e=Atomics.load(t[w].state,qr);vu(t,()=>{Atomics.store(t[w].state,Ht,-1)});let r=0;for(;e!==-1;){if(Atomics.wait(t[w].state,qr,e,1e3),e=Atomics.load(t[w].state,qr),e===-2){ut(t,new Error("end() failed"));return}if(++r===10){ut(t,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{t[w].finished=!0,t.emit("finish")})}catch(e){ut(t,e)}}}function gu(t){let e=()=>{t[w].ending?bu(t):t[w].needDrain&&process.nextTick(rh,t)};for(t[w].flushing=!1;t[w].bufLen!==0;){let r=Atomics.load(t[w].state,Ht),n=t[w].data.length-r;if(n===0){ch(t),eh(t);continue}else if(n<0)throw new Error("overwritten");ah(t,n,e)}}function ch(t){if(t[w].flushing)throw new Error("unable to flush while flushing");let e=Atomics.load(t[w].state,Ht),r=0;for(;;){let n=Atomics.load(t[w].state,qr);if(n===-2)throw Error("_flushSync failed");if(n!==e)Atomics.wait(t[w].state,qr,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}uh.exports=yu});var Su=$((zZ,ph)=>{"use strict";var{createRequire:nP}=require("module"),{existsSync:oP}=require("node:fs"),sP=iu(),{join:wu,isAbsolute:fh,sep:iP}=require("node:path"),{fileURLToPath:aP}=require("node:url"),cP=du(),xu=mu(),uP=lh();function lP(t){xu.register(t,hP),xu.registerBeforeExit(t,gP),t.on("close",function(){xu.unregister(t)})}function dP(){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 fP(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&&dh(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(dh(i)){n=!0;continue}}r.push(s)}return n?r.join(" "):t}function dh(t){let e=pP(t);if(!e)return!1;let r=e;if(r.startsWith("file://"))try{r=aP(r)}catch{return!1}return fh(r)&&!oP(r)}function pP(t){let e=t[0],r=t[t.length-1];return e==='"'&&r==='"'||e==="'"&&r==="'"?t.slice(1,-1):t}function mP(t,e,r,n,o){if(!r.execArgv&&dP()&&require.main===void 0&&(r={...r,execArgv:[]}),!r.env&&process.env.NODE_OPTIONS){let c=fP(process.env.NODE_OPTIONS);c!==process.env.NODE_OPTIONS&&(r={...r,env:{...process.env,NODE_OPTIONS:c}})}r={...r,name:o};let s=new uP({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&&lP(s)}function a(){s.closed||(s.flushSync(),cP(100),s.end())}return s}function hP(t){t.ref(),t.flushSync(),t.end(),t.once("close",function(){t.unref()})}function gP(t){t.flushSync()}function yP(t){let{pipeline:e,targets:r,levels:n,dedupe:o,worker:s={},caller:i=sP(),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"]||wu(__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"]||wu(__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 mP(m(d),c,s,a,p);function m(f){if(f=l[f]||f,fh(f)||f.indexOf("file://")===0)return f;if(f==="pino/file")return wu(__dirname,"..","file.js");let h;for(let g of u)try{let y=g==="node:repl"?process.cwd()+iP:g;h=nP(y).resolve(f);break}catch{continue}if(!h)throw new Error(`unable to determine transport target for "${f}"`);return h}}ph.exports=yP});var xi=$((TZ,kh)=>{"use strict";var _P=require("node:diagnostics_channel"),mh=Dm(),{mapHttpRequest:vP,mapHttpResponse:bP}=su(),Eu=qm(),hh=mu(),{lsCacheSym:wP,chindingsSym:bh,writeSym:gh,serializersSym:wh,formatOptsSym:yh,endSym:xP,stringifiersSym:xh,stringifySym:Sh,stringifySafeSym:ku,wildcardFirstSym:$h,nestedKeySym:SP,formattersSym:Eh,messageKeySym:$P,errorKeySym:EP,nestedKeyStrSym:kP,msgPrefixSym:bi}=wn(),{isMainThread:PP}=require("worker_threads"),zP=Su(),[TP]=process.versions.node.split(".").map(t=>Number(t)),_h=_P.tracingChannel("pino_asJson"),$u=TP>=25?t=>JSON.stringify(t):OP;function Sn(){}function CP(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=vP(n):typeof n.setHeader=="function"&&(n=bP(n)));let i;s===null&&o.length===0?i=[null]:(s=o.shift(),i=o),typeof this[bi]=="string"&&s!==void 0&&s!==null&&(s=this[bi]+s),this[gh](n,mh(s,i,this[yh]),t)}else{let s=n===void 0?o.shift():n;typeof this[bi]=="string"&&s!==void 0&&s!==null&&(s=this[bi]+s),this[gh](null,mh(s,o,this[yh]),t)}}}function OP(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 IP(t,e,r,n){if(_h.hasSubscribers===!1)return vh.call(this,t,e,r,n);let o={instance:this,arguments};return _h.traceSync(vh,o,this,t,e,r,n)}function vh(t,e,r,n){let o=this[Sh],s=this[ku],i=this[xh],a=this[xP],c=this[bh],u=this[wh],l=this[Eh],d=this[$P],p=this[EP],m=this[wP][r]+n;m=m+c;let f;l.log&&(t=l.log(t));let h=i[$h],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 x=i[v]||h;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":x&&(f=x(f));break;case"string":f=(x||$u)(f);break;default:f=(x||o)(f,s)}if(f===void 0)continue;let S=$u(v);g+=","+S+":"+f}let y="";if(e!==void 0){f=u[d]?u[d](e):e;let v=i[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||$u)(f),y=',"'+d+'":'+f;break;default:f=(v||o)(f,s),y=',"'+d+'":'+f}}return this[SP]&&g?m+this[kP]+g.slice(1)+"}"+y+a:m+g+y+a}function RP(t,e){let r,n=t[bh],o=t[Sh],s=t[ku],i=t[xh],a=i[$h],c=t[wh],u=t[Eh].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 DP(t){return t.write!==t.constructor.prototype.write}function wi(t){let e=new Eu(t);return e.on("error",r),!t.sync&&PP&&(hh.register(e,AP),e.on("close",function(){hh.unregister(e)})),e;function r(n){if(n.code==="EPIPE"){e.write=Sn,e.end=Sn,e.flushSync=Sn,e.destroy=Sn;return}e.removeListener("error",r),e.emit("error",n)}}function AP(t,e){t.destroyed||(e==="beforeExit"?(t.flush(),t.on("drain",function(){t.end()})):t.flushSync())}function NP(t){return function(r,n,o={},s){if(typeof o=="string")s=wi({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=wi({dest:s})}else if(o instanceof Eu||o.writable||o._writableState)s=o,o={};else if(o.transport){if(o.transport instanceof Eu||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=zP({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=Sn),s||(DP(process.stdout)?s=process.stdout:s=wi({fd:process.stdout.fd||1})),{opts:o,stream:s}}}function jP(t,e){try{return JSON.stringify(t)}catch{try{return(e||this[ku])(t)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function MP(t,e,r){return{level:t,bindings:e,log:r}}function LP(t){let e=Number(t);return typeof t=="string"&&Number.isFinite(e)?e:t===void 0?1:t}kh.exports={noop:Sn,buildSafeSonicBoom:wi,asChindings:RP,asJson:IP,genLog:CP,createArgsNormalizer:NP,stringify:jP,buildFormatters:MP,normalizeDestFileDescriptor:LP}});var Si=$((CZ,Ph)=>{var ZP={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},FP={ASC:"ASC",DESC:"DESC"};Ph.exports={DEFAULT_LEVELS:ZP,SORTING_ORDER:FP}});var Tu=$((OZ,Oh)=>{"use strict";var{lsCacheSym:qP,levelValSym:Pu,useOnlyCustomLevelsSym:UP,streamSym:VP,formattersSym:BP,hooksSym:HP,levelCompSym:zh}=wn(),{noop:WP,genLog:Ur}=xi(),{DEFAULT_LEVELS:At,SORTING_ORDER:Th}=Si(),Ch={fatal:t=>{let e=Ur(At.fatal,t);return function(...r){let n=this[VP];if(e.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:t=>Ur(At.error,t),warn:t=>Ur(At.warn,t),info:t=>Ur(At.info,t),debug:t=>Ur(At.debug,t),trace:t=>Ur(At.trace,t)},zu=Object.keys(At).reduce((t,e)=>(t[At[e]]=e,t),{}),GP=Object.keys(zu).reduce((t,e)=>(t[e]='{"level":'+Number(e),t),{});function JP(t){let e=t[BP].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[qP]=n,t}function KP(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 YP(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[Pu],o=this[Pu]=r[t],s=this[UP],i=this[zh],a=this[HP].logMethod;for(let c in r){if(i(r[c],o)===!1){this[c]=WP;continue}this[c]=KP(c,s)?Ch[c](a):Ur(r[c],a)}this.emit("level-change",t,o,e[n],n,this)}function XP(t){let{levels:e,levelVal:r}=this;return e&&e.labels?e.labels[r]:""}function QP(t){let{values:e}=this.levels,r=e[t];return r!==void 0&&this[zh](r,this[Pu])}function ez(t,e,r){return t===Th.DESC?e<=r:e>=r}function tz(t){return typeof t=="string"?ez.bind(null,t):t}function rz(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:zu,r),o=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),e?null:At,t);return{labels:n,values:o}}function nz(t,e,r){if(typeof t=="number"){if(![].concat(Object.keys(e||{}).map(s=>e[s]),r?[]:Object.keys(zu).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:At,e);if(!(t in n))throw Error(`default level:${t} must be included in custom levels`)}function oz(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 sz(t){if(typeof t!="function"&&!(typeof t=="string"&&Object.values(Th).includes(t)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Oh.exports={initialLsCache:GP,genLsCache:JP,levelMethods:Ch,getLevel:XP,setLevel:YP,isLevelEnabled:QP,mappings:rz,assertNoLevelCollisions:oz,assertDefaultLevelFound:nz,genLevelComparison:tz,assertLevelComparison:sz}});var Cu=$((IZ,Ih)=>{"use strict";Ih.exports={version:"10.3.1"}});var Zh=$((DZ,Lh)=>{"use strict";var{EventEmitter:iz}=require("node:events"),{lsCacheSym:az,levelValSym:cz,setLevelSym:Iu,getLevelSym:Rh,chindingsSym:Ei,mixinSym:uz,asJsonSym:Ah,writeSym:lz,mixinMergeStrategySym:dz,timeSym:fz,timeSliceIndexSym:pz,streamSym:Nh,serializersSym:Vr,formattersSym:So,errorKeySym:mz,messageKeySym:hz,useOnlyCustomLevelsSym:gz,needsMetadataGsym:yz,redactFmtSym:_z,stringifySym:vz,formatOptsSym:bz,stringifiersSym:wz,msgPrefixSym:Ru,hooksSym:xz}=wn(),{getLevel:Sz,setLevel:$z,isLevelEnabled:Ez,mappings:kz,initialLsCache:Pz,genLsCache:zz,assertNoLevelCollisions:Tz}=Tu(),{asChindings:Du,asJson:Cz,buildFormatters:Ou,stringify:Dh,noop:jh}=xi(),{version:Oz}=Cu(),Iz=uu(),Rz=class{},Mh={constructor:Rz,child:Dz,bindings:Az,setBindings:Nz,flush:Lz,isLevelEnabled:Ez,version:Oz,get level(){return this[Rh]()},set level(t){this[Iu](t)},get levelVal(){return this[cz]},set levelVal(t){throw Error("levelVal is read-only")},get msgPrefix(){return this[Ru]},get[Symbol.toStringTag](){return"Pino"},[az]:Pz,[lz]:Mz,[Ah]:Cz,[Rh]:Sz,[Iu]:$z};Object.setPrototypeOf(Mh,iz.prototype);Lh.exports=function(){return Object.create(Mh)};var $i=t=>t;function Dz(t,e){if(!t)throw Error("missing bindings for child Pino");let r=this[Vr],n=this[So],o=Object.create(this);if(e==null)return o[So].bindings!==$i&&(o[So]=Ou(n.level,$i,n.log)),o[Ei]=Du(o,t),this.onChild!==jh&&this.onChild(o),o;if(e.hasOwnProperty("serializers")===!0){o[Vr]=Object.create(null);for(let u in r)o[Vr][u]=r[u];let a=Object.getOwnPropertySymbols(r);for(var s=0;s<a.length;s++){let u=a[s];o[Vr][u]=r[u]}for(let u in e.serializers)o[Vr][u]=e.serializers[u];let c=Object.getOwnPropertySymbols(e.serializers);for(var i=0;i<c.length;i++){let u=c[i];o[Vr][u]=e.serializers[u]}}else o[Vr]=r;if(e.hasOwnProperty("formatters")){let{level:a,bindings:c,log:u}=e.formatters;o[So]=Ou(a||n.level,c||$i,u||n.log)}else o[So]=Ou(n.level,$i,n.log);if(e.hasOwnProperty("customLevels")===!0&&(Tz(this.levels,e.customLevels),o.levels=kz(e.customLevels,o[gz]),zz(o)),typeof e.redact=="object"&&e.redact!==null||Array.isArray(e.redact)){o.redact=e.redact;let a=Iz(o.redact,Dh),c={stringify:a[_z]};o[vz]=Dh,o[wz]=a,o[bz]=c}if(typeof e.msgPrefix=="string"&&(o[Ru]=(this[Ru]||"")+e.msgPrefix),o[Ei]=Du(o,t),e.level!==void 0&&e.level!==this.level||e.hasOwnProperty("customLevels")){let a=e.level||this.level;o[Iu](a)}return this.onChild(o),o}function Az(){let e=`{${this[Ei].substr(1)}}`,r=JSON.parse(e);return delete r.pid,delete r.hostname,r}function Nz(t){let e=Du(this,t);this[Ei]=e}function jz(t,e){return Object.assign(e,t)}function Mz(t,e,r){let n=this[fz](),o=this[uz],s=this[mz],i=this[hz],a=this[dz]||jz,c,u=this[xz].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[Ah](c,e,r,n),d=this[Nh];d[yz]===!0&&(d.lastLevel=r,d.lastObj=c,d.lastMsg=e,d.lastTime=n.slice(this[pz]),d.lastLogger=this),d.write(u?u(l):l)}function Lz(t){if(t!=null&&typeof t!="function")throw Error("callback must be a function");let e=this[Nh];typeof e.flush=="function"?e.flush(t||jh):t&&t()}});var Vh=$((Mu,Uh)=>{"use strict";var{hasOwnProperty:$o}=Object.prototype,Hr=ju();Hr.configure=ju;Hr.stringify=Hr;Hr.default=Hr;Mu.stringify=Hr;Mu.configure=ju;Uh.exports=Hr;var Zz=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function ar(t){return t.length<5e3&&!Zz.test(t)?`"${t}"`:JSON.stringify(t)}function Au(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 Fz=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Nu(t){return Fz.call(t)!==void 0&&t.length!==0}function Fh(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 qz(t){if($o.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 Uz(t){let e;if($o.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 Vz(t,e){let r;if($o.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 qh(t,e){let r;if($o.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 Br(t){return t===1?"1 item":`${t} items`}function Bz(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function Hz(t){if($o.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 ju(t){t={...t};let e=Hz(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=qz(t),n=Vz(t,"bigint"),o=Uz(t),s=typeof o=="function"?o:void 0,i=qh(t,"maximumDepth"),a=qh(t,"maximumBreadth");function c(m,f,h,g,y,v){let x=f[m];switch(typeof x=="object"&&x!==null&&typeof x.toJSON=="function"&&(x=x.toJSON(m)),x=g.call(f,m,x),typeof x){case"string":return ar(x);case"object":{if(x===null)return"null";if(h.indexOf(x)!==-1)return r;let S="",E=",",C=v;if(Array.isArray(x)){if(x.length===0)return"[]";if(i<h.length+1)return'"[Array]"';h.push(x),y!==""&&(v+=y,S+=`
|
|
5
|
-
${v}`,
|
|
6
|
-
${v}`);let
|
|
7
|
-
${
|
|
8
|
-
${v}`,F=" ");let
|
|
9
|
-
${v}${
|
|
10
|
-
${
|
|
11
|
-
${v}`,
|
|
12
|
-
${v}`);let
|
|
13
|
-
${
|
|
14
|
-
${v}`,
|
|
15
|
-
${v}${
|
|
16
|
-
${
|
|
17
|
-
${y}`,
|
|
18
|
-
${y}
|
|
19
|
-
${v}`,h.pop(),`[${F}]`}let
|
|
20
|
-
${y}`,
|
|
21
|
-
${y}${
|
|
22
|
-
${v}`),h.pop(),`{${
|
|
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
|
-
`),Er=uT.bind(null,{[Yh]:"",[Xh]:i,[eg]:be,[Qh]:Zu,[Fu]:F,[tg]:ie}),Oc="";d!==null&&(p===void 0?Oc=Er(d):Oc=Er(Object.assign({},d,{name:p})));let gp=a instanceof Function?a:a?ag:CT,dS=gp().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(re&&typeof re!="string")throw Error(`Unknown msgPrefix type "${typeof re}" - expected "string"`);nT(m,f,v);let yp=sg(f,v);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:yp,messageKey:c,errorKey:u}}),iT(h);let fS=sT(h);return Object.assign(e,{levels:yp,[$T]:fS,[ET]:v,[gT]:n,[mT]:gp,[hT]:dS,[Qh]:Zu,[Fu]:F,[eg]:be,[_T]:We,[vT]:Ce,[bT]:c,[wT]:u,[xT]:l,[PT]:l?`,${JSON.stringify(l)}:{`:"",[Xh]:i,[ST]:g,[zT]:y,[Yh]:Oc,[tg]:ie,[kT]:S,silent:dT,onChild:A,[TT]:re}),Object.setPrototypeOf(e,tT()),oT(e),e[yT](m),e}lt.exports=qu;lt.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=Kh(t.dest||process.stdout.fd),Jh(t)):Jh({dest:Kh(t),minLength:0});lt.exports.transport=Su();lt.exports.multistream=Gh();lt.exports.levels=sg();lt.exports.stdSerializers=NT;lt.exports.stdTimeFunctions=Object.assign({},ng);lt.exports.symbols=og;lt.exports.version=fT;lt.exports.default=qu;lt.exports.pino=qu});var fs=$(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.regexpCode=te.getEsmExportName=te.getProperty=te.safeStringify=te.stringify=te.strConcat=te.addCodeArg=te.str=te._=te.nil=te._Code=te.Name=te.IDENTIFIER=te._CodeOrName=void 0;var ls=class{};te._CodeOrName=ls;te.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Yr=class extends ls{constructor(e){if(super(),!te.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}}};te.Name=Yr;var mt=class extends ls{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 Yr&&(r[n.str]=(r[n.str]||0)+1),r),{})}};te._Code=mt;te.nil=new mt("");function Qb(t,...e){let r=[t[0]],n=0;for(;n<e.length;)hd(r,e[n]),r.push(t[++n]);return new mt(r)}te._=Qb;var md=new mt("+");function ew(t,...e){let r=[ds(t[0])],n=0;for(;n<e.length;)r.push(md),hd(r,e[n]),r.push(md,ds(t[++n]));return GR(r),new mt(r)}te.str=ew;function hd(t,e){e instanceof mt?t.push(...e._items):e instanceof Yr?t.push(e):t.push(YR(e))}te.addCodeArg=hd;function GR(t){let e=1;for(;e<t.length-1;){if(t[e]===md){let r=JR(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function JR(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Yr||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 Yr))return`"${t}${e.slice(1)}`}function KR(t,e){return e.emptyStr()?t:t.emptyStr()?e:ew`${t}${e}`}te.strConcat=KR;function YR(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:ds(Array.isArray(t)?t.join(","):t)}function XR(t){return new mt(ds(t))}te.stringify=XR;function ds(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}te.safeStringify=ds;function QR(t){return typeof t=="string"&&te.IDENTIFIER.test(t)?new mt(`.${t}`):Qb`[${t}]`}te.getProperty=QR;function eD(t){if(typeof t=="string"&&te.IDENTIFIER.test(t))return new mt(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}te.getEsmExportName=eD;function tD(t){return new mt(t.toString())}te.regexpCode=tD});var _d=$(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.ValueScope=Xe.ValueScopeName=Xe.Scope=Xe.varKinds=Xe.UsedValueState=void 0;var Ye=fs(),gd=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Da;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Da||(Xe.UsedValueState=Da={}));Xe.varKinds={const:new Ye.Name("const"),let:new Ye.Name("let"),var:new Ye.Name("var")};var Aa=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Ye.Name?e:this.name(e)}name(e){return new Ye.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}}};Xe.Scope=Aa;var Na=class extends Ye.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Ye._)`.${new Ye.Name(r)}[${n}]`}};Xe.ValueScopeName=Na;var rD=(0,Ye._)`\n`,yd=class extends Aa{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?rD:Ye.nil}}get(){return this._scope}name(e){return new Na(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,Ye._)`${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=Ye.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,Da.Started);let l=r(u);if(l){let d=this.opts.es5?Xe.varKinds.var:Xe.varKinds.const;s=(0,Ye._)`${s}${d} ${u} = ${l};${this.opts._n}`}else if(l=o?.(u))s=(0,Ye._)`${s}${l}${this.opts._n}`;else throw new gd(u);c.set(u,Da.Completed)})}return s}};Xe.ValueScope=yd});var B=$(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.or=W.and=W.not=W.CodeGen=W.operators=W.varKinds=W.ValueScopeName=W.ValueScope=W.Scope=W.Name=W.regexpCode=W.stringify=W.getProperty=W.nil=W.strConcat=W.str=W._=void 0;var Y=fs(),Tt=_d(),hr=fs();Object.defineProperty(W,"_",{enumerable:!0,get:function(){return hr._}});Object.defineProperty(W,"str",{enumerable:!0,get:function(){return hr.str}});Object.defineProperty(W,"strConcat",{enumerable:!0,get:function(){return hr.strConcat}});Object.defineProperty(W,"nil",{enumerable:!0,get:function(){return hr.nil}});Object.defineProperty(W,"getProperty",{enumerable:!0,get:function(){return hr.getProperty}});Object.defineProperty(W,"stringify",{enumerable:!0,get:function(){return hr.stringify}});Object.defineProperty(W,"regexpCode",{enumerable:!0,get:function(){return hr.regexpCode}});Object.defineProperty(W,"Name",{enumerable:!0,get:function(){return hr.Name}});var Za=_d();Object.defineProperty(W,"Scope",{enumerable:!0,get:function(){return Za.Scope}});Object.defineProperty(W,"ValueScope",{enumerable:!0,get:function(){return Za.ValueScope}});Object.defineProperty(W,"ValueScopeName",{enumerable:!0,get:function(){return Za.ValueScopeName}});Object.defineProperty(W,"varKinds",{enumerable:!0,get:function(){return Za.varKinds}});W.operators={GT:new Y._Code(">"),GTE:new Y._Code(">="),LT:new Y._Code("<"),LTE:new Y._Code("<="),EQ:new Y._Code("==="),NEQ:new Y._Code("!=="),NOT:new Y._Code("!"),OR:new Y._Code("||"),AND:new Y._Code("&&"),ADD:new Y._Code("+")};var Qt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},vd=class extends Qt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Tt.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=Ln(this.rhs,e,r)),this}get names(){return this.rhs instanceof Y._CodeOrName?this.rhs.names:{}}},ja=class extends Qt{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 Y.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Ln(this.rhs,e,r),this}get names(){let e=this.lhs instanceof Y.Name?{}:{...this.lhs.names};return La(e,this.rhs)}},bd=class extends ja{constructor(e,r,n,o){super(e,n,o),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},wd=class extends Qt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},xd=class extends Qt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Sd=class extends Qt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},$d=class extends Qt{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=Ln(this.code,e,r),this}get names(){return this.code instanceof Y._CodeOrName?this.code.names:{}}},ps=class extends Qt{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)||(nD(e,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>en(e,r.names),{})}},er=class extends ps{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Ed=class extends ps{},Mn=class extends er{};Mn.kind="else";var Xr=class t extends er{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Mn(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(tw(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=Ln(this.condition,e,r),this}get names(){let e=super.names;return La(e,this.condition),this.else&&en(e,this.else.names),e}};Xr.kind="if";var Qr=class extends er{};Qr.kind="for";var kd=class extends Qr{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=Ln(this.iteration,e,r),this}get names(){return en(super.names,this.iteration.names)}},Pd=class extends Qr{constructor(e,r,n,o){super(),this.varKind=e,this.name=r,this.from=n,this.to=o}render(e){let r=e.es5?Tt.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=La(super.names,this.from);return La(e,this.to)}},Ma=class extends Qr{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=Ln(this.iterable,e,r),this}get names(){return en(super.names,this.iterable.names)}},ms=class extends er{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)}};ms.kind="func";var hs=class extends ps{render(e){return"return "+super.render(e)}};hs.kind="return";var zd=class extends er{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var 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&&en(e,this.catch.names),this.finally&&en(e,this.finally.names),e}},gs=class extends er{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};gs.kind="catch";var ys=class extends er{render(e){return"finally"+super.render(e)}};ys.kind="finally";var Td=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
25
|
-
`:""},this._extScope=e,this._scope=new Tt.Scope({parent:e}),this._nodes=[new Ed]}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 vd(e,s,n)),s}const(e,r,n){return this._def(Tt.varKinds.const,e,r,n)}let(e,r,n){return this._def(Tt.varKinds.let,e,r,n)}var(e,r,n){return this._def(Tt.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new ja(e,r,n))}add(e,r){return this._leafNode(new bd(e,W.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==Y.nil&&this._leafNode(new $d(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,Y.addCodeArg)(r,o));return r.push("}"),new Y._Code(r)}if(e,r,n){if(this._blockNode(new Xr(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 Xr(e))}else(){return this._elseNode(new Mn)}endIf(){return this._endBlockNode(Xr,Mn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new kd(e),r)}forRange(e,r,n,o,s=this.opts.es5?Tt.varKinds.var:Tt.varKinds.let){let i=this._scope.toName(e);return this._for(new Pd(s,i,r,n),()=>o(i))}forOf(e,r,n,o=Tt.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=r instanceof Y.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Y._)`${i}.length`,a=>{this.var(s,(0,Y._)`${i}[${a}]`),n(s)})}return this._for(new Ma("of",o,s,r),()=>n(s))}forIn(e,r,n,o=this.opts.es5?Tt.varKinds.var:Tt.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Y._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new Ma("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(Qr)}label(e){return this._leafNode(new wd(e))}break(e){return this._leafNode(new xd(e))}return(e){let r=new hs;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(hs)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new zd;if(this._blockNode(o),this.code(e),r){let s=this.name("e");this._currNode=o.catch=new gs(s),r(s)}return n&&(this._currNode=o.finally=new ys,this.code(n)),this._endBlockNode(gs,ys)}throw(e){return this._leafNode(new Sd(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=Y.nil,n,o){return this._blockNode(new ms(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(ms)}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 Xr))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}};W.CodeGen=Td;function en(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function La(t,e){return e instanceof Y._CodeOrName?en(t,e.names):t}function Ln(t,e,r){if(t instanceof Y.Name)return n(t);if(!o(t))return t;return new Y._Code(t._items.reduce((s,i)=>(i instanceof Y.Name&&(i=n(i)),i instanceof Y._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 Y._Code&&s._items.some(i=>i instanceof Y.Name&&e[i.str]===1&&r[i.str]!==void 0)}}function nD(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function tw(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Y._)`!${Cd(t)}`}W.not=tw;var oD=rw(W.operators.AND);function sD(...t){return t.reduce(oD)}W.and=sD;var iD=rw(W.operators.OR);function aD(...t){return t.reduce(iD)}W.or=aD;function rw(t){return(e,r)=>e===Y.nil?r:r===Y.nil?e:(0,Y._)`${Cd(e)} ${t} ${Cd(r)}`}function Cd(t){return t instanceof Y.Name?t:(0,Y._)`(${t})`}});var X=$(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.checkStrictMode=G.getErrorPath=G.Type=G.useFunc=G.setEvaluated=G.evaluatedPropsToName=G.mergeEvaluated=G.eachItem=G.unescapeJsonPointer=G.escapeJsonPointer=G.escapeFragment=G.unescapeFragment=G.schemaRefOrVal=G.schemaHasRulesButRef=G.schemaHasRules=G.checkUnknownRules=G.alwaysValidSchema=G.toHash=void 0;var ce=B(),cD=fs();function uD(t){let e={};for(let r of t)e[r]=!0;return e}G.toHash=uD;function lD(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(sw(t,e),!iw(e,t.self.RULES.all))}G.alwaysValidSchema=lD;function sw(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]||uw(t,`unknown keyword: "${s}"`)}G.checkUnknownRules=sw;function iw(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}G.schemaHasRules=iw;function dD(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}G.schemaHasRulesButRef=dD;function fD({topSchemaRef:t,schemaPath:e},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ce._)`${r}`}return(0,ce._)`${t}${e}${(0,ce.getProperty)(n)}`}G.schemaRefOrVal=fD;function pD(t){return aw(decodeURIComponent(t))}G.unescapeFragment=pD;function mD(t){return encodeURIComponent(Id(t))}G.escapeFragment=mD;function Id(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}G.escapeJsonPointer=Id;function aw(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}G.unescapeJsonPointer=aw;function hD(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}G.eachItem=hD;function nw({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let c=i===void 0?s:i instanceof ce.Name?(s instanceof ce.Name?t(o,s,i):e(o,s,i),i):s instanceof ce.Name?(e(o,i,s),s):r(s,i);return a===ce.Name&&!(c instanceof ce.Name)?n(o,c):c}}G.mergeEvaluated={props:nw({mergeNames:(t,e,r)=>t.if((0,ce._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,ce._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,ce._)`${r} || {}`).code((0,ce._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,ce._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,ce._)`${r} || {}`),Rd(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:cw}),items:nw({mergeNames:(t,e,r)=>t.if((0,ce._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,ce._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,ce._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,ce._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function cw(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,ce._)`{}`);return e!==void 0&&Rd(t,r,e),r}G.evaluatedPropsToName=cw;function Rd(t,e,r){Object.keys(r).forEach(n=>t.assign((0,ce._)`${e}${(0,ce.getProperty)(n)}`,!0))}G.setEvaluated=Rd;var ow={};function gD(t,e){return t.scopeValue("func",{ref:e,code:ow[e.code]||(ow[e.code]=new cD._Code(e.code))})}G.useFunc=gD;var Od;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Od||(G.Type=Od={}));function yD(t,e,r){if(t instanceof ce.Name){let n=e===Od.Num;return r?n?(0,ce._)`"[" + ${t} + "]"`:(0,ce._)`"['" + ${t} + "']"`:n?(0,ce._)`"/" + ${t}`:(0,ce._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ce.getProperty)(t).toString():"/"+Id(t)}G.getErrorPath=yD;function uw(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}G.checkStrictMode=uw});var tr=$(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});var Me=B(),_D={data:new Me.Name("data"),valCxt:new Me.Name("valCxt"),instancePath:new Me.Name("instancePath"),parentData:new Me.Name("parentData"),parentDataProperty:new Me.Name("parentDataProperty"),rootData:new Me.Name("rootData"),dynamicAnchors:new Me.Name("dynamicAnchors"),vErrors:new Me.Name("vErrors"),errors:new Me.Name("errors"),this:new Me.Name("this"),self:new Me.Name("self"),scope:new Me.Name("scope"),json:new Me.Name("json"),jsonPos:new Me.Name("jsonPos"),jsonLen:new Me.Name("jsonLen"),jsonPart:new Me.Name("jsonPart")};Dd.default=_D});var _s=$(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.extendErrors=Le.resetErrorsCount=Le.reportExtraError=Le.reportError=Le.keyword$DataError=Le.keywordError=void 0;var Q=B(),Fa=X(),Be=tr();Le.keywordError={message:({keyword:t})=>(0,Q.str)`must pass "${t}" keyword validation`};Le.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,Q.str)`"${t}" keyword must be ${e} ($data)`:(0,Q.str)`"${t}" keyword is invalid ($data)`};function vD(t,e=Le.keywordError,r,n){let{it:o}=t,{gen:s,compositeRule:i,allErrors:a}=o,c=fw(t,e,r);n??(i||a)?lw(s,c):dw(o,(0,Q._)`[${c}]`)}Le.reportError=vD;function bD(t,e=Le.keywordError,r){let{it:n}=t,{gen:o,compositeRule:s,allErrors:i}=n,a=fw(t,e,r);lw(o,a),s||i||dw(n,Be.default.vErrors)}Le.reportExtraError=bD;function wD(t,e){t.assign(Be.default.errors,e),t.if((0,Q._)`${Be.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,Q._)`${Be.default.vErrors}.length`,e),()=>t.assign(Be.default.vErrors,null)))}Le.resetErrorsCount=wD;function xD({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,Be.default.errors,a=>{t.const(i,(0,Q._)`${Be.default.vErrors}[${a}]`),t.if((0,Q._)`${i}.instancePath === undefined`,()=>t.assign((0,Q._)`${i}.instancePath`,(0,Q.strConcat)(Be.default.instancePath,s.errorPath))),t.assign((0,Q._)`${i}.schemaPath`,(0,Q.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,Q._)`${i}.schema`,r),t.assign((0,Q._)`${i}.data`,n))})}Le.extendErrors=xD;function lw(t,e){let r=t.const("err",e);t.if((0,Q._)`${Be.default.vErrors} === null`,()=>t.assign(Be.default.vErrors,(0,Q._)`[${r}]`),(0,Q._)`${Be.default.vErrors}.push(${r})`),t.code((0,Q._)`${Be.default.errors}++`)}function dw(t,e){let{gen:r,validateName:n,schemaEnv:o}=t;o.$async?r.throw((0,Q._)`new ${t.ValidationError}(${e})`):(r.assign((0,Q._)`${n}.errors`,e),r.return(!1))}var tn={keyword:new Q.Name("keyword"),schemaPath:new Q.Name("schemaPath"),params:new Q.Name("params"),propertyName:new Q.Name("propertyName"),message:new Q.Name("message"),schema:new Q.Name("schema"),parentSchema:new Q.Name("parentSchema")};function fw(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,Q._)`{}`:SD(t,e,r)}function SD(t,e,r={}){let{gen:n,it:o}=t,s=[$D(o,r),ED(t,r)];return kD(t,e,s),n.object(...s)}function $D({errorPath:t},{instancePath:e}){let r=e?(0,Q.str)`${t}${(0,Fa.getErrorPath)(e,Fa.Type.Str)}`:t;return[Be.default.instancePath,(0,Q.strConcat)(Be.default.instancePath,r)]}function ED({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let o=n?e:(0,Q.str)`${e}/${t}`;return r&&(o=(0,Q.str)`${o}${(0,Fa.getErrorPath)(r,Fa.Type.Str)}`),[tn.schemaPath,o]}function kD(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([tn.keyword,o],[tn.params,typeof e=="function"?e(t):e||(0,Q._)`{}`]),c.messages&&n.push([tn.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([tn.schema,i],[tn.parentSchema,(0,Q._)`${l}${d}`],[Be.default.data,s]),u&&n.push([tn.propertyName,u])}});var mw=$(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.boolOrEmptySchema=Zn.topBoolOrEmptySchema=void 0;var PD=_s(),zD=B(),TD=tr(),CD={message:"boolean schema is false"};function OD(t){let{gen:e,schema:r,validateName:n}=t;r===!1?pw(t,!1):typeof r=="object"&&r.$async===!0?e.return(TD.default.data):(e.assign((0,zD._)`${n}.errors`,null),e.return(!0))}Zn.topBoolOrEmptySchema=OD;function ID(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),pw(t)):r.var(e,!0)}Zn.boolOrEmptySchema=ID;function pw(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,PD.reportError)(o,CD,void 0,e)}});var Ad=$(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.getRules=Fn.isJSONType=void 0;var RD=["string","number","integer","boolean","null","object","array"],DD=new Set(RD);function AD(t){return typeof t=="string"&&DD.has(t)}Fn.isJSONType=AD;function ND(){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:{}}}Fn.getRules=ND});var Nd=$(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.shouldUseRule=gr.shouldUseGroup=gr.schemaHasRulesForType=void 0;function jD({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&hw(t,n)}gr.schemaHasRulesForType=jD;function hw(t,e){return e.rules.some(r=>gw(t,r))}gr.shouldUseGroup=hw;function gw(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))}gr.shouldUseRule=gw});var vs=$(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.reportTypeError=Ze.checkDataTypes=Ze.checkDataType=Ze.coerceAndCheckDataType=Ze.getJSONTypes=Ze.getSchemaTypes=Ze.DataType=void 0;var MD=Ad(),LD=Nd(),ZD=_s(),V=B(),yw=X(),qn;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(qn||(Ze.DataType=qn={}));function FD(t){let e=_w(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}Ze.getSchemaTypes=FD;function _w(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(MD.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ze.getJSONTypes=_w;function qD(t,e){let{gen:r,data:n,opts:o}=t,s=UD(e,o.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,LD.schemaHasRulesForType)(t,e[0]));if(i){let a=Md(e,n,o.strictNumbers,qn.Wrong);r.if(a,()=>{s.length?VD(t,e,s):Ld(t)})}return i}Ze.coerceAndCheckDataType=qD;var vw=new Set(["string","number","integer","boolean","null"]);function UD(t,e){return e?t.filter(r=>vw.has(r)||e==="array"&&r==="array"):[]}function VD(t,e,r){let{gen:n,data:o,opts:s}=t,i=n.let("dataType",(0,V._)`typeof ${o}`),a=n.let("coerced",(0,V._)`undefined`);s.coerceTypes==="array"&&n.if((0,V._)`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,V._)`${o}[0]`).assign(i,(0,V._)`typeof ${o}`).if(Md(e,o,s.strictNumbers),()=>n.assign(a,o))),n.if((0,V._)`${a} !== undefined`);for(let u of r)(vw.has(u)||u==="array"&&s.coerceTypes==="array")&&c(u);n.else(),Ld(t),n.endIf(),n.if((0,V._)`${a} !== undefined`,()=>{n.assign(o,a),BD(t,a)});function c(u){switch(u){case"string":n.elseIf((0,V._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,V._)`"" + ${o}`).elseIf((0,V._)`${o} === null`).assign(a,(0,V._)`""`);return;case"number":n.elseIf((0,V._)`${i} == "boolean" || ${o} === null
|
|
26
|
-
|| (${
|
|
27
|
-
|| (${
|
|
28
|
-
|| ${i} === "boolean" || ${o} === null`).assign(a,(0,V._)`[${o}]`)}}}function BD({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,V._)`${e} !== undefined`,()=>t.assign((0,V._)`${e}[${r}]`,n))}function jd(t,e,r,n=qn.Correct){let o=n===qn.Correct?V.operators.EQ:V.operators.NEQ,s;switch(t){case"null":return(0,V._)`${e} ${o} null`;case"array":s=(0,V._)`Array.isArray(${e})`;break;case"object":s=(0,V._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,V._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,V._)`typeof ${e} ${o} ${t}`}return n===qn.Correct?s:(0,V.not)(s);function i(a=V.nil){return(0,V.and)((0,V._)`typeof ${e} == "number"`,a,r?(0,V._)`isFinite(${e})`:V.nil)}}Ze.checkDataType=jd;function Md(t,e,r,n){if(t.length===1)return jd(t[0],e,r,n);let o,s=(0,yw.toHash)(t);if(s.array&&s.object){let i=(0,V._)`typeof ${e} != "object"`;o=s.null?i:(0,V._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else o=V.nil;s.number&&delete s.integer;for(let i in s)o=(0,V.and)(o,jd(i,e,r,n));return o}Ze.checkDataTypes=Md;var HD={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,V._)`{type: ${t}}`:(0,V._)`{type: ${e}}`};function Ld(t){let e=WD(t);(0,ZD.reportError)(e,HD)}Ze.reportTypeError=Ld;function WD(t){let{gen:e,data:r,schema:n}=t,o=(0,yw.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:t}}});var ww=$(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.assignDefaults=void 0;var Un=B(),GD=X();function JD(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let o in r)bw(t,o,r[o].default);else e==="array"&&Array.isArray(n)&&n.forEach((o,s)=>bw(t,s,o.default))}qa.assignDefaults=JD;function bw(t,e,r){let{gen:n,compositeRule:o,data:s,opts:i}=t;if(r===void 0)return;let a=(0,Un._)`${s}${(0,Un.getProperty)(e)}`;if(o){(0,GD.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,Un._)`${a} === undefined`;i.useDefaults==="empty"&&(c=(0,Un._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Un._)`${a} = ${(0,Un.stringify)(r)}`)}});var ht=$(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.validateUnion=ae.validateArray=ae.usePattern=ae.callValidateCode=ae.schemaProperties=ae.allSchemaProperties=ae.noPropertyInData=ae.propertyInData=ae.isOwnProperty=ae.hasPropFunc=ae.reportMissingProp=ae.checkMissingProp=ae.checkReportMissingProp=void 0;var me=B(),Zd=X(),yr=tr(),KD=X();function YD(t,e){let{gen:r,data:n,it:o}=t;r.if(qd(r,n,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,me._)`${e}`},!0),t.error()})}ae.checkReportMissingProp=YD;function XD({gen:t,data:e,it:{opts:r}},n,o){return(0,me.or)(...n.map(s=>(0,me.and)(qd(t,e,s,r.ownProperties),(0,me._)`${o} = ${s}`)))}ae.checkMissingProp=XD;function QD(t,e){t.setParams({missingProperty:e},!0),t.error()}ae.reportMissingProp=QD;function xw(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,me._)`Object.prototype.hasOwnProperty`})}ae.hasPropFunc=xw;function Fd(t,e,r){return(0,me._)`${xw(t)}.call(${e}, ${r})`}ae.isOwnProperty=Fd;function eA(t,e,r,n){let o=(0,me._)`${e}${(0,me.getProperty)(r)} !== undefined`;return n?(0,me._)`${o} && ${Fd(t,e,r)}`:o}ae.propertyInData=eA;function qd(t,e,r,n){let o=(0,me._)`${e}${(0,me.getProperty)(r)} === undefined`;return n?(0,me.or)(o,(0,me.not)(Fd(t,e,r))):o}ae.noPropertyInData=qd;function Sw(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ae.allSchemaProperties=Sw;function tA(t,e){return Sw(e).filter(r=>!(0,Zd.alwaysValidSchema)(t,e[r]))}ae.schemaProperties=tA;function rA({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,c,u){let l=u?(0,me._)`${t}, ${e}, ${n}${o}`:e,d=[[yr.default.instancePath,(0,me.strConcat)(yr.default.instancePath,s)],[yr.default.parentData,i.parentData],[yr.default.parentDataProperty,i.parentDataProperty],[yr.default.rootData,yr.default.rootData]];i.opts.dynamicRef&&d.push([yr.default.dynamicAnchors,yr.default.dynamicAnchors]);let p=(0,me._)`${l}, ${r.object(...d)}`;return c!==me.nil?(0,me._)`${a}.call(${c}, ${p})`:(0,me._)`${a}(${p})`}ae.callValidateCode=rA;var nA=(0,me._)`new RegExp`;function oA({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,me._)`${o.code==="new RegExp"?nA:(0,KD.useFunc)(t,o)}(${r}, ${n})`})}ae.usePattern=oA;function sA(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,me._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:Zd.Type.Num},s),e.if((0,me.not)(s),a)})}}ae.validateArray=sA;function iA(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,Zd.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,me._)`${i} || ${a}`),t.mergeValidEvaluated(l,a)||e.if((0,me.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}ae.validateUnion=iA});var kw=$(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.validateKeywordUsage=Nt.validSchemaType=Nt.funcKeywordCode=Nt.macroKeywordCode=void 0;var He=B(),rn=tr(),aA=ht(),cA=_s();function uA(t,e){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=t,a=e.macro.call(i.self,o,s,i),c=Ew(r,n,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:He.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Nt.macroKeywordCode=uA;function lA(t,e){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:c}=t;fA(c,e);let u=!a&&e.compile?e.compile.call(c.self,s,i,c):e.validate,l=Ew(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&&$w(t),g(()=>t.error());else{let y=e.async?m():f();e.modifying&&$w(t),g(()=>dA(t,y))}}function m(){let y=n.let("ruleErrs",null);return n.try(()=>h((0,He._)`await `),v=>n.assign(d,!1).if((0,He._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(y,(0,He._)`${v}.errors`),()=>n.throw(v))),y}function f(){let y=(0,He._)`${l}.errors`;return n.assign(y,null),h(He.nil),y}function h(y=e.async?(0,He._)`await `:He.nil){let v=c.opts.passContext?rn.default.this:rn.default.self,x=!("compile"in e&&!a||e.schema===!1);n.assign(d,(0,He._)`${y}${(0,aA.callValidateCode)(t,l,v,x)}`,e.modifying)}function g(y){var v;n.if((0,He.not)((v=e.valid)!==null&&v!==void 0?v:d),y)}}Nt.funcKeywordCode=lA;function $w(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,He._)`${n.parentData}[${n.parentDataProperty}]`))}function dA(t,e){let{gen:r}=t;r.if((0,He._)`Array.isArray(${e})`,()=>{r.assign(rn.default.vErrors,(0,He._)`${rn.default.vErrors} === null ? ${e} : ${rn.default.vErrors}.concat(${e})`).assign(rn.default.errors,(0,He._)`${rn.default.vErrors}.length`),(0,cA.extendErrors)(t)},()=>t.error())}function fA({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Ew(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,He.stringify)(r)})}function pA(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")}Nt.validSchemaType=pA;function mA({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)}}Nt.validateKeywordUsage=mA});var zw=$(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.extendSubschemaMode=_r.extendSubschemaData=_r.getSubschema=void 0;var jt=B(),Pw=X();function hA(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,jt._)`${t.schemaPath}${(0,jt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,jt._)`${t.schemaPath}${(0,jt.getProperty)(e)}${(0,jt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Pw.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')}_r.getSubschema=hA;function gA(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,jt._)`${e.data}${(0,jt.getProperty)(r)}`,!0);c(p),t.errorPath=(0,jt.str)`${u}${(0,Pw.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,jt._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(o!==void 0){let u=o instanceof jt.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]}}_r.extendSubschemaData=gA;function yA(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}_r.extendSubschemaMode=yA});var Ud=$((XB,Tw)=>{"use strict";Tw.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 Ow=$((QB,Cw)=>{"use strict";var vr=Cw.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(){};Ua(e,n,o,t,"",t)};vr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};vr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};vr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};vr.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 Ua(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 vr.arrayKeywords)for(var p=0;p<d.length;p++)Ua(t,e,r,d[p],o+"/"+l+"/"+p,s,o,l,n,p)}else if(l in vr.propsKeywords){if(d&&typeof d=="object")for(var m in d)Ua(t,e,r,d[m],o+"/"+l+"/"+_A(m),s,o,l,n,m)}else(l in vr.keywords||t.allKeys&&!(l in vr.skipKeywords))&&Ua(t,e,r,d,o+"/"+l,s,o,l,n)}r(n,o,s,i,a,c,u)}}function _A(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var bs=$(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getSchemaRefs=Qe.resolveUrl=Qe.normalizeId=Qe._getFullPath=Qe.getFullPath=Qe.inlineRef=void 0;var vA=X(),bA=Ud(),wA=Ow(),xA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function SA(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Vd(t):e?Iw(t)<=e:!1}Qe.inlineRef=SA;var $A=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Vd(t){for(let e in t){if($A.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Vd)||typeof r=="object"&&Vd(r))return!0}return!1}function Iw(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!xA.has(r)&&(typeof t[r]=="object"&&(0,vA.eachItem)(t[r],n=>e+=Iw(n)),e===1/0))return 1/0}return e}function Rw(t,e="",r){r!==!1&&(e=Vn(e));let n=t.parse(e);return Dw(t,n)}Qe.getFullPath=Rw;function Dw(t,e){return t.serialize(e).split("#")[0]+"#"}Qe._getFullPath=Dw;var EA=/#\/?$/;function Vn(t){return t?t.replace(EA,""):""}Qe.normalizeId=Vn;function kA(t,e,r){return r=Vn(r),t.resolve(e,r)}Qe.resolveUrl=kA;var PA=/^[a-z_][-a-z0-9._]*$/i;function zA(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Vn(t[r]||e),s={"":o},i=Rw(n,o,!1),a={},c=new Set;return wA(t,{allKeys:!0},(d,p,m,f)=>{if(f===void 0)return;let h=i+p,g=s[f];typeof d[r]=="string"&&(g=y.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),s[p]=g;function y(x){let S=this.opts.uriResolver.resolve;if(x=Vn(g?S(g,x):x),c.has(x))throw l(x);c.add(x);let E=this.refs[x];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?u(d,E.schema,x):x!==Vn(h)&&(x[0]==="#"?(u(d,a[x],x),a[x]=d):this.refs[x]=h),x}function v(x){if(typeof x=="string"){if(!PA.test(x))throw new Error(`invalid anchor "${x}"`);y.call(this,`#${x}`)}}}),a;function u(d,p,m){if(p!==void 0&&!bA(d,p))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Qe.getSchemaRefs=zA});var Ss=$(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.getData=br.KeywordCxt=br.validateFunctionCode=void 0;var Lw=mw(),Aw=vs(),Hd=Nd(),Va=vs(),TA=ww(),xs=kw(),Bd=zw(),I=B(),M=tr(),CA=bs(),rr=X(),ws=_s();function OA(t){if(qw(t)&&(Uw(t),Fw(t))){DA(t);return}Zw(t,()=>(0,Lw.topBoolOrEmptySchema)(t))}br.validateFunctionCode=OA;function Zw({gen:t,validateName:e,schema:r,schemaEnv:n,opts:o},s){o.code.es5?t.func(e,(0,I._)`${M.default.data}, ${M.default.valCxt}`,n.$async,()=>{t.code((0,I._)`"use strict"; ${Nw(r,o)}`),RA(t,o),t.code(s)}):t.func(e,(0,I._)`${M.default.data}, ${IA(o)}`,n.$async,()=>t.code(Nw(r,o)).code(s))}function IA(t){return(0,I._)`{${M.default.instancePath}="", ${M.default.parentData}, ${M.default.parentDataProperty}, ${M.default.rootData}=${M.default.data}${t.dynamicRef?(0,I._)`, ${M.default.dynamicAnchors}={}`:I.nil}}={}`}function RA(t,e){t.if(M.default.valCxt,()=>{t.var(M.default.instancePath,(0,I._)`${M.default.valCxt}.${M.default.instancePath}`),t.var(M.default.parentData,(0,I._)`${M.default.valCxt}.${M.default.parentData}`),t.var(M.default.parentDataProperty,(0,I._)`${M.default.valCxt}.${M.default.parentDataProperty}`),t.var(M.default.rootData,(0,I._)`${M.default.valCxt}.${M.default.rootData}`),e.dynamicRef&&t.var(M.default.dynamicAnchors,(0,I._)`${M.default.valCxt}.${M.default.dynamicAnchors}`)},()=>{t.var(M.default.instancePath,(0,I._)`""`),t.var(M.default.parentData,(0,I._)`undefined`),t.var(M.default.parentDataProperty,(0,I._)`undefined`),t.var(M.default.rootData,M.default.data),e.dynamicRef&&t.var(M.default.dynamicAnchors,(0,I._)`{}`)})}function DA(t){let{schema:e,opts:r,gen:n}=t;Zw(t,()=>{r.$comment&&e.$comment&&Bw(t),LA(t),n.let(M.default.vErrors,null),n.let(M.default.errors,0),r.unevaluated&&AA(t),Vw(t),qA(t)})}function AA(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,I._)`${r}.evaluated`),e.if((0,I._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,I._)`${t.evaluated}.props`,(0,I._)`undefined`)),e.if((0,I._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,I._)`${t.evaluated}.items`,(0,I._)`undefined`))}function Nw(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,I._)`/*# sourceURL=${r} */`:I.nil}function NA(t,e){if(qw(t)&&(Uw(t),Fw(t))){jA(t,e);return}(0,Lw.boolOrEmptySchema)(t,e)}function Fw({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 qw(t){return typeof t.schema!="boolean"}function jA(t,e){let{schema:r,gen:n,opts:o}=t;o.$comment&&r.$comment&&Bw(t),ZA(t),FA(t);let s=n.const("_errs",M.default.errors);Vw(t,s),n.var(e,(0,I._)`${s} === ${M.default.errors}`)}function Uw(t){(0,rr.checkUnknownRules)(t),MA(t)}function Vw(t,e){if(t.opts.jtd)return jw(t,[],!1,e);let r=(0,Aw.getSchemaTypes)(t.schema),n=(0,Aw.coerceAndCheckDataType)(t,r);jw(t,r,!n,e)}function MA(t){let{schema:e,errSchemaPath:r,opts:n,self:o}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,rr.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function LA(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,rr.checkStrictMode)(t,"default is ignored in the schema root")}function ZA(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,CA.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function FA(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Bw({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)t.code((0,I._)`${M.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=(0,I.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,I._)`${M.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function qA(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=t;r.$async?e.if((0,I._)`${M.default.errors} === 0`,()=>e.return(M.default.data),()=>e.throw((0,I._)`new ${o}(${M.default.vErrors})`)):(e.assign((0,I._)`${n}.errors`,M.default.vErrors),s.unevaluated&&UA(t),e.return((0,I._)`${M.default.errors} === 0`))}function UA({gen:t,evaluated:e,props:r,items:n}){r instanceof I.Name&&t.assign((0,I._)`${e}.props`,r),n instanceof I.Name&&t.assign((0,I._)`${e}.items`,n)}function jw(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,rr.schemaHasRulesButRef)(s,l))){o.block(()=>Ww(t,"$ref",l.all.$ref.definition));return}c.jtd||VA(t,e),o.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,Hd.shouldUseGroup)(s,p)&&(p.type?(o.if((0,Va.checkDataType)(p.type,i,c.strictNumbers)),Mw(t,p),e.length===1&&e[0]===p.type&&r&&(o.else(),(0,Va.reportTypeError)(t)),o.endIf()):Mw(t,p),a||o.if((0,I._)`${M.default.errors} === ${n||0}`))}}function Mw(t,e){let{gen:r,schema:n,opts:{useDefaults:o}}=t;o&&(0,TA.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,Hd.shouldUseRule)(n,s)&&Ww(t,s.keyword,s.definition,e.type)})}function VA(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(BA(t,e),t.opts.allowUnionTypes||HA(t,e),WA(t,t.dataTypes))}function BA(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Hw(t.dataTypes,r)||Wd(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),JA(t,e)}}function HA(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Wd(t,"use allowUnionTypes to allow union type keyword")}function WA(t,e){let r=t.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Hd.shouldUseRule)(t.schema,o)){let{type:s}=o.definition;s.length&&!s.some(i=>GA(e,i))&&Wd(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function GA(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Hw(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function JA(t,e){let r=[];for(let n of t.dataTypes)Hw(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Wd(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,rr.checkStrictMode)(t,e,t.opts.strictTypes)}var Ba=class{constructor(e,r,n){if((0,xs.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,rr.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",Gw(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,xs.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",M.default.errors))}result(e,r,n){this.failResult((0,I.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,I.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,I._)`${r} !== undefined && (${(0,I.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?ws.reportExtraError:ws.reportError)(this,this.def.error,r)}$dataError(){(0,ws.reportError)(this,this.def.$dataError||ws.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ws.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=I.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=I.nil,r=I.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:i}=this;n.if((0,I.or)((0,I._)`${o} === undefined`,r)),e!==I.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==I.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,I.or)(i(),a());function i(){if(n.length){if(!(r instanceof I.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,I._)`${(0,Va.checkDataTypes)(c,r,s.opts.strictNumbers,Va.DataType.Wrong)}`}return I.nil}function a(){if(o.validateSchema){let c=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,I._)`!${c}(${r})`}return I.nil}}subschema(e,r){let n=(0,Bd.getSubschema)(this.it,e);(0,Bd.extendSubschemaData)(n,this.it,e),(0,Bd.extendSubschemaMode)(n,e);let o={...this.it,...n,items:void 0,props:void 0};return NA(o,r),o}mergeEvaluated(e,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=rr.mergeEvaluated.props(o,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=rr.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,I.Name)),!0}};br.KeywordCxt=Ba;function Ww(t,e,r,n){let o=new Ba(t,r,e);"code"in r?r.code(o,n):o.$data&&r.validate?(0,xs.funcKeywordCode)(o,r):"macro"in r?(0,xs.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,xs.funcKeywordCode)(o,r)}var KA=/^\/(?:[^~]|~0|~1)*$/,YA=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Gw(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let o,s;if(t==="")return M.default.rootData;if(t[0]==="/"){if(!KA.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,s=M.default.rootData}else{let u=YA.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,I._)`${s}${(0,I.getProperty)((0,rr.unescapeJsonPointer)(u))}`,i=(0,I._)`${i} && ${s}`);return i;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}br.getData=Gw});var Ha=$(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});var Gd=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Jd.default=Gd});var $s=$(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});var Kd=bs(),Yd=class extends Error{constructor(e,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Kd.resolveUrl)(e,r,n),this.missingSchema=(0,Kd.normalizeId)((0,Kd.getFullPath)(e,this.missingRef))}};Xd.default=Yd});var Ga=$(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.resolveSchema=gt.getCompilingSchema=gt.resolveRef=gt.compileSchema=gt.SchemaEnv=void 0;var Ct=B(),XA=Ha(),nn=tr(),Ot=bs(),Jw=X(),QA=Ss(),Bn=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,Ot.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};gt.SchemaEnv=Bn;function ef(t){let e=Kw.call(this,t);if(e)return e;let r=(0,Ot.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new Ct.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;t.$async&&(a=i.scopeValue("Error",{ref:XA.default,code:(0,Ct._)`require("ajv/dist/runtime/validation_error").default`}));let c=i.scopeName("validate");t.validateName=c;let u={gen:i,allErrors:this.opts.allErrors,data:nn.default.data,parentData:nn.default.parentData,parentDataProperty:nn.default.parentDataProperty,dataNames:[nn.default.data],dataPathArr:[Ct.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Ct.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Ct.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ct._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,QA.validateFunctionCode)(u),i.optimize(this.opts.code.optimize);let d=i.toString();l=`${i.scopeRefs(nn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let m=new Function(`${nn.default.self}`,`${nn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=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 Ct.Name?void 0:f,items:h instanceof Ct.Name?void 0:h,dynamicProps:f instanceof Ct.Name,dynamicItems:h instanceof Ct.Name},m.source&&(m.source.evaluated=(0,Ct.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)}}gt.compileSchema=ef;function eN(t,e,r){var n;r=(0,Ot.resolveUrl)(this.opts.uriResolver,e,r);let o=t.refs[r];if(o)return o;let s=nN.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 Bn({schema:i,schemaId:a,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=tN.call(this,s)}gt.resolveRef=eN;function tN(t){return(0,Ot.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:ef.call(this,t)}function Kw(t){for(let e of this._compilations)if(rN(e,t))return e}gt.getCompilingSchema=Kw;function rN(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function nN(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Wa.call(this,t,e)}function Wa(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Ot._getFullPath)(this.opts.uriResolver,r),o=(0,Ot.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===o)return Qd.call(this,r,t);let s=(0,Ot.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=Wa.call(this,t,i);return typeof a?.schema!="object"?void 0:Qd.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||ef.call(this,i),s===(0,Ot.normalizeId)(e)){let{schema:a}=i,{schemaId:c}=this.opts,u=a[c];return u&&(o=(0,Ot.resolveUrl)(this.opts.uriResolver,o,u)),new Bn({schema:a,schemaId:c,root:t,baseId:o})}return Qd.call(this,r,i)}}gt.resolveSchema=Wa;var oN=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Qd(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,Jw.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!oN.has(a)&&u&&(e=(0,Ot.resolveUrl)(this.opts.uriResolver,e,u))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Jw.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Ot.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=Wa.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new Bn({schema:r,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var Yw=$((sH,sN)=>{sN.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var sf=$((iH,sx)=>{"use strict";var iN=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),tf=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),aN=RegExp.prototype.test.bind(/^\d*$/u),on=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),rf=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),ex=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),nf=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),cN=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),uN=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=]$/u),lN=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=]*$/u);function dN(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 fN=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),pN=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),mN=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),hN=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),gN=RegExp.prototype.test.bind(/[^\d!"$&'()*+,\-.;=_`a-z{}~]/u),yN=RegExp.prototype.test.bind(/(?:^|\.)\d+$/u);function _N(t){return gN(t)||yN(t)}function vN(t){if(t.length===0)return!1;for(let e=0;e<t.length;e++)if(!mN(t[e])){if(t[e]==="%"&&e+2<t.length&&on(t.slice(e+1,e+3))){e+=2;continue}return!1}return!0}function Xw(t){let e=-1,r=0,n=-1,o=0;for(let a=0;a<t.length;a++)t[a]==="0"?(n===-1&&(n=a),o++,o>r&&(r=o,e=n)):(n=-1,o=0);if(r<2)return t.join(":");let s=t.slice(0,e).join(":"),i=t.slice(e+r).join(":");return s+"::"+i}function bN(t){let e=t.indexOf("::");if(e!==-1&&t.indexOf("::",e+1)!==-1)return;let r=e===-1?t.split(":"):t.slice(0,e).split(":"),n=e===-1?[]:t.slice(e+2).split(":");e!==-1&&(r.length===1&&r[0]===""&&(r.length=0),n.length===1&&n[0]===""&&(n.length=0));let o=r.concat(n),s=0;for(let a=0;a<o.length;a++){let c=o[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==o.length-1||e!==-1&&n.length===0||!tf(c))return;s+=2;continue}if(!fN(c))return;o[a]=parseInt(c,16).toString(16),s++}if(e===-1)return s!==8?void 0:Xw(o);if(s>=8)return;let i=o.slice(0,r.length);for(let a=s;a<8;a++)i.push("0");for(let a=r.length;a<o.length;a++)i.push(o[a]);return Xw(i)}function Ja(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 n=e?t.slice(1,-1):t;if(e&&pN(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(wN(n,":")<2)return{host:t,isIPV6:!1,error:e};let o="",s=n.indexOf("%");if(s!==-1){let a=n.slice(s,s+3).toLowerCase()==="%25"?3:1;if(o=n.slice(s+a),!vN(o))return{host:t,isIPV6:!1,error:!0};n=n.slice(0,s)}let i=bN(n);return i===void 0?{host:t,isIPV6:!1,error:!0}:{host:i+(o?"%"+o:""),escapedHost:i+(o?"%25"+o:""),isIPV6:!0}}function wN(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function tx(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("")}function xN(t){if(t===""||t[0]==="/")return tx(t);let e=t.split("/"),r=e.length-1,n=[],o=!1;for(let s=0;s<=r;s++){let i=e[s];i==="."||i===".."?(i===".."&&(n.length!==0&&n[n.length-1]!==".."?n.pop():n.push("..")),o=s===r):n.push(i)}return o&&n[n.length-1]!==".."&&n.push(""),(n.length===0||n[0]===""||n[0].includes(":"))&&n.unshift("."),n.join("/")}var SN={"@":"%40","/":"%2F","?":"%3F","#":"%23"},Qw=/[@/?#]/g;function rx(t,e,r=!1){return e?(Qw.lastIndex=0,t.replace(Qw,n=>SN[n])):lN(t)?t:Ka(t,uN,r)}function nx(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(on(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));e&&rf(i)?r+=i:r+="%"+s,n+=2;continue}}r+=t[n]}return r}var Fe=new Array(256);{let t="0123456789ABCDEF";for(let e=0;e<256;e++)Fe[e]="%"+t[e>>4]+t[e&15]}function of(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 ke(t){return t<2048?Fe[192|t>>6]+Fe[128|t&63]:t<65536?Fe[224|t>>12]+Fe[128|t>>6&63]+Fe[128|t&63]:Fe[240|t>>18]+Fe[128|t>>12&63]+Fe[128|t>>6&63]+Fe[128|t&63]}function $N(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(on(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));i!=="."&&rf(i)?e+=i:e+="%"+s,r+=2;continue}}if(ex(n))e+=n;else{let o=t.charCodeAt(r);if(o<128)e+=of(o)?n:Fe[o];else if(o<55296||o>57343)e+=ke(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(e+=ke(65536+(o-55296<<10)+(s-56320)),r++):e+=ke(65533)}else e+=ke(65533)}}return e}function EN(t,e=!1){let r="",n=e&&t[0]!=="/";for(let o=0;o<t.length;o++){let s=t[o];if(s==="%"&&o+2<t.length){let i=t.slice(o+1,o+3);if(on(i)){r+="%"+i.toUpperCase(),o+=2;continue}}if(s==="/"&&(n=!1),ex(s)&&(s!==":"||!n))r+=s;else{let i=t.charCodeAt(o);if(i<128)r+=Fe[i];else if(i<55296||i>57343)r+=ke(i);else if(i<=56319&&o+1<t.length){let a=t.charCodeAt(o+1);a>=56320&&a<=57343?(r+=ke(65536+(i-55296<<10)+(a-56320)),o++):r+=ke(65533)}else r+=ke(65533)}}return r}function kN(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(on(o)){let s=o.toUpperCase(),i=String.fromCharCode(parseInt(s,16));rf(i)?e+=i:e+="%"+s,r+=2;continue}}if(nf(n))e+=n;else{let o=t.charCodeAt(r);if(o<128)e+=of(o)?n:Fe[o];else if(o<55296||o>57343)e+=ke(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(e+=ke(65536+(o-55296<<10)+(s-56320)),r++):e+=ke(65533)}else e+=ke(65533)}}return e}function Ka(t,e,r=!1){let n="";for(let o=0;o<t.length;o++){let s=t[o];if(s==="%"&&o+2<t.length){let i=t.slice(o+1,o+3);if(on(i)){n+="%"+i.toUpperCase(),o+=2;continue}}if(e(s))n+=s;else{let i=t.charCodeAt(o);if(i<128)n+=Fe[i];else if(i<55296||i>57343)n+=r?s:ke(i);else if(i<=56319&&o+1<t.length){let a=t.charCodeAt(o+1);a>=56320&&a<=57343?(n+=r?s+t[o+1]:ke(65536+(i-55296<<10)+(a-56320)),o++):n+=r?"\uFFFD":ke(65533)}else n+=r?"\uFFFD":ke(65533)}}return n}function ox(t){return Ka(t,cN)}function PN(t){return Ka(t,nf)}function zN(t){return Ka(t,nf)}function TN(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(on(s)){e+="%"+s.toUpperCase(),r+=2;continue}}let o=t.charCodeAt(r);if(o<128)e+=of(o)?n:Fe[o];else if(o<55296||o>57343)e+=ke(o);else if(o<=56319&&r+1<t.length){let s=t.charCodeAt(r+1);s>=56320&&s<=57343?(e+=ke(65536+(o-55296<<10)+(s-56320)),r++):e+=ke(65533)}else e+=ke(65533)}return e}function CN(t){let e=t.ipv6Zone;if(e===void 0)return;let r=t.host,n=r.indexOf("%");if(n===-1)return;let s=r.slice(0,n)+"%25"+e,i=Ja("["+s+"]");if(i.isIPV6===!0&&i.host===r)return"["+s+"]"}function ON(t,e=!1){let r=[];if(t.userinfo!==void 0&&(r.push(ox(t.userinfo)),r.push("@")),t.host!==void 0){let n=t.host;if(!tf(n)){let o=CN(t);if(o!==void 0)n=o;else{let s=Ja(n);s.isIPV6!==!0&&s.isIPVFuture!==!0&&(n=nx(n,!0),s=Ja(n)),s.isIPV6===!0||s.isIPVFuture===!0?n=`[${s.escapedHost}]`:n=rx(n,!1,e)}}r.push(n)}if(typeof t.port=="number"||typeof t.port=="string"){let n=String(t.port);if(!aN(n))throw new TypeError("URI port is malformed.");r.push(":"),r.push(n)}return r.length?r.join(""):void 0}sx.exports={BYTE_HEX:Fe,percentEncodeNonAscii:ke,nonSimpleDomain:hN,nonSimpleMailtoDomain:_N,recomposeAuthority:ON,encodeHost:rx,normalizePercentEncoding:nx,normalizePathEncoding:$N,serializePathEncoding:EN,normalizeQueryFragmentEncoding:kN,encodeUserinfo:ox,encodeQuery:PN,encodeFragment:zN,escapePreservingEscapes:TN,removeDotSegments:tx,removeDotSegmentsRelative:xN,isIPv4:tf,isUUID:iN,normalizeIPv6:Ja,stringArrayToHexStripped:dN}});var hx=$((aH,mx)=>{"use strict";var{isUUID:IN,BYTE_HEX:RN,percentEncodeNonAscii:af,nonSimpleMailtoDomain:DN}=sf(),AN=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,NN=["http","https","ws","wss","urn","urn:uuid","mailto"];function jN(t){return NN.indexOf(t)!==-1}function uf(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 cx(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function ux(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 MN(t){return t.secure=uf(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function LN(t){if((t.port===(uf(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("?"),r=e===-1?t.resourceName:t.resourceName.slice(0,e);t.path=r&&r!=="/"?r:void 0,t.query=e===-1?void 0:t.resourceName.slice(e+1),t.resourceName=void 0}return t.fragment=void 0,t}function ZN(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(AN);if(r&&r[0]===t.path){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let o=`${n}:${e.nid||t.nid}`,s=lf(o);t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function FN(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=lf(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 qN(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!IN(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function UN(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var lx={scheme:"http",domainHost:!0,parse:cx,serialize:ux},VN={scheme:"https",domainHost:lx.domainHost,parse:cx,serialize:ux},Ya={scheme:"ws",domainHost:!0,parse:MN,serialize:LN},BN={scheme:"wss",domainHost:Ya.domainHost,parse:Ya.parse,serialize:Ya.serialize},HN={scheme:"urn",parse:ZN,serialize:FN,skipNormalize:!0,absolutePath:!0},WN={scheme:"urn:uuid",parse:qN,serialize:UN,skipNormalize:!0},GN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$'()*+=",JN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$'()*+,;:@",dx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$'()*+;:";function Qa(t,e=!1){let r=new Uint8Array(128);for(let s=0;s<t.length;s++)r[t.charCodeAt(s)]=1;let n=t.replace(/[\\\]^-]/gu,"\\$&"),o=e?`[${n}]|[^\\0-\\x7F\\uD800-\\uDFFF]`:`[${n}]`;return{all:new RegExp(`^(?:${o})*$`,"u"),table:r,allowNonAscii:e}}var KN=Qa(GN),fx=Qa(JN),YN=Qa(dx),XN=Qa(dx,!0),QN=/^[\da-f]{2}$/iu,e1=/^\[[\x21-\x5A\x5E-\x7E]*\]$/u,cf="URI mailto has an invalid recipient domain.",t1="URI mailto must not have an authority component.",ix=/[\uD800-\uDFFF]/u;function wr(t){if(typeof t!="string"||t.indexOf("%")===-1)return t;try{return decodeURIComponent(t)}catch{return t}}function ax(t){let e="";for(let r=0;r<t.length;r++){let n=t.charCodeAt(r);if(n>=55296&&n<=56319&&r+1<t.length){let o=t.charCodeAt(r+1);if(o>=56320&&o<=57343){e+=t[r]+t[r+1],r++;continue}}e+=n>=55296&&n<=57343?"\uFFFD":t[r]}return e}function Es(t,e){if(e.all.test(t))return t;let r=e.table,n="";for(let o=0;o<t.length;o++){let s=t.charCodeAt(o);if(s<128){r[s]===1?n+=t[o]:s===37&&o+2<t.length&&QN.test(t.slice(o+1,o+3))?(n+="%"+t.slice(o+1,o+3).toUpperCase(),o+=2):n+=RN[s];continue}if(s<55296||s>57343){n+=e.allowNonAscii?t[o]:af(s);continue}if(s<=56319&&o+1<t.length){let i=t.charCodeAt(o+1);if(i>=56320&&i<=57343){n+=e.allowNonAscii?t[o]+t[o+1]:af(65536+(s-55296<<10)+(i-56320)),o++;continue}}n+=e.allowNonAscii?"\uFFFD":af(65533)}return n}function px(t,e,r){let n=String(t).toLowerCase();if(e1.test(n)||n!==""&&!DN(n))return n;try{let o=new URL("http://"+n);if(o.username||o.password||o.port||o.pathname!=="/"||o.search||o.hash||!o.hostname)throw new Error(cf);return e&&e.unicodeSupport?n:o.hostname}catch{return r&&(r.error=r.error||cf),n}}function r1(t,e){let r=e&&e.unicodeSupport?XN:YN;return t.length>1&&t[0]==="["&&t[t.length-1]==="]"?"["+Es(t.slice(1,-1),r)+"]":Es(t,r)}function n1(t,e){let r=t,n=r.path,o=r.query;n&&ix.test(n)&&(n=ax(n)),o&&ix.test(o)&&(o=ax(o));let s=n?n.indexOf(",")===-1?[n]:n.split(","):[];if(r.path=void 0,o){let i=null,a=0;for(;a<=o.length;){let c=o.indexOf("&",a);c===-1&&(c=o.length);let u=o.slice(a,c);a=c+1;let l=u.indexOf("=");if(l!==u.lastIndexOf("=")){r.error=r.error||"URI mailto has malformed header fields.";continue}let d=wr(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++)s.push(f[h]);continue}if(p==="subject"){r.subject=wr(m);continue}if(p==="body"){r.body=wr(m);continue}i===null&&(i=Object.create(null)),i[d]=wr(m)}i!==null&&(r.headers=i)}r.query=void 0,s.length>0&&(r.userinfo!==void 0||r.host!==void 0||r.port!==void 0)&&(r.userinfo=void 0,r.host=void 0,r.port=void 0,r.error=r.error||t1);for(let i=0;i<s.length;i++){let a=s[i],c=a.lastIndexOf("@");if(c<0){r.error=r.error||cf,s[i]=wr(a);continue}let u=wr(a.slice(0,c)),l=px(wr(a.slice(c+1)),e,r);s[i]=u+"@"+l}return s.length&&(r.to=s),r}function o1(t){return Es(t.replace(/%/gu,"%25"),fx)}function s1(t,e){let r=t,n=Array.isArray(r.to)?r.to.slice():[],o=r.headers&&typeof r.headers=="object"?Object.assign(Object.create(null),r.headers):Object.create(null),s=Object.create(null);for(let c in o){let u=c.toLowerCase();if(u==="to"){let l=String(o[c]).split(",");for(let d=0;d<l.length;d++)n.push(l[d])}else u==="subject"||u==="body"?s[u]=o[c]:s[c]=o[c]}if(r.subject!==void 0&&(s.subject=r.subject),r.body!==void 0&&(s.body=r.body),r.headers=s,n.length){r.userinfo=void 0,r.host=void 0,r.port=void 0;for(let c=0;c<n.length;c++){let u=String(n[c]),l=u.lastIndexOf("@"),d=l>=0?u.slice(0,l):u,p=l>=0?u.slice(l+1):"",m=Es(d,KN),f=wr(p),h=px(f,e);n[c]=m+"@"+r1(h,e)}r.path=n.join(","),e.skipEscape=!0}else r.path=void 0;let i="",a=0;for(let c in s)a++!==0&&(i+="&"),i+=o1(c)+"="+Es(String(s[c]),fx);return a!==0?r.query=i:r.headers=void 0,r}var i1={scheme:"mailto",parse:n1,serialize:s1,domainHost:!1,unicodeSupport:!0,skipNormalize:!0,absolutePath:!0},Xa={http:lx,https:VN,ws:Ya,wss:BN,urn:HN,"urn:uuid":WN,mailto:i1};Object.setPrototypeOf(Xa,null);function lf(t){return t&&(Xa[t]||Xa[t.toLowerCase()])||void 0}mx.exports={wsIsSecure:uf,SCHEMES:Xa,isValidSchemeName:jN,getSchemeHandler:lf}});var Cx=$((cH,sc)=>{"use strict";var{normalizeIPv6:bx,removeDotSegments:Ps,removeDotSegmentsRelative:wx,recomposeAuthority:a1,normalizePercentEncoding:ff,normalizePathEncoding:c1,serializePathEncoding:gx,normalizeQueryFragmentEncoding:yx,encodeQuery:u1,encodeFragment:l1,encodeHost:d1,isIPv4:xx,nonSimpleDomain:f1}=sf(),{SCHEMES:Sx,getSchemeHandler:nc}=hx(),$x=/^[A-Za-z][A-Za-z0-9+.-]*$/u,Ex="URI scheme is malformed.",ec="URI host is malformed.",p1=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function _x(t){let e=String(t);if(!$x.test(e))throw new TypeError(Ex);return e}function m1(t,e){return typeof t=="string"?t=S1(t,e):typeof t=="object"&&(t=rc(sn(t,e),e)),t}function h1(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:o,malformedAuthorityOrPort:s,malformedReferenceEdge:i,malformedPercentEncoding:a,malformedSchemeSpecific:c,malformedHost:u,malformedScheme:l}=tc(t,n),{parsed:d,malformedAuthorityOrPort:p,malformedReferenceEdge:m,malformedPercentEncoding:f,malformedSchemeSpecific:h,malformedHost:g,malformedScheme:y}=tc(e,n);if(s||p||i||m||a||f||c||h||u||g||l||y)throw new Error(o.error||d.error||"URI is malformed.");let v=kx(o,d,n,!0),x=nc(r&&r.scheme||v.scheme),S=v.host;if((v.scheme==="http"||v.scheme==="https")&&!S)throw new Error("HTTP URIs must have a host.");let E=S!==void 0&&S!==""&&(xx(S)||bx(S).isIPV6);if(zx(v,r||{},x,E))throw new Error(ec);Px(v,r||{},x,E);let C=S&&S.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(S);if(v.error&&!C)throw new Error(v.error);return n.skipEscape=!0,x&&x.absolutePath&&(n.absolutePath=!0),sn(v,n)}function df(t,e){t.host=e.host,e.ipv6Zone!==void 0&&(t.ipv6Zone=e.ipv6Zone)}function kx(t,e,r,n){let o={};if(n||(t=rc(sn(t,r),r),e=rc(sn(e,r),r)),r=r||{},!r.tolerant&&e.scheme){o.scheme=e.scheme,o.userinfo=e.userinfo,df(o,e),o.port=e.port;let s=nc(e.scheme);o.path=s&&s.absolutePath?e.path||"":Ps(e.path||""),o.query=e.query}else{if(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)o.userinfo=e.userinfo,df(o,e),o.port=e.port,o.path=Ps(e.path||""),o.query=e.query;else{if(!e.path)o.path=t.path,e.query!==void 0?o.query=e.query:o.query=t.query;else{if(e.path[0]==="/")o.path=Ps(e.path);else{let s=t.userinfo!==void 0||t.host!==void 0||t.port!==void 0;s&&!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=t.scheme===void 0&&!s&&o.path[0]!=="/"?wx(o.path):Ps(o.path)}o.query=e.query}o.userinfo=t.userinfo,df(o,t),o.port=t.port}o.scheme=t.scheme}return o.fragment=e.fragment,o}function g1(t,e,r){let n=vx(t,r),o=vx(e,r);return n!==void 0&&o!==void 0&&n===o}function sn(t,e){let r={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:""},n=Object.assign({},e),o=[];r.scheme&&(r.scheme=_x(r.scheme));let s=nc(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n);let i=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=(r.scheme===void 0||n.reference==="suffix")&&!i,c=!n.skipEscape&&a;r.path!==void 0&&(n.skipEscape?r.path=ff(r.path):r.path=gx(r.path,c)),n.reference!=="suffix"&&r.scheme&&(r.scheme=_x(r.scheme),o.push(r.scheme,":"));let u=n.unicodeSupport===!0||!!(s&&s.unicodeSupport),l=a1(r,u);if(l!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(l),r.path&&r.path[0]!=="/"&&o.push("/")),r.path!==void 0){let d=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(d=a&&d[0]!=="/"?wx(d):Ps(d)),a&&(d=gx(d,!0)),l===void 0&&d[0]==="/"&&d[1]==="/"&&(d="/%2F"+d.slice(2)),o.push(d)}return r.query!==void 0&&o.push("?",u1(r.query)),r.fragment!==void 0&&o.push("#",l1(r.fragment)),o.join("")}var y1=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,_1=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,v1=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function b1(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 ks(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 oc(t){return t[0]==="["&&t[t.length-1]==="]"}function w1(t){let e=t[4];return ks(t[3])||e!==void 0&&!oc(e)&&ks(e)||ks(t[6])||ks(t[7])||ks(t[8])}function Px(t,e,r,n){let o=t.host&&t.host[0]==="["&&t.host[t.host.length-1]==="]";if(zx(t,e,r,n))return t.error=t.error||ec,!0;if(!e.unicodeSupport&&(!r||!r.unicodeSupport)&&t.host&&!oc(t.host)&&(e.domainHost||r&&r.domainHost)&&n===!1&&!o&&f1(t.host)){let s;try{s=new URL("http://"+t.host)}catch(i){return t.error=t.error||"Host's domain name can not be converted to ASCII: "+i,!0}if(!x1(s))return t.error=t.error||ec,!0;t.host=s.hostname}return!1}function zx(t,e,r,n){return!!(t.host&&n===!1&&!oc(t.host)&&(e.domainHost||r&&r.domainHost)&&p1.test(t.host))}function x1(t){return t.username===""&&t.password===""&&t.port===""&&t.pathname==="/"&&t.search===""&&t.hash===""&&t.hostname!==""}function tc(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=t.length!==0&&(t.charCodeAt(0)<=32||t.charCodeAt(t.length-1)<=32),i=!1,a=!1,c=!1,u=!1,l=!1,d=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let p=t.match(_1);p!==null&&p[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",o=!0);let m=t.match(v1);if(m!==null){let h=m[1],g=h.replace(/[\t\n\r]/g,"");g.length>=2&&(g.slice(0,2)!=="//"?(n.error=n.error||"URI authority must not contain a literal backslash.",o=!0):h.length!==g.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",o=!0))}s&&(n.error=n.error||"URI must not contain leading or trailing C0 controls or spaces.");let f=t.match(y1);if(f){n.scheme=f[1],n.userinfo=f[3],n.host=f[4],n.port=parseInt(f[5],10),n.path=f[6]||"",n.query=f[7],n.fragment=f[8],n.scheme!==void 0&&($x.test(n.scheme)?n.scheme=n.scheme.toLowerCase():(n.error=n.error||Ex,l=!0)),i=w1(f),i&&(n.error=n.error||"URI contains malformed percent-encoding."),isNaN(n.port)&&(n.port=f[5]);let h=b1(n,f);if(h!==void 0&&(n.error=n.error||h,o=!0),n.host)if(xx(n.host)===!1){let v=oc(n.host),x=n.host.indexOf("[")!==-1||n.host.indexOf("]")!==-1,S=bx(n.host);d=S.isIPV6||S.isIPVFuture===!0,u=x&&(!v||S.error===!0),n.host=d?S.host:S.host.toLowerCase(),d&&S.isIPV6===!0&&n.host.indexOf("%")!==-1&&(n.ipv6Zone=n.host.slice(n.host.indexOf("%")+1)),u&&(n.error=n.error||ec,o=!0)}else d=!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 g=nc(r.scheme||n.scheme);if(u||(c=Px(n,r,g,d)),n.host!==void 0&&!u){let y=n.host;if(t.indexOf("%")!==-1&&!d&&(y=ff(y,!0),y=ff(y.toLowerCase())),r.scheme!=="null"){let v=r.unicodeSupport===!0||!!(g&&g.unicodeSupport);n.host=d1(y,d,v)}else n.host=y}(!g||g&&!g.skipNormalize)&&(n.path&&(n.path=c1(n.path)),n.query&&(n.query=yx(n.query)),n.fragment&&(n.fragment=yx(n.fragment))),g&&g.parse&&(g.parse(n,r),g===Sx.urn&&n.nid===void 0&&(a=!0))}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:o,malformedReferenceEdge:s,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:l}}function rc(t,e){return tc(t,e).parsed}function S1(t,e){return Tx(t,e).normalized}function Tx(t,e){let{parsed:r,malformedAuthorityOrPort:n,malformedReferenceEdge:o,malformedPercentEncoding:s,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:c}=tc(t,e);return{normalized:n||o||s||i||a||c?t:sn(r,e),malformedAuthorityOrPort:n,malformedReferenceEdge:o,malformedPercentEncoding:s,malformedSchemeSpecific:i,malformedHost:a,malformedScheme:c}}function vx(t,e){if(typeof t!="string"&&typeof t!="object")return;let r;try{r=typeof t=="string"?t:sn(t,e)}catch{return}let{normalized:n,malformedAuthorityOrPort:o,malformedReferenceEdge:s,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:u}=Tx(r,e);return o||s||i||a||c||u?void 0:n}var pf={SCHEMES:Sx,normalize:m1,resolve:h1,resolveComponent:kx,equal:g1,serialize:sn,parse:rc};sc.exports=pf;sc.exports.default=pf;sc.exports.fastUri=pf});var Ix=$(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var Ox=Cx();Ox.code='require("ajv/dist/runtime/uri").default';mf.default=Ox});var Zx=$(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=void 0;var $1=Ss();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return $1.KeywordCxt}});var Hn=B();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return Hn._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return Hn.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return Hn.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return Hn.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return Hn.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return Hn.CodeGen}});var E1=Ha(),jx=$s(),k1=Ad(),zs=Ga(),P1=B(),Ts=bs(),ic=vs(),gf=X(),Rx=Yw(),z1=Ix(),Mx=(t,e)=>new RegExp(t,e);Mx.code="new RegExp";var T1=["removeAdditional","useDefaults","coerceTypes"],C1=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),O1={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."},I1={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Dx=200;function R1(t){var e,r,n,o,s,i,a,c,u,l,d,p,m,f,h,g,y,v,x,S,E,C,A,re,F;let ie=t.strict,$e=(e=t.code)===null||e===void 0?void 0:e.optimize,be=$e===!0||$e===void 0?1:$e||0,Ce=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Mx,We=(o=t.uriResolver)!==null&&o!==void 0?o:z1.default;return{strictSchema:(i=(s=t.strictSchema)!==null&&s!==void 0?s:ie)!==null&&i!==void 0?i:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:ie)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:ie)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=t.strictTuples)!==null&&d!==void 0?d:ie)!==null&&p!==void 0?p:"log",strictRequired:(f=(m=t.strictRequired)!==null&&m!==void 0?m:ie)!==null&&f!==void 0?f:!1,code:t.code?{...t.code,optimize:be,regExp:Ce}:{optimize:be,regExp:Ce},loopRequired:(h=t.loopRequired)!==null&&h!==void 0?h:Dx,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:Dx,meta:(y=t.meta)!==null&&y!==void 0?y:!0,messages:(v=t.messages)!==null&&v!==void 0?v:!0,inlineRefs:(x=t.inlineRefs)!==null&&x!==void 0?x:!0,schemaId:(S=t.schemaId)!==null&&S!==void 0?S:"$id",addUsedSchema:(E=t.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(C=t.validateSchema)!==null&&C!==void 0?C:!0,validateFormats:(A=t.validateFormats)!==null&&A!==void 0?A:!0,unicodeRegExp:(re=t.unicodeRegExp)!==null&&re!==void 0?re:!0,int32range:(F=t.int32range)!==null&&F!==void 0?F:!0,uriResolver:We}}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,...R1(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new P1.ValueScope({scope:{},prefixes:C1,es5:r,lines:n}),this.logger=L1(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,k1.getRules)(),Ax.call(this,O1,e,"NOT SUPPORTED"),Ax.call(this,I1,e,"DEPRECATED","warn"),this._metaOpts=j1.call(this),e.formats&&A1.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&N1.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),D1.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,o=Rx;n==="id"&&(o={...Rx},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 jx.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,Ts.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=Nx.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,o=new zs.SchemaEnv({schema:{},schemaId:n});if(r=zs.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=Nx.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,Ts.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(F1.call(this,n,r),!r)return(0,gf.eachItem)(n,s=>hf.call(this,s)),this;U1.call(this,r);let o={...r,type:(0,ic.getJSONTypes)(r.type),schemaType:(0,ic.getJSONTypes)(r.schemaType)};return(0,gf.eachItem)(n,o.type.length===0?s=>hf.call(this,s,o):s=>o.type.forEach(i=>hf.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]=Lx(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,Ts.normalizeId)(i||n);let u=Ts.getSchemaRefs.call(this,e,n);return c=new zs.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):zs.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{zs.compileSchema.call(this,e)}finally{this.opts=r}}};Cs.ValidationError=E1.default;Cs.MissingRefError=jx.default;Ae.default=Cs;function Ax(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 Nx(t){return t=(0,Ts.normalizeId)(t),this.schemas[t]||this.refs[t]}function D1(){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 A1(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function N1(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 j1(){let t={...this.opts};for(let e of T1)delete t[e];return t}var M1={log(){},warn(){},error(){}};function L1(t){if(t===!1)return M1;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 Z1=/^[a-z_$][a-z0-9_$:-]*$/i;function F1(t,e){let{RULES:r}=this;if((0,gf.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Z1.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 hf(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,ic.getJSONTypes)(e.type),schemaType:(0,ic.getJSONTypes)(e.schemaType)}};e.before?q1.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 q1(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 U1(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=Lx(e)),t.validateSchema=this.compile(e,!0))}var V1={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Lx(t){return{anyOf:[t,V1]}}});var Fx=$(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var B1={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};yf.default=B1});var Bx=$(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.callRef=an.getValidate=void 0;var H1=$s(),qx=ht(),et=B(),Wn=tr(),Ux=Ga(),ac=X(),W1={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=Ux.resolveRef.call(c,u,o,r);if(l===void 0)throw new H1.default(n.opts.uriResolver,o,r);if(l instanceof Ux.SchemaEnv)return p(l);return m(l);function d(){if(s===u)return cc(t,i,s,s.$async);let f=e.scopeValue("root",{ref:u});return cc(t,(0,et._)`${f}.validate`,u,u.$async)}function p(f){let h=Vx(t,f);cc(t,h,f,f.$async)}function m(f){let h=e.scopeValue("schema",a.code.source===!0?{ref:f,code:(0,et.stringify)(f)}:{ref:f}),g=e.name("valid"),y=t.subschema({schema:f,dataTypes:[],schemaPath:et.nil,topSchemaRef:h,errSchemaPath:r},g);t.mergeEvaluated(y),t.ok(g)}}};function Vx(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,et._)`${r.scopeValue("wrapper",{ref:e})}.validate`}an.getValidate=Vx;function cc(t,e,r,n){let{gen:o,it:s}=t,{allErrors:i,schemaEnv:a,opts:c}=s,u=c.passContext?Wn.default.this:et.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,et._)`await ${(0,qx.callValidateCode)(t,e,u)}`),m(e),i||o.assign(f,!0)},h=>{o.if((0,et._)`!(${h} instanceof ${s.ValidationError})`,()=>o.throw(h)),p(h),i||o.assign(f,!1)}),t.ok(f)}function d(){t.result((0,qx.callValidateCode)(t,e,u),()=>m(e),()=>p(e))}function p(f){let h=(0,et._)`${f}.errors`;o.assign(Wn.default.vErrors,(0,et._)`${Wn.default.vErrors} === null ? ${h} : ${Wn.default.vErrors}.concat(${h})`),o.assign(Wn.default.errors,(0,et._)`${Wn.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=ac.mergeEvaluated.props(o,g.props,s.props));else{let y=o.var("props",(0,et._)`${f}.evaluated.props`);s.props=ac.mergeEvaluated.props(o,y,s.props,et.Name)}if(s.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(s.items=ac.mergeEvaluated.items(o,g.items,s.items));else{let y=o.var("items",(0,et._)`${f}.evaluated.items`);s.items=ac.mergeEvaluated.items(o,y,s.items,et.Name)}}}an.callRef=cc;an.default=W1});var Hx=$(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var G1=Fx(),J1=Bx(),K1=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",G1.default,J1.default];_f.default=K1});var Wx=$(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var uc=B(),xr=uc.operators,lc={maximum:{okStr:"<=",ok:xr.LTE,fail:xr.GT},minimum:{okStr:">=",ok:xr.GTE,fail:xr.LT},exclusiveMaximum:{okStr:"<",ok:xr.LT,fail:xr.GTE},exclusiveMinimum:{okStr:">",ok:xr.GT,fail:xr.LTE}},Y1={message:({keyword:t,schemaCode:e})=>(0,uc.str)`must be ${lc[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,uc._)`{comparison: ${lc[t].okStr}, limit: ${e}}`},X1={keyword:Object.keys(lc),type:"number",schemaType:"number",$data:!0,error:Y1,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,uc._)`${r} ${lc[e].fail} ${n} || isNaN(${r})`)}};vf.default=X1});var Gx=$(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var Os=B(),Q1={message:({schemaCode:t})=>(0,Os.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Os._)`{multipleOf: ${t}}`},ej={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Q1,code(t){let{gen:e,data:r,schemaCode:n,it:o}=t,s=o.opts.multipleOfPrecision,i=e.let("res"),a=s?(0,Os._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,Os._)`${i} !== parseInt(${i})`;t.fail$data((0,Os._)`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};bf.default=ej});var Kx=$(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});function Jx(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}wf.default=Jx;Jx.code='require("ajv/dist/runtime/ucs2length").default'});var Yx=$(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var cn=B(),tj=X(),rj=Kx(),nj={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,cn.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,cn._)`{limit: ${t}}`},oj={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:nj,code(t){let{keyword:e,data:r,schemaCode:n,it:o}=t,s=e==="maxLength"?cn.operators.GT:cn.operators.LT,i=o.opts.unicode===!1?(0,cn._)`${r}.length`:(0,cn._)`${(0,tj.useFunc)(t.gen,rj.default)}(${r})`;t.fail$data((0,cn._)`${i} ${s} ${n}`)}};xf.default=oj});var Xx=$(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var sj=ht(),ij=X(),Gn=B(),aj={message:({schemaCode:t})=>(0,Gn.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Gn._)`{pattern: ${t}}`},cj={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:aj,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,Gn._)`new RegExp`:(0,ij.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,Gn._)`${u}(${s}, ${a}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,Gn._)`!${l}`)}else{let c=(0,sj.usePattern)(t,o);t.fail$data((0,Gn._)`!${c}.test(${r})`)}}};Sf.default=cj});var Qx=$($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var Is=B(),uj={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Is.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Is._)`{limit: ${t}}`},lj={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:uj,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxProperties"?Is.operators.GT:Is.operators.LT;t.fail$data((0,Is._)`Object.keys(${r}).length ${o} ${n}`)}};$f.default=lj});var e0=$(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});var Rs=ht(),Ds=B(),dj=X(),fj={message:({params:{missingProperty:t}})=>(0,Ds.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Ds._)`{missingProperty: ${t}}`},pj={keyword:"required",type:"object",schemaType:"array",$data:!0,error:fj,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,y=`required property "${h}" is not defined at "${g}" (strictRequired)`;(0,dj.checkStrictMode)(i,y,i.opts.strictRequired)}}function u(){if(c||s)t.block$data(Ds.nil,d);else for(let m of r)(0,Rs.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,Rs.checkMissingProp)(t,r,m)),(0,Rs.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Rs.noPropertyInData)(e,o,m,a.ownProperties),()=>t.error())})}function p(m,f){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(f,(0,Rs.propertyInData)(e,o,m,a.ownProperties)),e.if((0,Ds.not)(f),()=>{t.error(),e.break()})},Ds.nil)}}};Ef.default=pj});var t0=$(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var As=B(),mj={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,As.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,As._)`{limit: ${t}}`},hj={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:mj,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxItems"?As.operators.GT:As.operators.LT;t.fail$data((0,As._)`${r}.length ${o} ${n}`)}};kf.default=hj});var dc=$(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});var r0=Ud();r0.code='require("ajv/dist/runtime/equal").default';Pf.default=r0});var n0=$(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var zf=vs(),Ne=B(),gj=X(),yj=dc(),_j={message:({params:{i:t,j:e}})=>(0,Ne.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ne._)`{i: ${t}, j: ${e}}`},vj={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:_j,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,zf.getSchemaTypes)(s.items):[];t.block$data(c,l,(0,Ne._)`${i} === false`),t.ok(c);function l(){let f=e.let("i",(0,Ne._)`${r}.length`),h=e.let("j");t.setParams({i:f,j:h}),e.assign(c,!0),e.if((0,Ne._)`${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,zf.checkDataTypes)(u,g,a.opts.strictNumbers,zf.DataType.Wrong),v=e.const("indices",(0,Ne._)`{}`);e.for((0,Ne._)`;${f}--;`,()=>{e.let(g,(0,Ne._)`${r}[${f}]`),e.if(y,(0,Ne._)`continue`),u.length>1&&e.if((0,Ne._)`typeof ${g} == "string"`,(0,Ne._)`${g} += "_"`),e.if((0,Ne._)`typeof ${v}[${g}] == "number"`,()=>{e.assign(h,(0,Ne._)`${v}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Ne._)`${v}[${g}] = ${f}`)})}function m(f,h){let g=(0,gj.useFunc)(e,yj.default),y=e.name("outer");e.label(y).for((0,Ne._)`;${f}--;`,()=>e.for((0,Ne._)`${h} = ${f}; ${h}--;`,()=>e.if((0,Ne._)`${g}(${r}[${f}], ${r}[${h}])`,()=>{t.error(),e.assign(c,!1).break(y)})))}}};Tf.default=vj});var o0=$(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var Cf=B(),bj=X(),wj=dc(),xj={message:"must be equal to constant",params:({schemaCode:t})=>(0,Cf._)`{allowedValue: ${t}}`},Sj={keyword:"const",$data:!0,error:xj,code(t){let{gen:e,data:r,$data:n,schemaCode:o,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,Cf._)`!${(0,bj.useFunc)(e,wj.default)}(${r}, ${o})`):t.fail((0,Cf._)`${s} !== ${r}`)}};Of.default=Sj});var s0=$(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var Ns=B(),$j=X(),Ej=dc(),kj={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Ns._)`{allowedValues: ${t}}`},Pj={keyword:"enum",schemaType:"array",$data:!0,error:kj,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,$j.useFunc)(e,Ej.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,Ns.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,Ns._)`${u()}(${r}, ${m})`,()=>e.assign(l,!0).break()))}function p(m,f){let h=o[f];return typeof h=="object"&&h!==null?(0,Ns._)`${u()}(${r}, ${m}[${f}])`:(0,Ns._)`${r} === ${h}`}}};If.default=Pj});var i0=$(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});var zj=Wx(),Tj=Gx(),Cj=Yx(),Oj=Xx(),Ij=Qx(),Rj=e0(),Dj=t0(),Aj=n0(),Nj=o0(),jj=s0(),Mj=[zj.default,Tj.default,Cj.default,Oj.default,Ij.default,Rj.default,Dj.default,Aj.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Nj.default,jj.default];Rf.default=Mj});var Af=$(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.validateAdditionalItems=void 0;var un=B(),Df=X(),Lj={message:({params:{len:t}})=>(0,un.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,un._)`{limit: ${t}}`},Zj={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Lj,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Df.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}a0(t,n)}};function a0(t,e){let{gen:r,schema:n,data:o,keyword:s,it:i}=t;i.items=!0;let a=r.const("len",(0,un._)`${o}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,un._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,Df.alwaysValidSchema)(i,n)){let u=r.var("valid",(0,un._)`${a} <= ${e.length}`);r.if((0,un.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,a,l=>{t.subschema({keyword:s,dataProp:l,dataPropType:Df.Type.Num},u),i.allErrors||r.if((0,un.not)(u),()=>r.break())})}}js.validateAdditionalItems=a0;js.default=Zj});var Nf=$(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.validateTuple=void 0;var c0=B(),fc=X(),Fj=ht(),qj={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return u0(t,"additionalItems",e);r.items=!0,!(0,fc.alwaysValidSchema)(r,e)&&t.ok((0,Fj.validateArray)(t))}};function u0(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=fc.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,c0._)`${s}.length`);r.forEach((d,p)=>{(0,fc.alwaysValidSchema)(a,d)||(n.if((0,c0._)`${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,fc.checkStrictMode)(a,g,p.strictTuples)}}}Ms.validateTuple=u0;Ms.default=qj});var l0=$(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var Uj=Nf(),Vj={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Uj.validateTuple)(t,"items")};jf.default=Vj});var f0=$(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});var d0=B(),Bj=X(),Hj=ht(),Wj=Af(),Gj={message:({params:{len:t}})=>(0,d0.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,d0._)`{limit: ${t}}`},Jj={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Gj,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:o}=r;n.items=!0,!(0,Bj.alwaysValidSchema)(n,e)&&(o?(0,Wj.validateAdditionalItems)(t,o):t.ok((0,Hj.validateArray)(t)))}};Mf.default=Jj});var p0=$(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var yt=B(),pc=X(),Kj={message:({params:{min:t,max:e}})=>e===void 0?(0,yt.str)`must contain at least ${t} valid item(s)`:(0,yt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,yt._)`{minContains: ${t}}`:(0,yt._)`{minContains: ${t}, maxContains: ${e}}`},Yj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Kj,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,yt._)`${o}.length`);if(t.setParams({min:i,max:a}),a===void 0&&i===0){(0,pc.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,pc.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,pc.alwaysValidSchema)(s,r)){let h=(0,yt._)`${l} >= ${i}`;a!==void 0&&(h=(0,yt._)`${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,yt._)`${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,y=>{t.subschema({keyword:"contains",dataProp:y,dataPropType:pc.Type.Num,compositeRule:!0},h),g()})}function f(h){e.code((0,yt._)`${h}++`),a===void 0?e.if((0,yt._)`${h} >= ${i}`,()=>e.assign(d,!0).break()):(e.if((0,yt._)`${h} > ${a}`,()=>e.assign(d,!1).break()),i===1?e.assign(d,!0):e.if((0,yt._)`${h} >= ${i}`,()=>e.assign(d,!0)))}}};Lf.default=Yj});var g0=$(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.validateSchemaDeps=Mt.validatePropertyDeps=Mt.error=void 0;var Zf=B(),Xj=X(),Ls=ht();Mt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Zf.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Zf._)`{property: ${t},
|
|
29
|
-
missingProperty: ${
|
|
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 Qj={keyword:"dependencies",type:"object",schemaType:"object",error:Mt.error,code(t){let[e,r]=eM(t);m0(t,e),h0(t,r)}};function eM({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 m0(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,Ls.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,Ls.checkReportMissingProp)(t,u)}):(r.if((0,Zf._)`${c} && (${(0,Ls.checkMissingProp)(t,a,s)})`),(0,Ls.reportMissingProp)(t,s),r.else())}}Mt.validatePropertyDeps=m0;function h0(t,e=t.schema){let{gen:r,data:n,keyword:o,it:s}=t,i=r.name("valid");for(let a in e)(0,Xj.alwaysValidSchema)(s,e[a])||(r.if((0,Ls.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))}Mt.validateSchemaDeps=h0;Mt.default=Qj});var _0=$(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var y0=B(),tM=X(),rM={message:"property name must be valid",params:({params:t})=>(0,y0._)`{propertyName: ${t.propertyName}}`},nM={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:rM,code(t){let{gen:e,schema:r,data:n,it:o}=t;if((0,tM.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,y0.not)(s),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(s)}};Ff.default=nM});var Uf=$(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var mc=ht(),It=B(),oM=tr(),hc=X(),sM={message:"must NOT have additional properties",params:({params:t})=>(0,It._)`{additionalProperty: ${t.additionalProperty}}`},iM={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:sM,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,hc.alwaysValidSchema)(i,r))return;let u=(0,mc.allSchemaProperties)(n.properties),l=(0,mc.allSchemaProperties)(n.patternProperties);d(),t.ok((0,It._)`${s} === ${oM.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 y;if(u.length>8){let v=(0,hc.schemaRefOrVal)(i,n.properties,"properties");y=(0,mc.isOwnProperty)(e,v,g)}else u.length?y=(0,It.or)(...u.map(v=>(0,It._)`${g} === ${v}`)):y=It.nil;return l.length&&(y=(0,It.or)(y,...l.map(v=>(0,It._)`${(0,mc.usePattern)(t,v)}.test(${g})`))),(0,It.not)(y)}function m(g){e.code((0,It._)`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,hc.alwaysValidSchema)(i,r)){let y=e.name("valid");c.removeAdditional==="failing"?(h(g,y,!1),e.if((0,It.not)(y),()=>{t.reset(),m(g)})):(h(g,y),a||e.if((0,It.not)(y),()=>e.break()))}}function h(g,y,v){let x={keyword:"additionalProperties",dataProp:g,dataPropType:hc.Type.Str};v===!1&&Object.assign(x,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(x,y)}}};qf.default=iM});var w0=$(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});var aM=Ss(),v0=ht(),Vf=X(),b0=Uf(),cM={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&&b0.default.code(new aM.KeywordCxt(s,b0.default,"additionalProperties"));let i=(0,v0.allSchemaProperties)(r);for(let d of i)s.definedProperties.add(d);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=Vf.mergeEvaluated.props(e,(0,Vf.toHash)(i),s.props));let a=i.filter(d=>!(0,Vf.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,v0.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)}}};Bf.default=cM});var E0=$(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var x0=ht(),gc=B(),S0=X(),$0=X(),uM={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,x0.allSchemaProperties)(r),c=a.filter(h=>(0,S0.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 gc.Name)&&(s.props=(0,$0.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,S0.checkStrictMode)(s,`property ${g} matches pattern ${h} (use allowMatchingProperties)`)}function f(h){e.forIn("key",n,g=>{e.if((0,gc._)`${(0,x0.usePattern)(t,h)}.test(${g})`,()=>{let y=c.includes(h);y||t.subschema({keyword:"patternProperties",schemaProp:h,dataProp:g,dataPropType:$0.Type.Str},l),s.opts.unevaluated&&d!==!0?e.assign((0,gc._)`${d}[${g}]`,!0):!y&&!s.allErrors&&e.if((0,gc.not)(l),()=>e.break())})})}}};Hf.default=uM});var k0=$(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var lM=X(),dM={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,lM.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"}};Wf.default=dM});var P0=$(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});var fM=ht(),pM={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fM.validateUnion,error:{message:"must match a schema in anyOf"}};Gf.default=pM});var z0=$(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});var yc=B(),mM=X(),hM={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,yc._)`{passingSchemas: ${t.passing}}`},gM={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:hM,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,mM.alwaysValidSchema)(o,l)?e.var(c,!0):p=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,yc._)`${c} && ${i}`).assign(i,!1).assign(a,(0,yc._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(i,!0),e.assign(a,d),p&&t.mergeEvaluated(p,yc.Name)})})}}};Jf.default=gM});var T0=$(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var yM=X(),_M={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,yM.alwaysValidSchema)(n,s))return;let a=t.subschema({keyword:"allOf",schemaProp:i},o);t.ok(o),t.mergeEvaluated(a)})}};Kf.default=_M});var I0=$(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var _c=B(),O0=X(),vM={message:({params:t})=>(0,_c.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,_c._)`{failingKeyword: ${t.ifClause}}`},bM={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:vM,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,O0.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=C0(n,"then"),s=C0(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,_c.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,_c._)`${l}`):t.setParams({ifClause:l})}}}};function C0(t,e){let r=t.schema[e];return r!==void 0&&!(0,O0.alwaysValidSchema)(t,r)}Yf.default=bM});var R0=$(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var wM=X(),xM={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,wM.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Xf.default=xM});var D0=$(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var SM=Af(),$M=l0(),EM=Nf(),kM=f0(),PM=p0(),zM=g0(),TM=_0(),CM=Uf(),OM=w0(),IM=E0(),RM=k0(),DM=P0(),AM=z0(),NM=T0(),jM=I0(),MM=R0();function LM(t=!1){let e=[RM.default,DM.default,AM.default,NM.default,jM.default,MM.default,TM.default,CM.default,zM.default,OM.default,IM.default];return t?e.push($M.default,kM.default):e.push(SM.default,EM.default),e.push(PM.default),e}Qf.default=LM});var A0=$(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var Pe=B(),ZM={message:({schemaCode:t})=>(0,Pe.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Pe._)`{format: ${t}}`},FM={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:ZM,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,Pe._)`${f}[${i}]`),g=r.let("fType"),y=r.let("format");r.if((0,Pe._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>r.assign(g,(0,Pe._)`${h}.type || "string"`).assign(y,(0,Pe._)`${h}.validate`),()=>r.assign(g,(0,Pe._)`"string"`).assign(y,h)),t.fail$data((0,Pe.or)(v(),x()));function v(){return c.strictSchema===!1?Pe.nil:(0,Pe._)`${i} && !${y}`}function x(){let S=l.$async?(0,Pe._)`(${h}.async ? await ${y}(${n}) : ${y}(${n}))`:(0,Pe._)`${y}(${n})`,E=(0,Pe._)`(typeof ${y} == "function" ? ${S} : ${y}.test(${n}))`;return(0,Pe._)`${y} && ${y} !== true && ${g} === ${e} && !${E}`}}function m(){let f=d.formats[s];if(!f){v();return}if(f===!0)return;let[h,g,y]=x(f);h===e&&t.pass(S());function v(){if(c.strictSchema===!1){d.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${s}" ignored in schema at path "${u}"`}}function x(E){let C=E instanceof RegExp?(0,Pe.regexpCode)(E):c.code.formats?(0,Pe._)`${c.code.formats}${(0,Pe.getProperty)(s)}`:void 0,A=r.scopeValue("formats",{key:s,ref:E,code:C});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,Pe._)`${A}.validate`]:["string",E,A]}function S(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Pe._)`await ${y}(${n})`}return typeof g=="function"?(0,Pe._)`${y}(${n})`:(0,Pe._)`${y}.test(${n})`}}}};ep.default=FM});var N0=$(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var qM=A0(),UM=[qM.default];tp.default=UM});var j0=$(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.contentVocabulary=Jn.metadataVocabulary=void 0;Jn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Jn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var L0=$(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var VM=Hx(),BM=i0(),HM=D0(),WM=N0(),M0=j0(),GM=[VM.default,BM.default,(0,HM.default)(),WM.default,M0.metadataVocabulary,M0.contentVocabulary];rp.default=GM});var F0=$(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.DiscrError=void 0;var Z0;(function(t){t.Tag="tag",t.Mapping="mapping"})(Z0||(vc.DiscrError=Z0={}))});var U0=$(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});var Kn=B(),np=F0(),q0=Ga(),JM=$s(),KM=X(),YM={message:({params:{discrError:t,tagName:e}})=>t===np.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Kn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},XM={keyword:"discriminator",type:"object",schemaType:"object",error:YM,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,Kn._)`${r}${(0,Kn.getProperty)(a)}`);e.if((0,Kn._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:np.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,Kn._)`${u} === ${f}`),e.assign(c,d(m[f]));e.else(),t.error(!1,{discrError:np.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,Kn.Name),f}function p(){var m;let f={},h=y(o),g=!0;for(let S=0;S<i.length;S++){let E=i[S];if(E?.$ref&&!(0,KM.schemaHasRulesButRef)(E,s.self.RULES)){let A=E.$ref;if(E=q0.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,A),E instanceof q0.SchemaEnv&&(E=E.schema),E===void 0)throw new JM.default(s.opts.uriResolver,s.baseId,A)}let C=(m=E?.properties)===null||m===void 0?void 0:m[a];if(typeof C!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);g=g&&(h||y(E)),v(C,S)}if(!g)throw new Error(`discriminator: "${a}" must be required`);return f;function y({required:S}){return Array.isArray(S)&&S.includes(a)}function v(S,E){if(S.const)x(S.const,E);else if(S.enum)for(let C of S.enum)x(C,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function x(S,E){if(typeof S!="string"||S in f)throw new Error(`discriminator: "${a}" values must be unique strings`);f[S]=E}}}};op.default=XM});var V0=$((KH,QM)=>{QM.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 ip=$((he,sp)=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.MissingRefError=he.ValidationError=he.CodeGen=he.Name=he.nil=he.stringify=he.str=he._=he.KeywordCxt=he.Ajv=void 0;var eL=Zx(),tL=L0(),rL=U0(),B0=V0(),nL=["/properties"],bc="http://json-schema.org/draft-07/schema",Yn=class extends eL.default{_addVocabularies(){super._addVocabularies(),tL.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(rL.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(B0,nL):B0;this.addMetaSchema(e,bc,!1),this.refs["http://json-schema.org/schema"]=bc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(bc)?bc:void 0)}};he.Ajv=Yn;sp.exports=he=Yn;sp.exports.Ajv=Yn;Object.defineProperty(he,"__esModule",{value:!0});he.default=Yn;var oL=Ss();Object.defineProperty(he,"KeywordCxt",{enumerable:!0,get:function(){return oL.KeywordCxt}});var Xn=B();Object.defineProperty(he,"_",{enumerable:!0,get:function(){return Xn._}});Object.defineProperty(he,"str",{enumerable:!0,get:function(){return Xn.str}});Object.defineProperty(he,"stringify",{enumerable:!0,get:function(){return Xn.stringify}});Object.defineProperty(he,"nil",{enumerable:!0,get:function(){return Xn.nil}});Object.defineProperty(he,"Name",{enumerable:!0,get:function(){return Xn.Name}});Object.defineProperty(he,"CodeGen",{enumerable:!0,get:function(){return Xn.CodeGen}});var sL=Ha();Object.defineProperty(he,"ValidationError",{enumerable:!0,get:function(){return sL.default}});var iL=$s();Object.defineProperty(he,"MissingRefError",{enumerable:!0,get:function(){return iL.default}})});var Q0=$(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.formatNames=Zt.fastFormats=Zt.fullFormats=void 0;function Lt(t,e){return{validate:t,compare:e}}Zt.fullFormats={date:Lt(J0,lp),time:Lt(cp(!0),dp),"date-time":Lt(H0(!0),Y0),"iso-time":Lt(cp(),K0),"iso-date-time":Lt(H0(),X0),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:fL,"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:vL,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:pL,int32:{type:"number",validate:gL},int64:{type:"number",validate:yL},float:{type:"number",validate:G0},double:{type:"number",validate:G0},password:!0,binary:!0};Zt.fastFormats={...Zt.fullFormats,date:Lt(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,lp),time:Lt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,dp),"date-time":Lt(/^\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,Y0),"iso-time":Lt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,K0),"iso-date-time":Lt(/^\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,X0),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};Zt.formatNames=Object.keys(Zt.fullFormats);function aL(t){return t%4===0&&(t%100!==0||t%400===0)}var cL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,uL=[0,31,28,31,30,31,30,31,31,30,31,30,31];function J0(t){let e=cL.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&&aL(r)?29:uL[n])}function lp(t,e){if(t&&e)return t>e?1:t<e?-1:0}var ap=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function cp(t){return function(r){let n=ap.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 dp(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 K0(t,e){if(!(t&&e))return;let r=ap.exec(t),n=ap.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 up=/t|\s/i;function H0(t){let e=cp(t);return function(n){let o=n.split(up);return o.length===2&&J0(o[0])&&e(o[1])}}function Y0(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function X0(t,e){if(!(t&&e))return;let[r,n]=t.split(up),[o,s]=e.split(up),i=lp(r,o);if(i!==void 0)return i||dp(n,s)}var lL=/\/|:/,dL=/^(?:[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 fL(t){return lL.test(t)&&dL.test(t)}var W0=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function pL(t){return W0.lastIndex=0,W0.test(t)}var mL=-(2**31),hL=2**31-1;function gL(t){return Number.isInteger(t)&&t<=hL&&t>=mL}function yL(t){return Number.isInteger(t)}function G0(){return!0}var _L=/[^\\]\\Z/;function vL(t){if(_L.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var eS=$(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.formatLimitDefinition=void 0;var bL=ip(),Rt=B(),Sr=Rt.operators,wc={formatMaximum:{okStr:"<=",ok:Sr.LTE,fail:Sr.GT},formatMinimum:{okStr:">=",ok:Sr.GTE,fail:Sr.LT},formatExclusiveMaximum:{okStr:"<",ok:Sr.LT,fail:Sr.GTE},formatExclusiveMinimum:{okStr:">",ok:Sr.GT,fail:Sr.LTE}},wL={message:({keyword:t,schemaCode:e})=>(0,Rt.str)`should be ${wc[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Rt._)`{comparison: ${wc[t].okStr}, limit: ${e}}`};Qn.formatLimitDefinition={keyword:Object.keys(wc),type:"string",schemaType:"string",$data:!0,error:wL,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 bL.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,Rt._)`${p}[${c.schemaCode}]`);t.fail$data((0,Rt.or)((0,Rt._)`typeof ${m} != "object"`,(0,Rt._)`${m} instanceof RegExp`,(0,Rt._)`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,Rt._)`${i.code.formats}${(0,Rt.getProperty)(p)}`:void 0});t.fail$data(d(f))}function d(p){return(0,Rt._)`${p}.compare(${r}, ${n}) ${wc[o].fail} 0`}},dependencies:["format"]};var xL=t=>(t.addKeyword(Qn.formatLimitDefinition),t);Qn.default=xL});var oS=$((Zs,nS)=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});var eo=Q0(),SL=eS(),fp=B(),tS=new fp.Name("fullFormats"),$L=new fp.Name("fastFormats"),pp=(t,e={keywords:!0})=>{if(Array.isArray(e))return rS(t,e,eo.fullFormats,tS),t;let[r,n]=e.mode==="fast"?[eo.fastFormats,$L]:[eo.fullFormats,tS],o=e.formats||eo.formatNames;return rS(t,o,r,n),e.keywords&&(0,SL.default)(t),t};pp.get=(t,e="full")=>{let n=(e==="fast"?eo.fastFormats:eo.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function rS(t,e,r,n){var o,s;(o=(s=t.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,fp._)`require("ajv-formats/dist/formats").${n}`);for(let i of e)t.addFormat(i,r[i])}nS.exports=Zs=pp;Object.defineProperty(Zs,"__esModule",{value:!0});Zs.default=pp});var ne;(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})(ne||(ne={}));var Dc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Dc||(Dc={}));var P=ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nr=t=>{switch(typeof t){case"undefined":return P.undefined;case"string":return P.string;case"number":return isNaN(t)?P.nan:P.number;case"boolean":return P.boolean;case"function":return P.function;case"bigint":return P.bigint;case"symbol":return P.symbol;case"object":return Array.isArray(t)?P.array:t===null?P.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?P.promise:typeof Map<"u"&&t instanceof Map?P.map:typeof Set<"u"&&t instanceof Set?P.set:typeof Date<"u"&&t instanceof Date?P.date:P.object;default:return P.unknown}},k=ne.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"]),vS=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),tt=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,ne.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()}};tt.create=t=>new tt(t);var ho=(t,e)=>{let r;switch(t.code){case k.invalid_type:t.received===P.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case k.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ne.jsonStringifyReplacer)}`;break;case k.unrecognized_keys:r=`Unrecognized key(s) in object: ${ne.joinValues(t.keys,", ")}`;break;case k.invalid_union:r="Invalid input";break;case k.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ne.joinValues(t.options)}`;break;case k.invalid_enum_value:r=`Invalid enum value. Expected ${ne.joinValues(t.options)}, received '${t.received}'`;break;case k.invalid_arguments:r="Invalid function arguments";break;case k.invalid_return_type:r="Invalid function return type";break;case k.invalid_date:r="Invalid date";break;case k.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}"`:ne.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case k.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 k.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 k.custom:r="Invalid input";break;case k.invalid_intersection_types:r="Intersection results could not be merged";break;case k.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case k.not_finite:r="Number must be finite";break;default:r=e.defaultError,ne.assertNever(t)}return{message:r}},wp=ho;function bS(t){wp=t}function Bs(){return wp}var Hs=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}},wS=[];function T(t,e){let r=Hs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Bs(),ho].filter(n=>!!n)});t.common.issues.push(r)}var je=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 L;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 L;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}}},L=Object.freeze({status:"aborted"}),xp=t=>({status:"dirty",value:t}),qe=t=>({status:"valid",value:t}),Ac=t=>t.status==="aborted",Nc=t=>t.status==="dirty",go=t=>t.status==="valid",Ws=t=>typeof Promise<"u"&&t instanceof Promise,R;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(R||(R={}));var ct=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}},vp=(t,e)=>{if(go(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 tt(t.common.issues);return this._error=r,this._error}}};function q(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 U=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 nr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:nr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new je,ctx:{common:e.parent.common,data:e.data,parsedType:nr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Ws(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:nr(e)},s=this._parseSync({data:e,path:o.path,parent:o});return vp(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:nr(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(Ws(o)?o:Promise.resolve(o));return vp(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:k.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 rt({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return vt.create(this,this._def)}nullable(){return Ut.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qt.create(this,this._def)}promise(){return ir.create(this,this._def)}or(e){return Ir.create([this,e],this._def)}and(e){return Rr.create(this,e,this._def)}transform(e){return new rt({...q(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Mr({...q(this._def),innerType:this,defaultValue:r,typeName:N.ZodDefault})}brand(){return new Ys({typeName:N.ZodBranded,type:this,...q(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new hn({...q(this._def),innerType:this,catchValue:r,typeName:N.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return yo.create(this,e)}readonly(){return yn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},xS=/^c[^\s-]{8,}$/i,SS=/^[a-z][a-z0-9]*$/,$S=/^[0-9A-HJKMNP-TV-Z]{26}$/,ES=/^[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,kS=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,PS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Rc,zS=/^(((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}))$/,TS=/^(([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})))$/,CS=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 OS(t,e){return!!((e==="v4"||!e)&&zS.test(t)||(e==="v6"||!e)&&TS.test(t))}var or=class t extends U{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==P.string){let s=this._getOrReturnCtx(e);return T(s,{code:k.invalid_type,expected:P.string,received:s.parsedType}),L}let n=new je,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:k.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:k.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:k.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&T(o,{code:k.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")kS.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"email",code:k.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Rc||(Rc=new RegExp(PS,"u")),Rc.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"emoji",code:k.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")ES.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"uuid",code:k.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")xS.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"cuid",code:k.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")SS.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"cuid2",code:k.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")$S.test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"ulid",code:k.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:k.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:k.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:k.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:k.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:k.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?CS(s).test(e.data)||(o=this._getOrReturnCtx(e,o),T(o,{code:k.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="ip"?OS(e.data,s.version)||(o=this._getOrReturnCtx(e,o),T(o,{validation:"ip",code:k.invalid_string,message:s.message}),n.dirty()):ne.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:k.invalid_string,...R.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...R.errToObj(e)})}url(e){return this._addCheck({kind:"url",...R.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...R.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...R.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...R.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...R.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...R.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...R.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,...R.errToObj(e?.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...R.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...R.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...R.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...R.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...R.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...R.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...R.errToObj(r)})}nonempty(e){return this.min(1,R.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get 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}};or.create=t=>{var e;return new or({checks:[],typeName:N.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...q(t)})};function IS(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 kr=class t extends U{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)!==P.number){let s=this._getOrReturnCtx(e);return T(s,{code:k.invalid_type,expected:P.number,received:s.parsedType}),L}let n,o=new je;for(let s of this._def.checks)s.kind==="int"?ne.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),T(n,{code:k.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:k.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:k.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?IS(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),T(n,{code:k.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:k.not_finite,message:s.message}),o.dirty()):ne.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,R.toString(r))}gt(e,r){return this.setLimit("min",e,!1,R.toString(r))}lte(e,r){return this.setLimit("max",e,!0,R.toString(r))}lt(e,r){return this.setLimit("max",e,!1,R.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:R.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:R.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:R.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:R.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:R.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:R.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:R.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:R.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ne.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)}};kr.create=t=>new kr({checks:[],typeName:N.ZodNumber,coerce:t?.coerce||!1,...q(t)});var Pr=class t extends U{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)!==P.bigint){let s=this._getOrReturnCtx(e);return T(s,{code:k.invalid_type,expected:P.bigint,received:s.parsedType}),L}let n,o=new je;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:k.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:k.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:k.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):ne.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,R.toString(r))}gt(e,r){return this.setLimit("min",e,!1,R.toString(r))}lte(e,r){return this.setLimit("max",e,!0,R.toString(r))}lt(e,r){return this.setLimit("max",e,!1,R.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:R.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:R.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:R.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:R.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Pr.create=t=>{var e;return new Pr({checks:[],typeName:N.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...q(t)})};var zr=class extends U{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==P.boolean){let n=this._getOrReturnCtx(e);return T(n,{code:k.invalid_type,expected:P.boolean,received:n.parsedType}),L}return qe(e.data)}};zr.create=t=>new zr({typeName:N.ZodBoolean,coerce:t?.coerce||!1,...q(t)});var Tr=class t extends U{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==P.date){let s=this._getOrReturnCtx(e);return T(s,{code:k.invalid_type,expected:P.date,received:s.parsedType}),L}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return T(s,{code:k.invalid_date}),L}let n=new je,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),T(o,{code:k.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:k.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):ne.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:R.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:R.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Tr.create=t=>new Tr({checks:[],coerce:t?.coerce||!1,typeName:N.ZodDate,...q(t)});var dn=class extends U{_parse(e){if(this._getType(e)!==P.symbol){let n=this._getOrReturnCtx(e);return T(n,{code:k.invalid_type,expected:P.symbol,received:n.parsedType}),L}return qe(e.data)}};dn.create=t=>new dn({typeName:N.ZodSymbol,...q(t)});var Cr=class extends U{_parse(e){if(this._getType(e)!==P.undefined){let n=this._getOrReturnCtx(e);return T(n,{code:k.invalid_type,expected:P.undefined,received:n.parsedType}),L}return qe(e.data)}};Cr.create=t=>new Cr({typeName:N.ZodUndefined,...q(t)});var Or=class extends U{_parse(e){if(this._getType(e)!==P.null){let n=this._getOrReturnCtx(e);return T(n,{code:k.invalid_type,expected:P.null,received:n.parsedType}),L}return qe(e.data)}};Or.create=t=>new Or({typeName:N.ZodNull,...q(t)});var sr=class extends U{constructor(){super(...arguments),this._any=!0}_parse(e){return qe(e.data)}};sr.create=t=>new sr({typeName:N.ZodAny,...q(t)});var Ft=class extends U{constructor(){super(...arguments),this._unknown=!0}_parse(e){return qe(e.data)}};Ft.create=t=>new Ft({typeName:N.ZodUnknown,...q(t)});var bt=class extends U{_parse(e){let r=this._getOrReturnCtx(e);return T(r,{code:k.invalid_type,expected:P.never,received:r.parsedType}),L}};bt.create=t=>new bt({typeName:N.ZodNever,...q(t)});var fn=class extends U{_parse(e){if(this._getType(e)!==P.undefined){let n=this._getOrReturnCtx(e);return T(n,{code:k.invalid_type,expected:P.void,received:n.parsedType}),L}return qe(e.data)}};fn.create=t=>new fn({typeName:N.ZodVoid,...q(t)});var qt=class t extends U{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==P.array)return T(r,{code:k.invalid_type,expected:P.array,received:r.parsedType}),L;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?k.too_big:k.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:k.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:k.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 ct(r,i,r.path,a)))).then(i=>je.mergeArray(n,i));let s=[...r.data].map((i,a)=>o.type._parseSync(new ct(r,i,r.path,a)));return je.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:R.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:R.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:R.toString(r)}})}nonempty(e){return this.min(1,e)}};qt.create=(t,e)=>new qt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...q(e)});function ln(t){if(t instanceof Ge){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=vt.create(ln(n))}return new Ge({...t._def,shape:()=>e})}else return t instanceof qt?new qt({...t._def,type:ln(t.element)}):t instanceof vt?vt.create(ln(t.unwrap())):t instanceof Ut?Ut.create(ln(t.unwrap())):t instanceof Dt?Dt.create(t.items.map(e=>ln(e))):t}var Ge=class t extends U{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=ne.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==P.object){let u=this._getOrReturnCtx(e);return T(u,{code:k.invalid_type,expected:P.object,received:u.parsedType}),L}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof bt&&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 ct(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof bt){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:k.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 ct(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=>je.mergeObjectSync(n,u)):je.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return R.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=R.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:N.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return ne.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 ne.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return ln(this)}partial(e){let r={};return ne.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 ne.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof vt;)s=s._def.innerType;r[n]=s}}),new t({...this._def,shape:()=>r})}keyof(){return Sp(ne.objectKeys(this.shape))}};Ge.create=(t,e)=>new Ge({shape:()=>t,unknownKeys:"strip",catchall:bt.create(),typeName:N.ZodObject,...q(e)});Ge.strictCreate=(t,e)=>new Ge({shape:()=>t,unknownKeys:"strict",catchall:bt.create(),typeName:N.ZodObject,...q(e)});Ge.lazycreate=(t,e)=>new Ge({shape:t,unknownKeys:"strip",catchall:bt.create(),typeName:N.ZodObject,...q(e)});var Ir=class extends U{_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 tt(a.ctx.common.issues));return T(r,{code:k.invalid_union,unionErrors:i}),L}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 tt(c));return T(r,{code:k.invalid_union,unionErrors:a}),L}}get options(){return this._def.options}};Ir.create=(t,e)=>new Ir({options:t,typeName:N.ZodUnion,...q(e)});var Vs=t=>t instanceof Dr?Vs(t.schema):t instanceof rt?Vs(t.innerType()):t instanceof Ar?[t.value]:t instanceof Nr?t.options:t instanceof jr?Object.keys(t.enum):t instanceof Mr?Vs(t._def.innerType):t instanceof Cr?[void 0]:t instanceof Or?[null]:null,Gs=class t extends U{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.object)return T(r,{code:k.invalid_type,expected:P.object,received:r.parsedType}),L;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:k.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),L)}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=Vs(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:N.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...q(n)})}};function jc(t,e){let r=nr(t),n=nr(e);if(t===e)return{valid:!0,data:t};if(r===P.object&&n===P.object){let o=ne.objectKeys(e),s=ne.objectKeys(t).filter(a=>o.indexOf(a)!==-1),i={...t,...e};for(let a of s){let c=jc(t[a],e[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===P.array&&n===P.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=jc(i,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===P.date&&n===P.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Rr=class extends U{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,i)=>{if(Ac(s)||Ac(i))return L;let a=jc(s.value,i.value);return a.valid?((Nc(s)||Nc(i))&&r.dirty(),{status:r.value,value:a.data}):(T(n,{code:k.invalid_intersection_types}),L)};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}))}};Rr.create=(t,e,r)=>new Rr({left:t,right:e,typeName:N.ZodIntersection,...q(r)});var Dt=class t extends U{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.array)return T(n,{code:k.invalid_type,expected:P.array,received:n.parsedType}),L;if(n.data.length<this._def.items.length)return T(n,{code:k.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),L;!this._def.rest&&n.data.length>this._def.items.length&&(T(n,{code:k.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 ct(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>je.mergeArray(r,i)):je.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Dt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Dt({items:t,typeName:N.ZodTuple,rest:null,...q(e)})};var Js=class t extends U{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!==P.object)return T(n,{code:k.invalid_type,expected:P.object,received:n.parsedType}),L;let o=[],s=this._def.keyType,i=this._def.valueType;for(let a in n.data)o.push({key:s._parse(new ct(n,a,n.path,a)),value:i._parse(new ct(n,n.data[a],n.path,a))});return n.common.async?je.mergeObjectAsync(r,o):je.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof U?new t({keyType:e,valueType:r,typeName:N.ZodRecord,...q(n)}):new t({keyType:or.create(),valueType:e,typeName:N.ZodRecord,...q(r)})}},pn=class extends U{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!==P.map)return T(n,{code:k.invalid_type,expected:P.map,received:n.parsedType}),L;let o=this._def.keyType,s=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:o._parse(new ct(n,a,n.path,[u,"key"])),value:s._parse(new ct(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 L;(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 L;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};pn.create=(t,e,r)=>new pn({valueType:e,keyType:t,typeName:N.ZodMap,...q(r)});var mn=class t extends U{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.set)return T(n,{code:k.invalid_type,expected:P.set,received:n.parsedType}),L;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(T(n,{code:k.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:k.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 L;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 ct(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:R.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:R.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};mn.create=(t,e)=>new mn({valueType:t,minSize:null,maxSize:null,typeName:N.ZodSet,...q(e)});var Ks=class t extends U{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.function)return T(r,{code:k.invalid_type,expected:P.function,received:r.parsedType}),L;function n(a,c){return Hs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Bs(),ho].filter(u=>!!u),issueData:{code:k.invalid_arguments,argumentsError:c}})}function o(a,c){return Hs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Bs(),ho].filter(u=>!!u),issueData:{code:k.invalid_return_type,returnTypeError:c}})}let s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof ir){let a=this;return qe(async function(...c){let u=new tt([]),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 qe(function(...c){let u=a._def.args.safeParse(c,s);if(!u.success)throw new tt([n(c,u.error)]);let l=Reflect.apply(i,this,u.data),d=a._def.returns.safeParse(l,s);if(!d.success)throw new tt([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:Dt.create(e).rest(Ft.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||Dt.create([]).rest(Ft.create()),returns:r||Ft.create(),typeName:N.ZodFunction,...q(n)})}},Dr=class extends U{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})}};Dr.create=(t,e)=>new Dr({getter:t,typeName:N.ZodLazy,...q(e)});var Ar=class extends U{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return T(r,{received:r.data,code:k.invalid_literal,expected:this._def.value}),L}return{status:"valid",value:e.data}}get value(){return this._def.value}};Ar.create=(t,e)=>new Ar({value:t,typeName:N.ZodLiteral,...q(e)});function Sp(t,e){return new Nr({values:t,typeName:N.ZodEnum,...q(e)})}var Nr=class t extends U{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return T(r,{expected:ne.joinValues(n),received:r.parsedType,code:k.invalid_type}),L}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),n=this._def.values;return T(r,{received:r.data,code:k.invalid_enum_value,options:n}),L}return qe(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)))}};Nr.create=Sp;var jr=class extends U{_parse(e){let r=ne.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==P.string&&n.parsedType!==P.number){let o=ne.objectValues(r);return T(n,{expected:ne.joinValues(o),received:n.parsedType,code:k.invalid_type}),L}if(r.indexOf(e.data)===-1){let o=ne.objectValues(r);return T(n,{received:n.data,code:k.invalid_enum_value,options:o}),L}return qe(e.data)}get enum(){return this._def.values}};jr.create=(t,e)=>new jr({values:t,typeName:N.ZodNativeEnum,...q(e)});var ir=class extends U{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==P.promise&&r.common.async===!1)return T(r,{code:k.invalid_type,expected:P.promise,received:r.parsedType}),L;let n=r.parsedType===P.promise?r.data:Promise.resolve(r.data);return qe(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ir.create=(t,e)=>new ir({type:t,typeName:N.ZodPromise,...q(e)});var rt=class extends U{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.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"?L:(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"?L:(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(!go(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=>go(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:r.value,value:a})):i);ne.assertNever(o)}};rt.create=(t,e,r)=>new rt({schema:t,typeName:N.ZodEffects,effect:e,...q(r)});rt.createWithPreprocess=(t,e,r)=>new rt({schema:e,effect:{type:"preprocess",transform:t},typeName:N.ZodEffects,...q(r)});var vt=class extends U{_parse(e){return this._getType(e)===P.undefined?qe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};vt.create=(t,e)=>new vt({innerType:t,typeName:N.ZodOptional,...q(e)});var Ut=class extends U{_parse(e){return this._getType(e)===P.null?qe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ut.create=(t,e)=>new Ut({innerType:t,typeName:N.ZodNullable,...q(e)});var Mr=class extends U{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===P.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Mr.create=(t,e)=>new Mr({innerType:t,typeName:N.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...q(e)});var hn=class extends U{_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 Ws(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new tt(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new tt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};hn.create=(t,e)=>new hn({innerType:t,typeName:N.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...q(e)});var gn=class extends U{_parse(e){if(this._getType(e)!==P.nan){let n=this._getOrReturnCtx(e);return T(n,{code:k.invalid_type,expected:P.nan,received:n.parsedType}),L}return{status:"valid",value:e.data}}};gn.create=t=>new gn({typeName:N.ZodNaN,...q(t)});var RS=Symbol("zod_brand"),Ys=class extends U{_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}},yo=class t extends U{_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"?L:s.status==="dirty"?(r.dirty(),xp(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"?L: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:N.ZodPipeline})}},yn=class extends U{_parse(e){let r=this._def.innerType._parse(e);return go(r)&&(r.value=Object.freeze(r.value)),r}};yn.create=(t,e)=>new yn({innerType:t,typeName:N.ZodReadonly,...q(e)});var $p=(t,e={},r)=>t?sr.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})}}):sr.create(),DS={object:Ge.lazycreate},N;(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"})(N||(N={}));var AS=(t,e={message:`Input not instance of ${t.name}`})=>$p(r=>r instanceof t,e),Ep=or.create,kp=kr.create,NS=gn.create,jS=Pr.create,Pp=zr.create,MS=Tr.create,LS=dn.create,ZS=Cr.create,FS=Or.create,qS=sr.create,US=Ft.create,VS=bt.create,BS=fn.create,HS=qt.create,WS=Ge.create,GS=Ge.strictCreate,JS=Ir.create,KS=Gs.create,YS=Rr.create,XS=Dt.create,QS=Js.create,e$=pn.create,t$=mn.create,r$=Ks.create,n$=Dr.create,o$=Ar.create,s$=Nr.create,i$=jr.create,a$=ir.create,bp=rt.create,c$=vt.create,u$=Ut.create,l$=rt.createWithPreprocess,d$=yo.create,f$=()=>Ep().optional(),p$=()=>kp().optional(),m$=()=>Pp().optional(),h$={string:(t=>or.create({...t,coerce:!0})),number:(t=>kr.create({...t,coerce:!0})),boolean:(t=>zr.create({...t,coerce:!0})),bigint:(t=>Pr.create({...t,coerce:!0})),date:(t=>Tr.create({...t,coerce:!0}))},g$=L,Se=Object.freeze({__proto__:null,defaultErrorMap:ho,setErrorMap:bS,getErrorMap:Bs,makeIssue:Hs,EMPTY_PATH:wS,addIssueToContext:T,ParseStatus:je,INVALID:L,DIRTY:xp,OK:qe,isAborted:Ac,isDirty:Nc,isValid:go,isAsync:Ws,get util(){return ne},get objectUtil(){return Dc},ZodParsedType:P,getParsedType:nr,ZodType:U,ZodString:or,ZodNumber:kr,ZodBigInt:Pr,ZodBoolean:zr,ZodDate:Tr,ZodSymbol:dn,ZodUndefined:Cr,ZodNull:Or,ZodAny:sr,ZodUnknown:Ft,ZodNever:bt,ZodVoid:fn,ZodArray:qt,ZodObject:Ge,ZodUnion:Ir,ZodDiscriminatedUnion:Gs,ZodIntersection:Rr,ZodTuple:Dt,ZodRecord:Js,ZodMap:pn,ZodSet:mn,ZodFunction:Ks,ZodLazy:Dr,ZodLiteral:Ar,ZodEnum:Nr,ZodNativeEnum:jr,ZodPromise:ir,ZodEffects:rt,ZodTransformer:rt,ZodOptional:vt,ZodNullable:Ut,ZodDefault:Mr,ZodCatch:hn,ZodNaN:gn,BRAND:RS,ZodBranded:Ys,ZodPipeline:yo,ZodReadonly:yn,custom:$p,Schema:U,ZodSchema:U,late:DS,get ZodFirstPartyTypeKind(){return N},coerce:h$,any:qS,array:HS,bigint:jS,boolean:Pp,date:MS,discriminatedUnion:KS,effect:bp,enum:s$,function:r$,instanceof:AS,intersection:YS,lazy:n$,literal:o$,map:e$,nan:NS,nativeEnum:i$,never:VS,null:FS,nullable:u$,number:kp,object:WS,oboolean:m$,onumber:p$,optional:c$,ostring:f$,pipeline:d$,preprocess:l$,promise:a$,record:QS,set:t$,strictObject:GS,string:Ep,symbol:LS,transformer:bp,tuple:XS,undefined:ZS,union:JS,unknown:US,void:BS,NEVER:g$,ZodIssueCode:k,quotelessJson:vS,ZodError:tt});var Vt=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 y$=Se.object({name:Se.string().default("eui-compodoc-mcp"),version:Se.string().default("1.0.0")}),_$=Se.object({path:Se.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://")?Vt.isRemoteUrl(e):!0},{message:"Path must be a valid local file path or HTTP/HTTPS URL"}).default("__bundled__"),watchForChanges:Se.boolean().default(!0),reloadDebounce:Se.number().min(0).default(1e3),timeout:Se.number().min(1e3).default(1e4),maxRetries:Se.number().min(0).max(10).default(3),pollingInterval:Se.number().min(5e3).default(6e4)}).default({}),v$=Se.object({maxResults:Se.number().min(1).max(1e3).default(50),minQueryLength:Se.number().min(1).default(2)}),b$=Se.object({level:Se.enum(["debug","info","warn","error"]).default("info"),format:Se.enum(["json","text"]).default("text")}),w$=Se.object({path:Se.string().optional()}).default({}),x$=Se.object({path:Se.string().optional()}).default({}),zp=Se.object({server:y$.default({}),documentation:_$,search:v$.default({}),logging:b$.default({}),accessibility:w$.default({}),examples:x$.default({})}),Xs={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 Mc(t){return zp.safeParse(t)}var _n=_t(require("fs")),_o=_t(require("path"));function S$(){let t=_o.join(__dirname,"documentation.json.gz");if(_n.existsSync(t))return t;let e=_o.join(__dirname,"documentation.json");return _n.existsSync(e)?e:Xs.documentation.path}function Tp(){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 Cp(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"--examples-path":e.examples||(e.examples={}),e.examples.path=t[++r];break;case"--help":case"-h":E$(),process.exit(0);break}return e}function Op(t){try{if(!_n.existsSync(t))return process.stderr.write(`Configuration file not found: ${t}
|
|
32
|
-
`),{};let e=_n.readFileSync(t,"utf-8"),r=_o.extname(t).toLowerCase();return r===".json"?JSON.parse(e):(process.stderr.write(`Unsupported configuration file format: ${r}
|
|
33
|
-
`),
|
|
34
|
-
|
|
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
|
|
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:
|
|
@@ -91,84 +152,28 @@ Examples:
|
|
|
91
152
|
COMPODOC_MCP_DOC_PATH=./documentation.json eui-compodoc-mcp
|
|
92
153
|
|
|
93
154
|
For more information, visit: https://github.com/your-org/eui-compodoc-mcp
|
|
94
|
-
`)}var Po=_t(require("fs")),ug=_t(require("path")),lg=require("zlib");var Wp=require("node:events"),Gp=require("node:fs"),ai=require("node:fs/promises"),J=_t(require("node:path"),1);var Bt=require("node:fs/promises"),Lr=require("node:path"),Ap=require("node:stream"),nt={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},vn={root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:nt.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:256};Object.freeze(vn);var Np="READDIRP_RECURSIVE_ERROR",k$=new Set(["ENOENT","EPERM","EACCES","ELOOP",Np]),Ip=[nt.DIR_TYPE,nt.EVERYTHING_TYPE,nt.FILE_DIR_TYPE,nt.FILE_TYPE],P$=new Set([nt.DIR_TYPE,nt.EVERYTHING_TYPE,nt.FILE_DIR_TYPE]),z$=new Set([nt.EVERYTHING_TYPE,nt.FILE_DIR_TYPE,nt.FILE_TYPE]),T$=t=>k$.has(t.code),C$=process.platform==="win32",Rp=t=>!0,Dp=t=>{if(t===void 0)return Rp;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 Rp},Zc=class extends Ap.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??vn.highWaterMark});let r={...vn,...e},n=r.root??vn.root,o=r.type??vn.type;this._fileFilter=Dp(r.fileFilter),this._directoryFilter=Dp(r.directoryFilter);let s=r.lstat?Bt.lstat:Bt.stat;C$?this._stat=a=>s(a,{bigint:!0}):this._stat=s,this._maxDepth=r.depth!=null&&Number.isSafeInteger(r.depth)?r.depth:vn.depth,this._wantsDir=P$.has(o),this._wantsFile=z$.has(o),this._wantsEverything=o===nt.EVERYTHING_TYPE,this._root=(0,Lr.resolve)(n),this._relStart=this._root.endsWith(Lr.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,Bt.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,Lr.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){T$(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,Bt.realpath)(r),o=await(0,Bt.lstat)(n);if(o.isFile())return"file";if(o.isDirectory()){let s=n.length;if(r.startsWith(n)&&r[s]===Lr.sep){let i=new Error(`Circular symlink detected: "${r}" points to "${n}"`);return i.code=Np,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 jp(t,e={}){let r=e.entryType||e.type;if(r==="both"&&(r=nt.FILE_DIR_TYPE),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(r&&!Ip.includes(r))throw new Error(`readdirp: Invalid type passed. Use one of ${Ip.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 Zc(n)}var Fr=require("node:fs"),xt=require("node:fs/promises"),Lp=require("node:os"),ge=_t(require("node:path"),1),O$="data",Uc="end",Zp="close",oi=()=>{};var si=process.platform,Vc=si==="win32",I$=si==="darwin",R$=si==="linux",D$=si==="freebsd",Fp=(0,Lp.type)()==="OS400",we={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},wt=we,A$="watch",N$={lstat:xt.lstat,stat:xt.stat},Zr="listeners",ei="errHandlers",bn="rawEmitters",j$=[Zr,ei,bn],M$=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"]),L$=t=>M$.has(ge.extname(t).slice(1).toLowerCase()),qc=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},vo=(t,e,r)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(r)},Z$=t=>e=>{let r=t[e];r instanceof Set?r.clear():delete t[e]},bo=(t,e,r)=>{let n=t[e];n instanceof Set?n.delete(r):n===r&&delete t[e]},qp=t=>t instanceof Set?t.size===0:!t,ti=new Map;function Mp(t,e,r,n,o){let s=(i,a)=>{r(t),o(i,a,{watchedPath:t}),a&&t!==a&&ri(ge.resolve(t,a),Zr,ge.join(t,a))};try{return(0,Fr.watch)(t,{persistent:e.persistent},s)}catch(i){n(i);return}}var ri=(t,e,r,n,o)=>{let s=ti.get(t);s&&qc(s[e],i=>{i(r,n,o)})},F$=(t,e,r,n)=>{let{listener:o,errHandler:s,rawEmitter:i}=n,a=ti.get(e),c;if(!r.persistent)return c=Mp(t,r,o,s,i),c?c.close.bind(c):void 0;if(a)vo(a,Zr,o),vo(a,ei,s),vo(a,bn,i);else{if(c=Mp(t,r,ri.bind(null,e,Zr),s,ri.bind(null,e,bn)),!c)return;c.on(wt.ERROR,async u=>{let l=ri.bind(null,e,ei);if(a&&(a.watcherUnusable=!0),Vc&&u.code==="EPERM")try{await(await(0,xt.open)(t,"r")).close(),l(u)}catch{}else l(u)}),a={listeners:o,errHandlers:s,rawEmitters:i,watcher:c},ti.set(e,a)}return()=>{bo(a,Zr,o),bo(a,ei,s),bo(a,bn,i),qp(a.listeners)&&(a.watcher.close(),ti.delete(e),j$.forEach(Z$(a)),a.watcher=void 0,Object.freeze(a))}},Fc=new Map,q$=(t,e,r,n)=>{let{listener:o,rawEmitter:s}=n,i=Fc.get(e),a=i&&i.options;return a&&(a.persistent<r.persistent||a.interval>r.interval)&&((0,Fr.unwatchFile)(e),i=void 0),i?(vo(i,Zr,o),vo(i,bn,s)):(i={listeners:o,rawEmitters:s,options:r,watcher:(0,Fr.watchFile)(e,r,(c,u)=>{qc(i.rawEmitters,d=>{d(wt.CHANGE,e,{curr:c,prev:u})});let l=c.mtimeMs;(c.size!==u.size||l>u.mtimeMs||l===0)&&qc(i.listeners,d=>d(t,c))})},Fc.set(e,i)),()=>{bo(i,Zr,o),bo(i,bn,s),qp(i.listeners)&&(Fc.delete(e),(0,Fr.unwatchFile)(e),i.options=i.watcher=void 0,Object.freeze(i))}},ni=class{fsw;_boundHandleError;constructor(e){this.fsw=e,this._boundHandleError=r=>e._handleError(r)}_watchWithNodeFs(e,r){let n=this.fsw.options,o=ge.dirname(e),s=ge.basename(e);this.fsw._getWatchedDir(o).add(s);let a=ge.resolve(e),c={persistent:n.persistent};r||(r=oi);let u;if(n.usePolling){let l=n.interval!==n.binaryInterval;c.interval=l&&L$(s)?n.binaryInterval:n.interval,u=q$(e,a,c,{listener:r,rawEmitter:this.fsw._emitRaw})}else u=F$(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=ge.dirname(e),s=ge.basename(e),i=this.fsw._getWatchedDir(o),a=r;if(i.has(s))return;let c=async(l,d)=>{if(this.fsw._throttle(A$,e,5)){if(!d||d.mtimeMs===0)try{let p=await(0,xt.stat)(e);if(this.fsw.closed)return;let m=p.atimeMs,f=p.mtimeMs;if((!m||m<=f||f!==a.mtimeMs)&&this.fsw._emit(wt.CHANGE,e,p),(I$||R$||D$)&&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(wt.CHANGE,e,d),a=d}}},u=this._watchWithNodeFs(e,c);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(wt.ADD,e,0))return;this.fsw._emit(wt.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,xt.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(wt.CHANGE,n,e.stats)):(i.add(o),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(wt.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=ge.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(O$,async p=>{if(this.fsw.closed){d=void 0;return}let m=p.path,f=ge.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=ge.join(s,ge.relative(s,f)),this._addToNodeFs(f,r,n,i+1))}}).on(wt.ERROR,this._boundHandleError),new Promise((p,m)=>{if(!d)return m();d.once(Uc,()=>{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(ge.dirname(e)),u=c.has(ge.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!s&&!u&&this.fsw._emit(wt.ADD_DIR,e,r),c.add(ge.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 N$[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=ge.resolve(e),p=u?await(0,xt.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,xt.realpath)(e):e;if(this.fsw.closed)return;let p=ge.dirname(a.watchPath);if(this.fsw._getWatchedDir(p).add(a.watchPath),this.fsw._emit(wt.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(ge.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 Bc="/",U$="//",Jp=".",V$="..",B$="string",H$=/\\/g,Kp=/\/\//g,W$=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,G$=/^\.[/\\]/;function ii(t){return Array.isArray(t)?t:[t]}var Hc=t=>typeof t=="object"&&t!==null&&!(t instanceof RegExp);function J$(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=J.relative(t.path,e);return r?!r.startsWith("..")&&!J.isAbsolute(r):!1}return!1}:()=>!1}function K$(t){if(typeof t!="string")throw new Error("string expected");t=J.normalize(t),t=t.replace(/\\/g,"/");let e=!1;return t.startsWith("//")&&(e=!0),t=t.replace(Kp,"/"),e&&(t="/"+t),t}function Up(t,e,r){let n=K$(e);for(let o=0;o<t.length;o++){let s=t[o];if(s(n,r))return!0}return!1}function Y$(t,e){if(t==null)throw new TypeError("anymatch: specify first argument");let n=ii(t).map(o=>J$(o));return e==null?(o,s)=>Up(n,o,s):Up(n,e)}var Vp=t=>{let e=ii(t).flat();if(!e.every(r=>typeof r===B$))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Yp)},Bp=t=>{let e=t.replace(H$,Bc),r=!1;return e.startsWith(U$)&&(r=!0),e=e.replace(Kp,Bc),r&&(e=Bc+e),e},Yp=t=>Bp(J.normalize(Bp(t))),Hp=(t="")=>e=>typeof e=="string"?Yp(J.isAbsolute(e)?e:J.join(t,e)):e,X$=(t,e)=>J.isAbsolute(t)?t:J.join(e,t),Q$=Object.freeze(new Set),Wc=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!==Jp&&e!==V$&&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,ai.readdir)(n)}catch{this._removeWatcher&&this._removeWatcher(J.dirname(n),J.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=oi,this.items=Q$,Object.freeze(this)}},eE="stat",tE="lstat",Gc=class{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor(e,r,n){this.fsw=n;let o=e;this.path=e=e.replace(G$,""),this.watchPath=o,this.fullWatchPath=J.resolve(o),this.dirParts=[],this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=r,this.statMethod=r?eE:tE}entryPath(e){return J.join(this.watchPath,J.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)}},Jc=class extends Wp.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?ii(e.ignored):ii([]),awaitWriteFinish:r===!0?n:typeof r=="object"?{...n,...r}:!1};Fp&&(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=oi,this._readyEmitted=!0,process.nextTick(()=>this.emit(we.READY)))},this._emitRaw=(...c)=>this.emit(we.RAW,...c),this._boundRemove=this._remove.bind(this),this.options=o,this._nodeFsHandler=new ni(this),Object.freeze(o)}_addIgnoredPath(e){if(Hc(e)){for(let r of this._ignoredPaths)if(Hc(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)Hc(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=Vp(e);return o&&(s=s.map(i=>X$(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(J.dirname(a),J.basename(r||a))})}),this}unwatch(e){if(this.closed)return this;let r=Vp(e),{cwd:n}=this.options;return r.forEach(o=>{!J.isAbsolute(o)&&!this._closers.has(o)&&(n&&(o=J.join(n,o)),o=J.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?J.relative(this.options.cwd,n):n)||Jp;e[s]=r.getChildren().sort()}),e}emitWithAll(e,r){this.emit(e,...r),e!==we.ERROR&&this.emit(we.ALL,e,...r)}async _emit(e,r,n){if(this.closed)return;let o=this.options;Vc&&(r=J.normalize(r)),o.cwd&&(r=J.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===we.UNLINK)return this._pendingUnlinks.set(r,[e,...s]),setTimeout(()=>{this._pendingUnlinks.forEach((c,u)=>{this.emit(...c),this.emit(we.ALL,...c),this._pendingUnlinks.delete(u)})},typeof o.atomic=="number"?o.atomic:100),this;e===we.ADD&&this._pendingUnlinks.has(r)&&(e=we.CHANGE,this._pendingUnlinks.delete(r))}if(i&&(e===we.ADD||e===we.CHANGE)&&this._readyEmitted){let c=(u,l)=>{u?(e=we.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===we.CHANGE&&!this._throttle(we.CHANGE,r,50))return this;if(o.alwaysStat&&n===void 0&&(e===we.ADD||e===we.ADD_DIR||e===we.CHANGE)){let c=o.cwd?J.join(o.cwd,r):r,u;try{u=await(0,ai.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(we.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&&!J.isAbsolute(e)&&(c=J.join(this.options.cwd,e));let u=new Date,l=this._pendingWrites;function d(p){(0,Gp.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&&W$.test(e))return!0;if(!this._userIgnored){let{cwd:n}=this.options,s=(this.options.ignored||[]).map(Hp(n)),a=[...[...this._ignoredPaths].map(Hp(n)),...s];this._userIgnored=Y$(a,void 0)}return this._userIgnored(e,r)}_isntIgnored(e,r){return!this._isIgnored(e,r)}_getWatchHelpers(e){return new Gc(e,this.options.followSymlinks,this)}_getWatchedDir(e){let r=J.resolve(e);return this._watched.has(r)||this._watched.set(r,new Wc(r,this._boundRemove)),this._watched.get(r)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,r,n){let o=J.join(e,r),s=J.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=J.relative(this.options.cwd,o)),this.options.awaitWriteFinish&&this._pendingWrites.has(l)&&this._pendingWrites.get(l).cancelWait()===we.ADD)return;this._watched.delete(o),this._watched.delete(s);let d=n?we.UNLINK_DIR:we.UNLINK;u&&!this._isIgnored(o)&&this._emit(d,o),this._closePath(o)}_closePath(e){this._closeFile(e);let r=J.dirname(e);this._getWatchedDir(r).remove(J.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:we.ALL,alwaysStat:!0,lstat:!0,...r,depth:0},o=jp(e,n);return this._streams.add(o),o.once(Zp,()=>{o=void 0}),o.once(Uc,()=>{o&&(this._streams.delete(o),o=void 0)}),o}};function Xp(t,e={}){let r=new Jc(e);return r.add(t),r}var Uu=_t(cg()),ko=class t{pino;context;constructor(e){this.context=e.context,this.pino=(0,Uu.default)({level:e.level},Uu.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)}},Eo=null;function Vu(t){return Eo=new ko(t),Eo}function oe(){return Eo||(Eo=new ko({level:"info",format:"text"})),Eo}var jT={failureThreshold:5,successThreshold:2,timeout:1e4,resetTimeout:6e4},ki=class{state="CLOSED";failureCount=0;successCount=0;nextAttempt=Date.now();options;name;constructor(e,r={}){this.name=e,this.options={...jT,...r}}getState(){return this.state}getStats(){return{state:this.state,failureCount:this.failureCount,successCount:this.successCount,nextAttempt:this.nextAttempt}}async execute(e){let r=oe();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=oe();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=oe();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=oe();this.state="CLOSED",this.failureCount=0,this.successCount=0,this.nextAttempt=Date.now(),e.info("Circuit breaker manually reset",{name:this.name})}},Pi=class{breakers=new Map;get(e,r){return this.breakers.has(e)||this.breakers.set(e,new ki(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}},MT=new Pi;var zi=class{filePath;watchForChanges;reloadDebounce;watcher;reloadTimer;onReloadCallback;onErrorCallback;currentData;constructor(e){this.filePath=ug.resolve(e.path),this.watchForChanges=e.watchForChanges,this.reloadDebounce=e.reloadDebounce,this.onReloadCallback=e.onReload,this.onErrorCallback=e.onError}async load(){try{if(!Po.existsSync(this.filePath))return{success:!1,error:`Documentation file not found: ${this.filePath}`};let e;if(this.filePath.endsWith(".gz")){let o=await Po.promises.readFile(this.filePath);e=(0,lg.gunzipSync)(o).toString("utf-8")}else e=await Po.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,oe().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=Xp(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));oe().error("File watcher error",r),this.onErrorCallback&&this.onErrorCallback(r)}),oe().info(`Watching for changes: ${this.filePath}`))}scheduleReload(){this.reloadTimer&&clearTimeout(this.reloadTimer),this.reloadTimer=setTimeout(()=>{this.reload()},this.reloadDebounce)}async reload(){oe().info("Reloading documentation...");let e=await this.load();e.success&&e.data?(oe().info("Documentation reloaded successfully"),this.onReloadCallback&&this.onReloadCallback(e.data)):(oe().error("Failed to reload documentation",new Error(e.error)),this.onErrorCallback&&this.onErrorCallback(new Error(e.error)))}};var Wr=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 Ti=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 Bu=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 zo=class t extends Bu{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},To=class t extends Error{constructor(r,n){super(r);this.content=n;this.name="ParseError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}content};var Ci=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 Wr(r),this.cacheManager=new Ti}async load(){return this.fetchDocumentation()}startMonitoring(){this.pollingTimer||(this.pollingTimer=setInterval(()=>{this.poll()},this.pollingInterval),oe().info(`Started polling ${this.url} every ${this.pollingInterval}ms`))}async stopMonitoring(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=void 0,oe().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{oe().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){oe().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 To(o,r.data);this.cacheManager.set(this.url,n,r.headers),this.currentData=n,oe().info(`Documentation updated from ${this.url}`),this.onReloadCallback&&this.onReloadCallback(n);return}throw new zo(`HTTP ${r.status}: ${r.statusText}`,this.url,r.status,r.statusText)}catch(e){let r=e instanceof Error?e.message:String(e);oe().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 oe().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 zo(`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 To(`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 Co=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=Vt.detect(e.path);return r.type==="local"?new zi({path:r.normalizedPath,watchForChanges:e.watchForChanges??!0,reloadDebounce:e.reloadDebounce??1e3,onReload:e.onReload,onError:e.onError}):new Ci({url:r.normalizedPath,timeout:e.timeout??1e4,maxRetries:e.maxRetries??3,pollingInterval:e.pollingInterval??6e4,onReload:e.onReload,onError:e.onError})}};var Oo=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 j={};_p(j,{BIGINT_FORMAT_RANGES:()=>Di,CONSTANT_CATCH:()=>wg,Class:()=>Gu,NUMBER_FORMAT_RANGES:()=>Ro,aborted:()=>kt,allowsEval:()=>Qu,assert:()=>HT,assertEqual:()=>FT,assertIs:()=>VT,assertNever:()=>BT,assertNotEqual:()=>qT,assignProp:()=>ot,attachSchema:()=>Do,base64ToUint8Array:()=>vg,base64urlToUint8Array:()=>dC,cached:()=>Pn,captureStackTrace:()=>Ii,cleanEnum:()=>lC,cleanRegex:()=>Io,clone:()=>Et,cloneDef:()=>JT,codePointLength:()=>Ao,constantCatch:()=>xg,createTransparentProxy:()=>tC,defineLazy:()=>fg,defineLazyInternal:()=>ee,derived:()=>hC,esc:()=>Yu,escapeRegex:()=>Jt,explicitlyAborted:()=>rl,extend:()=>oC,finalizeIssue:()=>Pt,floatSafeRemainder:()=>Ku,getElementAtPath:()=>KT,getEnumValues:()=>En,getLengthableOrigin:()=>No,getParsedType:()=>eC,getSizableOrigin:()=>_g,hexToUint8Array:()=>pC,hide:()=>ji,installLazyProp:()=>vC,isObject:()=>Jr,isPlainObject:()=>lr,issue:()=>Tn,joinValues:()=>Oi,jsonStringifyReplacer:()=>kn,members:()=>ol,merge:()=>iC,mergeDefs:()=>Gt,normalizeParams:()=>D,nullish:()=>Ju,numKeys:()=>QT,objectClone:()=>WT,omit:()=>nC,optionalKeys:()=>tl,own:()=>ur,parsedType:()=>nl,partial:()=>aC,pick:()=>rC,prefixIssues:()=>Kt,primitiveTypes:()=>gg,promiseAllObject:()=>YT,propertyKeyTypes:()=>el,randomString:()=>XT,rawShape:()=>zn,required:()=>cC,safeExtend:()=>sC,shallowClone:()=>hg,sizeCaps:()=>Ni,slugify:()=>Xu,stringifyPrimitive:()=>Ri,toZod:()=>UT,uint8ArrayToBase64:()=>bg,uint8ArrayToBase64url:()=>fC,uint8ArrayToHex:()=>mC,unwrapMessage:()=>$n});function FT(t){return t}function qT(t){return t}function UT(){return t=>t}function VT(t){}function BT(t){throw new Error("Unexpected value in exhaustive check")}function HT(t){}function En(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 Oi(t,e="|"){return t.map(r=>Ri(r)).join(e)}function kn(t,e){return typeof e=="bigint"?e.toString():e}var Wu=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 Pn(t){return new Wu(t)}function Ju(t){return t==null}function Io(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Ku(t,e){let r=t/e,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var dg=Symbol("evaluating");function fg(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==dg)return n===void 0&&(n=dg,n=r()),n},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}function WT(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function ot(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function zn(t){let e=Object.getOwnPropertyDescriptor(t,"shape");return e?.get?e.get.raw:e?.value}function Wt(t){return zn(t._zod.def)??t._zod.def.shape}function pg(t,e,r){Object.defineProperty(t,e,{get(){let n=r();return ot(this,e,n),n},enumerable:!0,configurable:!0})}function mg(t,e,r){e in t?ot(t,e,r):t[e]=r}function Gr(t,e,r,n){let o=Wt(e);for(let s of r){let i=Object.getOwnPropertyDescriptor(o,s);i.enumerable&&(i.get?pg(t,s,()=>{let a=e._zod.def.shape[s];return n?n(a,s):a}):mg(t,s,n?n(i.value,s):i.value))}}function GT(t,e){for(let r of Reflect.ownKeys(e)){let n=Object.getOwnPropertyDescriptor(e,r);n.enumerable&&(n.get?pg(t,r,()=>e[r]):mg(t,r,n.value))}}function Gt(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function JT(t){return Gt(t._zod.def)}function KT(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function YT(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 XT(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function Yu(t){return JSON.stringify(t)}function Xu(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Ii="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Jr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Qu=Pn(()=>{if(Je.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function lr(t){if(Jr(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Jr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function hg(t){return lr(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function QT(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var eC=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}`)}},el=new Set(["string","number","symbol"]),gg=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Jt(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Et(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function D(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 tC(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 Ri(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function tl(t){return Object.keys(t).filter(e=>t[e]._zod.optin!==void 0&&t[e]._zod.optout==="optional")}var Ro={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]},Di={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function rC(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={};return Gr(s,t,Ai(t,e)),Et(t,Gt(r,{shape:s,checks:[]}))}function Ai(t,e){let r=Wt(t),n=[];for(let o of Reflect.ownKeys(e)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);e[o]&&n.push(o)}return n}function nC(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=new Set(Ai(t,e)),i={};return Gr(i,t,Reflect.ownKeys(Wt(t)).filter(a=>!s.has(a))),Et(t,Gt(r,{shape:i,checks:[]}))}function oC(t,e){if(!lr(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=Wt(t);for(let s of Reflect.ownKeys(e))if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Et(t,Gt(t._zod.def,{shape:yg(t,e)}))}function yg(t,e){let r={};return Gr(r,t,Reflect.ownKeys(Wt(t))),GT(r,e),r}function sC(t,e){if(!lr(e))throw new Error("Invalid input to safeExtend: expected a plain object");return Et(t,Gt(t._zod.def,{shape:yg(t,e)}))}function iC(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 r={};Gr(r,t,Reflect.ownKeys(Wt(t))),Gr(r,e,Reflect.ownKeys(Wt(e)));let n=Gt(t._zod.def,{shape:r,get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Et(t,n)}function aC(t,e,r,n="partial"){let s=e._zod.def.checks;if(s&&s.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);let a=r?new Set(Ai(e,r)):void 0,c={};return Gr(c,e,Reflect.ownKeys(Wt(e)),t&&((u,l)=>a&&!a.has(l)?u:new t({type:"optional",innerType:u}))),Et(e,Gt(e._zod.def,{shape:c,checks:[]}))}function cC(t,e,r){let n=r?new Set(Ai(e,r)):void 0,o={};return Gr(o,e,Reflect.ownKeys(Wt(e)),(s,i)=>n&&!n.has(i)?s:new t({type:"nonoptional",innerType:s})),Et(e,Gt(e._zod.def,{shape:o}))}function kt(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 rl(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 Kt(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function $n(t){return typeof t=="string"?t:t?.message}function Ni(t){let e=[];for(let r of t??[]){let n=r._zod.def;if(!/_(length|size)$|_equals$/.test(n.check))break;let o=n.maximum??n.length??n.size;o>=0&&e.push([o,r])}return e}function Do(t,e,r){var n;for(let o=e;o<t.length;o++)(n=t[o]).schema??(n.schema=r)}function Pt(t,e,r){var n;let o=t.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=t).schema??(n.schema=t.inst):t.schema=t.inst);let s=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,i=t.message?t.message:$n(t.inst?._zod.def?.error?.(t))??$n(s?.(t))??$n(e?.error?.(t))??$n(r.customError?.(t))??$n(r.localeError?.(t))??"Invalid input",a={};for(let c of Object.keys(t))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(a[c]=t[c]);return a.path??(a.path=[]),a.message=i,e?.reportInput&&(a.input=t.input),a}function _g(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}var uC=/[\uD800-\uDBFF]/;function Ao(t){let e=t.length;if(!uC.test(t))return e;let r=e;for(let n=0;n<e-1;n++)(t.charCodeAt(n)&64512)===55296&&(t.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function No(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function nl(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 Tn(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function lC(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function vg(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 bg(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function dC(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return vg(e+r)}function fC(t){return bg(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function pC(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 mC(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Gu=class{constructor(...e){}};function ol(t,e){for(let r in e){let n=Object.getOwnPropertyDescriptor(e,r);n.get?Object.defineProperty(t,r,{...n,enumerable:!1}):gC(t,r,n.value)}}function ur(t,e,r,n=!0){return Object.defineProperty(t,e,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function ji(t,e,r){return ur(t,e,r,!1)}function hC(t,e){for(let r in t){let n=t[r];Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){return ur(this,r,n(this))},set(o){ur(this,r,o)}})}return e}function gC(t,e,r){Object.defineProperty(t,e,{configurable:!0,get(){return this==null?r:ur(this,e,r.bind(this))},set(n){ur(this,e,n)}})}function yC(t,e){let r=Object.getPrototypeOf(t);return e in r?void 0:r}var Hu,cr=!1,_C={configurable:!0,get(){cr=!0}};function ee(t,e,r){let n=Object.getPrototypeOf(t._zod);if(e in n&&Hu!==t._zod){Hu=void 0;return}Hu=t._zod,Object.defineProperty(n,e,{configurable:!0,get(){Object.defineProperty(this,e,_C);let o=cr;cr=!1;try{let s=r(this);return cr?delete this[e]:Object.defineProperty(this,e,{configurable:!0,writable:!0,value:s}),cr=cr||o,s}catch(s){throw delete this[e],cr=cr||o,s}},set(o){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:o})}})}function vC(t,e,r,n){let o=yC(t,e);o&&Object.defineProperty(o,e,{configurable:!0,get(){let s={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,e,s),s.value=r(this),Object.defineProperty(this,e,s),s.value},set(s){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:n,value:s})}})}var wg="~constantCatch";function xg(t){let e=()=>t;return e[wg]=!0,e}var Sg;var sl={value:void 0,enumerable:!1},$g="captureStackTrace"in Error?Error:null;function bC(t){let e=$g;if(e){let r=e.stackTraceLimit;if(typeof r=="number"){try{e.stackTraceLimit=0}catch{return $g=null,new t}try{return new t}finally{e.stackTraceLimit=r}}}return new t}function b(t,e,r,n){let o={};function s(p){this.def=p,this.constr=d,this.traits=new Set}s.prototype=o;let i=r,a=i&&new WeakSet;function c(p,m){if(p._zod){if(p._zod.traits.has(t))return}else{sl.value=new s(m);try{Object.defineProperty(p,"_zod",sl)}finally{sl.value=void 0}}if(p._zod.traits.add(t),e(p,m),a){let h=Object.getPrototypeOf(p),g=p._zod.constr.prototype,y=h;for(;y&&y!==g;)y=Object.getPrototypeOf(y);let v=y??h;a.has(v)||(a.add(v),ol(v,i))}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=n?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:t});function d(p){let m=n?.Parent?bC(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=>n?.Parent&&p instanceof n.Parent?!0:p?._zod?.traits?.has(t)}),Object.defineProperty(d,"name",{value:t}),d}var zt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Cn=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Sg=globalThis).__zod_globalConfig??(Sg.__zod_globalConfig={});var Je=globalThis.__zod_globalConfig;function st(t){return t&&Object.assign(Je,t),Je}function wC(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,kn,2)),t.message}function xC(t){this._zod.message=t}var SC={get:wC,set:xC,enumerable:!0,configurable:!0},al={value:void 0,enumerable:!1},Eg=new WeakSet([Object.prototype,Error.prototype]),kg=(t,e)=>{t.name="$ZodError",al.value=e,Object.defineProperty(t,"issues",al),al.value=void 0,Object.defineProperty(t,"message",SC);let r=Object.getPrototypeOf(t);Eg.has(r)||(Eg.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},Pg=b("$ZodError",kg),zg=b("$ZodError",kg,void 0,{Parent:Error});function $C(t,e,r){return Object.prototype.hasOwnProperty.call(t,e)||(e==="__proto__"?Object.defineProperty(t,e,{value:r(),writable:!0,enumerable:!0,configurable:!0}):t[e]=r()),t[e]}function Tg(t,e=r=>r.message){let r={},n=[];for(let o of t.issues)o.path.length>0?$C(r,o.path[0],()=>[]).push(e(o)):n.push(e(o));return{formErrors:n,fieldErrors:r}}function Cg(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],d=u===a.length-1;if(l==="_errors"){d&&c._errors.push(e(i)),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(i)),c=p,u++}}}};return n(t),r}function Mi(t,e){return{callee:e?.callee??t,Err:e?.Err}}var Li=t=>{let e=(r,n,o,s)=>{let i=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new zt;if(a.issues.length){let c=new(s?.Err??t)(a.issues.map(u=>Pt(u,i,st())));throw Ii(c,s?.callee??e),c}return a.value};return e};var Zi=t=>{let e=async(r,n,o,s)=>{let i=o?{...o,async:!0}:{async:!0},a=r._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(s?.Err??t)(a.issues.map(u=>Pt(u,i,st())));throw Ii(c,s?.callee??e),c}return a.value};return e};var jo=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 zt;return s.issues.length?Og(t,s.issues,o):{success:!0,data:s.value}},cl=jo(zg);function Og(t,e,r){let n;return{success:!1,get error(){return n||(n=new t(e.map(o=>Pt(o,r,st()))),e=void 0,r=void 0),n},set error(o){n=o,e=void 0,r=void 0}}}var Fi=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?Og(t,s.issues,o):{success:!0,data:s.value}};var kC=Symbol.for("zod.compile.invalid"),PC=Symbol.for("zod.compile.fallback"),qi=((t,e,r)=>{let n=t._zod.bag.validator;if(n!==void 0){if(n(e)!==kC)return!0;if(n.definite===!0&&r===void 0)return!1}return zC(t,e,r)});function zC(t,e,r){let n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=t._zod.bag.fallbackRun,s;if(o?(n[PC]=!0,s=o({value:e,issues:[]},n)):s=t._zod.run({value:e,issues:[]},n),s instanceof Promise)throw new zt;return s.issues.length===0}var Ui=async(t,e,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=t._zod.run({value:e,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},Ig=t=>{let e=Li(t),r=(n,o,s,i)=>{let a=s?{...s,direction:"backward"}:{direction:"backward"};return e(n,o,a,Mi(r,i))};return r};var Rg=t=>{let e=Li(t),r=(n,o,s,i)=>e(n,o,s,Mi(r,i));return r};var Dg=t=>{let e=Zi(t),r=async(n,o,s,i)=>{let a=s?{...s,direction:"backward"}:{direction:"backward"};return await e(n,o,a,Mi(r,i))};return r};var Ag=t=>{let e=Zi(t),r=async(n,o,s,i)=>await e(n,o,s,Mi(r,i));return r};var Ng=t=>(e,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return jo(t)(e,r,o)};var jg=t=>(e,r,n)=>jo(t)(e,r,n);var Mg=t=>async(e,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Fi(t)(e,r,o)};var Lg=t=>async(e,r,n)=>Fi(t)(e,r,n);var Zg=/^[cC][0-9a-z]{6,}$/,Fg=/^[0-9a-z]+$/,qg=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ug=/^[0-9a-vA-V]{20}$/,Vg=/^[A-Za-z0-9]{27}$/,Bg=/^[a-zA-Z0-9_-]{21}$/;function Hg(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}var Wg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Gg=/^([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})$/,ll=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 Jg=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var TC="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Kg(){return new RegExp(TC,"u")}var Yg=/^(?:(?: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])$/,Xg=/^(([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 Qg=/^((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])$/,ey=/^(([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])$/,ty=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ry=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;var ny=/^https?$/,oy=/^\+[1-9]\d{6,14}$/;var sy="(?:(?:\\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 CC(t){return new RegExp(`^${t}$`)}var iy=CC(sy);function ul(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 ay(t){return new RegExp(`^${ul(t)}$`)}function cy(t){let e=["Z"];t.offset&&e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${ul({precision:t.precision,seconds:!0})}(?:${e.join("|")})`,n=t.local?`${r}|${ul({precision:t.precision})}`:r;return new RegExp(`^${sy}T(?:${n})$`)}var uy=/^[\s\S]{0,}$/;var dl=/^-?\d+$/,Mo=/^-?\d+(?:\.\d+)?$/,ly=/^(?:true|false)$/i,dy=/^null$/i;var fy=/^[^A-Z]*$/,py=/^[^a-z]*$/;var Oe=b("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])});var fl=t=>{let e=t.value;return!Ju(e)&&e.length!==void 0},Vi={number:"number",bigint:"bigint",object:"date"},pl=b("$ZodCheckLessThan",(t,e)=>{Oe.init(t,e);let r=Vi[typeof e.value];t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:Vi[typeof n.value]??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})}}),ml=b("$ZodCheckGreaterThan",(t,e)=>{Oe.init(t,e);let r=Vi[typeof e.value];t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:Vi[typeof n.value]??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})}}),my=b("$ZodCheckMultipleOf",(t,e)=>{Oe.init(t,e),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"?e.value!==BigInt(0)&&r.value%e.value===BigInt(0):Ku(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})}}),hy=b("$ZodCheckNumberFormat",(t,e)=>{Oe.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[o,s]=Ro[e.format];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 gy=b("$ZodCheckMaxLength",(t,e)=>{var r;Oe.init(t,e),(r=t._zod.def).when??(r.when=fl),t._zod.check=n=>{let o=n.value,s=o.length;if((typeof o=="string"&&s>e.maximum?Ao(o):s)<=e.maximum)return;let a=No(o);n.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),yy=b("$ZodCheckMinLength",(t,e)=>{var r;Oe.init(t,e),(r=t._zod.def).when??(r.when=fl),t._zod.check=n=>{let o=n.value,s=o.length;if((typeof o=="string"&&s>=e.minimum&&s<e.minimum*2?Ao(o):s)>=e.minimum)return;let a=No(o);n.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),_y=b("$ZodCheckLengthEquals",(t,e)=>{var r;Oe.init(t,e),(r=t._zod.def).when??(r.when=fl),t._zod.check=n=>{let o=n.value,s=o.length,i=typeof o=="string"&&s>=e.length&&s<=e.length*2?Ao(o):s;if(i===e.length)return;let a=No(o),c=i>e.length;n.issues.push({origin:a,...c?{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=b("$ZodCheckStringFormat",(t,e)=>{var r,n;Oe.init(t,e),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=()=>{})}),vy=b("$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})}}),by=b("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=fy),Zo.init(t,e)}),wy=b("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=py),Zo.init(t,e)}),xy=b("$ZodCheckIncludes",(t,e)=>{Oe.init(t,e);let r=Jt(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position},}${r}`:r);e.pattern=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})}}),Sy=b("$ZodCheckStartsWith",(t,e)=>{Oe.init(t,e);let r=new RegExp(`^${Jt(e.prefix)}.*`);e.pattern??(e.pattern=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})}}),$y=b("$ZodCheckEndsWith",(t,e)=>{Oe.init(t,e);let r=new RegExp(`.*${Jt(e.suffix)}$`);e.pattern??(e.pattern=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 Ey=b("$ZodCheckOverwrite",(t,e)=>{Oe.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var Bi=class{constructor(e=[],r={}){this.content=[],this.indent=0,this.args=e,this.closed=r}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 n=e.split(`
|
|
95
|
-
`)
|
|
96
|
-
|
|
97
|
-
`)}
|
|
98
|
-
};`)(...Object.values(this.closed))}};var Py={major:4,minor:6,patch:7};var de=b("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Py;let n=t._zod.def.checks,o=t._zod.traits.has("$ZodCheck")?[t,...n??[]]:n?.length?[...n]:[];for(let s of o)for(let i of s._zod.onattach)i(t);if(o.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let s=(a,c,u)=>{if(a.memo)return a;let l=kt(a),d;for(let p of c){if(p._zod.def.when){if(rl(a)||!p._zod.def.when(a))continue}else if(l)continue;let m=a.issues.length,f=p._zod.check(a);if(f instanceof Promise&&u?.async===!1)throw new zt;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,a.issues.length!==m&&(Do(a.issues,m,t),l||(l=kt(a,m)))});else{if(a.issues.length===m)continue;Do(a.issues,m,t),l||(l=kt(a,m))}}return d?d.then(()=>a):a},i=(a,c,u)=>{if(kt(a))return a.aborted=!0,a;let l=s(c,o,u);if(l instanceof Promise){if(u.async===!1)throw new zt;return l.then(d=>t._zod.parse(d,u))}return t._zod.parse(l,u)};t._zod.run=(a,c)=>{if(c.skipChecks)return t._zod.parse(a,c);if(c.direction==="backward"){let l=t._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,a,c)):i(l,a,c)}let u=t._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new zt;return u.then(l=>s(l,o,c))}return s(u,o,c)}}},{get"~standard"(){return ji(this,"~standard",gl(this))},set"~standard"(t){ur(this,"~standard",t)}}),My=(t,e)=>t.issues.length?{issues:t.issues.map(r=>Pt(r,e,st()))}:{value:t.value};async function OC(t,e){let r={async:!0};return My(await t._zod.run({value:e,issues:[]},r),r)}function gl(t){return{validate:e=>{let r={async:!1};try{let n=t._zod.run({value:e,issues:[]},r);if(!(n instanceof Promise))return My(n,r)}catch{}return OC(t,e)},vendor:"zod",version:1}}var Ji=b("$ZodString",(t,e)=>{de.init(t,e),t._zod.pattern=e.pattern??uy,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}}),fe=b("$ZodStringFormat",(t,e)=>{Zo.init(t,e),Ji.init(t,e)}),Ly=b("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Gg),fe.init(t,e)}),Zy=b("$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=ll(n))}else e.pattern??(e.pattern=ll());fe.init(t,e)}),Fy=b("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Jg),fe.init(t,e)}),qy=1,Wi=2;function Uy(t){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(t):(new URL(t),!0)}catch{return!1}}function IC(t,e){return!("normalize"in e)&&!("hostname"in e)&&!("protocol"in e)?Uy(t)||Wi:RC(t,e)}function RC(t,e){if(!e.normalize&&e.protocol?.source===ny.source&&!/^https?:\/\//i.test(t))return qy;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(t)??Wi}return new URL(t)}catch{return Wi}}var DC=/[\t\n\r]/g;function zy(t){return t.replace(DC,"")}function AC(t,e){return e.lastIndex=0,e.test(t.hostname)}function NC(t,e){return e.lastIndex=0,e.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}var Vy=b("$ZodURL",(t,e)=>{fe.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),o=IC(n,e);if(o===qy){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:t,continue:!e.abort});return}if(o===Wi){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort});return}if(o===!0){r.value=zy(n);return}e.hostname&&!AC(o,e.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&&!NC(o,e.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort}),r.value=e.normalize?o.href:zy(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),By=b("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Kg()),fe.init(t,e)}),Hy=b("$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?Bg:Hg(e.length)),fe.init(t,e)}),Wy=b("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Zg),fe.init(t,e)}),Gy=b("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Fg),fe.init(t,e)}),Jy=b("$ZodULID",(t,e)=>{e.pattern??(e.pattern=qg),fe.init(t,e)}),Ky=b("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Ug),fe.init(t,e)}),Yy=b("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Vg),fe.init(t,e)}),Xy=b("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=cy(e)),fe.init(t,e)}),Qy=b("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=iy),fe.init(t,e)}),e_=b("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=ay(e)),fe.init(t,e)}),t_=b("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Wg),fe.init(t,e)}),r_=b("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Yg),fe.init(t,e)}),jC=/^[0-9a-fA-F:.]+$/;function n_(t){return jC.test(t)?Uy(`http://[${t}]`):!1}var o_=b("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Xg),fe.init(t,e),t._zod.check=r=>{n_(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}});var s_=b("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Qg),fe.init(t,e)});function MC(t){let e=t.split("/");if(e.length!==2)return!1;let[r,n]=e;if(!n)return!1;let o=Number(n);return`${o}`!==n||o<0||o>128?!1:n_(r)}var i_=b("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=ey),fe.init(t,e),t._zod.check=r=>{MC(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}});function a_(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var yl=/^[0-9a-zA-Z+/]*={0,2}$/,c_=b("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=yl),fe.init(t,e),t._zod.check=r=>{a_(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}}),Ki=/^[A-Za-z0-9_-]*$/;function LC(t){if(!Ki.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return a_(r)}var u_=b("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Ki),fe.init(t,e),t._zod.check=r=>{LC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),l_=b("$ZodE164",(t,e)=>{e.pattern??(e.pattern=oy),fe.init(t,e)});function ZC(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 d_=b("$ZodJWT",(t,e)=>{fe.init(t,e),t._zod.check=r=>{ZC(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});var _l=b("$ZodNumber",(t,e)=>{de.init(t,e),t._zod.pattern=Mo,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:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...s?{received:s}:{}}),r}}),f_=b("$ZodNumberFormat",(t,e)=>{hy.init(t,e),_l.init(t,e)}),p_=b("$ZodBoolean",(t,e)=>{de.init(t,e),t._zod.pattern=ly,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 m_=b("$ZodNull",(t,e)=>{de.init(t,e),t._zod.pattern=dy,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 h_=b("$ZodUnknown",(t,e)=>{de.init(t,e),t._zod.parse=r=>r}),g_=b("$ZodNever",(t,e)=>{de.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)});function FC(t,e){let r=Ni(t._zod.def.checks);if(!r.length)return;let n=Math.min(...r.map(s=>s[0])),o=t._zod.parse;t._zod.parse=(s,i)=>{let a=e(s.value);if(a>n&&!i?.skipChecks&&i?.direction!=="backward"){for(let[c,u]of Ni(t._zod.def.checks))if(a>c&&u._zod.def.when(s)){let l=s.issues.length;return u._zod.check(s),s.issues[l].continue=!1,Do(s.issues,l,t),s}}return o(s,i)}}var qC=t=>Array.isArray(t)?t.length:-1;function Ty(t,e,r){t.issues.length&&e.issues.push(...Kt(r,t.issues)),e.value[r]=t.value}var y_=b("$ZodArray",(t,e)=>{de.init(t,e);let r=Je.memoizer;r?.attach(t),t._zod.parse=(n,o)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:t}),n;n.value=r?r.alloc(t,n,Array(s.length),o):Array(s.length);let i=[],a=o?.abortEarly;for(let c=0;c<s.length;c++){let u=s[c],l=e.element._zod.run({value:u,issues:[]},o);if(l instanceof Promise)i.push(l.then(d=>Ty(d,n,c)));else if(Ty(l,n,c),a&&l.issues.length!==0&&kt(l))break}return i.length?Promise.all(i).then(()=>n):n},FC(t,qC)});function Gi(t,e,r,n,o,s){let i=r in n,a=s==="optional";if(!(!i&&a&&o==="optional")){if(t.issues.length){if(o!==void 0&&a&&!i)return;e.issues.push(...Kt(r,t.issues))}if(!i&&o===void 0){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}t.value===void 0?(i||o==="defaulted"&&!a)&&(e.value[r]=void 0):e.value[r]=t.value}}var UC=[];function __(t){let e=Object.keys(t.shape),r=Object.getOwnPropertySymbols(t.shape),n=r.length?r:UC,o=n.length?[...e,...n]:e;for(let i of o)if(!t.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(i)}": expected a Zod schema`);let s=tl(t.shape);return{...t,allKeys:o,symbolKeys:n,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(s)}}function v_(t,e,r,n,o,s,i){let a=[],c=o.keySet,u=o.catchall._zod,l=u.def.type,d=u.optin,p=u.optout,m=0;for(let f in e){if(i&&r.issues.length!==m){if(kt(r,m))break;m=r.issues.length}if(c.has(f))continue;if(f==="__proto__"){l==="never"&&a.push(f);continue}if(l==="never"){a.push(f);continue}let h=u.run({value:e[f],issues:[]},n);h instanceof Promise?t.push(h.then(g=>Gi(g,r,f,e,d,p))):Gi(h,r,f,e,d,p)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:s,continue:!0}),t.length?Promise.all(t).then(()=>r):r}var VC=b("$ZodObject",(t,e)=>{de.init(t,e);let r=Object.getOwnPropertyDescriptor(e,"shape"),n=r?.get?r.get.raw:e.shape??{};if(n){let u=()=>{let l={...n};return Object.defineProperty(e,"shape",{value:l}),u.raw=l,l};u.raw=n,Object.defineProperty(e,"shape",{get:u})}let o=Pn(()=>__(e));ee(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)||ot(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 s=Jr,i=e.catchall,a,c=Je.memoizer;c?.attach(t),t._zod.parse=(u,l)=>{a??(a=o.value);let d=u.value;if(!s(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=a.shape,f=l?.abortEarly,h=u.issues.length;for(let g of a.allKeys){if(f&&u.issues.length!==h){if(kt(u,h))break;h=u.issues.length}if(g==="__proto__")continue;let y=m[g],v=y._zod.optin,x=y._zod.optout,S=y._zod.run({value:d[g],issues:[]},l);S instanceof Promise?p.push(S.then(E=>Gi(E,u,g,d,v,x))):Gi(S,u,g,d,v,x)}return i?v_(p,d,u,l,o.value,t,f===!0):p.length?Promise.all(p).then(()=>u):u}}),b_=b("$ZodObjectJIT",(t,e)=>{VC.init(t,e);let r=t._zod.parse,n=Pn(()=>__(e)),o=Je.memoizer,s=m=>{let f=n.value,h=f.symbolKeys,g=new Bi(["payload","ctx"],{shape:m,inst:t,memo:o,syms:h}),y=E=>`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`,v=(E,C)=>`
|
|
99
|
-
let ${E}_ab = false;
|
|
100
|
-
for (let i = 0; i < ${E}.issues.length; i++) {
|
|
101
|
-
const iss = ${E}.issues[i];
|
|
102
|
-
iss.path = iss.path ? [${C}, ...iss.path] : [${C}];
|
|
103
|
-
payload.issues.push(iss);
|
|
104
|
-
if (iss.continue !== true) ${E}_ab = true;
|
|
105
|
-
}
|
|
106
|
-
if (${E}_ab && ctx && ctx.abortEarly) {
|
|
107
|
-
payload.value = newResult;
|
|
108
|
-
return payload;
|
|
109
|
-
}`;g.write("const input = payload.value;");let x=Object.create(null),S=0;for(let E of f.allKeys)x[E]=`key_${S++}`;g.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let E of f.allKeys){if(E==="__proto__")continue;let C=x[E],A=typeof E=="symbol"?`syms[${h.indexOf(E)}]`:Yu(E),re=`${A} in input`,F=m[E],ie=F?._zod?.optin,$e=ie!==void 0,be=F?._zod?.optout==="optional";if(g.write(`const ${C} = ${y(A)};`),$e&&be){let Ce=ie==="optional"?`${C}_present`:`${C}.value !== undefined || ${C}_present`;g.write(`
|
|
110
|
-
const ${C}_present = ${re};
|
|
111
|
-
if (!${C}.issues.length || ${C}_present) {
|
|
112
|
-
if (${C}.issues.length) {${v(C,A)}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (${Ce}) {
|
|
116
|
-
newResult[${A}] = ${C}.value;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
`)}else $e?(g.write(`
|
|
121
|
-
if (${C}.issues.length) {${v(C,A)}
|
|
122
|
-
}
|
|
123
|
-
`),ie==="defaulted"?g.write(`newResult[${A}] = ${C}.value;`):g.write(`
|
|
124
|
-
if (${C}.value !== undefined || ${re}) {
|
|
125
|
-
newResult[${A}] = ${C}.value;
|
|
126
|
-
}
|
|
127
|
-
`)):g.write(`
|
|
128
|
-
const ${C}_present = ${re};
|
|
129
|
-
if (${C}.issues.length) {${v(C,A)}
|
|
130
|
-
}
|
|
131
|
-
if (!${C}_present && !${C}.issues.length) {
|
|
132
|
-
payload.issues.push({
|
|
133
|
-
code: "invalid_type",
|
|
134
|
-
expected: "nonoptional",
|
|
135
|
-
input: undefined,
|
|
136
|
-
path: [${A}]
|
|
137
|
-
});
|
|
138
|
-
if (ctx && ctx.abortEarly) {
|
|
139
|
-
payload.value = newResult;
|
|
140
|
-
return payload;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (${C}_present) {
|
|
145
|
-
newResult[${A}] = ${C}.value;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
`)}return g.write("payload.value = newResult;"),g.write("return payload;"),g.compile()},i,a=Jr,c=!Je.jitless,l=c&&Qu.value,d=e.catchall,p;t._zod.parse=(m,f)=>{p??(p=n.value);let h=m.value;return a(h)?c&&l&&f?.async===!1&&f.jitless!==!0?(i||(i=s(e.shape)),m=i(m,f),d?v_([],h,m,f,p,t,f?.abortEarly===!0):m):r(m,f):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),m)}});function Cy(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=>!kt(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=>Pt(i,n,st())))}),e)}var vl=b("$ZodUnion",(t,e)=>{de.init(t,e),ee(t,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),ee(t,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ee(t,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),ee(t,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Io(s.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=>Cy(a,n,t,o)):Cy(i,n,t,o)}});function BC(t){let e=new Map;for(let r of t.options){let n=r._zod.propValues?.[t.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let o of n)if(e.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);e.set(o,null)}else e.set(o,r)}return e}var w_=b("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,vl.init(t,e);let r=t._zod.parse;ee(t,"propValues",o=>{let s={},i=0;for(let a of o.def.options){let c=a._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(a)}"`);c[o.def.discriminator]?.has(void 0)&&i++;for(let[u,l]of Object.entries(c)){Object.prototype.hasOwnProperty.call(s,u)||ot(s,u,new Set);for(let d of l)s[u].add(d)}}return!o.def.unionFallback&&i>1&&s[o.def.discriminator]?.delete(void 0),s}),e.options.forEach((o,s)=>{let i=zn(o._zod.def);if(i&&!Object.prototype.hasOwnProperty.call(i,e.discriminator))throw new Error(`Invalid discriminated union option at index "${s}"`)});let n=Pn(()=>BC(e));t._zod.parse=(o,s)=>{let i=o.value;if(!Jr(i))return o.issues.push({code:"invalid_type",expected:"object",input:i,inst:t}),o;let a=i?.[e.discriminator],c=n.value.get(a);return c&&(a!==void 0||s.direction!=="backward")?c._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()).filter(u=>n.value.get(u)!==null),input:i,path:[e.discriminator],inst:t}),o)}}),x_=b("$ZodIntersection",(t,e)=>{de.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])=>Oy(r,c,u)):Oy(r,s,i)}});function hl(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(lr(t)&&lr(e)){let r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),o={...t,...e};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let s of n){if(s==="__proto__")continue;let i=hl(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=hl(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 Oy(t,e,r){let n=new Map,o,s=new Map,i=(u,l)=>{let d;if(u.code==="unrecognized_keys"&&!u.path?.length)o??(o=u),d=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){let p=String(u.path[0]);s.has(p)||s.set(p,u),d=[p]}else return!1;for(let p of d)n.has(p)||n.set(p,{}),n.get(p)[l]=!0;return!0};for(let u of e.issues)i(u,"l")||t.issues.push(u);for(let u of r.issues)i(u,"r")||t.issues.push(u);let a=[...n].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length){let u=o?a.filter(l=>o.keys.includes(l)):[];u.length&&t.issues.push({...o,keys:u});for(let l of a)!u.includes(l)&&s.has(l)&&t.issues.push(s.get(l))}let c=hl(e.value,r.value);if(!c.valid){if(kt(t))return t;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return t.value=c.data,t}var S_=b("$ZodRecord",(t,e)=>{de.init(t,e);let r=Je.memoizer;r?.attach(t),t._zod.parse=(n,o)=>{let s=n.value;if(!lr(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:t}),n;let i=[],a=e.keyType._zod.values;if(a&&!e.partial){n.value=r?r.alloc(t,n,{},o):{};let c=new Set;for(let l of a)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:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(f=>Pt(f,o,st())),input:l,path:[l],inst:t});continue}let p=d.value;if(p==="__proto__")continue;let m=e.valueType._zod.run({value:s[l],issues:[]},o);m instanceof Promise?i.push(m.then(f=>{f.issues.length&&n.issues.push(...Kt(l,f.issues)),n.value[p]=f.value})):(m.issues.length&&n.issues.push(...Kt(l,m.issues)),n.value[p]=m.value)}let u;for(let l in s)if(!c.has(l))if(e.mode==="loose"){if(l==="__proto__")continue;n.value[l]=s[l]}else u=u??[],u.push(l);u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:t,keys:u,continue:!0})}else{n.value=r?r.alloc(t,n,{},o):{};let c;for(let u of Reflect.ownKeys(s)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,u))continue;let l=e.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Mo.test(u)&&l.issues.length){let f=e.keyType._zod.run({value:Number(u),issues:[]},o);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"?n.value[u]=s[u]:a?(c=c??[],c.push(u)):n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(f=>Pt(f,o,st())),input:u,path:[u],inst:t});continue}let p=l.value;if(p==="__proto__")continue;let m=e.valueType._zod.run({value:s[u],issues:[]},o);m instanceof Promise?i.push(m.then(f=>{f.issues.length&&n.issues.push(...Kt(u,f.issues)),n.value[p]=f.value})):(m.issues.length&&n.issues.push(...Kt(u,m.issues)),n.value[p]=m.value)}c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:t,keys:c,continue:!0})}return i.length?Promise.all(i).then(()=>n):n}});var $_=b("$ZodEnum",(t,e)=>{de.init(t,e);let r=En(e.entries),n=new Set(r);t._zod.values=n,ee(t,"pattern",o=>{let s=En(o.def.entries).filter(i=>el.has(typeof i));return new RegExp(s.length?`^(${s.map(i=>Jt(i.toString())).join("|")})$`:"^[^\\s\\S]$")}),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}}),E_=b("$ZodLiteral",(t,e)=>{de.init(t,e);let r=new Set(e.values);t._zod.values=r,ee(t,"pattern",n=>{let o=n.def.values;return new RegExp(o.length?`^(${o.map(s=>typeof s=="string"?Jt(s):s?Jt(s.toString()):String(s)).join("|")})$`:"^[^\\s\\S]$")}),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 k_=b("$ZodTransform",(t,e)=>{de.init(t,e),t._zod.optin="optional",Je.memoizer?.guard(t),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Cn(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));if(o instanceof Promise)throw new zt;return r.value=o,r}});function Iy(t,e){return t.value=e.issues.length?void 0:e.value,t}var bl=b("$ZodOptional",(t,e)=>{de.init(t,e),ee(t,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",ee(t,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),ee(t,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${Io(n.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(r.value===void 0){if(e.innerType._zod.optin!=="defaulted")return r;let o=e.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(s=>Iy(r,s)):Iy(r,o)}return e.innerType._zod.run(r,n)}}),P_=b("$ZodExactOptional",(t,e)=>{bl.init(t,e),ee(t,"values",r=>r.def.innerType._zod.values),ee(t,"pattern",r=>r.def.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),z_=b("$ZodNullable",(t,e)=>{de.init(t,e),ee(t,"optin",r=>r.def.innerType._zod.optin),ee(t,"optout",r=>r.def.innerType._zod.optout),ee(t,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${Io(n.source)}|null)$`):void 0}),ee(t,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),T_=b("$ZodDefault",(t,e)=>{de.init(t,e),t._zod.optin="defaulted",ee(t,"values",r=>r.def.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=>Ry(s,e)):Ry(o,e)}});function Ry(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var C_=b("$ZodPrefault",(t,e)=>{de.init(t,e),t._zod.optin="defaulted",ee(t,"values",r=>r.def.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))}),O_=b("$ZodNonOptional",(t,e)=>{de.init(t,e),ee(t,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),t._zod.parse=(r,n)=>{let o=e.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Dy(s,t)):Dy(o,t)}});function Dy(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function Ay(t,e,r,n){return e.issues.length?(t.value=r.catchValue({...e,value:t.value,error:{issues:e.issues.map(o=>Pt(o,n,st()))},input:t.value}),t):(t.value=e.value,e.memo&&(t.memo=!0),t)}var I_=b("$ZodCatch",(t,e)=>{de.init(t,e),ee(t,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ee(t,"optout",r=>r.def.innerType._zod.optout),ee(t,"values",r=>r.def.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({value:r.value,issues:[]},n);return o instanceof Promise?o.then(s=>Ay(r,s,e,n)):Ay(r,o,e,n)}});var wl=b("$ZodPipe",(t,e)=>{de.init(t,e),ee(t,"values",r=>r.def.in._zod.values),ee(t,"optin",r=>r.def.in._zod.optin),ee(t,"optout",r=>r.def.out._zod.optout),ee(t,"propValues",r=>r.def.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=>Hi(i,e.in,n)):Hi(s,e.in,n)}let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Hi(s,e.out,n)):Hi(o,e.out,n)}});function Hi(t,e,r){return t.issues.some(n=>n.code!=="unrecognized_keys")?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}var R_=b("$ZodPreprocess",(t,e)=>{wl.init(t,e)}),D_=b("$ZodReadonly",(t,e)=>{de.init(t,e),ee(t,"propValues",r=>r.def.innerType._zod.propValues),ee(t,"values",r=>r.def.innerType._zod.values),ee(t,"optin",r=>r.def.innerType?._zod?.optin),ee(t,"optout",r=>r.def.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(Ny):Ny(o)}});function Ny(t){return t.memo||(t.value=Object.freeze(t.value)),t}var A_=b("$ZodCustom",(t,e)=>{Oe.init(t,e),de.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=>jy(s,r,n,t));jy(o,r,n,t)}});function jy(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(Tn(o))}}var Sl=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},$l="~memo",N_=[];function j_(t){return t!==null&&typeof t=="object"}function xl(t){return t.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var M_=new WeakMap,Fo=0,Qi=1,qo=2;function ea(t,e,r){let n=M_.get(t);if(n!==void 0)return n?qo:Fo;if(e.has(t))return qo;e.add(t);let o=Fo,s=l=>{if(o!==qo&&l?._zod){let d=ea(l,e,r);d>o&&(o=d)}},i=(l,d)=>{let p=Fo;for(let m of Reflect.ownKeys(l)){let f=Object.getOwnPropertyDescriptor(l,m);if(d&&!f.enumerable)continue;let h=f.get?Qi:f.value?._zod?ea(f.value,e,r):Fo;h>p&&(p=h)}return p},a=l=>{l>o&&(o=l)},c=t._zod.def,u=c.type;switch(u){case"object":{let l=zn(c);a(l?i(l,!0):Qi),s(c.catchall);break}case"array":s(c.element);break;case"tuple":for(let l of c.items)s(l);s(c.rest);break;case"record":case"map":s(c.keyType),s(c.valueType);break;case"set":s(c.valueType);break;case"union":for(let l of c.options)s(l);break;case"intersection":s(c.left),s(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":s(c.innerType);break;case"pipe":s(c.in),s(c.out);break;case"function":s(c.input),s(c.output);break;case"lazy":{let l=c._cachedInner??(r?t._zod.innerType:void 0);a(l?ea(l,e,!1):Qi);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)s(p);else if(Array.isArray(p))for(let m of p)s(m)}}}return e.delete(t),HC(t,o)}function HC(t,e){return e!==Qi&&M_.set(t,e===qo),e}function WC(t,e){let r=t.buckets.get(e);return r||(r=new WeakMap,t.buckets.set(e,r)),r}var Yi,Xi=[],GC={alloc(t,e,r){let n=Yi;if(!n)return r;Yi=void 0;let o={value:r,issues:null};return n.set(e.value,o),Xi.push(o),r},guard(t){var e;(e=t._zod).deferred??(e.deferred=[]),t._zod.deferred.push(()=>{let r=t._zod.parse,n=(o,s)=>{if(s.direction!=="backward"&&JC(s,o.value))throw new Sl;return r(o,s)};t._zod.parse=n,t._zod.run===r&&(t._zod.run=n)})},attach(t){var e;let r,n=!1,o,s;(e=t._zod).deferred??(e.deferred=[]),t._zod.deferred.push(()=>{let i=t._zod.parse,a=(c,u)=>{if(r===void 0){let y=ea(t,new Set,!1);if(y===Fo)return t._zod.parse=i,t._zod.run===a&&(t._zod.run=i),i(c,u);y===qo||n?r=!0:n=!0}let l=c.value;if(!j_(l))return i(c,u);let d=u[$l];d||(d={buckets:new WeakMap,backEdges:void 0},u[$l]=d);let p;o===u?p=s:(p=WC(d,t),o=u,s=p);let m=p.get(l);if(m)return c.value=m.value,m.issues?m.issues.length&&c.issues.push(...xl(m.issues)):(c.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(m.value)),c;Yi=p;let f=Xi.length,h=i(c,u);Yi=void 0;let g=Xi.length>f?Xi.pop():void 0;return h instanceof Promise?h.then(y=>(g&&(g.issues=y.issues.length?xl(y.issues):N_),y)):(g&&(g.issues=h.issues.length?xl(h.issues):N_),h)};t._zod.parse=a,t._zod.run===i&&(t._zod.run=a)})}};function L_(){return GC}function JC(t,e){let r=t[$l]?.backEdges;return r!==void 0&&j_(e)&&r.has(e)}var KC=()=>{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(s){return t[s]??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",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(s,i){return s==="number"&&typeof i=="number"&&!Number.isFinite(i)?String(i):n[s]??s}return s=>{switch(s.code){case"invalid_type":{let i=o(s.expected),a=nl(s.input),c=o(a,s.input);return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${Ri(s.values[0])}`:`Invalid option: expected one of ${Oi(s.values,"|")}`;case"too_big":{let i=s.exact?"exactly ":s.inclusive?"<=":"<",a=e(s.origin);return a?`Too big: expected ${s.origin??"value"} to have ${i}${s.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${i}${s.maximum.toString()}`}case"too_small":{let i=s.exact?"exactly ":s.inclusive?">=":">",a=e(s.origin);return a?`Too small: expected ${s.origin} to have ${i}${s.minimum.toString()} ${a.unit}`:`Too small: expected ${s.origin} to be ${i}${s.minimum.toString()}`}case"invalid_format":{let i=s;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${Oi(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Invalid discriminator value. Expected ${s.options.map(a=>`'${a}'`).join(" | ")}`:s.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function Z_(){return{localeError:KC()}}var F_;var El=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 YC(){return new El}(F_=globalThis).__zod_globalRegistry??(F_.__zod_globalRegistry=YC());var Kr=globalThis.__zod_globalRegistry;function q_(t){return t.checks&&(t.checks=[...t.checks]),t}function U_(t,e){return new t(q_({type:"string",...D(e)}))}function V_(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...D(e)})}function B_(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...D(e)})}function H_(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...D(e)})}function W_(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...D(e)})}function G_(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...D(e)})}function J_(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...D(e)})}function K_(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...D(e)})}function Y_(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...D(e)})}function X_(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...D(e)})}function Q_(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...D(e)})}function ev(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...D(e)})}function tv(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...D(e)})}function rv(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...D(e)})}function nv(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...D(e)})}function ov(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...D(e)})}function sv(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...D(e)})}function iv(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...D(e)})}function av(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...D(e)})}function cv(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...D(e)})}function uv(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...D(e)})}function lv(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...D(e)})}function dv(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...D(e)})}function ta(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...D(e)})}function ra(t,e){return new t({type:"string",format:"date",check:"string_format",...D(e)})}function na(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...D(e)})}function oa(t,e){return new t({type:"string",format:"duration",check:"string_format",...D(e)})}function fv(t,e){return new t(q_({type:"number",checks:[],...D(e)}))}function pv(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...D(e)})}function mv(t,e){return new t({type:"boolean",...D(e)})}function hv(t,e){return new t({type:"null",...D(e)})}function gv(t){return new t({type:"unknown"})}function yv(t,e){return new t({type:"never",...D(e)})}function sa(t,e){return new pl({check:"less_than",...D(e),value:t,inclusive:!1})}function Uo(t,e){return new pl({check:"less_than",...D(e),value:t,inclusive:!0})}function ia(t,e){return new ml({check:"greater_than",...D(e),value:t,inclusive:!1})}function Vo(t,e){return new ml({check:"greater_than",...D(e),value:t,inclusive:!0})}function aa(t,e){return new my({check:"multiple_of",...D(e),value:t})}function ca(t,e){return new gy({check:"max_length",...D(e),maximum:t})}function On(t,e){return new yy({check:"min_length",...D(e),minimum:t})}function ua(t,e){return new _y({check:"length_equals",...D(e),length:t})}function kl(t,e){return new vy({check:"string_format",format:"regex",...D(e),pattern:t})}function Pl(t){return new by({check:"string_format",format:"lowercase",...D(t)})}function zl(t){return new wy({check:"string_format",format:"uppercase",...D(t)})}function Tl(t,e){return new xy({check:"string_format",format:"includes",...D(e),includes:t})}function Cl(t,e){return new Sy({check:"string_format",format:"starts_with",...D(e),prefix:t})}function Ol(t,e){return new $y({check:"string_format",format:"ends_with",...D(e),suffix:t})}function dr(t){return new Ey({check:"overwrite",tx:t})}function Il(t){return dr(e=>e.normalize(t))}function Rl(){return dr(t=>t.trim())}function Dl(){return dr(t=>t.toLowerCase())}function Al(){return dr(t=>t.toUpperCase())}function Nl(){return dr(t=>Xu(t))}function _v(t,e,r){return new t({type:"array",element:e,...D(r)})}function vv(t,e,r){let n=D(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function bv(t,e,r){return new t({type:"custom",check:"custom",fn:e,...D(r)})}function wv(t,e){let r=XC(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Tn(o,n.value,r._zod.def));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push(Tn(s))}},t(n.value,n)),e);return r}function XC(t,e){let r=new Oe({check:"custom",...D(e)});return r._zod.check=t,r}function Bo(t,...e){for(let r of e)for(let n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&ot(t,n,r[n]);return t}function Ml(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??Kr,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 Yt(t,e,r,n,o){let s=typeof e.unrepresentable=="function"?e.unrepresentable({zodSchema:t,path:n.path,message:o}):e.unrepresentable;if(s==="any")return!1;if(s===void 0||s==="throw")throw new Error(o);return Object.assign(r,s),!0}function Ee(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),e.sharedDefsExtractedFor=void 0,e.sharedEmitDoneFor=void 0;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),Ee(d,e,l),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Bo(i.schema,c),e.io==="input"&&Ue(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 xv(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Ll(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;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}/${xv(m)}`}}let c="#",u=`${c}/${a}/`;if(i[1]===r&&!i[1].schema.id)return{ref:c};let l=i[1].schema.id??`__schema${t.counter++}`;return{defId:l,ref:u+xv(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>
|
|
149
|
-
|
|
150
|
-
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}a.count>1&&t.reused==="ref"&&s(i)}t.external&&(t.sharedDefsExtractedFor=t.external)}function Ev(t){let e=t.anyOf;if(!Array.isArray(e)||e.length===0||t.type!==void 0)return;let r=[];for(let n of e){if(!n||typeof n!="object")return;Ev(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let s=n.type;for(let i of Array.isArray(s)?s:[s]){if(typeof i!="string")return;r.includes(i)||r.push(i)}}delete t.anyOf,t.type=r.length===1?r[0]:r}var kv=new Set(["type","properties","required","additionalProperties"]),Sv=["oneOf","anyOf"];function $v(t){let e=t.additionalProperties;return e===void 0||e===!1||typeof e!="object"||e===null?null:Object.keys(e).length?e:null}function jl(t){let e=[];for(let s of t){if(typeof s!="object"||s.type!=="object")return null;for(let i in s)if(!kv.has(i))return null;e.push(s)}let r={},n=new Set;for(let s of e){for(let i in s.properties){if(Object.prototype.hasOwnProperty.call(r,i))continue;let a=[];for(let u of e){let l=u.properties?.[i]??$v(u);l!=null&&(a.some(d=>JSON.stringify(d)===JSON.stringify(l))||a.push(l))}let c=a.length===1?a[0]:jl(a)??{allOf:a};ot(r,i,c)}for(let i of s.required??[])n.add(i)}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),e.every(s=>s.additionalProperties===!1))o.additionalProperties=!1;else{let s=[];for(let i of e){let a=$v(i);a&&!s.some(c=>JSON.stringify(c)===JSON.stringify(a))&&s.push(a)}s.length===1?o.additionalProperties=s[0]:s.length>1&&(o.additionalProperties={allOf:s})}return o}function QC(t){let e=t.allOf;if(!Array.isArray(e)||e.length<2)return;for(let o of kv)if(o in t)return;let r=e.filter(o=>Sv.some(s=>Array.isArray(o[s]))),n=null;if(!r.length)n=jl(e);else{let o=r[0],s=Sv.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;let i=e.filter(c=>c!==o),a=o[s].map(c=>jl([...i,c]));if(a.some(c=>!c))return;n={[s]:a}}n&&(delete t.allOf,Bo(t,n))}function Zl(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)):Bo(u,f),Bo(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??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(let a of[...t.seen.entries()].reverse())n(a[0]);if(t.target!=="openapi-3.0")for(let a of t.seen.entries())Ev(a[1].def??a[1].schema);for(let a of t.deferred)a();if(t.intersections.length){let a=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=a.get(l);d?d.push(u):a.set(l,[u])}for(let c of t.intersections)for(let u of a.get(c)??[])QC(u)}}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)}Bo(o,r.defId?r.schema: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??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(let a of t.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,ot(i,c.defId,c.def))}t.external&&(t.sharedEmitDoneFor=t.external),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:Ho(e,"input",t.processors),output:Ho(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Ue(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 Ue(n.element,r);if(n.type==="set")return Ue(n.valueType,r);if(n.type==="lazy")return Ue(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"||n.type==="catch")return Ue(n.innerType,r);if(n.type==="intersection")return Ue(n.left,r)||Ue(n.right,r);if(n.type==="record"||n.type==="map")return Ue(n.keyType,r)||Ue(n.valueType,r);if(n.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:Ue(n.in,r)||Ue(n.out,r);if(n.type==="object"){for(let o in n.shape)if(Ue(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(Ue(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(Ue(o,r))return!0;return!!(n.rest&&Ue(n.rest,r))}return!1}var Pv=(t,e={})=>r=>{let n=Ml({...r,processors:e});return Ee(t,n),Ll(n,t),Zl(n,t)},Ho=(t,e,r={})=>n=>{let{libraryOptions:o,target:s}=n??{},i=Ml({...o??{},target:s,io:e,processors:r});return Ee(t,i),Ll(i,t),Zl(i,t)};var In=(t,e,r)=>{(t[e]===void 0||r>t[e])&&(t[e]=r)},Rn=(t,e,r)=>{(t[e]===void 0||r<t[e])&&(t[e]=r)},zv=(t,e)=>{In(t,"minimum",e),Rn(t,"maximum",e)},Iv=(t,e)=>{t.multipleOf??(t.multipleOf=[]),t.multipleOf.includes(e)||t.multipleOf.push(e)},Rv=(t,e)=>{t.patterns??(t.patterns=new Set),t.patterns.add(e)},Dv=(t,e)=>{t.mime=t.mime?t.mime.filter(r=>e.includes(r)):[...e]},Av=(t,e)=>{t.format=e,e.includes("int")&&(t.isInt=!0)},Tv=(t,e)=>In(t,"minimum",e.minimum),Cv=(t,e)=>Rn(t,"maximum",e.maximum),Ov=t=>(e,r)=>{Av(e,r.format);let[n,o]=t[r.format];In(e,"minimum",n),Rn(e,"maximum",o)},eO={greater_than:(t,e)=>In(t,e.inclusive?"minimum":"exclusiveMinimum",e.value),less_than:(t,e)=>Rn(t,e.inclusive?"maximum":"exclusiveMaximum",e.value),multiple_of:(t,e)=>Iv(t,e.value),number_format:Ov(Ro),bigint_format:Ov(Di),min_length:Tv,max_length:Cv,length_equals:(t,e)=>zv(t,e.length),min_size:Tv,max_size:Cv,size_equals:(t,e)=>zv(t,e.size),string_format:(t,e)=>{Av(t,e.format),e.pattern&&Rv(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)=>Dv(t,e.mime)};function dt(t){let e={},r=t._zod.def,n=t._zod.traits.has("$ZodCheck")?[t,...r.checks??[]]:r.checks??[];for(let s of n)eO[s._zod.def.check]?.(e,s._zod.def);let o=t._zod.bag;o.minimum!==void 0&&In(e,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&In(e,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Rn(e,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Rn(e,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&Iv(e,o.multipleOf),o.format!==void 0&&(e.format??(e.format=o.format),o.format.includes("int")&&(e.isInt=!0)),o.mime&&Dv(e,o.mime);for(let s of o.patterns??[])Rv(e,s);return e}var tO={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rO=new Map([[yl,ty],[Ki,ry]]),Nv=t=>rO.get(t)??t,jv=(t,e,r,n)=>{let o=r;o.type="string";let{minimum:s,maximum:i,format:a,patterns:c,contentEncoding:u,laxFormat:l}=dt(t);if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=tO[a]??a,o.format===""&&delete o.format,(a==="time"||l)&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){let d=[...c].map(Nv);d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(p=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Mv=(t,e,r,n)=>{let o=r,{minimum:s,maximum:i,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u,isInt:l}=dt(t);o.type=l?"integer":"number";let d=typeof u=="number"&&u>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(i??Number.POSITIVE_INFINITY),m=e.target==="draft-04"||e.target==="openapi-3.0";if(d?m?(o.minimum=u,o.exclusiveMinimum=!0):o.exclusiveMinimum=u:typeof s=="number"&&(o.minimum=s),p?m?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c:typeof i=="number"&&(o.maximum=i),a){let f=new Set;for(let y of a)Number.isFinite(y)&&y!==0?f.add(Math.abs(y)):Yt(t,e,o,n,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`);let[h,...g]=f;h!==void 0&&(o.multipleOf=h),g.length&&(o.allOf=[...o.allOf??[],...g.map(y=>({multipleOf:y}))])}},Lv=(t,e,r,n)=>{r.type="boolean"};var Zv=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"};var Fv=(t,e,r,n)=>{r.not={}};var qv=(t,e,r,n)=>{};var Uv=(t,e,r,n)=>{let o=t._zod.def,s=En(o.entries);if(s.length===0){r.not={};return}s.every(i=>typeof i=="number")&&(r.type="number"),s.every(i=>typeof i=="string")&&(r.type="string"),r.enum=s},Vv=(t,e,r,n)=>{let o=t._zod.def;if(o.values.length===0){r.not={};return}let s=[];for(let i of o.values)if(i===void 0){if(Yt(t,e,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof i=="bigint"){if(Yt(t,e,r,n,"BigInt literals cannot be represented in JSON Schema"))return;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 Bv=(t,e,r,n)=>{Yt(t,e,r,n,"Custom types cannot be represented in JSON Schema")};var Hv=(t,e,r,n)=>{Yt(t,e,r,n,"Transforms cannot be represented in JSON Schema")};var Wv=(t,e,r,n)=>{let o=r,s=t._zod.def,{minimum:i,maximum:a}=dt(t);typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Ee(s.element,e,{...n,path:[...n.path,"items"]})};function la(t){let e=t._zod.def;return e.type==="pipe"&&e.in._zod.traits.has("$ZodTransform")?la(e.out):e.type==="catch"?la(e.innerType):t._zod.optin}var Gv=(t,e,r,n)=>{let o=r,s=t._zod.def,i=s.shape;if(Object.getOwnPropertySymbols(i).length&&Yt(t,e,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let u in i)ot(o.properties,u,Ee(i[u],e,{...n,path:[...n.path,"properties",u]}));let c=[];for(let u of Object.keys(i)){let l=s.shape[u];(e.io==="input"?la(l)===void 0:l._zod.optout===void 0)&&c.push(u)}c.length>0&&(o.required=c),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Ee(s.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(o.additionalProperties=!1)},Jv=(t,e,r,n)=>{let o=t._zod.def,s=o.inclusive===!1,i=o.options.map((a,c)=>Ee(a,e,{...n,path:[...n.path,s?"oneOf":"anyOf",c]}));s?r.oneOf=i:r.anyOf=i},Kv=(t,e,r,n)=>{let o=t._zod.def,s=Ee(o.left,e,{...n,path:[...n.path,"allOf",0]}),i=Ee(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,e.intersections.push(c)};function Fl(t,e,r){if(e.$ref){if(r.has(e))return e;r.add(e);let f=t.get(e)?.def;if(!f)return e;let h=Fl(t,f,r);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=>Fl(t,y,r));g.some((y,v)=>y!==h[v])&&(e={...e,[f]:g})}let n=Array.isArray(e.type)?e.type:[e.type],o=!n.includes("string")&&n.some(f=>f==="number"||f==="integer"),s=e.enum??(e.const!==void 0?[e.const]:void 0);if(!o&&!s?.some(f=>typeof f=="number"))return e;let{minimum:i,maximum:a,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)),o&&(m.type="string",s||(m.pattern=(n.includes("number")?Mo:dl).source)),m}var ql=new WeakMap;function nO(t){let e=new Map;for(let n of t.seen.values())n.def&&!e.has(n.schema)&&e.set(n.schema,n);let r=new Map;for(let n of ql.get(t)??[]){let o=t.seen.get(n),s=(o?.def??o?.schema)?.propertyNames;if(!s||s===!0||r.has(s))continue;let i=Fl(e,s,new Set);i!==s&&r.set(s,i)}if(r.size)for(let n of t.seen.values())for(let o of[n.schema,n.def]){let s=o&&r.get(o.propertyNames);s&&(o.propertyNames=s)}}var Yv=(t,e,r,n)=>{let o=r,s=t._zod.def;o.type="object";let i=s.keyType,a=dt(i).patterns;if(s.mode==="loose"&&a&&a.size>0){let l=Ee(s.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let d of a)ot(o.patternProperties,Nv(d).source,l)}else{if(e.target==="draft-07"||e.target==="draft-2020-12"){o.propertyNames=Ee(s.keyType,e,{...n,path:[...n.path,"propertyNames"]});let l=ql.get(e);l||(l=[],ql.set(e,l),e.deferred.push(()=>nO(e))),l.push(t)}o.additionalProperties=Ee(s.valueType,e,{...n,path:[...n.path,"additionalProperties"]})}let c=i._zod.values,u=e.io==="input"&&la(s.valueType)!==void 0;if(c&&!s.partial&&!u){let l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(o.required=l.map(String))}},Xv=(t,e,r,n)=>{let o=t._zod.def,s=Ee(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"}]},Qv=(t,e,r,n)=>{let o=t._zod.def;Ee(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType},Ul=Symbol();function eb(t,e,r,n,o){let s=!1,i=JSON.stringify(t,(a,c)=>typeof c!="bigint"?c:(s=!0,null));return s?(Yt(e,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),Ul):JSON.parse(i)}var tb=(t,e,r,n)=>{let o=t._zod.def;Ee(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType;let i=eb(o.defaultValue,t,e,r,n);i!==Ul&&(r.default=i)},rb=(t,e,r,n)=>{let o=t._zod.def;Ee(o.innerType,e,n);let s=e.seen.get(t);if(s.ref=o.innerType,e.io!=="input")return;let i=eb(o.defaultValue,t,e,r,n);i!==Ul&&(r._prefault=i)},nb=(t,e,r,n)=>{let o=t._zod.def;Ee(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{Yt(t,e,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=i},ob=(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;Ee(i,e,n);let a=e.seen.get(t);a.ref=i},sb=(t,e,r,n)=>{let o=t._zod.def;Ee(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType,r.readOnly=!0};var Vl=(t,e,r,n)=>{let o=t._zod.def;Ee(o.innerType,e,n);let s=e.seen.get(t);s.ref=o.innerType};function da(t){return!!t._zod}function fr(t,e){return da(t)?cl(t,e):t.safeParse(e)}function fa(t){if(!t)return;let e;if(da(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function pa(t){if(da(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 ib=new WeakSet([Object.prototype,Error.prototype]);function ma(t,e,r){Object.defineProperty(t,e,{configurable:!0,enumerable:!1,get(){let n=r(this);return Object.defineProperty(this,e,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,e,{value:n,configurable:!0,writable:!0})}})}var pO=(t,e)=>{Pg.init(t,e),t.name="ZodError";let r=Object.getPrototypeOf(t);ib.has(r)||(ib.add(r),ma(r,"format",n=>o=>Cg(n,o)),ma(r,"flatten",n=>o=>Tg(n,o)),ma(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,kn,2)}),ma(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,kn,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))};var it=b("ZodError",pO,void 0,{Parent:Error});var ab=Li(it),cb=Zi(it),ub=jo(it),lb=Fi(it),db=Ig(it),fb=Rg(it),pb=Dg(it),mb=Ag(it),hb=Ng(it),gb=jg(it),yb=Mg(it),_b=Lg(it);function hO(){Je.localeError||st(Z_())}function ga(){Je.memoizer||st({memoizer:L_()})}var ve=b("ZodType",(t,e)=>(hO(),de.init(t,e),t.def=e,t.type=e.type,t),{check(...t){let e=this.def;return this.clone(j.mergeDefs(e,{checks:[...e.checks??[],...t.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,e){return Et(this,t,e)},brand(){return this},register(t,e){return t.add(this,e),this},refine(t,e){return this.check(oI(t,e))},superRefine(t,e){return this.check(sI(t,e))},overwrite(t){return this.check(dr(t))},optional(){return _e(this)},exactOptional(){return HO(this)},nullable(){return wb(this)},nullish(){return _e(wb(this))},nonoptional(t){return XO(this,t)},array(){return K(this)},or(t){return pe([this,t])},and(t){return ya(this,t)},transform(t){return xb(this,zb(t))},default(t){return JO(this,t)},prefault(t){return YO(this,t)},catch(t){return eI(this,t)},pipe(t){return xb(this,t)},readonly(){return nI(this)},describe(t){let e=this.clone();return Kr.add(e,{description:t}),e},meta(...t){if(t.length===0)return Kr.get(this);let e=this.clone();return Kr.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 j.hide(this,"~standard",{...gl(this),jsonSchema:{input:Ho(this,"input"),output:Ho(this,"output")}})},set"~standard"(t){j.own(this,"~standard",t)},parse:function t(e,r){return ab(this,e,r,{callee:t})},parseAsync:async function t(e,r){return await cb(this,e,r,{callee:t})},safeParse(t,e){return ub(this,t,e)},async safeParseAsync(t,e){return lb(this,t,e)},get spa(){return this?.safeParseAsync},set spa(t){j.own(this,"spa",t)},validate(t,e){return qi(this,t,e)},validateAsync(t,e){return Ui(this,t,e)},encode:function t(e,r){return db(this,e,r,{callee:t})},decode:function t(e,r){return fb(this,e,r,{callee:t})},encodeAsync:async function t(e,r){return await pb(this,e,r,{callee:t})},decodeAsync:async function t(e,r){return await mb(this,e,r,{callee:t})},safeEncode(t,e){return hb(this,t,e)},safeDecode(t,e){return gb(this,t,e)},async safeEncodeAsync(t,e){return yb(this,t,e)},async safeDecodeAsync(t,e){return _b(this,t,e)},toJSONSchema(t){return Pv(this,{})(t)},get description(){return Kr.get(this)?.description},get _def(){return this._zod.def}}),Sb=b("_ZodString",(t,e)=>{Ji.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>jv(t,r,n,o)},j.derived({format:t=>dt(t).format??null,minLength:t=>dt(t).minimum??null,maxLength:t=>dt(t).maximum??null},{regex(...t){return this.check(kl(...t))},includes(...t){return this.check(Tl(...t))},startsWith(...t){return this.check(Cl(...t))},endsWith(...t){return this.check(Ol(...t))},min(...t){return this.check(On(...t))},max(...t){return this.check(ca(...t))},length(...t){return this.check(ua(...t))},nonempty(...t){return this.check(On(1,...t))},lowercase(t){return this.check(Pl(t))},uppercase(t){return this.check(zl(t))},trim(){return this.check(Rl())},normalize(...t){return this.check(Il(...t))},toLowerCase(){return this.check(Dl())},toUpperCase(){return this.check(Al())},slugify(){return this.check(Nl())}})),gO=b("ZodString",(t,e)=>{Ji.init(t,e),Sb.init(t,e)},{email(t){return this.check(V_(yO,t))},url(t){return this.check(K_(vO,t))},jwt(t){return this.check(dv(DO,t))},emoji(t){return this.check(Y_(bO,t))},guid(t){return this.check(B_(_O,t))},uuid(t){return this.check(H_(ha,t))},uuidv4(t){return this.check(W_(ha,t))},uuidv6(t){return this.check(G_(ha,t))},uuidv7(t){return this.check(J_(ha,t))},nanoid(t){return this.check(X_(wO,t))},cuid(t){return this.check(Q_(xO,t))},cuid2(t){return this.check(ev(SO,t))},ulid(t){return this.check(tv($O,t))},base64(t){return this.check(cv(OO,t))},base64url(t){return this.check(uv(IO,t))},xid(t){return this.check(rv(EO,t))},ksuid(t){return this.check(nv(kO,t))},ipv4(t){return this.check(ov(PO,t))},ipv6(t){return this.check(sv(zO,t))},cidrv4(t){return this.check(iv(TO,t))},cidrv6(t){return this.check(av(CO,t))},e164(t){return this.check(lv(RO,t))},datetime(t){return this.check(ta(Go,t))},date(t){return this.check(ra(Jo,t))},time(t){return this.check(na(Ko,t))},duration(t){return this.check(oa(Yo,t))}});function _(t){return U_(gO,t)}var xe=b("ZodStringFormat",(t,e)=>{fe.init(t,e),Sb.init(t,e)}),Go=b("ZodISODateTime",(t,e)=>{Xy.init(t,e),xe.init(t,e)}),Jo=b("ZodISODate",(t,e)=>{Qy.init(t,e),xe.init(t,e)}),Ko=b("ZodISOTime",(t,e)=>{e_.init(t,e),xe.init(t,e)}),Yo=b("ZodISODuration",(t,e)=>{t_.init(t,e),xe.init(t,e)}),yO=b("ZodEmail",(t,e)=>{Fy.init(t,e),xe.init(t,e)});var _O=b("ZodGUID",(t,e)=>{Ly.init(t,e),xe.init(t,e)});var ha=b("ZodUUID",(t,e)=>{Zy.init(t,e),xe.init(t,e)});var vO=b("ZodURL",(t,e)=>{Vy.init(t,e),xe.init(t,e)});var bO=b("ZodEmoji",(t,e)=>{By.init(t,e),xe.init(t,e)});var wO=b("ZodNanoID",(t,e)=>{Hy.init(t,e),xe.init(t,e)});var xO=b("ZodCUID",(t,e)=>{Wy.init(t,e),xe.init(t,e)});var SO=b("ZodCUID2",(t,e)=>{Gy.init(t,e),xe.init(t,e)});var $O=b("ZodULID",(t,e)=>{Jy.init(t,e),xe.init(t,e)});var EO=b("ZodXID",(t,e)=>{Ky.init(t,e),xe.init(t,e)});var kO=b("ZodKSUID",(t,e)=>{Yy.init(t,e),xe.init(t,e)});var PO=b("ZodIPv4",(t,e)=>{r_.init(t,e),xe.init(t,e)});var zO=b("ZodIPv6",(t,e)=>{o_.init(t,e),xe.init(t,e)});var TO=b("ZodCIDRv4",(t,e)=>{s_.init(t,e),xe.init(t,e)});var CO=b("ZodCIDRv6",(t,e)=>{i_.init(t,e),xe.init(t,e)});var OO=b("ZodBase64",(t,e)=>{c_.init(t,e),xe.init(t,e)});var IO=b("ZodBase64URL",(t,e)=>{u_.init(t,e),xe.init(t,e)});var RO=b("ZodE164",(t,e)=>{l_.init(t,e),xe.init(t,e)});var DO=b("ZodJWT",(t,e)=>{d_.init(t,e),xe.init(t,e)});var $b=b("ZodNumber",(t,e)=>{_l.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Mv(t,r,n,o),t.isFinite=!0},j.derived({minValue:t=>{let{minimum:e,exclusiveMinimum:r}=dt(t);return Math.max(e??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:t=>{let{maximum:e,exclusiveMaximum:r}=dt(t);return Math.min(e??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:t=>{let{isInt:e,multipleOf:r}=dt(t);return!!e||!!r?.some(Number.isSafeInteger)},format:t=>dt(t).format??null},{gt(t,e){return this.check(ia(t,e))},gte(t,e){return this.check(Vo(t,e))},min(t,e){return this.check(Vo(t,e))},lt(t,e){return this.check(sa(t,e))},lte(t,e){return this.check(Uo(t,e))},max(t,e){return this.check(Uo(t,e))},int(t){return this.check(vb(t))},safe(t){return this.check(vb(t))},positive(t){return this.check(ia(0,t))},nonnegative(t){return this.check(Vo(0,t))},negative(t){return this.check(sa(0,t))},nonpositive(t){return this.check(Uo(0,t))},multipleOf(t,e){return this.check(aa(t,e))},step(t,e){return this.check(aa(t,e))},finite(){return this}}));function se(t){return fv($b,t)}var AO=b("ZodNumberFormat",(t,e)=>{f_.init(t,e),$b.init(t,e)});function vb(t){return pv(AO,t)}var NO=b("ZodBoolean",(t,e)=>{p_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Lv(t,r,n,o)});function Te(t){return mv(NO,t)}var jO=b("ZodNull",(t,e)=>{m_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Zv(t,r,n,o)});function Eb(t){return hv(jO,t)}var MO=b("ZodUnknown",(t,e)=>{h_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>qv(t,r,n,o)});function ye(){return gv(MO)}var LO=b("ZodNever",(t,e)=>{g_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Fv(t,r,n,o)});function ZO(t){return yv(LO,t)}var FO=b("ZodArray",(t,e)=>{ga(),y_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Wv(t,r,n,o),t.element=e.element},{min(t,e){return this.check(On(t,e))},nonempty(t){return this.check(On(1,t))},max(t,e){return this.check(ca(t,e))},length(t,e){return this.check(ua(t,e))},unwrap(){return this.element}});function K(t,e){return _v(FO,t,e)}var kb=b("ZodObject",(t,e)=>{ga(),b_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Gv(t,r,n,o),j.installLazyProp(t,"shape",r=>r._zod.def.shape,!1)},{keyof(){return Ke(Object.keys(this._zod.def.shape))},catchall(t){return this.clone(j.mergeDefs(this._zod.def,{catchall:t}))},passthrough(){return this.clone(j.mergeDefs(this._zod.def,{catchall:ye()}))},loose(){return this.clone(j.mergeDefs(this._zod.def,{catchall:ye()}))},strict(){return this.clone(j.mergeDefs(this._zod.def,{catchall:ZO()}))},strip(){return this.clone(j.mergeDefs(this._zod.def,{catchall:void 0}))},extend(t){return j.extend(this,t)},safeExtend(t){return j.safeExtend(this,t)},merge(t){return j.merge(this,t)},pick(t){return j.pick(this,t)},omit(t){return j.omit(this,t)},partial(...t){return j.partial(Tb,this,t[0])},exactPartial(...t){return j.partial(Cb,this,t[0],"exactPartial")},required(...t){return j.required(Ob,this,t[0])}});function z(t,e){let r={type:"object",shape:t??{},...j.normalizeParams(e)};return new kb(r)}function Ve(t,e){return new kb({type:"object",shape:t,catchall:ye(),...j.normalizeParams(e)})}var Pb=b("ZodUnion",(t,e)=>{vl.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Jv(t,r,n,o),t.options=e.options});function pe(t,e){return new Pb({type:"union",options:t,...j.normalizeParams(e)})}var qO=b("ZodDiscriminatedUnion",(t,e)=>{Pb.init(t,e),w_.init(t,e)});function Hl(t,e,r){return new qO({type:"union",options:e,discriminator:t,...j.normalizeParams(r)})}var UO=b("ZodIntersection",(t,e)=>{x_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Kv(t,r,n,o)});function ya(t,e){return new UO({type:"intersection",left:t,right:e})}var bb=b("ZodRecord",(t,e)=>{ga(),S_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Yv(t,r,n,o),t.keyType=e.keyType,t.valueType=e.valueType});function ue(t,e,r){return!e||!e._zod?new bb({type:"record",keyType:_(),valueType:t,...j.normalizeParams(e)}):new bb({type:"record",keyType:t,valueType:e,...j.normalizeParams(r)})}var Bl=b("ZodEnum",(t,e)=>{$_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(n,o,s)=>Uv(t,n,o,s),t.enum=e.entries,t.options=[...t._zod.values];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 Bl({...e,checks:[],...j.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 Bl({...e,checks:[],...j.normalizeParams(o),entries:s})}});function Ke(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Bl({type:"enum",entries:r,...j.normalizeParams(e)})}var VO=b("ZodLiteral",(t,e)=>{E_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Vv(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 O(t,e){return new VO({type:"literal",values:Array.isArray(t)?t:[t],...j.normalizeParams(e)})}var BO=b("ZodTransform",(t,e)=>{ga(),k_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Hv(t,r,n,o),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Cn(t.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(j.issue(s,r.value,e));else{let i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=r.value),i.inst??(i.inst=t),r.issues.push(j.issue(i))}};let o=e.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function zb(t){return new BO({type:"transform",transform:t})}var Tb=b("ZodOptional",(t,e)=>{bl.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Vl(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function _e(t){return new Tb({type:"optional",innerType:t})}var Cb=b("ZodExactOptional",(t,e)=>{P_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Vl(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function HO(t){return new Cb({type:"optional",innerType:t})}var WO=b("ZodNullable",(t,e)=>{z_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Xv(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function wb(t){return new WO({type:"nullable",innerType:t})}var GO=b("ZodDefault",(t,e)=>{T_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>tb(t,r,n,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function JO(t,e){return new GO({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():j.shallowClone(e)}})}var KO=b("ZodPrefault",(t,e)=>{C_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>rb(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function YO(t,e){return new KO({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():j.shallowClone(e)}})}var Ob=b("ZodNonOptional",(t,e)=>{O_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Qv(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function XO(t,e){return new Ob({type:"nonoptional",innerType:t,...j.normalizeParams(e)})}var QO=b("ZodCatch",(t,e)=>{I_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>nb(t,r,n,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function eI(t,e){return new QO({type:"catch",innerType:t,catchValue:typeof e=="function"?e:j.constantCatch(e)})}var Ib=b("ZodPipe",(t,e)=>{wl.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>ob(t,r,n,o),t.in=e.in,t.out=e.out});function xb(t,e){return new Ib({type:"pipe",in:t,out:e})}var tI=b("ZodPreprocess",(t,e)=>{Ib.init(t,e),R_.init(t,e)}),rI=b("ZodReadonly",(t,e)=>{D_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>sb(t,r,n,o),t.unwrap=()=>t._zod.def.innerType});function nI(t){return new rI({type:"readonly",innerType:t})}var Rb=b("ZodCustom",(t,e)=>{A_.init(t,e),ve.init(t,e),t._zod.processJSONSchema=(r,n,o)=>Bv(t,r,n,o)});function Db(t,e){return vv(Rb,t??(()=>!0),e)}function oI(t,e={}){return bv(Rb,t,e)}function sI(t,e){return wv(t,e)}function Wl(t,e){return new tI({type:"pipe",in:zb(t),out:e})}var _a={};_p(_a,{ZodISODate:()=>Jo,ZodISODateTime:()=>Go,ZodISODuration:()=>Yo,ZodISOTime:()=>Ko,date:()=>aI,datetime:()=>iI,duration:()=>uI,time:()=>cI});function iI(t){return ta(Go,t)}function aI(t){return ra(Jo,t)}function cI(t){return na(Ko,t)}function uI(t){return oa(Yo,t)}var Jl="2025-11-25";var Ab=[Jl,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],pr="io.modelcontextprotocol/related-task",ba="2.0",ze=Db(t=>t!==null&&(typeof t=="object"||typeof t=="function")),Nb=pe([_(),se().int()]),jb=_(),K4=Ve({ttl:se().optional(),pollInterval:se().optional()}),lI=z({ttl:se().optional()}),dI=z({taskId:_()}),Kl=Ve({progressToken:Nb.optional(),[pr]:dI.optional()}),at=z({_meta:Kl.optional()}),Xo=at.extend({task:lI.optional()}),Mb=t=>Xo.safeParse(t).success,Ie=z({method:_(),params:at.loose().optional()}),ft=z({_meta:Kl.optional()}),pt=z({method:_(),params:ft.loose().optional()}),Re=Ve({_meta:Kl.optional()}),wa=pe([_(),se().int()]),Lb=z({jsonrpc:O(ba),id:wa,...Ie.shape}).strict(),Yl=t=>Lb.safeParse(t).success,Zb=z({jsonrpc:O(ba),...pt.shape}).strict(),Fb=t=>Zb.safeParse(t).success,Xl=z({jsonrpc:O(ba),id:wa,result:Re}).strict(),Qo=t=>Xl.safeParse(t).success;var H;(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"})(H||(H={}));var Ql=z({jsonrpc:O(ba),id:wa.optional(),error:z({code:se().int(),message:_(),data:ye().optional()})}).strict();var qb=t=>Ql.safeParse(t).success;var Ub=pe([Lb,Zb,Xl,Ql]),Y4=pe([Xl,Ql]),xa=Re.strict(),fI=ft.extend({requestId:wa.optional(),reason:_().optional()}),Sa=pt.extend({method:O("notifications/cancelled"),params:fI}),pI=z({src:_(),mimeType:_().optional(),sizes:K(_()).optional(),theme:Ke(["light","dark"]).optional()}),es=z({icons:K(pI).optional()}),Dn=z({name:_(),title:_().optional()}),Vb=Dn.extend({...Dn.shape,...es.shape,version:_(),websiteUrl:_().optional(),description:_().optional()}),mI=ya(z({applyDefaults:Te().optional()}),ue(_(),ye())),hI=Wl(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,ya(z({form:mI.optional(),url:ze.optional()}),ue(_(),ye()).optional())),gI=Ve({list:ze.optional(),cancel:ze.optional(),requests:Ve({sampling:Ve({createMessage:ze.optional()}).optional(),elicitation:Ve({create:ze.optional()}).optional()}).optional()}),yI=Ve({list:ze.optional(),cancel:ze.optional(),requests:Ve({tools:Ve({call:ze.optional()}).optional()}).optional()}),_I=z({experimental:ue(_(),ze).optional(),sampling:z({context:ze.optional(),tools:ze.optional()}).optional(),elicitation:hI.optional(),roots:z({listChanged:Te().optional()}).optional(),tasks:gI.optional(),extensions:ue(_(),ze).optional()}),vI=at.extend({protocolVersion:_(),capabilities:_I,clientInfo:Vb}),ed=Ie.extend({method:O("initialize"),params:vI});var bI=z({experimental:ue(_(),ze).optional(),logging:ze.optional(),completions:ze.optional(),prompts:z({listChanged:Te().optional()}).optional(),resources:z({subscribe:Te().optional(),listChanged:Te().optional()}).optional(),tools:z({listChanged:Te().optional()}).optional(),tasks:yI.optional(),extensions:ue(_(),ze).optional()}),wI=Re.extend({protocolVersion:_(),capabilities:bI,serverInfo:Vb,instructions:_().optional()}),td=pt.extend({method:O("notifications/initialized"),params:ft.optional()});var $a=Ie.extend({method:O("ping"),params:at.optional()}),xI=z({progress:se(),total:_e(se()),message:_e(_())}),SI=z({...ft.shape,...xI.shape,progressToken:Nb}),Ea=pt.extend({method:O("notifications/progress"),params:SI}),$I=at.extend({cursor:jb.optional()}),ts=Ie.extend({params:$I.optional()}),rs=Re.extend({nextCursor:jb.optional()}),EI=Ke(["working","input_required","completed","failed","cancelled"]),ns=z({taskId:_(),status:EI,ttl:pe([se(),Eb()]),createdAt:_(),lastUpdatedAt:_(),pollInterval:_e(se()),statusMessage:_e(_())}),An=Re.extend({task:ns}),kI=ft.merge(ns),os=pt.extend({method:O("notifications/tasks/status"),params:kI}),ka=Ie.extend({method:O("tasks/get"),params:at.extend({taskId:_()})}),Pa=Re.merge(ns),za=Ie.extend({method:O("tasks/result"),params:at.extend({taskId:_()})}),X4=Re.loose(),Ta=ts.extend({method:O("tasks/list")}),Ca=rs.extend({tasks:K(ns)}),Oa=Ie.extend({method:O("tasks/cancel"),params:at.extend({taskId:_()})}),Bb=Re.merge(ns),Hb=z({uri:_(),mimeType:_e(_()),_meta:ue(_(),ye()).optional()}),Wb=Hb.extend({text:_()}),rd=_().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Gb=Hb.extend({blob:rd}),ss=Ke(["user","assistant"]),Nn=z({audience:K(ss).optional(),priority:se().min(0).max(1).optional(),lastModified:_a.datetime({offset:!0}).optional()}),Jb=z({...Dn.shape,...es.shape,uri:_(),description:_e(_()),mimeType:_e(_()),size:_e(se()),annotations:Nn.optional(),_meta:_e(Ve({}))}),PI=z({...Dn.shape,...es.shape,uriTemplate:_(),description:_e(_()),mimeType:_e(_()),annotations:Nn.optional(),_meta:_e(Ve({}))}),zI=ts.extend({method:O("resources/list")}),TI=rs.extend({resources:K(Jb)}),CI=ts.extend({method:O("resources/templates/list")}),OI=rs.extend({resourceTemplates:K(PI)}),nd=at.extend({uri:_()}),II=nd,RI=Ie.extend({method:O("resources/read"),params:II}),DI=Re.extend({contents:K(pe([Wb,Gb]))}),AI=pt.extend({method:O("notifications/resources/list_changed"),params:ft.optional()}),NI=nd,jI=Ie.extend({method:O("resources/subscribe"),params:NI}),MI=nd,LI=Ie.extend({method:O("resources/unsubscribe"),params:MI}),ZI=ft.extend({uri:_()}),FI=pt.extend({method:O("notifications/resources/updated"),params:ZI}),qI=z({name:_(),description:_e(_()),required:_e(Te())}),UI=z({...Dn.shape,...es.shape,description:_e(_()),arguments:_e(K(qI)),_meta:_e(Ve({}))}),VI=ts.extend({method:O("prompts/list")}),BI=rs.extend({prompts:K(UI)}),HI=at.extend({name:_(),arguments:ue(_(),_()).optional()}),WI=Ie.extend({method:O("prompts/get"),params:HI}),od=z({type:O("text"),text:_(),annotations:Nn.optional(),_meta:ue(_(),ye()).optional()}),sd=z({type:O("image"),data:rd,mimeType:_(),annotations:Nn.optional(),_meta:ue(_(),ye()).optional()}),id=z({type:O("audio"),data:rd,mimeType:_(),annotations:Nn.optional(),_meta:ue(_(),ye()).optional()}),GI=z({type:O("tool_use"),name:_(),id:_(),input:ue(_(),ye()),_meta:ue(_(),ye()).optional()}),JI=z({type:O("resource"),resource:pe([Wb,Gb]),annotations:Nn.optional(),_meta:ue(_(),ye()).optional()}),KI=Jb.extend({type:O("resource_link")}),ad=pe([od,sd,id,KI,JI]),YI=z({role:ss,content:ad}),XI=Re.extend({description:_().optional(),messages:K(YI)}),QI=pt.extend({method:O("notifications/prompts/list_changed"),params:ft.optional()}),eR=z({title:_().optional(),readOnlyHint:Te().optional(),destructiveHint:Te().optional(),idempotentHint:Te().optional(),openWorldHint:Te().optional()}),tR=z({taskSupport:Ke(["required","optional","forbidden"]).optional()}),Kb=z({...Dn.shape,...es.shape,description:_().optional(),inputSchema:z({type:O("object"),properties:ue(_(),ze).optional(),required:K(_()).optional()}).catchall(ye()),outputSchema:z({type:O("object"),properties:ue(_(),ze).optional(),required:K(_()).optional()}).catchall(ye()).optional(),annotations:eR.optional(),execution:tR.optional(),_meta:ue(_(),ye()).optional()}),cd=ts.extend({method:O("tools/list")}),rR=rs.extend({tools:K(Kb)}),Ia=Re.extend({content:K(ad).default([]),structuredContent:ue(_(),ye()).optional(),isError:Te().optional()}),Q4=Ia.or(Re.extend({toolResult:ye()})),nR=Xo.extend({name:_(),arguments:ue(_(),ye()).optional()}),is=Ie.extend({method:O("tools/call"),params:nR}),oR=pt.extend({method:O("notifications/tools/list_changed"),params:ft.optional()}),eU=z({autoRefresh:Te().default(!0),debounceMs:se().int().nonnegative().default(300)}),as=Ke(["debug","info","notice","warning","error","critical","alert","emergency"]),sR=at.extend({level:as}),ud=Ie.extend({method:O("logging/setLevel"),params:sR}),iR=ft.extend({level:as,logger:_().optional(),data:ye()}),aR=pt.extend({method:O("notifications/message"),params:iR}),cR=z({name:_().optional()}),uR=z({hints:K(cR).optional(),costPriority:se().min(0).max(1).optional(),speedPriority:se().min(0).max(1).optional(),intelligencePriority:se().min(0).max(1).optional()}),lR=z({mode:Ke(["auto","required","none"]).optional()}),dR=z({type:O("tool_result"),toolUseId:_().describe("The unique identifier for the corresponding tool call."),content:K(ad).default([]),structuredContent:z({}).loose().optional(),isError:Te().optional(),_meta:ue(_(),ye()).optional()}),fR=Hl("type",[od,sd,id]),va=Hl("type",[od,sd,id,GI,dR]),pR=z({role:ss,content:pe([va,K(va)]),_meta:ue(_(),ye()).optional()}),mR=Xo.extend({messages:K(pR),modelPreferences:uR.optional(),systemPrompt:_().optional(),includeContext:Ke(["none","thisServer","allServers"]).optional(),temperature:se().optional(),maxTokens:se().int(),stopSequences:K(_()).optional(),metadata:ze.optional(),tools:K(Kb).optional(),toolChoice:lR.optional()}),hR=Ie.extend({method:O("sampling/createMessage"),params:mR}),cs=Re.extend({model:_(),stopReason:_e(Ke(["endTurn","stopSequence","maxTokens"]).or(_())),role:ss,content:fR}),ld=Re.extend({model:_(),stopReason:_e(Ke(["endTurn","stopSequence","maxTokens","toolUse"]).or(_())),role:ss,content:pe([va,K(va)])}),gR=z({type:O("boolean"),title:_().optional(),description:_().optional(),default:Te().optional()}),yR=z({type:O("string"),title:_().optional(),description:_().optional(),minLength:se().optional(),maxLength:se().optional(),format:Ke(["email","uri","date","date-time"]).optional(),default:_().optional()}),_R=z({type:Ke(["number","integer"]),title:_().optional(),description:_().optional(),minimum:se().optional(),maximum:se().optional(),default:se().optional()}),vR=z({type:O("string"),title:_().optional(),description:_().optional(),enum:K(_()),default:_().optional()}),bR=z({type:O("string"),title:_().optional(),description:_().optional(),oneOf:K(z({const:_(),title:_()})),default:_().optional()}),wR=z({type:O("string"),title:_().optional(),description:_().optional(),enum:K(_()),enumNames:K(_()).optional(),default:_().optional()}),xR=pe([vR,bR]),SR=z({type:O("array"),title:_().optional(),description:_().optional(),minItems:se().optional(),maxItems:se().optional(),items:z({type:O("string"),enum:K(_())}),default:K(_()).optional()}),$R=z({type:O("array"),title:_().optional(),description:_().optional(),minItems:se().optional(),maxItems:se().optional(),items:z({anyOf:K(z({const:_(),title:_()}))}),default:K(_()).optional()}),ER=pe([SR,$R]),kR=pe([wR,xR,ER]),PR=pe([kR,gR,yR,_R]),zR=Xo.extend({mode:O("form").optional(),message:_(),requestedSchema:z({type:O("object"),properties:ue(_(),PR),required:K(_()).optional()})}),TR=Xo.extend({mode:O("url"),message:_(),elicitationId:_(),url:_().url()}),CR=pe([zR,TR]),OR=Ie.extend({method:O("elicitation/create"),params:CR}),IR=ft.extend({elicitationId:_()}),RR=pt.extend({method:O("notifications/elicitation/complete"),params:IR}),jn=Re.extend({action:Ke(["accept","decline","cancel"]),content:Wl(t=>t===null?void 0:t,ue(_(),pe([_(),se(),Te(),K(_())])).optional())}),DR=z({type:O("ref/resource"),uri:_()});var AR=z({type:O("ref/prompt"),name:_()}),NR=at.extend({ref:pe([AR,DR]),argument:z({name:_(),value:_()}),context:z({arguments:ue(_(),_()).optional()}).optional()}),jR=Ie.extend({method:O("completion/complete"),params:NR});var MR=Re.extend({completion:Ve({values:K(_()).max(100),total:_e(se().int()),hasMore:_e(Te())})}),LR=z({uri:_().startsWith("file://"),name:_().optional(),_meta:ue(_(),ye()).optional()}),ZR=Ie.extend({method:O("roots/list"),params:at.optional()}),dd=Re.extend({roots:K(LR)}),FR=pt.extend({method:O("notifications/roots/list_changed"),params:ft.optional()}),tU=pe([$a,ed,jR,ud,WI,VI,zI,CI,RI,jI,LI,is,cd,ka,za,Ta,Oa]),rU=pe([Sa,Ea,td,FR,os]),nU=pe([xa,cs,ld,jn,dd,Pa,Ca,An]),oU=pe([$a,hR,OR,ZR,ka,za,Ta,Oa]),sU=pe([Sa,Ea,aR,FI,AI,oR,QI,os,RR]),iU=pe([xa,wI,MR,XI,BI,TI,OI,DI,Ia,rR,Pa,Ca,An]),Z=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===H.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new Gl(o.elicitations,r)}return new t(e,r,n)}},Gl=class extends Z{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(H.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function mr(t){return t==="completed"||t==="failed"||t==="cancelled"}var LU=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function fd(t){let r=fa(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=pa(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function pd(t,e){let r=fr(t,e);if(!r.success)throw r.error;return r.data}var WR=6e4,Ra=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(Sa,r=>{this._oncancel(r)}),this.setNotificationHandler(Ea,r=>{this._onprogress(r)}),this.setRequestHandler($a,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ka,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new Z(H.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(za,async(r,n)=>{let o=async()=>{let s=r.params.taskId;if(!await this._taskStore.getTask(s,n.sessionId))throw new Z(H.InvalidParams,`Task not found: ${s}`);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 Z(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 Z(H.InvalidParams,`Task not found: ${s}`);if(!mr(i.status))return await this._waitForTaskUpdate(s,n.signal,n.sessionId),await o();if(mr(i.status)){let a=await this._taskStore.getTaskResult(s,n.sessionId);return this._clearTaskQueue(s,n.sessionId),{...a,_meta:{...a._meta,[pr]:{taskId:s}}}}return await o()};return await o()}),this.setRequestHandler(Ta,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 Z(H.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(Oa,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new Z(H.InvalidParams,`Task not found: ${r.params.taskId}`);if(mr(o.status))throw new Z(H.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,n.sessionId);let s=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!s)throw new Z(H.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...s}}catch(o){throw o instanceof Z?o:new Z(H.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),Z.fromError(H.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),Qo(s)||qb(s)?this._onresponse(s):Yl(s)?this._onrequest(s,i):Fb(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._timeoutInfo.values())clearTimeout(n.timeoutId);this._timeoutInfo.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=Z.fromError(H.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?.[pr]?.taskId,i=o?.sessionId,a=this._taskStore,c=!0,u;if(s&&a&&this._taskMessageQueue&&i!==void 0&&(c=!1,u=(async()=>{if(!await a.getTask(s,i))throw new Z(H.InvalidParams,`Task not found: ${s}`);c=!0})()),n===void 0){let f={jsonrpc:"2.0",id:e.id,error:{code:H.MethodNotFound,message:"Method not found"}};if(s&&u){let h={type:"error",message:f,timestamp:Date.now()};u.then(()=>this._enqueueTaskMessage(s,h,i),()=>o?.send(f)).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)))}else s&&this._taskMessageQueue?this._enqueueTaskMessage(s,{type:"error",message:f,timestamp:Date.now()},o?.sessionId).catch(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):o?.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=Mb(e.params)?e.params.task:void 0,p=this._taskStore?this.requestTaskStore(e,o?.sessionId):void 0,m={signal:l.signal,sessionId:o?.sessionId,_meta:e.params?._meta,sendNotification:async f=>{if(l.signal.aborted)return;let h={relatedRequestId:e.id};s&&(h.relatedTask={taskId:s}),await this.notification(f,h)},sendRequest:async(f,h,g)=>{if(l.signal.aborted)throw new Z(H.ConnectionClosed,"Request was cancelled");let y={...g,relatedRequestId:e.id};s&&!y.relatedTask&&(y.relatedTask={taskId:s});let v=y.relatedTask?.taskId??s;return v&&p&&await p.updateTaskStatus(v,"input_required"),await this.request(f,h,y)},authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:s,taskStore:p,taskRequestedTtl:d?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};(u??Promise.resolve()).then(()=>{if(u&&l.signal.aborted)throw new Z(H.ConnectionClosed,"Request was cancelled");d&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,m)).then(async f=>{if(l.signal.aborted)return;let h={result:f,jsonrpc:"2.0",id:e.id};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"response",message:h,timestamp:Date.now()},o?.sessionId):await o?.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:H.InternalError,message:f.message??"Internal error",...f.data!==void 0&&{data:f.data}}};s&&this._taskMessageQueue&&c?await this._enqueueTaskMessage(s,{type:"error",message:h,timestamp:Date.now()},o?.sessionId):await o?.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: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),Qo(e))n(e);else{let i=new Z(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(Qo(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),Qo(e))o(e);else{let i=Z.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 Z?i:new Z(H.InternalError,String(i))}}return}let s;try{let i=await this.request(e,An,n);if(i.task)s=i.task.taskId,yield{type:"taskCreated",task:i.task};else throw new Z(H.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:s},n);if(yield{type:"taskStatus",task:a},mr(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:s},r,n)}:a.status==="failed"?yield{type:"error",error:new Z(H.InternalError,`Task ${s} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new Z(H.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 Z?i:new Z(H.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=v=>{l(v)};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(v){d(v);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||{},[pr]: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:o,resumptionToken:s,onresumptiontoken:i}).catch(S=>this._onerror(new Error(`Failed to send cancellation: ${S}`)));let x=v instanceof Z?v:new Z(H.RequestTimeout,String(v));l(x)};this._responseHandlers.set(p,v=>{if(!n?.signal?.aborted){if(v instanceof Error)return l(v);try{let x=fr(r,v.result);x.success?u(x.data):l(x.error)}catch(x){l(x)}}}),n?.signal?.addEventListener("abort",()=>{f(n?.signal?.reason)});let h=n?.timeout??WR,g=()=>f(Z.fromError(H.RequestTimeout,"Request timed out",{timeout:h}));this._setupTimeout(p,h,n?.maxTotalTimeout,g,n?.resetTimeoutOnProgress??!1);let y=c?.taskId;if(y){let v=x=>{let S=this._responseHandlers.get(p);S?S(x):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(x=>{this._cleanupTimeout(p),l(x)})}else this._transport.send(m,{relatedRequestId:o,resumptionToken:s,onresumptiontoken:i}).catch(v=>{this._cleanupTimeout(p),l(v)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},Pa,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},Ca,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},Bb,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||{},[pr]: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||{},[pr]: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||{},[pr]:r.relatedTask}}}),await this._transport.send(i,r)}setRequestHandler(e,r){let n=fd(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,s)=>{let i=pd(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=fd(e);this._notificationHandlers.set(n,o=>{let s=pd(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??this._transport?.sessionId,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"&&Yl(o.message)){let s=o.message.id,i=this._requestResolvers.get(s);i?(i(new Z(H.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,n){let o=this._options?.defaultTaskPollInterval??1e3;try{let s=await this._taskStore?.getTask(e,n);s?.pollInterval&&(o=s.pollInterval)}catch{}return new Promise((s,i)=>{if(r.aborted){i(new Z(H.InvalidRequest,"Request cancelled"));return}let a=setTimeout(s,o);r.addEventListener("abort",()=>{clearTimeout(a),i(new Z(H.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 Z(H.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=os.parse({method:"notifications/tasks/status",params:a});await this.notification(c),mr(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 Z(H.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(mr(a.status))throw new Z(H.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=os.parse({method:"notifications/tasks/status",params:c});await this.notification(u),mr(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}};function Yb(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function Xb(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];Yb(i)&&Yb(s)?r[o]={...i,...s}:r[o]=s}return r}var sS=_t(ip(),1),iS=_t(oS(),1);function EL(){let t=new sS.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,iS.default)(t),t}var xc=class{constructor(e){this._ajv=e??EL()}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 Sc=class{constructor(e){this._server=e}requestStream(e,r,n){return this._server.requestStream(e,r,n)}createMessageStream(e,r){let n=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!n?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages[e.messages.length-1],s=Array.isArray(o.content)?o.content:[o.content],i=s.some(l=>l.type==="tool_result"),a=e.messages.length>1?e.messages[e.messages.length-2]:void 0,c=a?Array.isArray(a.content)?a.content:[a.content]:[],u=c.some(l=>l.type==="tool_use");if(i){if(s.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(s.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},cs,r)}elicitInputStream(e,r){let n=this._server.getClientCapabilities(),o=e.mode??"form";switch(o){case"url":{if(!n?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!n?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}let s=o==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:s},jn,r)}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 aS(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 cS(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 $c=class extends Ra{constructor(e,r){super(r),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(as.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 xc,this.setRequestHandler(ed,n=>this._oninitialize(n)),this.setNotificationHandler(td,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(ud,async(n,o)=>{let s=o.sessionId||o.requestInfo?.headers["mcp-session-id"]||void 0,{level:i}=n.params,a=as.safeParse(i);return a.success&&this._loggingLevels.set(s,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Sc(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Xb(this._capabilities,e)}setRequestHandler(e,r){let o=fa(e)?.method;if(!o)throw new Error("Schema is missing a method literal");let s=pa(o);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=fr(is,c);if(!l.success){let f=l.error instanceof Error?l.error.message:String(l.error);throw new Z(H.InvalidParams,`Invalid tools/call request: ${f}`)}let{params:d}=l.data,p=await Promise.resolve(r(c,u));if(d.task){let f=fr(An,p);if(!f.success){let h=f.error instanceof Error?f.error.message:String(f.error);throw new Z(H.InvalidParams,`Invalid task creation result: ${h}`)}return f.data}let m=fr(Ia,p);if(!m.success){let f=m.error instanceof Error?m.error.message:String(m.error);throw new Z(H.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){cS(this._clientCapabilities?.tasks?.requests,e,"Client")}assertTaskHandlerCapability(e){this._capabilities&&aS(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:Ab.includes(r)?r:Jl,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"},xa)}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},ld,r):this.request({method:"sampling/createMessage",params:e},cs,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},jn,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},jn,r);if(s.action==="accept"&&s.content&&o.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(o.requestedSchema)(s.content);if(!a.valid)throw new Z(H.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(i){throw i instanceof Z?i:new Z(H.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},dd,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 mp=_t(require("node:process"),1);var kL=10*1024*1024,Ec=class{constructor(e){this._maxBufferSize=e?.maxBufferSize??kL}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(`
|
|
151
|
-
`);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),PL(r)}clear(){this._buffer=void 0}};function PL(t){return Ub.parse(JSON.parse(t))}function uS(t){return JSON.stringify(t)+`
|
|
152
|
-
`}var kc=class{constructor(e=mp.default.stdin,r=mp.default.stdout,n){this._stdin=e,this._stdout=r,this._started=!1,this._ondata=o=>{try{this._readBuffer.append(o),this.processReadBuffer()}catch(s){this.onerror?.(s),this.close().catch(()=>{})}},this._onerror=o=>{this.onerror?.(o)},this._readBuffer=new Ec({maxBufferSize:n?.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(r=>{let n=uS(e);this._stdout.write(n)?r():this._stdout.once("drain",r)})}};var Fs=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 qs=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 Pc=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):
|
|
153
158
|
|
|
154
|
-
`;for(let[
|
|
159
|
+
`;for(let[o,a]of Object.entries(i)){r+=`## ${o.charAt(0).toUpperCase()+o.slice(1)}s
|
|
155
160
|
|
|
156
|
-
`;for(let
|
|
157
|
-
`,
|
|
158
|
-
`,
|
|
159
|
-
`),
|
|
160
|
-
`),
|
|
161
|
-
`}return
|
|
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})
|
|
162
167
|
|
|
163
|
-
`;return
|
|
168
|
+
`;return n+=`**Status**: DEPRECATED
|
|
164
169
|
|
|
165
|
-
`,e.deprecationMessage&&(
|
|
170
|
+
`,e.deprecationMessage&&(n+=`**Message**: ${e.deprecationMessage}
|
|
166
171
|
|
|
167
|
-
`),e.versionDeprecated&&(
|
|
172
|
+
`),e.versionDeprecated&&(n+=`**Deprecated in**: v${e.versionDeprecated}
|
|
168
173
|
|
|
169
|
-
`),e.replacementSuggestion&&(
|
|
174
|
+
`),e.replacementSuggestion&&(n+=`**Recommended replacement**: ${e.replacementSuggestion}
|
|
170
175
|
|
|
171
|
-
`),r}};var to=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 ro=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 no=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 oo=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 so=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"]}}}};function zL(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 io=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)return{componentName:r.trim(),examples:[]};let n=zL(r.trim()),o=r.trim().toLowerCase(),s=this.data.find(i=>i.component===n)??this.data.find(i=>i.component===`eui-${n}`)??this.data.find(i=>i.component===`ecl-${n}`)??this.data.find(i=>i.component===`eds-${n}`)??this.data.find(i=>i.component===o);return{componentName:s?.component??r.trim(),examples:s?.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 ao=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 zc=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 co=class{constructor(e){this.index=e;this.parser=new zc}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 uo=class{query;formatter;constructor(e,r){this.query=new co(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 lo=class{query;formatter;constructor(e,r){this.query=new co(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 fo=class{execute(e={}){return Promise.resolve({content:TL,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:{}}}}},TL=`# 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
|
|
172
177
|
|
|
173
178
|
The EUI CLI is a command-line tool for scaffolding and managing EUI applications.
|
|
174
179
|
|
|
@@ -293,7 +298,7 @@ my-app/
|
|
|
293
298
|
\`\`\`
|
|
294
299
|
|
|
295
300
|
The application will be available at \`http://localhost:4200\`
|
|
296
|
-
`;var
|
|
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
|
|
297
302
|
|
|
298
303
|
## Overview
|
|
299
304
|
|
|
@@ -633,9 +638,9 @@ eui-cli serve-app --maxSpaceSize
|
|
|
633
638
|
|
|
634
639
|
- **Node.js**: >=24.0.0
|
|
635
640
|
- **Yarn**: >=1.22.4 <2
|
|
636
|
-
`;function
|
|
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
|
|
637
642
|
`),t.errors&&t.errors.forEach(u=>process.stderr.write(` - ${u}
|
|
638
|
-
`)),process.exit(1));let e=t.config,
|
|
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}
|
|
639
644
|
`),process.exit(1)});
|
|
640
645
|
/*! Bundled license information:
|
|
641
646
|
|