@babylonjs/mcp-servers 9.20.0 → 9.21.0

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.
@@ -1,47 +1,47 @@
1
1
  #!/usr/bin/env node
2
- import ou from"node:process";import*as ko from"node:crypto";import*as Nv from"node:http";import{dirname as xv}from"node:path";import{mkdirSync as jv,writeFileSync as Cv,readFileSync as Dv}from"node:fs";var au;const su=Object.freeze({status:"aborted"});function w(e,t,r){function i(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);const u=a.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){const m=l[d];m in s||(s[m]=u[m].bind(s))}}const n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(s){var c;const u=r?.Parent?new o:this;i(u,s),(c=u._zod).deferred??(c.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const cu=Symbol("zod_brand");class Lt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class xr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(au=globalThis).__zod_globalConfig??(au.__zod_globalConfig={});const jn=globalThis.__zod_globalConfig;function Re(e){return e&&Object.assign(jn,e),jn}function Av(e){return e}function Rv(e){return e}function Uv(e){}function Zv(e){throw new Error("Unexpected value in exhaustive check")}function Mv(e){}function wo(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function C(e,t="|"){return e.map(r=>J(r)).join(t)}function jr(e,t){return typeof t=="bigint"?t.toString():t}function Cn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Vt(e){return e==null}function Cr(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function uu(e,t){const r=e/t,i=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}const lu=Symbol("evaluating");function se(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==lu)return i===void 0&&(i=lu,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Fv(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function jt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function wt(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function Gv(e){return wt(e._zod.def)}function Lv(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Vv(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function Bv(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function So(e){return JSON.stringify(e)}function du(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Io="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const pu=Cn(()=>{if(jn.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Bt(e){if(sn(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(sn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Dr(e){return Bt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function qv(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const Jv=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Ar=new Set(["string","number","symbol"]),mu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Tt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function et(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function z(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Kv(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function J(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function fu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const hu={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]},gu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function vu(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=wt(e._zod.def,{get shape(){const a={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return jt(this,"shape",a),a},checks:[]});return et(e,o)}function yu(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=wt(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return jt(this,"shape",a),a},checks:[]});return et(e,o)}function _u(e,t){if(!Bt(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const o=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=wt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return jt(this,"shape",o),o}});return et(e,n)}function $u(e,t){if(!Bt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=wt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return jt(this,"shape",i),i}});return et(e,r)}function bu(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=wt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return jt(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return et(e,r)}function ku(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=wt(t._zod.def,{get shape(){const s=t._zod.def.shape,c={...s};if(r)for(const u in r){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(const u in s)c[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return jt(this,"shape",c),c},checks:[]});return et(t,a)}function wu(e,t,r){const i=wt(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a in n)o[a]=new e({type:"nonoptional",innerType:n[a]});return jt(this,"shape",o),o}});return et(t,i)}function qt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Su(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function ct(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Dn(e){return typeof e=="string"?e:e?.message}function tt(e,t,r){const i=e.message?e.message:Dn(e.inst?._zod.def?.error?.(e))??Dn(t?.error?.(e))??Dn(r.customError?.(e))??Dn(r.localeError?.(e))??"Invalid input",{inst:n,continue:o,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function Rr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function W(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function cn(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function Hv(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Iu(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Ou(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Wv(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Iu(t+r)}function Xv(e){return Ou(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Yv(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function Qv(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class ey{constructor(...t){}}var Tu=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:gu,Class:ey,NUMBER_FORMAT_RANGES:hu,aborted:qt,allowsEval:pu,assert:Mv,assertEqual:Av,assertIs:Uv,assertNever:Zv,assertNotEqual:Rv,assignProp:jt,base64ToUint8Array:Iu,base64urlToUint8Array:Wv,cached:Cn,captureStackTrace:Io,cleanEnum:Hv,cleanRegex:Cr,clone:et,cloneDef:Gv,createTransparentProxy:Kv,defineLazy:se,esc:So,escapeRegex:Tt,explicitlyAborted:Su,extend:_u,finalizeIssue:tt,floatSafeRemainder:uu,getElementAtPath:Lv,getEnumValues:wo,getLengthableOrigin:Ur,getParsedType:Jv,getSizableOrigin:Rr,hexToUint8Array:Yv,isObject:sn,isPlainObject:Bt,issue:cn,joinValues:C,jsonStringifyReplacer:jr,merge:bu,mergeDefs:wt,normalizeParams:z,nullish:Vt,numKeys:qv,objectClone:Fv,omit:yu,optionalKeys:fu,parsedType:W,partial:ku,pick:vu,prefixIssues:ct,primitiveTypes:mu,promiseAllObject:Vv,propertyKeyTypes:Ar,randomString:Bv,required:wu,safeExtend:$u,shallowClone:Dr,slugify:du,stringifyPrimitive:J,uint8ArrayToBase64:Ou,uint8ArrayToBase64url:Xv,uint8ArrayToHex:Qv,unwrapMessage:Dn});const Pu=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,jr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Oo=w("$ZodError",Pu),nt=w("$ZodError",Pu,{Parent:Error});function To(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Po(e,t=r=>r.message){const r={_errors:[]},i=(n,o=[])=>{for(const a of n.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{const s=[...o,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,u=0;for(;u<s.length;){const l=s[u];u===s.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(a))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}}};return i(e),r}function Eu(e,t=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var a,s;for(const c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>i({issues:u},[...o,...c.path]));else if(c.code==="invalid_key")i({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")i({issues:c.issues},[...o,...c.path]);else{const u=[...o,...c.path];if(u.length===0){r.errors.push(t(c));continue}let l=r,d=0;for(;d<u.length;){const m=u[d],p=d===u.length-1;typeof m=="string"?(l.properties??(l.properties={}),(a=l.properties)[m]??(a[m]={errors:[]}),l=l.properties[m]):(l.items??(l.items=[]),(s=l.items)[m]??(s[m]={errors:[]}),l=l.items[m]),p&&l.errors.push(t(c)),d++}}};return i(e),r}function zu(e){const t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Nu(e){const t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(const i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${zu(i.path)}`);return t.join(`
3
- `)}const An=e=>(t,r,i,n)=>{const o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Lt;if(a.issues.length){const s=new(n?.Err??e)(a.issues.map(c=>tt(c,o,Re())));throw Io(s,n?.callee),s}return a.value},Zr=An(nt),Rn=e=>async(t,r,i,n)=>{const o=i?{...i,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new(n?.Err??e)(a.issues.map(c=>tt(c,o,Re())));throw Io(s,n?.callee),s}return a.value},Mr=Rn(nt),Un=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Lt;return o.issues.length?{success:!1,error:new(e??Oo)(o.issues.map(a=>tt(a,n,Re())))}:{success:!0,data:o.value}},Fr=Un(nt),Zn=e=>async(t,r,i)=>{const n=i?{...i,async:!0}:{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>tt(a,n,Re())))}:{success:!0,data:o.value}},Gr=Zn(nt),Eo=e=>(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return An(e)(t,r,n)},ty=Eo(nt),zo=e=>(t,r,i)=>An(e)(t,r,i),ny=zo(nt),No=e=>async(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return Rn(e)(t,r,n)},ry=No(nt),xo=e=>async(t,r,i)=>Rn(e)(t,r,i),iy=xo(nt),jo=e=>(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return Un(e)(t,r,n)},oy=jo(nt),Co=e=>(t,r,i)=>Un(e)(t,r,i),ay=Co(nt),Do=e=>async(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return Zn(e)(t,r,n)},sy=Do(nt),Ao=e=>async(t,r,i)=>Zn(e)(t,r,i),cy=Ao(nt),xu=/^[cC][0-9a-z]{6,}$/,ju=/^[0-9a-z]+$/,Cu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Du=/^[0-9a-vA-V]{20}$/,Au=/^[A-Za-z0-9]{27}$/,Ru=/^[a-zA-Z0-9_-]{21}$/,Uu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,uy=/^[-+]?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)?)??$/,Zu=/^([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})$/,un=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ly=un(4),dy=un(6),py=un(7),Mu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,my=/^[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])?)*$/,fy=/^(([^<>()\[\]\\.,;:\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,}))$/,Fu=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,hy=Fu,gy=/^[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])?)*$/,vy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Gu(){return new RegExp(vy,"u")}const Lu=/^(?:(?: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])$/,Vu=/^(([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}|:))$/,Bu=e=>{const t=Tt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},qu=/^((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])$/,Ju=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ku=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ro=/^[A-Za-z0-9_-]*$/,Hu=/^(?=.{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])?)*\.?$/,Wu=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Uo=/^https?$/,Xu=/^\+[1-9]\d{6,14}$/,Yu="(?:(?:\\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])))",Qu=new RegExp(`^${Yu}$`);function el(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tl(e){return new RegExp(`^${el(e)}$`)}function nl(e){const t=el({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Yu}T(?:${i})$`)}const rl=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},il=/^-?\d+n?$/,ol=/^-?\d+$/,Zo=/^-?\d+(?:\.\d+)?$/,al=/^(?:true|false)$/i,sl=/^null$/i,cl=/^undefined$/i,ul=/^[^A-Z]*$/,ll=/^[^a-z]*$/,dl=/^[0-9a-fA-F]*$/;function Mn(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Fn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const yy=/^[0-9a-fA-F]{32}$/,_y=Mn(22,"=="),$y=Fn(22),by=/^[0-9a-fA-F]{40}$/,ky=Mn(27,"="),wy=Fn(27),Sy=/^[0-9a-fA-F]{64}$/,Iy=Mn(43,"="),Oy=Fn(43),Ty=/^[0-9a-fA-F]{96}$/,Py=Mn(64,""),Ey=Fn(64),zy=/^[0-9a-fA-F]{128}$/,Ny=Mn(86,"=="),xy=Fn(86);var Mo=Object.freeze({__proto__:null,base64:Ku,base64url:Ro,bigint:il,boolean:al,browserEmail:gy,cidrv4:qu,cidrv6:Ju,cuid:xu,cuid2:ju,date:Qu,datetime:nl,domain:Wu,duration:Uu,e164:Xu,email:Mu,emoji:Gu,extendedDuration:uy,guid:Zu,hex:dl,hostname:Hu,html5Email:my,httpProtocol:Uo,idnEmail:hy,integer:ol,ipv4:Lu,ipv6:Vu,ksuid:Au,lowercase:ul,mac:Bu,md5_base64:_y,md5_base64url:$y,md5_hex:yy,nanoid:Ru,null:sl,number:Zo,rfc5322Email:fy,sha1_base64:ky,sha1_base64url:wy,sha1_hex:by,sha256_base64:Iy,sha256_base64url:Oy,sha256_hex:Sy,sha384_base64:Py,sha384_base64url:Ey,sha384_hex:Ty,sha512_base64:Ny,sha512_base64url:xy,sha512_hex:zy,string:rl,time:tl,ulid:Cu,undefined:cl,unicodeEmail:Fu,uppercase:ll,uuid:un,uuid4:ly,uuid6:dy,uuid7:py,xid:Du});const Te=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),pl={number:"number",bigint:"bigint",object:"date"},Fo=w("$ZodCheckLessThan",(e,t)=>{Te.init(e,t);const r=pl[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Go=w("$ZodCheckGreaterThan",(e,t)=>{Te.init(e,t);const r=pl[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ml=w("$ZodCheckMultipleOf",(e,t)=>{Te.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):uu(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),fl=w("$ZodCheckNumberFormat",(e,t)=>{Te.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,o]=hu[t.format];e._zod.onattach.push(a=>{const s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=o,r&&(s.pattern=ol)}),e._zod.check=a=>{const s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});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:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),hl=w("$ZodCheckBigIntFormat",(e,t)=>{Te.init(e,t);const[r,i]=gu[t.format];e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),gl=w("$ZodCheckMaxSize",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:Rr(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),vl=w("$ZodCheckMinSize",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:Rr(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),yl=w("$ZodCheckSizeEquals",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,o=n.size;if(o===t.size)return;const a=o>t.size;i.issues.push({origin:Rr(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),_l=w("$ZodCheckMaxLength",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const a=Ur(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),$l=w("$ZodCheckMinLength",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const a=Ur(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),bl=w("$ZodCheckLengthEquals",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,o=n.length;if(o===t.length)return;const a=Ur(n),s=o>t.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Gn=w("$ZodCheckStringFormat",(e,t)=>{var r,i;Te.init(e,t),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),kl=w("$ZodCheckRegex",(e,t)=>{Gn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),wl=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ul),Gn.init(e,t)}),Sl=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ll),Gn.init(e,t)}),Il=w("$ZodCheckIncludes",(e,t)=>{Te.init(e,t);const r=Tt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ol=w("$ZodCheckStartsWith",(e,t)=>{Te.init(e,t);const r=new RegExp(`^${Tt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Tl=w("$ZodCheckEndsWith",(e,t)=>{Te.init(e,t);const r=new RegExp(`.*${Tt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Pl(e,t,r){e.issues.length&&t.issues.push(...ct(r,e.issues))}const El=w("$ZodCheckProperty",(e,t)=>{Te.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Pl(n,r,t.property));Pl(i,r,t.property)}}),zl=w("$ZodCheckMimeType",(e,t)=>{Te.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Nl=w("$ZodCheckOverwrite",(e,t)=>{Te.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class xl{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
2
+ import ou from"node:process";import*as wo from"node:crypto";import*as xv from"node:http";import{dirname as Nv}from"node:path";import{mkdirSync as jv,writeFileSync as Cv,readFileSync as Dv}from"node:fs";var au;const su=Object.freeze({status:"aborted"});function k(e,t,r){function i(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);const u=a.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){const m=l[d];m in s||(s[m]=u[m].bind(s))}}const n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(s){var c;const u=r?.Parent?new o:this;i(u,s),(c=u._zod).deferred??(c.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const cu=Symbol("zod_brand");class Lt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Nr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(au=globalThis).__zod_globalConfig??(au.__zod_globalConfig={});const jn=globalThis.__zod_globalConfig;function Re(e){return e&&Object.assign(jn,e),jn}function Av(e){return e}function Rv(e){return e}function Uv(e){}function Zv(e){throw new Error("Unexpected value in exhaustive check")}function Fv(e){}function ko(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function C(e,t="|"){return e.map(r=>J(r)).join(t)}function jr(e,t){return typeof t=="bigint"?t.toString():t}function Cn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Vt(e){return e==null}function Cr(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function uu(e,t){const r=e/t,i=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}const lu=Symbol("evaluating");function se(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==lu)return i===void 0&&(i=lu,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Mv(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function jt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function kt(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function Gv(e){return kt(e._zod.def)}function Lv(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Vv(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function Bv(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function So(e){return JSON.stringify(e)}function du(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Io="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const pu=Cn(()=>{if(jn.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Bt(e){if(sn(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(sn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Dr(e){return Bt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function qv(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const Jv=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Ar=new Set(["string","number","symbol"]),mu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Tt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function et(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function z(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Kv(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function J(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function fu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const hu={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]},gu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function vu(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=kt(e._zod.def,{get shape(){const a={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return jt(this,"shape",a),a},checks:[]});return et(e,o)}function yu(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=kt(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return jt(this,"shape",a),a},checks:[]});return et(e,o)}function _u(e,t){if(!Bt(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const o=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=kt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return jt(this,"shape",o),o}});return et(e,n)}function $u(e,t){if(!Bt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=kt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return jt(this,"shape",i),i}});return et(e,r)}function bu(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=kt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return jt(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return et(e,r)}function wu(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=kt(t._zod.def,{get shape(){const s=t._zod.def.shape,c={...s};if(r)for(const u in r){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(const u in s)c[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return jt(this,"shape",c),c},checks:[]});return et(t,a)}function ku(e,t,r){const i=kt(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a in n)o[a]=new e({type:"nonoptional",innerType:n[a]});return jt(this,"shape",o),o}});return et(t,i)}function qt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Su(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function ct(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Dn(e){return typeof e=="string"?e:e?.message}function tt(e,t,r){const i=e.message?e.message:Dn(e.inst?._zod.def?.error?.(e))??Dn(t?.error?.(e))??Dn(r.customError?.(e))??Dn(r.localeError?.(e))??"Invalid input",{inst:n,continue:o,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function Rr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function W(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function cn(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function Hv(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Iu(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Ou(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Wv(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Iu(t+r)}function Xv(e){return Ou(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Qv(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function Yv(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class ey{constructor(...t){}}var Tu=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:gu,Class:ey,NUMBER_FORMAT_RANGES:hu,aborted:qt,allowsEval:pu,assert:Fv,assertEqual:Av,assertIs:Uv,assertNever:Zv,assertNotEqual:Rv,assignProp:jt,base64ToUint8Array:Iu,base64urlToUint8Array:Wv,cached:Cn,captureStackTrace:Io,cleanEnum:Hv,cleanRegex:Cr,clone:et,cloneDef:Gv,createTransparentProxy:Kv,defineLazy:se,esc:So,escapeRegex:Tt,explicitlyAborted:Su,extend:_u,finalizeIssue:tt,floatSafeRemainder:uu,getElementAtPath:Lv,getEnumValues:ko,getLengthableOrigin:Ur,getParsedType:Jv,getSizableOrigin:Rr,hexToUint8Array:Qv,isObject:sn,isPlainObject:Bt,issue:cn,joinValues:C,jsonStringifyReplacer:jr,merge:bu,mergeDefs:kt,normalizeParams:z,nullish:Vt,numKeys:qv,objectClone:Mv,omit:yu,optionalKeys:fu,parsedType:W,partial:wu,pick:vu,prefixIssues:ct,primitiveTypes:mu,promiseAllObject:Vv,propertyKeyTypes:Ar,randomString:Bv,required:ku,safeExtend:$u,shallowClone:Dr,slugify:du,stringifyPrimitive:J,uint8ArrayToBase64:Ou,uint8ArrayToBase64url:Xv,uint8ArrayToHex:Yv,unwrapMessage:Dn});const Pu=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,jr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Oo=k("$ZodError",Pu),nt=k("$ZodError",Pu,{Parent:Error});function To(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Po(e,t=r=>r.message){const r={_errors:[]},i=(n,o=[])=>{for(const a of n.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{const s=[...o,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,u=0;for(;u<s.length;){const l=s[u];u===s.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(a))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}}};return i(e),r}function Eu(e,t=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var a,s;for(const c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>i({issues:u},[...o,...c.path]));else if(c.code==="invalid_key")i({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")i({issues:c.issues},[...o,...c.path]);else{const u=[...o,...c.path];if(u.length===0){r.errors.push(t(c));continue}let l=r,d=0;for(;d<u.length;){const m=u[d],p=d===u.length-1;typeof m=="string"?(l.properties??(l.properties={}),(a=l.properties)[m]??(a[m]={errors:[]}),l=l.properties[m]):(l.items??(l.items=[]),(s=l.items)[m]??(s[m]={errors:[]}),l=l.items[m]),p&&l.errors.push(t(c)),d++}}};return i(e),r}function zu(e){const t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function xu(e){const t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(const i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${zu(i.path)}`);return t.join(`
3
+ `)}const An=e=>(t,r,i,n)=>{const o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Lt;if(a.issues.length){const s=new(n?.Err??e)(a.issues.map(c=>tt(c,o,Re())));throw Io(s,n?.callee),s}return a.value},Zr=An(nt),Rn=e=>async(t,r,i,n)=>{const o=i?{...i,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new(n?.Err??e)(a.issues.map(c=>tt(c,o,Re())));throw Io(s,n?.callee),s}return a.value},Fr=Rn(nt),Un=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Lt;return o.issues.length?{success:!1,error:new(e??Oo)(o.issues.map(a=>tt(a,n,Re())))}:{success:!0,data:o.value}},Mr=Un(nt),Zn=e=>async(t,r,i)=>{const n=i?{...i,async:!0}:{async:!0};let o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>tt(a,n,Re())))}:{success:!0,data:o.value}},Gr=Zn(nt),Eo=e=>(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return An(e)(t,r,n)},ty=Eo(nt),zo=e=>(t,r,i)=>An(e)(t,r,i),ny=zo(nt),xo=e=>async(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return Rn(e)(t,r,n)},ry=xo(nt),No=e=>async(t,r,i)=>Rn(e)(t,r,i),iy=No(nt),jo=e=>(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return Un(e)(t,r,n)},oy=jo(nt),Co=e=>(t,r,i)=>Un(e)(t,r,i),ay=Co(nt),Do=e=>async(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return Zn(e)(t,r,n)},sy=Do(nt),Ao=e=>async(t,r,i)=>Zn(e)(t,r,i),cy=Ao(nt),Nu=/^[cC][0-9a-z]{6,}$/,ju=/^[0-9a-z]+$/,Cu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Du=/^[0-9a-vA-V]{20}$/,Au=/^[A-Za-z0-9]{27}$/,Ru=/^[a-zA-Z0-9_-]{21}$/,Uu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,uy=/^[-+]?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)?)??$/,Zu=/^([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})$/,un=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ly=un(4),dy=un(6),py=un(7),Fu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,my=/^[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])?)*$/,fy=/^(([^<>()\[\]\\.,;:\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,}))$/,Mu=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,hy=Mu,gy=/^[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])?)*$/,vy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Gu(){return new RegExp(vy,"u")}const Lu=/^(?:(?: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])$/,Vu=/^(([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}|:))$/,Bu=e=>{const t=Tt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},qu=/^((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])$/,Ju=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ku=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ro=/^[A-Za-z0-9_-]*$/,Hu=/^(?=.{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])?)*\.?$/,Wu=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Uo=/^https?$/,Xu=/^\+[1-9]\d{6,14}$/,Qu="(?:(?:\\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])))",Yu=new RegExp(`^${Qu}$`);function el(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tl(e){return new RegExp(`^${el(e)}$`)}function nl(e){const t=el({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Qu}T(?:${i})$`)}const rl=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},il=/^-?\d+n?$/,ol=/^-?\d+$/,Zo=/^-?\d+(?:\.\d+)?$/,al=/^(?:true|false)$/i,sl=/^null$/i,cl=/^undefined$/i,ul=/^[^A-Z]*$/,ll=/^[^a-z]*$/,dl=/^[0-9a-fA-F]*$/;function Fn(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Mn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const yy=/^[0-9a-fA-F]{32}$/,_y=Fn(22,"=="),$y=Mn(22),by=/^[0-9a-fA-F]{40}$/,wy=Fn(27,"="),ky=Mn(27),Sy=/^[0-9a-fA-F]{64}$/,Iy=Fn(43,"="),Oy=Mn(43),Ty=/^[0-9a-fA-F]{96}$/,Py=Fn(64,""),Ey=Mn(64),zy=/^[0-9a-fA-F]{128}$/,xy=Fn(86,"=="),Ny=Mn(86);var Fo=Object.freeze({__proto__:null,base64:Ku,base64url:Ro,bigint:il,boolean:al,browserEmail:gy,cidrv4:qu,cidrv6:Ju,cuid:Nu,cuid2:ju,date:Yu,datetime:nl,domain:Wu,duration:Uu,e164:Xu,email:Fu,emoji:Gu,extendedDuration:uy,guid:Zu,hex:dl,hostname:Hu,html5Email:my,httpProtocol:Uo,idnEmail:hy,integer:ol,ipv4:Lu,ipv6:Vu,ksuid:Au,lowercase:ul,mac:Bu,md5_base64:_y,md5_base64url:$y,md5_hex:yy,nanoid:Ru,null:sl,number:Zo,rfc5322Email:fy,sha1_base64:wy,sha1_base64url:ky,sha1_hex:by,sha256_base64:Iy,sha256_base64url:Oy,sha256_hex:Sy,sha384_base64:Py,sha384_base64url:Ey,sha384_hex:Ty,sha512_base64:xy,sha512_base64url:Ny,sha512_hex:zy,string:rl,time:tl,ulid:Cu,undefined:cl,unicodeEmail:Mu,uppercase:ll,uuid:un,uuid4:ly,uuid6:dy,uuid7:py,xid:Du});const Te=k("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),pl={number:"number",bigint:"bigint",object:"date"},Mo=k("$ZodCheckLessThan",(e,t)=>{Te.init(e,t);const r=pl[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Go=k("$ZodCheckGreaterThan",(e,t)=>{Te.init(e,t);const r=pl[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ml=k("$ZodCheckMultipleOf",(e,t)=>{Te.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):uu(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),fl=k("$ZodCheckNumberFormat",(e,t)=>{Te.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,o]=hu[t.format];e._zod.onattach.push(a=>{const s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=o,r&&(s.pattern=ol)}),e._zod.check=a=>{const s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});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:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),hl=k("$ZodCheckBigIntFormat",(e,t)=>{Te.init(e,t);const[r,i]=gu[t.format];e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),gl=k("$ZodCheckMaxSize",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:Rr(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),vl=k("$ZodCheckMinSize",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:Rr(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),yl=k("$ZodCheckSizeEquals",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,o=n.size;if(o===t.size)return;const a=o>t.size;i.issues.push({origin:Rr(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),_l=k("$ZodCheckMaxLength",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const a=Ur(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),$l=k("$ZodCheckMinLength",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const a=Ur(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),bl=k("$ZodCheckLengthEquals",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!Vt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,o=n.length;if(o===t.length)return;const a=Ur(n),s=o>t.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Gn=k("$ZodCheckStringFormat",(e,t)=>{var r,i;Te.init(e,t),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),wl=k("$ZodCheckRegex",(e,t)=>{Gn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),kl=k("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ul),Gn.init(e,t)}),Sl=k("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ll),Gn.init(e,t)}),Il=k("$ZodCheckIncludes",(e,t)=>{Te.init(e,t);const r=Tt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ol=k("$ZodCheckStartsWith",(e,t)=>{Te.init(e,t);const r=new RegExp(`^${Tt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Tl=k("$ZodCheckEndsWith",(e,t)=>{Te.init(e,t);const r=new RegExp(`.*${Tt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Pl(e,t,r){e.issues.length&&t.issues.push(...ct(r,e.issues))}const El=k("$ZodCheckProperty",(e,t)=>{Te.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Pl(n,r,t.property));Pl(i,r,t.property)}}),zl=k("$ZodCheckMimeType",(e,t)=>{Te.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),xl=k("$ZodCheckOverwrite",(e,t)=>{Te.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Nl{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
4
4
  `).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(const a of o)this.content.push(a)}compile(){const t=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
5
- `))}}const jl={major:4,minor:4,patch:3},Q=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jl;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const n of i)for(const o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(a,s,c)=>{let u=qt(a),l;for(const d of s){if(d._zod.def.when){if(Su(a)||!d._zod.def.when(a))continue}else if(u)continue;const m=a.issues.length,p=d._zod.check(a);if(p instanceof Promise&&c?.async===!1)throw new Lt;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,a.issues.length!==m&&(u||(u=qt(a,m)))});else{if(a.issues.length===m)continue;u||(u=qt(a,m))}}return l?l.then(()=>a):a},o=(a,s,c)=>{if(qt(a))return a.aborted=!0,a;const u=n(s,i,c);if(u instanceof Promise){if(c.async===!1)throw new Lt;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){const u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(l=>o(l,a,s)):o(u,a,s)}const c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Lt;return c.then(u=>n(u,i,s))}return n(c,i,s)}}se(e,"~standard",()=>({validate:n=>{try{const o=Fr(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Gr(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Ln=w("$ZodString",(e,t)=>{Q.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??rl(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),be=w("$ZodStringFormat",(e,t)=>{Gn.init(e,t),Ln.init(e,t)}),Cl=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Zu),be.init(e,t)}),Dl=w("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=un(i))}else t.pattern??(t.pattern=un());be.init(e,t)}),Al=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Mu),be.init(e,t)}),Rl=w("$ZodURL",(e,t)=>{be.init(e,t),e._zod.check=r=>{try{const i=r.value.trim();if(!t.normalize&&t.protocol?.source===Uo.source&&!/^https?:\/\//i.test(i)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ul=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Gu()),be.init(e,t)}),Zl=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ru),be.init(e,t)}),Ml=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=xu),be.init(e,t)}),Fl=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ju),be.init(e,t)}),Gl=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Cu),be.init(e,t)}),Ll=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Du),be.init(e,t)}),Vl=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Au),be.init(e,t)}),Bl=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=nl(t)),be.init(e,t)}),ql=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Qu),be.init(e,t)}),Jl=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=tl(t)),be.init(e,t)}),Kl=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Uu),be.init(e,t)}),Hl=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Lu),be.init(e,t),e._zod.bag.format="ipv4"}),Wl=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Vu),be.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Xl=w("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Bu(t.delimiter)),be.init(e,t),e._zod.bag.format="mac"}),Yl=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=qu),be.init(e,t)}),Ql=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ju),be.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[n,o]=i;if(!o)throw new Error;const a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Lo(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const ed=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ku),be.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Lo(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function td(e){if(!Ro.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Lo(r)}const nd=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ro),be.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{td(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rd=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Xu),be.init(e,t)});function id(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const od=w("$ZodJWT",(e,t)=>{be.init(e,t),e._zod.check=r=>{id(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ad=w("$ZodCustomStringFormat",(e,t)=>{be.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Vo=w("$ZodNumber",(e,t)=>{Q.init(e,t),e._zod.pattern=e._zod.bag.pattern??Zo,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),sd=w("$ZodNumberFormat",(e,t)=>{fl.init(e,t),Vo.init(e,t)}),Bo=w("$ZodBoolean",(e,t)=>{Q.init(e,t),e._zod.pattern=al,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),qo=w("$ZodBigInt",(e,t)=>{Q.init(e,t),e._zod.pattern=il,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),cd=w("$ZodBigIntFormat",(e,t)=>{hl.init(e,t),qo.init(e,t)}),ud=w("$ZodSymbol",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),ld=w("$ZodUndefined",(e,t)=>{Q.init(e,t),e._zod.pattern=cl,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),dd=w("$ZodNull",(e,t)=>{Q.init(e,t),e._zod.pattern=sl,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),pd=w("$ZodAny",(e,t)=>{Q.init(e,t),e._zod.parse=r=>r}),md=w("$ZodUnknown",(e,t)=>{Q.init(e,t),e._zod.parse=r=>r}),fd=w("$ZodNever",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),hd=w("$ZodVoid",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),gd=w("$ZodDate",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function vd(e,t,r){e.issues.length&&t.issues.push(...ct(r,e.issues)),t.value[r]=e.value}const yd=w("$ZodArray",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let a=0;a<n.length;a++){const s=n[a],c=t.element._zod.run({value:s,issues:[]},i);c instanceof Promise?o.push(c.then(u=>vd(u,r,a))):vd(c,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function Lr(e,t,r,i,n,o){const a=r in i;if(e.issues.length){if(n&&o&&!a)return;t.issues.push(...ct(r,e.issues))}if(!a&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function _d(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=fu(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function $d(e,t,r,i,n,o){const a=[],s=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optin==="optional",d=c.optout==="optional";for(const m in t){if(m==="__proto__"||s.has(m))continue;if(u==="never"){a.push(m);continue}const p=c.run({value:t[m],issues:[]},i);p instanceof Promise?e.push(p.then(h=>Lr(h,r,m,t,l,d))):Lr(p,r,m,t,l,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const Jo=w("$ZodObject",(e,t)=>{if(Q.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}const i=Cn(()=>_d(t));se(e._zod,"propValues",()=>{const s=t.shape,c={};for(const u in s){const l=s[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(const d of l.values)c[u].add(d)}}return c});const n=sn,o=t.catchall;let a;e._zod.parse=(s,c)=>{a??(a=i.value);const u=s.value;if(!n(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};const l=[],d=a.shape;for(const m of a.keys){const p=d[m],h=p._zod.optin==="optional",b=p._zod.optout==="optional",$=p._zod.run({value:u[m],issues:[]},c);$ instanceof Promise?l.push($.then(y=>Lr(y,s,m,u,h,b))):Lr($,s,m,u,h,b)}return o?$d(l,u,s,c,i.value,e):l.length?Promise.all(l).then(()=>s):s}}),bd=w("$ZodObjectJIT",(e,t)=>{Jo.init(e,t);const r=e._zod.parse,i=Cn(()=>_d(t)),n=m=>{const p=new xl(["shape","payload","ctx"]),h=i.value,b=k=>{const O=So(k);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};p.write("const input = payload.value;");const $=Object.create(null);let y=0;for(const k of h.keys)$[k]=`key_${y++}`;p.write("const newResult = {};");for(const k of h.keys){const O=$[k],N=So(k),L=m[k],Y=L?._zod?.optin==="optional",pe=L?._zod?.optout==="optional";p.write(`const ${O} = ${b(k)};`),Y&&pe?p.write(`
5
+ `))}}const jl={major:4,minor:4,patch:3},Y=k("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jl;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const n of i)for(const o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(a,s,c)=>{let u=qt(a),l;for(const d of s){if(d._zod.def.when){if(Su(a)||!d._zod.def.when(a))continue}else if(u)continue;const m=a.issues.length,p=d._zod.check(a);if(p instanceof Promise&&c?.async===!1)throw new Lt;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,a.issues.length!==m&&(u||(u=qt(a,m)))});else{if(a.issues.length===m)continue;u||(u=qt(a,m))}}return l?l.then(()=>a):a},o=(a,s,c)=>{if(qt(a))return a.aborted=!0,a;const u=n(s,i,c);if(u instanceof Promise){if(c.async===!1)throw new Lt;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){const u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(l=>o(l,a,s)):o(u,a,s)}const c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Lt;return c.then(u=>n(u,i,s))}return n(c,i,s)}}se(e,"~standard",()=>({validate:n=>{try{const o=Mr(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Gr(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Ln=k("$ZodString",(e,t)=>{Y.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??rl(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),be=k("$ZodStringFormat",(e,t)=>{Gn.init(e,t),Ln.init(e,t)}),Cl=k("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Zu),be.init(e,t)}),Dl=k("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=un(i))}else t.pattern??(t.pattern=un());be.init(e,t)}),Al=k("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Fu),be.init(e,t)}),Rl=k("$ZodURL",(e,t)=>{be.init(e,t),e._zod.check=r=>{try{const i=r.value.trim();if(!t.normalize&&t.protocol?.source===Uo.source&&!/^https?:\/\//i.test(i)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ul=k("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Gu()),be.init(e,t)}),Zl=k("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ru),be.init(e,t)}),Fl=k("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Nu),be.init(e,t)}),Ml=k("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ju),be.init(e,t)}),Gl=k("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Cu),be.init(e,t)}),Ll=k("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Du),be.init(e,t)}),Vl=k("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Au),be.init(e,t)}),Bl=k("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=nl(t)),be.init(e,t)}),ql=k("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Yu),be.init(e,t)}),Jl=k("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=tl(t)),be.init(e,t)}),Kl=k("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Uu),be.init(e,t)}),Hl=k("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Lu),be.init(e,t),e._zod.bag.format="ipv4"}),Wl=k("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Vu),be.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Xl=k("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Bu(t.delimiter)),be.init(e,t),e._zod.bag.format="mac"}),Ql=k("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=qu),be.init(e,t)}),Yl=k("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ju),be.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[n,o]=i;if(!o)throw new Error;const a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Lo(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const ed=k("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ku),be.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Lo(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function td(e){if(!Ro.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Lo(r)}const nd=k("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ro),be.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{td(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rd=k("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Xu),be.init(e,t)});function id(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const od=k("$ZodJWT",(e,t)=>{be.init(e,t),e._zod.check=r=>{id(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ad=k("$ZodCustomStringFormat",(e,t)=>{be.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Vo=k("$ZodNumber",(e,t)=>{Y.init(e,t),e._zod.pattern=e._zod.bag.pattern??Zo,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),sd=k("$ZodNumberFormat",(e,t)=>{fl.init(e,t),Vo.init(e,t)}),Bo=k("$ZodBoolean",(e,t)=>{Y.init(e,t),e._zod.pattern=al,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),qo=k("$ZodBigInt",(e,t)=>{Y.init(e,t),e._zod.pattern=il,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),cd=k("$ZodBigIntFormat",(e,t)=>{hl.init(e,t),qo.init(e,t)}),ud=k("$ZodSymbol",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),ld=k("$ZodUndefined",(e,t)=>{Y.init(e,t),e._zod.pattern=cl,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),dd=k("$ZodNull",(e,t)=>{Y.init(e,t),e._zod.pattern=sl,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),pd=k("$ZodAny",(e,t)=>{Y.init(e,t),e._zod.parse=r=>r}),md=k("$ZodUnknown",(e,t)=>{Y.init(e,t),e._zod.parse=r=>r}),fd=k("$ZodNever",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),hd=k("$ZodVoid",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),gd=k("$ZodDate",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function vd(e,t,r){e.issues.length&&t.issues.push(...ct(r,e.issues)),t.value[r]=e.value}const yd=k("$ZodArray",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const o=[];for(let a=0;a<n.length;a++){const s=n[a],c=t.element._zod.run({value:s,issues:[]},i);c instanceof Promise?o.push(c.then(u=>vd(u,r,a))):vd(c,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function Lr(e,t,r,i,n,o){const a=r in i;if(e.issues.length){if(n&&o&&!a)return;t.issues.push(...ct(r,e.issues))}if(!a&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function _d(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=fu(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function $d(e,t,r,i,n,o){const a=[],s=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optin==="optional",d=c.optout==="optional";for(const m in t){if(m==="__proto__"||s.has(m))continue;if(u==="never"){a.push(m);continue}const p=c.run({value:t[m],issues:[]},i);p instanceof Promise?e.push(p.then(h=>Lr(h,r,m,t,l,d))):Lr(p,r,m,t,l,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const Jo=k("$ZodObject",(e,t)=>{if(Y.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}const i=Cn(()=>_d(t));se(e._zod,"propValues",()=>{const s=t.shape,c={};for(const u in s){const l=s[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(const d of l.values)c[u].add(d)}}return c});const n=sn,o=t.catchall;let a;e._zod.parse=(s,c)=>{a??(a=i.value);const u=s.value;if(!n(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};const l=[],d=a.shape;for(const m of a.keys){const p=d[m],h=p._zod.optin==="optional",b=p._zod.optout==="optional",$=p._zod.run({value:u[m],issues:[]},c);$ instanceof Promise?l.push($.then(y=>Lr(y,s,m,u,h,b))):Lr($,s,m,u,h,b)}return o?$d(l,u,s,c,i.value,e):l.length?Promise.all(l).then(()=>s):s}}),bd=k("$ZodObjectJIT",(e,t)=>{Jo.init(e,t);const r=e._zod.parse,i=Cn(()=>_d(t)),n=m=>{const p=new Nl(["shape","payload","ctx"]),h=i.value,b=w=>{const O=So(w);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};p.write("const input = payload.value;");const $=Object.create(null);let y=0;for(const w of h.keys)$[w]=`key_${y++}`;p.write("const newResult = {};");for(const w of h.keys){const O=$[w],x=So(w),L=m[w],Q=L?._zod?.optin==="optional",pe=L?._zod?.optout==="optional";p.write(`const ${O} = ${b(w)};`),Q&&pe?p.write(`
6
6
  if (${O}.issues.length) {
7
- if (${N} in input) {
7
+ if (${x} in input) {
8
8
  payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
9
9
  ...iss,
10
- path: iss.path ? [${N}, ...iss.path] : [${N}]
10
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
11
11
  })));
12
12
  }
13
13
  }
14
14
 
15
15
  if (${O}.value === undefined) {
16
- if (${N} in input) {
17
- newResult[${N}] = undefined;
16
+ if (${x} in input) {
17
+ newResult[${x}] = undefined;
18
18
  }
19
19
  } else {
20
- newResult[${N}] = ${O}.value;
20
+ newResult[${x}] = ${O}.value;
21
21
  }
22
22
 
23
- `):Y?p.write(`
23
+ `):Q?p.write(`
24
24
  if (${O}.issues.length) {
25
25
  payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
26
26
  ...iss,
27
- path: iss.path ? [${N}, ...iss.path] : [${N}]
27
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
28
28
  })));
29
29
  }
30
30
 
31
31
  if (${O}.value === undefined) {
32
- if (${N} in input) {
33
- newResult[${N}] = undefined;
32
+ if (${x} in input) {
33
+ newResult[${x}] = undefined;
34
34
  }
35
35
  } else {
36
- newResult[${N}] = ${O}.value;
36
+ newResult[${x}] = ${O}.value;
37
37
  }
38
38
 
39
39
  `):p.write(`
40
- const ${O}_present = ${N} in input;
40
+ const ${O}_present = ${x} in input;
41
41
  if (${O}.issues.length) {
42
42
  payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
43
43
  ...iss,
44
- path: iss.path ? [${N}, ...iss.path] : [${N}]
44
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
45
45
  })));
46
46
  }
47
47
  if (!${O}_present && !${O}.issues.length) {
@@ -49,59 +49,59 @@ import ou from"node:process";import*as ko from"node:crypto";import*as Nv from"no
49
49
  code: "invalid_type",
50
50
  expected: "nonoptional",
51
51
  input: undefined,
52
- path: [${N}]
52
+ path: [${x}]
53
53
  });
54
54
  }
55
55
 
56
56
  if (${O}_present) {
57
57
  if (${O}.value === undefined) {
58
- newResult[${N}] = undefined;
58
+ newResult[${x}] = undefined;
59
59
  } else {
60
- newResult[${N}] = ${O}.value;
60
+ newResult[${x}] = ${O}.value;
61
61
  }
62
62
  }
63
63
 
64
- `)}p.write("payload.value = newResult;"),p.write("return payload;");const g=p.compile();return(k,O)=>g(m,k,O)};let o;const a=sn,s=!jn.jitless,u=s&&pu.value,l=t.catchall;let d;e._zod.parse=(m,p)=>{d??(d=i.value);const h=m.value;return a(h)?s&&u&&p?.async===!1&&p.jitless!==!0?(o||(o=n(t.shape)),m=o(m,p),l?$d([],h,m,p,d,e):m):r(m,p):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function kd(e,t,r,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const n=e.filter(o=>!qt(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>tt(a,i,Re())))}),t)}const Vr=w("$ZodUnion",(e,t)=>{Q.init(e,t),se(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),se(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),se(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),se(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${i.map(n=>Cr(n.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1;const a=[];for(const s of t.options){const c=s._zod.run({value:i.value,issues:[]},n);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=>kd(s,i,e,n)):kd(a,i,e,n)}});function wd(e,t,r,i){const n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>tt(a,i,Re())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}const Sd=w("$ZodXor",(e,t)=>{Vr.init(e,t),t.inclusive=!1;const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1;const a=[];for(const s of t.options){const c=s._zod.run({value:i.value,issues:[]},n);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>wd(s,i,e,n)):wd(a,i,e,n)}}),Id=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Vr.init(e,t);const r=e._zod.parse;se(e._zod,"propValues",()=>{const n={};for(const o of t.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(const u of c)n[s].add(u)}}return n});const i=Cn(()=>{const n=t.options,o=new Map;for(const a of n){const s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});e._zod.parse=(n,o)=>{const a=n.value;if(!sn(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;const s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(n,o):t.unionFallback||o.direction==="backward"?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),n)}}),Od=w("$ZodIntersection",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{const n=r.value,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,u])=>Td(r,c,u)):Td(r,o,a)}});function Ko(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Bt(e)&&Bt(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const a=Ko(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],a=Ko(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Td(e,t,r){const i=new Map;let n;for(const s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(const c of s.keys)i.has(c)||i.set(c,{}),i.get(c).l=!0}else e.issues.push(s);for(const s of r.issues)if(s.code==="unrecognized_keys")for(const c of s.keys)i.has(c)||i.set(c,{}),i.get(c).r=!0;else e.issues.push(s);const o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&n&&e.issues.push({...n,keys:o}),qt(e))return e;const a=Ko(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Ho=w("$ZodTuple",(e,t)=>{Q.init(e,t);const r=t.items;e._zod.parse=(i,n)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const a=[],s=Pd(r,"optin"),c=Pd(r,"optout");if(!t.rest){if(o.length<s)return i.issues.push({code:"too_small",minimum:s,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>r.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:o,inst:e,origin:"array"})}const u=new Array(r.length);for(let l=0;l<r.length;l++){const d=r[l]._zod.run({value:o[l],issues:[]},n);d instanceof Promise?a.push(d.then(m=>{u[l]=m})):u[l]=d}if(t.rest){let l=r.length-1;const d=o.slice(r.length);for(const m of d){l++;const p=t.rest._zod.run({value:m,issues:[]},n);p instanceof Promise?a.push(p.then(h=>Ed(h,i,l))):Ed(p,i,l)}}return a.length?Promise.all(a).then(()=>zd(u,i,r,o,c)):zd(u,i,r,o,c)}});function Pd(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function Ed(e,t,r){e.issues.length&&t.issues.push(...ct(r,e.issues)),t.value[r]=e.value}function zd(e,t,r,i,n){for(let o=0;o<r.length;o++){const a=e[o],s=o<i.length;if(a.issues.length){if(!s&&o>=n){t.value.length=o;break}t.issues.push(...ct(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(r[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}const Nd=w("$ZodRecord",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Bt(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const o=[],a=t.keyType._zod.values;if(a){r.value={};const s=new Set;for(const u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);const l=t.keyType._zod.run({value:u,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>tt(p,i,Re())),input:u,path:[u],inst:e});continue}const d=l.value,m=t.valueType._zod.run({value:n[u],issues:[]},i);m instanceof Promise?o.push(m.then(p=>{p.issues.length&&r.issues.push(...ct(u,p.issues)),r.value[d]=p.value})):(m.issues.length&&r.issues.push(...ct(u,m.issues)),r.value[d]=m.value)}let c;for(const u in n)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(const s of Reflect.ownKeys(n)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Zo.test(s)&&c.issues.length){const d=t.keyType._zod.run({value:Number(s),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>tt(d,i,Re())),input:s,path:[s],inst:e});continue}const l=t.valueType._zod.run({value:n[s],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...ct(s,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...ct(s,l.issues)),r.value[c.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),xd=w("$ZodMap",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const o=[];r.value=new Map;for(const[a,s]of n){const c=t.keyType._zod.run({value:a,issues:[]},i),u=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([l,d])=>{jd(l,d,r,a,n,e,i)})):jd(c,u,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function jd(e,t,r,i,n,o,a){e.issues.length&&(Ar.has(typeof i)?r.issues.push(...ct(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(s=>tt(s,a,Re()))})),t.issues.length&&(Ar.has(typeof i)?r.issues.push(...ct(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(s=>tt(s,a,Re()))})),r.value.set(e.value,t.value)}const Cd=w("$ZodSet",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const a of n){const s=t.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(c=>Dd(c,r))):Dd(s,r)}return o.length?Promise.all(o).then(()=>r):r}});function Dd(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Ad=w("$ZodEnum",(e,t)=>{Q.init(e,t);const r=wo(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>Ar.has(typeof n)).map(n=>typeof n=="string"?Tt(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{const a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),Rd=w("$ZodLiteral",(e,t)=>{if(Q.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Tt(i):i?Tt(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),Ud=w("$ZodFile",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Zd=w("$ZodTransform",(e,t)=>{Q.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new xr(e.constructor.name);const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r.fallback=!0,r));if(n instanceof Promise)throw new Lt;return r.value=n,r.fallback=!0,r}});function Md(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Wo=w("$ZodOptional",(e,t)=>{Q.init(e,t),e._zod.optin="optional",e._zod.optout="optional",se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),se(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Cr(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const n=r.value,o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(a=>Md(a,n)):Md(o,n)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Fd=w("$ZodExactOptional",(e,t)=>{Wo.init(e,t),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Gd=w("$ZodNullable",(e,t)=>{Q.init(e,t),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Cr(r.source)}|null)$`):void 0}),se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Ld=w("$ZodDefault",(e,t)=>{Q.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Vd(o,t)):Vd(n,t)}});function Vd(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Bd=w("$ZodPrefault",(e,t)=>{Q.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),qd=w("$ZodNonOptional",(e,t)=>{Q.init(e,t),se(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Jd(o,e)):Jd(n,e)}});function Jd(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Kd=w("$ZodSuccess",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new xr("ZodSuccess");const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Hd=w("$ZodCatch",(e,t)=>{Q.init(e,t),e._zod.optin="optional",se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>tt(a,i,Re()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>tt(o,i,Re()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Wd=w("$ZodNaN",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Xo=w("$ZodPipe",(e,t)=>{Q.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>Br(a,t.in,i)):Br(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Br(o,t.out,i)):Br(n,t.out,i)}});function Br(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}const Yo=w("$ZodCodec",(e,t)=>{Q.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){const o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>qr(a,t,i)):qr(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>qr(a,t,i)):qr(o,t,i)}}});function qr(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>Jr(e,o,t.out,r)):Jr(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>Jr(e,o,t.in,r)):Jr(e,n,t.in,r)}}function Jr(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const Xd=w("$ZodPreprocess",(e,t)=>{Xo.init(e,t)}),Yd=w("$ZodReadonly",(e,t)=>{Q.init(e,t),se(e._zod,"propValues",()=>t.innerType._zod.propValues),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"optin",()=>t.innerType?._zod?.optin),se(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Qd):Qd(n)}});function Qd(e){return e.value=Object.freeze(e.value),e}const ep=w("$ZodTemplateLiteral",(e,t)=>{Q.init(e,t);const r=[];for(const i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a))}else if(i===null||mu.has(typeof i))r.push(Tt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),tp=w("$ZodFunction",(e,t)=>(Q.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){const n=e._def.input?Zr(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?Zr(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const n=e._def.input?await Mr(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await Mr(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Ho({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),np=w("$ZodPromise",(e,t)=>{Q.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),rp=w("$ZodLazy",(e,t)=>{Q.init(e,t),se(e._zod,"innerType",()=>{const r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),se(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),se(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),se(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),se(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),ip=w("$ZodCustom",(e,t)=>{Te.init(e,t),Q.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>op(o,r,i,e));op(n,r,i,e)}});function op(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(cn(n))}}const jy=()=>{const e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}const r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${J(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${C(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Cy(){return{localeError:jy()}}const Dy=()=>{const e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${J(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Ay(){return{localeError:Dy()}}function ap(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const Ry=()=>{const e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}const r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.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 n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${J(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=ap(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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=ap(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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Uy(){return{localeError:Ry()}}const Zy=()=>{const e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}const r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.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 n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${J(n.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 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.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 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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} ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function My(){return{localeError:Zy()}}const Fy=()=>{const e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${J(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${C(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function Gy(){return{localeError:Fy()}}const Ly=()=>{const e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}const r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${J(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${C(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function Vy(){return{localeError:Ly()}}const By=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${J(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function qy(){return{localeError:By()}}const Jy=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${J(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Ky(){return{localeError:Jy()}}const Hy=()=>{const e={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 t(n){return e[n]??null}const r={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",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return typeof n.expected=="string"&&/^[A-Z]/.test(n.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 ${n.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 n.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 ${J(n.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 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${n.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 ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${n.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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: ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.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 ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Wy(){return{localeError:Hy()}}const Xy=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${J(n.values[0])}`:`Invalid option: expected one of ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function sp(){return{localeError:Xy()}}const Yy=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${J(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function Qy(){return{localeError:Yy()}}const e_=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${J(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function t_(){return{localeError:e_()}}const n_=()=>{const e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}const r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.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 n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${J(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${C(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${C(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function r_(){return{localeError:n_()}}const i_=()=>{const e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}const r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${J(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${C(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function o_(){return{localeError:i_()}}const a_=()=>{const e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",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:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${J(n.values[0])} attendu`:`Option invalide : une valeur parmi ${C(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${C(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function s_(){return{localeError:a_()}}const c_=()=>{const e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${J(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${C(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function u_(){return{localeError:c_()}}const l_=()=>{const e={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"}},t={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"}},r=u=>u?e[u]:void 0,i=u=>{const l=r(u);return l?l.label:u??e.unknown.label},n=u=>`\u05D4${i(u)}`,o=u=>(r(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?t[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"},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"},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"},jwt:{label:"JWT",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":{const l=u.expected,d=c[l??""]??i(l),m=W(u.input),p=c[m]??e[m]?.label??m;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 ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}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 ${J(u.values[0])}`;const l=u.values.map(p=>J(p));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]}`;const 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":{const l=a(u.origin),d=n(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"){const h=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 ${h}`}if(u.origin==="array"||u.origin==="set"){const h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",b=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} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}const m=u.inclusive?"<=":"<",p=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${m}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${m}${u.maximum.toString()}`}case"too_small":{const l=a(u.origin),d=n(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"){const h=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 ${h}`}if(u.origin==="array"||u.origin==="set"){const h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){const $=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`}const b=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} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}const m=u.inclusive?">=":">",p=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${m}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${m}${u.minimum.toString()}`}case"invalid_format":{const 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}`;const d=s[l.format],m=d?.label??l.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${h}`}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"}: ${C(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${n(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function d_(){return{localeError:l_()}}const p_=()=>{const e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}const r={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",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${J(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${C(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function m_(){return{localeError:p_()}}const f_=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${J(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function h_(){return{localeError:f_()}}function cp(e,t,r){return Math.abs(e)===1?t:r}function ln(e){if(!e)return"";const t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}const g_=()=>{const e={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"}};function t(n){return e[n]??null}const r={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",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",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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.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 ${J(n.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 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=cp(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 ${ln(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.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 ${ln(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=cp(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 ${ln(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.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 ${ln(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.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 ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${C(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ln(n.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 ${ln(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function v_(){return{localeError:g_()}}const y_=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${J(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function __(){return{localeError:y_()}}const $_=()=>{const e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}const r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${J(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${C(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function b_(){return{localeError:$_()}}const k_=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${J(n.values[0])}`:`Opzione non valida: atteso uno tra ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${C(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function w_(){return{localeError:k_()}}const S_=()=>{const e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}const r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.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 n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${J(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${C(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{const o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{const o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${C(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function I_(){return{localeError:S_()}}const O_=()=>{const e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}const r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \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",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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.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 ${J(n.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 ${C(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${a.verb} ${o}${n.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 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.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 ${n.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${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.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 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function T_(){return{localeError:O_()}}const P_=()=>{const e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}const r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${C(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function up(){return{localeError:P_()}}function E_(){return up()}const z_=()=>{const e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.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 n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${J(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${C(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{const o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${C(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function N_(){return{localeError:z_()}}const Vn=e=>e.charAt(0).toUpperCase()+e.slice(1);function lp(e){const t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}const x_=()=>{const e={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 t(n,o,a,s){const c=e[n]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"inclusive":"notInclusive"]}}const r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${J(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${C(n.values,"|")} pasirinkim\u0173`;case"too_big":{const o=i[n.origin]??n.origin,a=t(n.origin,lp(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Vn(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;const s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Vn(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{const o=i[n.origin]??n.origin,a=t(n.origin,lp(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Vn(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;const s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Vn(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${C(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{const o=i[n.origin]??n.origin;return`${Vn(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function j_(){return{localeError:x_()}}const C_=()=>{const e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}const r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.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 n.values.length===1?`Invalid input: expected ${J(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function D_(){return{localeError:C_()}}const A_=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${J(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${C(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function R_(){return{localeError:A_()}}const U_=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}const r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${J(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Z_(){return{localeError:U_()}}const M_=()=>{const e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${J(n.values[0])}`:`Ugyldig valg: forventet en av ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function F_(){return{localeError:M_()}}const G_=()=>{const e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}const r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${J(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function L_(){return{localeError:G_()}}const V_=()=>{const e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}const r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.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 n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${J(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${C(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function B_(){return{localeError:V_()}}const q_=()=>{const e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}const r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${J(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function J_(){return{localeError:q_()}}const K_=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${J(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function H_(){return{localeError:K_()}}const W_=()=>{const e={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 t(n){return e[n]??null}const r={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",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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${J(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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: ${r[o.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${C(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function X_(){return{localeError:W_()}}function dp(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const Y_=()=>{const e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}const r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.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 n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${J(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=dp(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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=dp(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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Q_(){return{localeError:Y_()}}const e$=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${J(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${C(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function t$(){return{localeError:e$()}}const n$=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}const r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${J(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function r$(){return{localeError:n$()}}const i$=()=>{const e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}const r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${C(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${o}${n.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 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function o$(){return{localeError:i$()}}const a$=()=>{const e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}const r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${J(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${C(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function s$(){return{localeError:a$()}}const c$=()=>{const e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${J(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function u$(){return{localeError:c$()}}const l$=()=>{const e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}const r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${J(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${a.verb} ${o}${n.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 ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function pp(){return{localeError:l$()}}function d$(){return pp()}const p$=()=>{const e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}const r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.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 n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${J(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${C(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.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: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${C(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function m$(){return{localeError:p$()}}const f$=()=>{const e={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 t(n){return e[n]??null}const r={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",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${J(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function h$(){return{localeError:f$()}}const g$=()=>{const e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}const r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.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 n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${J(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${C(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function v$(){return{localeError:g$()}}const y$=()=>{const e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}const r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.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 n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${J(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function _$(){return{localeError:y$()}}const $$=()=>{const e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}const r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.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 n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${J(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${C(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function b$(){return{localeError:$$()}}const k$=()=>{const e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}const r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.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 n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${J(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${C(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function w$(){return{localeError:k$()}}var mp=Object.freeze({__proto__:null,ar:Cy,az:Ay,be:Uy,bg:My,ca:Gy,cs:Vy,da:qy,de:Ky,el:Wy,en:sp,eo:Qy,es:t_,fa:r_,fi:o_,fr:s_,frCA:u_,he:d_,hr:m_,hu:h_,hy:v_,id:__,is:b_,it:w_,ja:I_,ka:T_,kh:E_,km:up,ko:N_,lt:j_,mk:D_,ms:R_,nl:Z_,no:F_,ota:L_,pl:J_,ps:B_,pt:H_,ro:X_,ru:Q_,sl:t$,sv:r$,ta:o$,th:s$,tr:u$,ua:d$,uk:pp,ur:m$,uz:h$,vi:v$,yo:w$,zhCN:_$,zhTW:b$}),fp;const hp=Symbol("ZodOutput"),gp=Symbol("ZodInput");class vp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Qo(){return new vp}(fp=globalThis).__zod_globalRegistry??(fp.__zod_globalRegistry=Qo());const ut=globalThis.__zod_globalRegistry;function yp(e,t){return new e({type:"string",...z(t)})}function _p(e,t){return new e({type:"string",coerce:!0,...z(t)})}function ea(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}function Kr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...z(t)})}function ta(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}function na(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(t)})}function ra(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(t)})}function ia(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(t)})}function Hr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}function oa(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...z(t)})}function aa(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(t)})}function sa(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...z(t)})}function ca(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(t)})}function ua(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...z(t)})}function la(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...z(t)})}function da(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(t)})}function pa(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}function ma(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}function $p(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...z(t)})}function fa(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(t)})}function ha(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(t)})}function ga(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...z(t)})}function va(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...z(t)})}function ya(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...z(t)})}function _a(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...z(t)})}const bp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function kp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}function wp(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}function Sp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}function Ip(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}function Op(e,t){return new e({type:"number",checks:[],...z(t)})}function Tp(e,t){return new e({type:"number",coerce:!0,checks:[],...z(t)})}function Pp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}function Ep(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...z(t)})}function zp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...z(t)})}function Np(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...z(t)})}function xp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...z(t)})}function jp(e,t){return new e({type:"boolean",...z(t)})}function Cp(e,t){return new e({type:"boolean",coerce:!0,...z(t)})}function Dp(e,t){return new e({type:"bigint",...z(t)})}function Ap(e,t){return new e({type:"bigint",coerce:!0,...z(t)})}function Rp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...z(t)})}function Up(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...z(t)})}function Zp(e,t){return new e({type:"symbol",...z(t)})}function Mp(e,t){return new e({type:"undefined",...z(t)})}function Fp(e,t){return new e({type:"null",...z(t)})}function Gp(e){return new e({type:"any"})}function Lp(e){return new e({type:"unknown"})}function Vp(e,t){return new e({type:"never",...z(t)})}function Bp(e,t){return new e({type:"void",...z(t)})}function qp(e,t){return new e({type:"date",...z(t)})}function Jp(e,t){return new e({type:"date",coerce:!0,...z(t)})}function Kp(e,t){return new e({type:"nan",...z(t)})}function Ct(e,t){return new Fo({check:"less_than",...z(t),value:e,inclusive:!1})}function lt(e,t){return new Fo({check:"less_than",...z(t),value:e,inclusive:!0})}function Dt(e,t){return new Go({check:"greater_than",...z(t),value:e,inclusive:!1})}function We(e,t){return new Go({check:"greater_than",...z(t),value:e,inclusive:!0})}function $a(e){return Dt(0,e)}function ba(e){return Ct(0,e)}function ka(e){return lt(0,e)}function wa(e){return We(0,e)}function dn(e,t){return new ml({check:"multiple_of",...z(t),value:e})}function pn(e,t){return new gl({check:"max_size",...z(t),maximum:e})}function At(e,t){return new vl({check:"min_size",...z(t),minimum:e})}function Bn(e,t){return new yl({check:"size_equals",...z(t),size:e})}function qn(e,t){return new _l({check:"max_length",...z(t),maximum:e})}function Jt(e,t){return new $l({check:"min_length",...z(t),minimum:e})}function Jn(e,t){return new bl({check:"length_equals",...z(t),length:e})}function Wr(e,t){return new kl({check:"string_format",format:"regex",...z(t),pattern:e})}function Xr(e){return new wl({check:"string_format",format:"lowercase",...z(e)})}function Yr(e){return new Sl({check:"string_format",format:"uppercase",...z(e)})}function Qr(e,t){return new Il({check:"string_format",format:"includes",...z(t),includes:e})}function ei(e,t){return new Ol({check:"string_format",format:"starts_with",...z(t),prefix:e})}function ti(e,t){return new Tl({check:"string_format",format:"ends_with",...z(t),suffix:e})}function Sa(e,t,r){return new El({check:"property",property:e,schema:t,...z(r)})}function ni(e,t){return new zl({check:"mime_type",mime:e,...z(t)})}function Pt(e){return new Nl({check:"overwrite",tx:e})}function ri(e){return Pt(t=>t.normalize(e))}function ii(){return Pt(e=>e.trim())}function oi(){return Pt(e=>e.toLowerCase())}function ai(){return Pt(e=>e.toUpperCase())}function si(){return Pt(e=>du(e))}function Hp(e,t,r){return new e({type:"array",element:t,...z(r)})}function S$(e,t,r){return new e({type:"union",options:t,...z(r)})}function I$(e,t,r){return new e({type:"union",options:t,inclusive:!1,...z(r)})}function O$(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...z(i)})}function T$(e,t,r){return new e({type:"intersection",left:t,right:r})}function P$(e,t,r,i){const n=r instanceof Q,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...z(o)})}function E$(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...z(i)})}function z$(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...z(i)})}function N$(e,t,r){return new e({type:"set",valueType:t,...z(r)})}function x$(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...z(r)})}function j$(e,t,r){return new e({type:"enum",entries:t,...z(r)})}function C$(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...z(r)})}function Wp(e,t){return new e({type:"file",...z(t)})}function D$(e,t){return new e({type:"transform",transform:t})}function A$(e,t){return new e({type:"optional",innerType:t})}function R$(e,t){return new e({type:"nullable",innerType:t})}function U$(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Dr(r)}})}function Z$(e,t,r){return new e({type:"nonoptional",innerType:t,...z(r)})}function M$(e,t){return new e({type:"success",innerType:t})}function F$(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function G$(e,t,r){return new e({type:"pipe",in:t,out:r})}function L$(e,t){return new e({type:"readonly",innerType:t})}function V$(e,t,r){return new e({type:"template_literal",parts:t,...z(r)})}function B$(e,t){return new e({type:"lazy",getter:t})}function q$(e,t){return new e({type:"promise",innerType:t})}function Xp(e,t,r){const i=z(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Yp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...z(r)})}function Qp(e,t){const r=em(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(cn(n,i.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(cn(o))}},e(i.value,i)),t);return r}function em(e,t){const r=new Te({check:"custom",...z(t)});return r._zod.check=e,r}function tm(e){const t=new Te({check:"describe"});return t._zod.onattach=[r=>{const i=ut.get(r)??{};ut.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function nm(e){const t=new Te({check:"meta"});return t._zod.onattach=[r=>{const i=ut.get(r)??{};ut.add(r,{...i,...e})}],t._zod.check=()=>{},t}function rm(e,t){const r=z(t);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(p=>typeof p=="string"?p.toLowerCase():p),n=n.map(p=>typeof p=="string"?p.toLowerCase():p));const o=new Set(i),a=new Set(n),s=e.Codec??Yo,c=e.Boolean??Bo,u=e.String??Ln,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),m=new s({type:"pipe",in:l,out:d,transform:((p,h)=>{let b=p;return r.case!=="sensitive"&&(b=b.toLowerCase()),o.has(b)?!0:a.has(b)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:h.value,inst:m,continue:!1}),{})}),reverseTransform:((p,h)=>p===!0?i[0]||"true":n[0]||"false"),error:r.error});return m}function Kn(e,t,r,i={}){const n=z(i),o={...z(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}function mn(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ut,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $e(e,t,r={path:[],schemaPath:[]}){var i;const n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,l);else{const m=a.schema,p=t.processors[n.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);p(e,t,m,l)}const d=e._zod.parent;d&&(a.ref||(a.ref=d),$e(d,t,l),t.seen.get(d).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&qe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function fn(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const a of e.seen.entries()){const s=e.metadataRegistry.get(a[0])?.id;if(s){const 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])}}const n=a=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(a[0])?.id,m=e.external.uri??(h=>h);if(d)return{ref:m(d)};const p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${m("__shared")}#/${s}/${p}`}}if(a[1]===r)return{ref:"#"};const u=`#/${s}/`,l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},o=a=>{if(a[1].schema.$ref)return;const s=a[1],{ref:c,defId:u}=n(a);s.def={...s.schema},u&&(s.defId=u);const l=s.schema;for(const d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(const a of e.seen.entries()){const s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
64
+ `)}p.write("payload.value = newResult;"),p.write("return payload;");const g=p.compile();return(w,O)=>g(m,w,O)};let o;const a=sn,s=!jn.jitless,u=s&&pu.value,l=t.catchall;let d;e._zod.parse=(m,p)=>{d??(d=i.value);const h=m.value;return a(h)?s&&u&&p?.async===!1&&p.jitless!==!0?(o||(o=n(t.shape)),m=o(m,p),l?$d([],h,m,p,d,e):m):r(m,p):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function wd(e,t,r,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const n=e.filter(o=>!qt(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>tt(a,i,Re())))}),t)}const Vr=k("$ZodUnion",(e,t)=>{Y.init(e,t),se(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),se(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),se(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),se(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${i.map(n=>Cr(n.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1;const a=[];for(const s of t.options){const c=s._zod.run({value:i.value,issues:[]},n);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=>wd(s,i,e,n)):wd(a,i,e,n)}});function kd(e,t,r,i){const n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>tt(a,i,Re())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}const Sd=k("$ZodXor",(e,t)=>{Vr.init(e,t),t.inclusive=!1;const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1;const a=[];for(const s of t.options){const c=s._zod.run({value:i.value,issues:[]},n);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>kd(s,i,e,n)):kd(a,i,e,n)}}),Id=k("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Vr.init(e,t);const r=e._zod.parse;se(e._zod,"propValues",()=>{const n={};for(const o of t.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(const u of c)n[s].add(u)}}return n});const i=Cn(()=>{const n=t.options,o=new Map;for(const a of n){const s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});e._zod.parse=(n,o)=>{const a=n.value;if(!sn(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;const s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(n,o):t.unionFallback||o.direction==="backward"?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),n)}}),Od=k("$ZodIntersection",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{const n=r.value,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,u])=>Td(r,c,u)):Td(r,o,a)}});function Ko(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Bt(e)&&Bt(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(const o of i){const a=Ko(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const n=e[i],o=t[i],a=Ko(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Td(e,t,r){const i=new Map;let n;for(const s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(const c of s.keys)i.has(c)||i.set(c,{}),i.get(c).l=!0}else e.issues.push(s);for(const s of r.issues)if(s.code==="unrecognized_keys")for(const c of s.keys)i.has(c)||i.set(c,{}),i.get(c).r=!0;else e.issues.push(s);const o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&n&&e.issues.push({...n,keys:o}),qt(e))return e;const a=Ko(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Ho=k("$ZodTuple",(e,t)=>{Y.init(e,t);const r=t.items;e._zod.parse=(i,n)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const a=[],s=Pd(r,"optin"),c=Pd(r,"optout");if(!t.rest){if(o.length<s)return i.issues.push({code:"too_small",minimum:s,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>r.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:o,inst:e,origin:"array"})}const u=new Array(r.length);for(let l=0;l<r.length;l++){const d=r[l]._zod.run({value:o[l],issues:[]},n);d instanceof Promise?a.push(d.then(m=>{u[l]=m})):u[l]=d}if(t.rest){let l=r.length-1;const d=o.slice(r.length);for(const m of d){l++;const p=t.rest._zod.run({value:m,issues:[]},n);p instanceof Promise?a.push(p.then(h=>Ed(h,i,l))):Ed(p,i,l)}}return a.length?Promise.all(a).then(()=>zd(u,i,r,o,c)):zd(u,i,r,o,c)}});function Pd(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function Ed(e,t,r){e.issues.length&&t.issues.push(...ct(r,e.issues)),t.value[r]=e.value}function zd(e,t,r,i,n){for(let o=0;o<r.length;o++){const a=e[o],s=o<i.length;if(a.issues.length){if(!s&&o>=n){t.value.length=o;break}t.issues.push(...ct(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(r[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}const xd=k("$ZodRecord",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Bt(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const o=[],a=t.keyType._zod.values;if(a){r.value={};const s=new Set;for(const u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);const l=t.keyType._zod.run({value:u,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>tt(p,i,Re())),input:u,path:[u],inst:e});continue}const d=l.value,m=t.valueType._zod.run({value:n[u],issues:[]},i);m instanceof Promise?o.push(m.then(p=>{p.issues.length&&r.issues.push(...ct(u,p.issues)),r.value[d]=p.value})):(m.issues.length&&r.issues.push(...ct(u,m.issues)),r.value[d]=m.value)}let c;for(const u in n)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(const s of Reflect.ownKeys(n)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Zo.test(s)&&c.issues.length){const d=t.keyType._zod.run({value:Number(s),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>tt(d,i,Re())),input:s,path:[s],inst:e});continue}const l=t.valueType._zod.run({value:n[s],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...ct(s,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...ct(s,l.issues)),r.value[c.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Nd=k("$ZodMap",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const o=[];r.value=new Map;for(const[a,s]of n){const c=t.keyType._zod.run({value:a,issues:[]},i),u=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([l,d])=>{jd(l,d,r,a,n,e,i)})):jd(c,u,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function jd(e,t,r,i,n,o,a){e.issues.length&&(Ar.has(typeof i)?r.issues.push(...ct(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(s=>tt(s,a,Re()))})),t.issues.length&&(Ar.has(typeof i)?r.issues.push(...ct(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(s=>tt(s,a,Re()))})),r.value.set(e.value,t.value)}const Cd=k("$ZodSet",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const a of n){const s=t.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(c=>Dd(c,r))):Dd(s,r)}return o.length?Promise.all(o).then(()=>r):r}});function Dd(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Ad=k("$ZodEnum",(e,t)=>{Y.init(e,t);const r=ko(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>Ar.has(typeof n)).map(n=>typeof n=="string"?Tt(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{const a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),Rd=k("$ZodLiteral",(e,t)=>{if(Y.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Tt(i):i?Tt(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{const o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),Ud=k("$ZodFile",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Zd=k("$ZodTransform",(e,t)=>{Y.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Nr(e.constructor.name);const n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r.fallback=!0,r));if(n instanceof Promise)throw new Lt;return r.value=n,r.fallback=!0,r}});function Fd(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Wo=k("$ZodOptional",(e,t)=>{Y.init(e,t),e._zod.optin="optional",e._zod.optout="optional",se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),se(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Cr(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const n=r.value,o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(a=>Fd(a,n)):Fd(o,n)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Md=k("$ZodExactOptional",(e,t)=>{Wo.init(e,t),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Gd=k("$ZodNullable",(e,t)=>{Y.init(e,t),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Cr(r.source)}|null)$`):void 0}),se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Ld=k("$ZodDefault",(e,t)=>{Y.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Vd(o,t)):Vd(n,t)}});function Vd(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Bd=k("$ZodPrefault",(e,t)=>{Y.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),qd=k("$ZodNonOptional",(e,t)=>{Y.init(e,t),se(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Jd(o,e)):Jd(n,e)}});function Jd(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Kd=k("$ZodSuccess",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Nr("ZodSuccess");const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Hd=k("$ZodCatch",(e,t)=>{Y.init(e,t),e._zod.optin="optional",se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>tt(a,i,Re()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>tt(o,i,Re()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Wd=k("$ZodNaN",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Xo=k("$ZodPipe",(e,t)=>{Y.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>Br(a,t.in,i)):Br(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Br(o,t.out,i)):Br(n,t.out,i)}});function Br(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}const Qo=k("$ZodCodec",(e,t)=>{Y.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){const o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>qr(a,t,i)):qr(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>qr(a,t,i)):qr(o,t,i)}}});function qr(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>Jr(e,o,t.out,r)):Jr(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>Jr(e,o,t.in,r)):Jr(e,n,t.in,r)}}function Jr(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const Xd=k("$ZodPreprocess",(e,t)=>{Xo.init(e,t)}),Qd=k("$ZodReadonly",(e,t)=>{Y.init(e,t),se(e._zod,"propValues",()=>t.innerType._zod.propValues),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"optin",()=>t.innerType?._zod?.optin),se(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Yd):Yd(n)}});function Yd(e){return e.value=Object.freeze(e.value),e}const ep=k("$ZodTemplateLiteral",(e,t)=>{Y.init(e,t);const r=[];for(const i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a))}else if(i===null||mu.has(typeof i))r.push(Tt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),tp=k("$ZodFunction",(e,t)=>(Y.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){const n=e._def.input?Zr(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?Zr(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const n=e._def.input?await Fr(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await Fr(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Ho({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),np=k("$ZodPromise",(e,t)=>{Y.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),rp=k("$ZodLazy",(e,t)=>{Y.init(e,t),se(e._zod,"innerType",()=>{const r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),se(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),se(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),se(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),se(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),ip=k("$ZodCustom",(e,t)=>{Te.init(e,t),Y.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>op(o,r,i,e));op(n,r,i,e)}});function op(e,t,r,i){if(!e){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(cn(n))}}const jy=()=>{const e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}const r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${J(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${C(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Cy(){return{localeError:jy()}}const Dy=()=>{const e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${J(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Ay(){return{localeError:Dy()}}function ap(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const Ry=()=>{const e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}const r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.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 n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${J(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=ap(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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=ap(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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Uy(){return{localeError:Ry()}}const Zy=()=>{const e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}const r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.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 n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${J(n.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 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.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 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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} ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Fy(){return{localeError:Zy()}}const My=()=>{const e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${J(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${C(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function Gy(){return{localeError:My()}}const Ly=()=>{const e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}const r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${J(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${C(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function Vy(){return{localeError:Ly()}}const By=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${J(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function qy(){return{localeError:By()}}const Jy=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${J(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Ky(){return{localeError:Jy()}}const Hy=()=>{const e={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 t(n){return e[n]??null}const r={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",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return typeof n.expected=="string"&&/^[A-Z]/.test(n.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 ${n.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 n.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 ${J(n.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 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${n.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 ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${n.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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: ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.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 ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Wy(){return{localeError:Hy()}}const Xy=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${J(n.values[0])}`:`Invalid option: expected one of ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function sp(){return{localeError:Xy()}}const Qy=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${J(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function Yy(){return{localeError:Qy()}}const e_=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${J(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function t_(){return{localeError:e_()}}const n_=()=>{const e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}const r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.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 n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${J(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${C(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${C(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function r_(){return{localeError:n_()}}const i_=()=>{const e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}const r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${J(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${C(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function o_(){return{localeError:i_()}}const a_=()=>{const e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",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:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${J(n.values[0])} attendu`:`Option invalide : une valeur parmi ${C(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${C(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function s_(){return{localeError:a_()}}const c_=()=>{const e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}const r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${J(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${C(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function u_(){return{localeError:c_()}}const l_=()=>{const e={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"}},t={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"}},r=u=>u?e[u]:void 0,i=u=>{const l=r(u);return l?l.label:u??e.unknown.label},n=u=>`\u05D4${i(u)}`,o=u=>(r(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?t[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"},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"},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"},jwt:{label:"JWT",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":{const l=u.expected,d=c[l??""]??i(l),m=W(u.input),p=c[m]??e[m]?.label??m;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 ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}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 ${J(u.values[0])}`;const l=u.values.map(p=>J(p));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]}`;const 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":{const l=a(u.origin),d=n(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"){const h=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 ${h}`}if(u.origin==="array"||u.origin==="set"){const h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",b=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} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}const m=u.inclusive?"<=":"<",p=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${m}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${m}${u.maximum.toString()}`}case"too_small":{const l=a(u.origin),d=n(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"){const h=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 ${h}`}if(u.origin==="array"||u.origin==="set"){const h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){const $=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`}const b=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} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}const m=u.inclusive?">=":">",p=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${m}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${m}${u.minimum.toString()}`}case"invalid_format":{const 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}`;const d=s[l.format],m=d?.label??l.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${h}`}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"}: ${C(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${n(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function d_(){return{localeError:l_()}}const p_=()=>{const e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}const r={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",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${J(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${C(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function m_(){return{localeError:p_()}}const f_=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${J(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function h_(){return{localeError:f_()}}function cp(e,t,r){return Math.abs(e)===1?t:r}function ln(e){if(!e)return"";const t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}const g_=()=>{const e={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"}};function t(n){return e[n]??null}const r={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",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",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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.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 ${J(n.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 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=cp(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 ${ln(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.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 ${ln(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=cp(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 ${ln(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.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 ${ln(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.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 ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${C(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ln(n.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 ${ln(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function v_(){return{localeError:g_()}}const y_=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${J(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function __(){return{localeError:y_()}}const $_=()=>{const e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}const r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${J(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${C(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function b_(){return{localeError:$_()}}const w_=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${J(n.values[0])}`:`Opzione non valida: atteso uno tra ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${C(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function k_(){return{localeError:w_()}}const S_=()=>{const e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}const r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.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 n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${J(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${C(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{const o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{const o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${C(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function I_(){return{localeError:S_()}}const O_=()=>{const e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}const r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \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",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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.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 ${J(n.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 ${C(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${a.verb} ${o}${n.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 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.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 ${n.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${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.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 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function T_(){return{localeError:O_()}}const P_=()=>{const e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}const r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${C(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function up(){return{localeError:P_()}}function E_(){return up()}const z_=()=>{const e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}const r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.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 n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${J(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${C(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{const o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${C(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function x_(){return{localeError:z_()}}const Vn=e=>e.charAt(0).toUpperCase()+e.slice(1);function lp(e){const t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}const N_=()=>{const e={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 t(n,o,a,s){const c=e[n]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"inclusive":"notInclusive"]}}const r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${J(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${C(n.values,"|")} pasirinkim\u0173`;case"too_big":{const o=i[n.origin]??n.origin,a=t(n.origin,lp(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Vn(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;const s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Vn(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{const o=i[n.origin]??n.origin,a=t(n.origin,lp(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Vn(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;const s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Vn(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${C(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{const o=i[n.origin]??n.origin;return`${Vn(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function j_(){return{localeError:N_()}}const C_=()=>{const e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}const r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.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 n.values.length===1?`Invalid input: expected ${J(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function D_(){return{localeError:C_()}}const A_=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${J(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${C(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function R_(){return{localeError:A_()}}const U_=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}const r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${J(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Z_(){return{localeError:U_()}}const F_=()=>{const e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${J(n.values[0])}`:`Ugyldig valg: forventet en av ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function M_(){return{localeError:F_()}}const G_=()=>{const e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}const r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${J(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function L_(){return{localeError:G_()}}const V_=()=>{const e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}const r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.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 n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${J(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${C(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function B_(){return{localeError:V_()}}const q_=()=>{const e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}const r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${J(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function J_(){return{localeError:q_()}}const K_=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${J(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function H_(){return{localeError:K_()}}const W_=()=>{const e={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 t(n){return e[n]??null}const r={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",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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${J(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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: ${r[o.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${C(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function X_(){return{localeError:W_()}}function dp(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const Q_=()=>{const e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}const r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.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 n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${J(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=dp(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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=dp(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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Y_(){return{localeError:Q_()}}const e$=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${J(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${C(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function t$(){return{localeError:e$()}}const n$=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}const r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${J(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function r$(){return{localeError:n$()}}const i$=()=>{const e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}const r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${C(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${o}${n.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 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function o$(){return{localeError:i$()}}const a$=()=>{const e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}const r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},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 n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${J(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${C(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function s$(){return{localeError:a$()}}const c$=()=>{const e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${J(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function u$(){return{localeError:c$()}}const l$=()=>{const e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}const r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.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 n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${J(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${a.verb} ${o}${n.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 ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function pp(){return{localeError:l$()}}function d$(){return pp()}const p$=()=>{const e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}const r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.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 n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${J(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${C(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.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: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${C(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function m$(){return{localeError:p$()}}const f$=()=>{const e={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 t(n){return e[n]??null}const r={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",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${J(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;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 ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function h$(){return{localeError:f$()}}const g$=()=>{const e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}const r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.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 n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${J(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${C(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function v$(){return{localeError:g$()}}const y$=()=>{const e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}const r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.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 n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${J(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function _$(){return{localeError:y$()}}const $$=()=>{const e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}const r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.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 n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${J(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${C(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function b$(){return{localeError:$$()}}const w$=()=>{const e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}const r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=W(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.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 n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${J(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${C(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${C(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function k$(){return{localeError:w$()}}var mp=Object.freeze({__proto__:null,ar:Cy,az:Ay,be:Uy,bg:Fy,ca:Gy,cs:Vy,da:qy,de:Ky,el:Wy,en:sp,eo:Yy,es:t_,fa:r_,fi:o_,fr:s_,frCA:u_,he:d_,hr:m_,hu:h_,hy:v_,id:__,is:b_,it:k_,ja:I_,ka:T_,kh:E_,km:up,ko:x_,lt:j_,mk:D_,ms:R_,nl:Z_,no:M_,ota:L_,pl:J_,ps:B_,pt:H_,ro:X_,ru:Y_,sl:t$,sv:r$,ta:o$,th:s$,tr:u$,ua:d$,uk:pp,ur:m$,uz:h$,vi:v$,yo:k$,zhCN:_$,zhTW:b$}),fp;const hp=Symbol("ZodOutput"),gp=Symbol("ZodInput");class vp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Yo(){return new vp}(fp=globalThis).__zod_globalRegistry??(fp.__zod_globalRegistry=Yo());const ut=globalThis.__zod_globalRegistry;function yp(e,t){return new e({type:"string",...z(t)})}function _p(e,t){return new e({type:"string",coerce:!0,...z(t)})}function ea(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}function Kr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...z(t)})}function ta(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}function na(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(t)})}function ra(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(t)})}function ia(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(t)})}function Hr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}function oa(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...z(t)})}function aa(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(t)})}function sa(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...z(t)})}function ca(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(t)})}function ua(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...z(t)})}function la(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...z(t)})}function da(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(t)})}function pa(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}function ma(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}function $p(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...z(t)})}function fa(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(t)})}function ha(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(t)})}function ga(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...z(t)})}function va(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...z(t)})}function ya(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...z(t)})}function _a(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...z(t)})}const bp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function wp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}function kp(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}function Sp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}function Ip(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}function Op(e,t){return new e({type:"number",checks:[],...z(t)})}function Tp(e,t){return new e({type:"number",coerce:!0,checks:[],...z(t)})}function Pp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}function Ep(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...z(t)})}function zp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...z(t)})}function xp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...z(t)})}function Np(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...z(t)})}function jp(e,t){return new e({type:"boolean",...z(t)})}function Cp(e,t){return new e({type:"boolean",coerce:!0,...z(t)})}function Dp(e,t){return new e({type:"bigint",...z(t)})}function Ap(e,t){return new e({type:"bigint",coerce:!0,...z(t)})}function Rp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...z(t)})}function Up(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...z(t)})}function Zp(e,t){return new e({type:"symbol",...z(t)})}function Fp(e,t){return new e({type:"undefined",...z(t)})}function Mp(e,t){return new e({type:"null",...z(t)})}function Gp(e){return new e({type:"any"})}function Lp(e){return new e({type:"unknown"})}function Vp(e,t){return new e({type:"never",...z(t)})}function Bp(e,t){return new e({type:"void",...z(t)})}function qp(e,t){return new e({type:"date",...z(t)})}function Jp(e,t){return new e({type:"date",coerce:!0,...z(t)})}function Kp(e,t){return new e({type:"nan",...z(t)})}function Ct(e,t){return new Mo({check:"less_than",...z(t),value:e,inclusive:!1})}function lt(e,t){return new Mo({check:"less_than",...z(t),value:e,inclusive:!0})}function Dt(e,t){return new Go({check:"greater_than",...z(t),value:e,inclusive:!1})}function We(e,t){return new Go({check:"greater_than",...z(t),value:e,inclusive:!0})}function $a(e){return Dt(0,e)}function ba(e){return Ct(0,e)}function wa(e){return lt(0,e)}function ka(e){return We(0,e)}function dn(e,t){return new ml({check:"multiple_of",...z(t),value:e})}function pn(e,t){return new gl({check:"max_size",...z(t),maximum:e})}function At(e,t){return new vl({check:"min_size",...z(t),minimum:e})}function Bn(e,t){return new yl({check:"size_equals",...z(t),size:e})}function qn(e,t){return new _l({check:"max_length",...z(t),maximum:e})}function Jt(e,t){return new $l({check:"min_length",...z(t),minimum:e})}function Jn(e,t){return new bl({check:"length_equals",...z(t),length:e})}function Wr(e,t){return new wl({check:"string_format",format:"regex",...z(t),pattern:e})}function Xr(e){return new kl({check:"string_format",format:"lowercase",...z(e)})}function Qr(e){return new Sl({check:"string_format",format:"uppercase",...z(e)})}function Yr(e,t){return new Il({check:"string_format",format:"includes",...z(t),includes:e})}function ei(e,t){return new Ol({check:"string_format",format:"starts_with",...z(t),prefix:e})}function ti(e,t){return new Tl({check:"string_format",format:"ends_with",...z(t),suffix:e})}function Sa(e,t,r){return new El({check:"property",property:e,schema:t,...z(r)})}function ni(e,t){return new zl({check:"mime_type",mime:e,...z(t)})}function Pt(e){return new xl({check:"overwrite",tx:e})}function ri(e){return Pt(t=>t.normalize(e))}function ii(){return Pt(e=>e.trim())}function oi(){return Pt(e=>e.toLowerCase())}function ai(){return Pt(e=>e.toUpperCase())}function si(){return Pt(e=>du(e))}function Hp(e,t,r){return new e({type:"array",element:t,...z(r)})}function S$(e,t,r){return new e({type:"union",options:t,...z(r)})}function I$(e,t,r){return new e({type:"union",options:t,inclusive:!1,...z(r)})}function O$(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...z(i)})}function T$(e,t,r){return new e({type:"intersection",left:t,right:r})}function P$(e,t,r,i){const n=r instanceof Y,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...z(o)})}function E$(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...z(i)})}function z$(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...z(i)})}function x$(e,t,r){return new e({type:"set",valueType:t,...z(r)})}function N$(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...z(r)})}function j$(e,t,r){return new e({type:"enum",entries:t,...z(r)})}function C$(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...z(r)})}function Wp(e,t){return new e({type:"file",...z(t)})}function D$(e,t){return new e({type:"transform",transform:t})}function A$(e,t){return new e({type:"optional",innerType:t})}function R$(e,t){return new e({type:"nullable",innerType:t})}function U$(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Dr(r)}})}function Z$(e,t,r){return new e({type:"nonoptional",innerType:t,...z(r)})}function F$(e,t){return new e({type:"success",innerType:t})}function M$(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function G$(e,t,r){return new e({type:"pipe",in:t,out:r})}function L$(e,t){return new e({type:"readonly",innerType:t})}function V$(e,t,r){return new e({type:"template_literal",parts:t,...z(r)})}function B$(e,t){return new e({type:"lazy",getter:t})}function q$(e,t){return new e({type:"promise",innerType:t})}function Xp(e,t,r){const i=z(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Qp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...z(r)})}function Yp(e,t){const r=em(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(cn(n,i.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(cn(o))}},e(i.value,i)),t);return r}function em(e,t){const r=new Te({check:"custom",...z(t)});return r._zod.check=e,r}function tm(e){const t=new Te({check:"describe"});return t._zod.onattach=[r=>{const i=ut.get(r)??{};ut.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function nm(e){const t=new Te({check:"meta"});return t._zod.onattach=[r=>{const i=ut.get(r)??{};ut.add(r,{...i,...e})}],t._zod.check=()=>{},t}function rm(e,t){const r=z(t);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(p=>typeof p=="string"?p.toLowerCase():p),n=n.map(p=>typeof p=="string"?p.toLowerCase():p));const o=new Set(i),a=new Set(n),s=e.Codec??Qo,c=e.Boolean??Bo,u=e.String??Ln,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),m=new s({type:"pipe",in:l,out:d,transform:((p,h)=>{let b=p;return r.case!=="sensitive"&&(b=b.toLowerCase()),o.has(b)?!0:a.has(b)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:h.value,inst:m,continue:!1}),{})}),reverseTransform:((p,h)=>p===!0?i[0]||"true":n[0]||"false"),error:r.error});return m}function Kn(e,t,r,i={}){const n=z(i),o={...z(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}function mn(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ut,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $e(e,t,r={path:[],schemaPath:[]}){var i;const n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,l);else{const m=a.schema,p=t.processors[n.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);p(e,t,m,l)}const d=e._zod.parent;d&&(a.ref||(a.ref=d),$e(d,t,l),t.seen.get(d).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&qe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function fn(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const a of e.seen.entries()){const s=e.metadataRegistry.get(a[0])?.id;if(s){const 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])}}const n=a=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(a[0])?.id,m=e.external.uri??(h=>h);if(d)return{ref:m(d)};const p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${m("__shared")}#/${s}/${p}`}}if(a[1]===r)return{ref:"#"};const u=`#/${s}/`,l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},o=a=>{if(a[1].schema.$ref)return;const s=a[1],{ref:c,defId:u}=n(a);s.def={...s.schema},u&&(s.defId=u);const l=s.schema;for(const d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(const a of e.seen.entries()){const s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
65
65
 
66
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const s=a[1];if(t===a[0]){o(a);continue}if(e.external){const u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&e.reused==="ref"){o(a);continue}}}function hn(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=s=>{const c=e.seen.get(s);if(c.ref===null)return;const u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){i(d);const p=e.seen.get(d),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,l),s._zod.parent===d)for(const $ in u)$==="$ref"||$==="allOf"||$ in l||delete u[$];if(h.$ref&&p.def)for(const $ in u)$==="$ref"||$==="allOf"||$ in p.def&&JSON.stringify(u[$])===JSON.stringify(p.def[$])&&delete u[$]}const m=s._zod.parent;if(m&&m!==d){i(m);const p=e.seen.get(m);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const h in u)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(u[h])===JSON.stringify(p.def[h])&&delete u[h]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};for(const s of[...e.seen.entries()].reverse())i(s[0]);const n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);const o=e.metadataRegistry.get(t)?.id;o!==void 0&&n.id===o&&delete n.id;const a=e.external?.defs??{};for(const s of e.seen.entries()){const c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{const s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Hn(t,"input",e.processors),output:Hn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function qe(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return qe(i.element,r);if(i.type==="set")return qe(i.valueType,r);if(i.type==="lazy")return qe(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return qe(i.innerType,r);if(i.type==="intersection")return qe(i.left,r)||qe(i.right,r);if(i.type==="record"||i.type==="map")return qe(i.keyType,r)||qe(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:qe(i.in,r)||qe(i.out,r);if(i.type==="object"){for(const n in i.shape)if(qe(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(const n of i.options)if(qe(n,r))return!0;return!1}if(i.type==="tuple"){for(const n of i.items)if(qe(n,r))return!0;return!!(i.rest&&qe(i.rest,r))}return!1}const im=(e,t={})=>r=>{const i=mn({...r,processors:t});return $e(e,i),fn(i,e),hn(i,e)},Hn=(e,t,r={})=>i=>{const{libraryOptions:n,target:o}=i??{},a=mn({...n??{},target:o,io:t,processors:r});return $e(e,a),fn(a,e),hn(a,e)},J$={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},om=(e,t,r,i)=>{const n=r;n.type="string";const{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),s&&(n.format=J$[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),u&&(n.contentEncoding=u),c&&c.size>0){const l=[...c];l.length===1?n.pattern=l[0].source:l.length>1&&(n.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},am=(e,t,r,i)=>{const n=r,{minimum:o,maximum:a,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number";const d=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),m=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:typeof o=="number"&&(n.minimum=o),m?p?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(n.multipleOf=c)},sm=(e,t,r,i)=>{r.type="boolean"},cm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},um=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},lm=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},dm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},pm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},mm=(e,t,r,i)=>{r.not={}},fm=(e,t,r,i)=>{},hm=(e,t,r,i)=>{},gm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},vm=(e,t,r,i)=>{const n=e._zod.def,o=wo(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},ym=(e,t,r,i)=>{const n=e._zod.def,o=[];for(const a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){const a=o[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},_m=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},$m=(e,t,r,i)=>{const n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},bm=(e,t,r,i)=>{const n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),c?c.length===1?(o.contentMediaType=c[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(n,o)},km=(e,t,r,i)=>{r.type="boolean"},wm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Sm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Im=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Om=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Tm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Pm=(e,t,r,i)=>{const n=r,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=$e(o.element,t,{...i,path:[...i.path,"items"]})},Em=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="object",n.properties={};const a=o.shape;for(const u in a)n.properties[u]=$e(a[u],t,{...i,path:[...i.path,"properties",u]});const s=new Set(Object.keys(a)),c=new Set([...s].filter(u=>{const l=o.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(n.required=Array.from(c)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=$e(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Ia=(e,t,r,i)=>{const n=e._zod.def,o=n.inclusive===!1,a=n.options.map((s,c)=>$e(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},zm=(e,t,r,i)=>{const n=e._zod.def,o=$e(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=$e(n.right,t,{...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]];r.allOf=c},Nm=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((m,p)=>$e(m,t,{...i,path:[...i.path,a,p]})),u=o.rest?$e(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,u&&(n.items=u)):t.target==="openapi-3.0"?(n.items={anyOf:c},u&&n.items.anyOf.push(u),n.minItems=c.length,u||(n.maxItems=c.length)):(n.items=c,u&&(n.additionalItems=u));const{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},xm=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="object";const a=o.keyType,c=a._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){const l=$e(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(const d of c)n.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=$e(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=$e(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const u=a._zod.values;if(u){const l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},jm=(e,t,r,i)=>{const n=e._zod.def,o=$e(n.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Cm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Dm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Am=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Rm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Um=(e,t,r,i)=>{const n=e._zod.def,o=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?n.out:n.in:n.out;$e(a,t,i);const s=t.seen.get(e);s.ref=a},Zm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},Mm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Oa=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Fm=(e,t,r,i)=>{const n=e._zod.innerType;$e(n,t,i);const o=t.seen.get(e);o.ref=n},Ta={string:om,number:am,boolean:sm,bigint:cm,symbol:um,null:lm,undefined:dm,void:pm,never:mm,any:fm,unknown:hm,date:gm,enum:vm,literal:ym,nan:_m,template_literal:$m,file:bm,success:km,custom:wm,function:Sm,transform:Im,map:Om,set:Tm,array:Pm,object:Em,union:Ia,intersection:zm,tuple:Nm,record:xm,nullable:jm,nonoptional:Cm,default:Dm,prefault:Am,catch:Rm,pipe:Um,readonly:Zm,promise:Mm,optional:Oa,lazy:Fm};function Pa(e,t){if("_idmap"in e){const i=e,n=mn({...t,processors:Ta}),o={};for(const c of i._idmap.entries()){const[u,l]=c;$e(l,n)}const a={},s={registry:i,uri:t?.uri,defs:o};n.external=s;for(const c of i._idmap.entries()){const[u,l]=c;fn(n,l),a[u]=hn(n,l)}if(Object.keys(o).length>0){const c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}const r=mn({...t,processors:Ta});return $e(e,r),fn(r,e),hn(r,e)}class K${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(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=mn({processors:Ta,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return $e(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),fn(this.ctx,t);const i=hn(this.ctx,t),{"~standard":n,...o}=i;return o}}var H$=Object.freeze({__proto__:null}),W$=Object.freeze({__proto__:null,$ZodAny:pd,$ZodArray:yd,$ZodAsyncError:Lt,$ZodBase64:ed,$ZodBase64URL:nd,$ZodBigInt:qo,$ZodBigIntFormat:cd,$ZodBoolean:Bo,$ZodCIDRv4:Yl,$ZodCIDRv6:Ql,$ZodCUID:Ml,$ZodCUID2:Fl,$ZodCatch:Hd,$ZodCheck:Te,$ZodCheckBigIntFormat:hl,$ZodCheckEndsWith:Tl,$ZodCheckGreaterThan:Go,$ZodCheckIncludes:Il,$ZodCheckLengthEquals:bl,$ZodCheckLessThan:Fo,$ZodCheckLowerCase:wl,$ZodCheckMaxLength:_l,$ZodCheckMaxSize:gl,$ZodCheckMimeType:zl,$ZodCheckMinLength:$l,$ZodCheckMinSize:vl,$ZodCheckMultipleOf:ml,$ZodCheckNumberFormat:fl,$ZodCheckOverwrite:Nl,$ZodCheckProperty:El,$ZodCheckRegex:kl,$ZodCheckSizeEquals:yl,$ZodCheckStartsWith:Ol,$ZodCheckStringFormat:Gn,$ZodCheckUpperCase:Sl,$ZodCodec:Yo,$ZodCustom:ip,$ZodCustomStringFormat:ad,$ZodDate:gd,$ZodDefault:Ld,$ZodDiscriminatedUnion:Id,$ZodE164:rd,$ZodEmail:Al,$ZodEmoji:Ul,$ZodEncodeError:xr,$ZodEnum:Ad,$ZodError:Oo,$ZodExactOptional:Fd,$ZodFile:Ud,$ZodFunction:tp,$ZodGUID:Cl,$ZodIPv4:Hl,$ZodIPv6:Wl,$ZodISODate:ql,$ZodISODateTime:Bl,$ZodISODuration:Kl,$ZodISOTime:Jl,$ZodIntersection:Od,$ZodJWT:od,$ZodKSUID:Vl,$ZodLazy:rp,$ZodLiteral:Rd,$ZodMAC:Xl,$ZodMap:xd,$ZodNaN:Wd,$ZodNanoID:Zl,$ZodNever:fd,$ZodNonOptional:qd,$ZodNull:dd,$ZodNullable:Gd,$ZodNumber:Vo,$ZodNumberFormat:sd,$ZodObject:Jo,$ZodObjectJIT:bd,$ZodOptional:Wo,$ZodPipe:Xo,$ZodPrefault:Bd,$ZodPreprocess:Xd,$ZodPromise:np,$ZodReadonly:Yd,$ZodRealError:nt,$ZodRecord:Nd,$ZodRegistry:vp,$ZodSet:Cd,$ZodString:Ln,$ZodStringFormat:be,$ZodSuccess:Kd,$ZodSymbol:ud,$ZodTemplateLiteral:ep,$ZodTransform:Zd,$ZodTuple:Ho,$ZodType:Q,$ZodULID:Gl,$ZodURL:Rl,$ZodUUID:Dl,$ZodUndefined:ld,$ZodUnion:Vr,$ZodUnknown:md,$ZodVoid:hd,$ZodXID:Ll,$ZodXor:Sd,$brand:cu,$constructor:w,$input:gp,$output:hp,Doc:xl,JSONSchema:H$,JSONSchemaGenerator:K$,NEVER:su,TimePrecision:bp,_any:Gp,_array:Hp,_base64:ga,_base64url:va,_bigint:Dp,_boolean:jp,_catch:F$,_check:em,_cidrv4:fa,_cidrv6:ha,_coercedBigint:Ap,_coercedBoolean:Cp,_coercedDate:Jp,_coercedNumber:Tp,_coercedString:_p,_cuid:sa,_cuid2:ca,_custom:Xp,_date:qp,_decode:zo,_decodeAsync:xo,_default:U$,_discriminatedUnion:O$,_e164:ya,_email:ea,_emoji:oa,_encode:Eo,_encodeAsync:No,_endsWith:ti,_enum:x$,_file:Wp,_float32:Ep,_float64:zp,_gt:Dt,_gte:We,_guid:Kr,_includes:Qr,_int:Pp,_int32:Np,_int64:Rp,_intersection:T$,_ipv4:pa,_ipv6:ma,_isoDate:wp,_isoDateTime:kp,_isoDuration:Ip,_isoTime:Sp,_jwt:_a,_ksuid:da,_lazy:B$,_length:Jn,_literal:C$,_lowercase:Xr,_lt:Ct,_lte:lt,_mac:$p,_map:z$,_max:lt,_maxLength:qn,_maxSize:pn,_mime:ni,_min:We,_minLength:Jt,_minSize:At,_multipleOf:dn,_nan:Kp,_nanoid:aa,_nativeEnum:j$,_negative:ba,_never:Vp,_nonnegative:wa,_nonoptional:Z$,_nonpositive:ka,_normalize:ri,_null:Fp,_nullable:R$,_number:Op,_optional:A$,_overwrite:Pt,_parse:An,_parseAsync:Rn,_pipe:G$,_positive:$a,_promise:q$,_property:Sa,_readonly:L$,_record:E$,_refine:Yp,_regex:Wr,_safeDecode:Co,_safeDecodeAsync:Ao,_safeEncode:jo,_safeEncodeAsync:Do,_safeParse:Un,_safeParseAsync:Zn,_set:N$,_size:Bn,_slugify:si,_startsWith:ei,_string:yp,_stringFormat:Kn,_stringbool:rm,_success:M$,_superRefine:Qp,_symbol:Zp,_templateLiteral:V$,_toLowerCase:oi,_toUpperCase:ai,_transform:D$,_trim:ii,_tuple:P$,_uint32:xp,_uint64:Up,_ulid:ua,_undefined:Mp,_union:S$,_unknown:Lp,_uppercase:Yr,_url:Hr,_uuid:ta,_uuidv4:na,_uuidv6:ra,_uuidv7:ia,_void:Bp,_xid:la,_xor:I$,clone:et,config:Re,createStandardJSONSchemaMethod:Hn,createToJSONSchemaMethod:im,decode:ny,decodeAsync:iy,describe:tm,encode:ty,encodeAsync:ry,extractDefs:fn,finalize:hn,flattenError:To,formatError:Po,globalConfig:jn,globalRegistry:ut,initializeContext:mn,isValidBase64:Lo,isValidBase64URL:td,isValidJWT:id,locales:mp,meta:nm,parse:Zr,parseAsync:Mr,prettifyError:Nu,process:$e,regexes:Mo,registry:Qo,safeDecode:ay,safeDecodeAsync:cy,safeEncode:oy,safeEncodeAsync:sy,safeParse:Fr,safeParseAsync:Gr,toDotPath:zu,toJSONSchema:Pa,treeifyError:Eu,util:Tu,version:jl}),X$=Object.freeze({__proto__:null,endsWith:ti,gt:Dt,gte:We,includes:Qr,length:Jn,lowercase:Xr,lt:Ct,lte:lt,maxLength:qn,maxSize:pn,mime:ni,minLength:Jt,minSize:At,multipleOf:dn,negative:ba,nonnegative:wa,nonpositive:ka,normalize:ri,overwrite:Pt,positive:$a,property:Sa,regex:Wr,size:Bn,slugify:si,startsWith:ei,toLowerCase:oi,toUpperCase:ai,trim:ii,uppercase:Yr});const Ea=w("ZodISODateTime",(e,t)=>{Bl.init(e,t),ke.init(e,t)});function za(e){return kp(Ea,e)}const Na=w("ZodISODate",(e,t)=>{ql.init(e,t),ke.init(e,t)});function Gm(e){return wp(Na,e)}const xa=w("ZodISOTime",(e,t)=>{Jl.init(e,t),ke.init(e,t)});function Lm(e){return Sp(xa,e)}const ja=w("ZodISODuration",(e,t)=>{Kl.init(e,t),ke.init(e,t)});function Vm(e){return Ip(ja,e)}var Bm=Object.freeze({__proto__:null,ZodISODate:Na,ZodISODateTime:Ea,ZodISODuration:ja,ZodISOTime:xa,date:Gm,datetime:za,duration:Vm,time:Lm});const qm=(e,t)=>{Oo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Po(e,r)},flatten:{value:r=>To(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,jr,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,jr,2)}},isEmpty:{get(){return e.issues.length===0}}})},Y$=w("ZodError",qm),rt=w("ZodError",qm,{Parent:Error}),Jm=An(rt),Km=Rn(rt),Hm=Un(rt),Wm=Zn(rt),Xm=Eo(rt),Ym=zo(rt),Qm=No(rt),ef=xo(rt),tf=jo(rt),nf=Co(rt),rf=Do(rt),of=Ao(rt),af=new WeakMap;function Wn(e,t,r){const i=Object.getPrototypeOf(e);let n=af.get(i);if(n||(n=new Set,af.set(i,n)),!n.has(t)){n.add(t);for(const o in r){const a=r[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){const s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}const re=w("ZodType",(e,t)=>(Q.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Hn(e,"input"),output:Hn(e,"output")}}),e.toJSONSchema=im(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>Jm(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Hm(e,r,i),e.parseAsync=async(r,i)=>Km(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Wm(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Xm(e,r,i),e.decode=(r,i)=>Ym(e,r,i),e.encodeAsync=async(r,i)=>Qm(e,r,i),e.decodeAsync=async(r,i)=>ef(e,r,i),e.safeEncode=(r,i)=>tf(e,r,i),e.safeDecode=(r,i)=>nf(e,r,i),e.safeEncodeAsync=async(r,i)=>rf(e,r,i),e.safeDecodeAsync=async(r,i)=>of(e,r,i),Wn(e,"ZodType",{check(...r){const i=this.def;return this.clone(wt(i,{checks:[...i.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return et(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check($s(r,i))},superRefine(r,i){return this.check(bs(r,i))},overwrite(r){return this.check(Pt(r))},optional(){return Oe(this)},exactOptional(){return es(this)},nullable(){return sr(this)},nullish(){return Oe(sr(this))},nonoptional(r){return as(this,r)},array(){return ie(this)},or(r){return we([this,r])},and(r){return or(this,r)},transform(r){return ji(this,Ni(r))},default(r){return rs(this,r)},prefault(r){return os(this,r)},catch(r){return us(this,r)},pipe(r){return ji(this,r)},readonly(){return ms(this)},describe(r){const i=this.clone();return ut.add(i,{description:r}),i},meta(...r){if(r.length===0)return ut.get(this);const i=this.clone();return ut.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return ut.get(e)?.description},configurable:!0}),e)),ci=w("_ZodString",(e,t)=>{Ln.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>om(e,i,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Wn(e,"_ZodString",{regex(...i){return this.check(Wr(...i))},includes(...i){return this.check(Qr(...i))},startsWith(...i){return this.check(ei(...i))},endsWith(...i){return this.check(ti(...i))},min(...i){return this.check(Jt(...i))},max(...i){return this.check(qn(...i))},length(...i){return this.check(Jn(...i))},nonempty(...i){return this.check(Jt(1,...i))},lowercase(i){return this.check(Xr(i))},uppercase(i){return this.check(Yr(i))},trim(){return this.check(ii())},normalize(...i){return this.check(ri(...i))},toLowerCase(){return this.check(oi())},toUpperCase(){return this.check(ai())},slugify(){return this.check(si())}})}),Xn=w("ZodString",(e,t)=>{Ln.init(e,t),ci.init(e,t),e.email=r=>e.check(ea(ui,r)),e.url=r=>e.check(Hr(Qn,r)),e.jwt=r=>e.check(_a(Si,r)),e.emoji=r=>e.check(oa(li,r)),e.guid=r=>e.check(Kr(Yn,r)),e.uuid=r=>e.check(ta(St,r)),e.uuidv4=r=>e.check(na(St,r)),e.uuidv6=r=>e.check(ra(St,r)),e.uuidv7=r=>e.check(ia(St,r)),e.nanoid=r=>e.check(aa(di,r)),e.guid=r=>e.check(Kr(Yn,r)),e.cuid=r=>e.check(sa(pi,r)),e.cuid2=r=>e.check(ca(mi,r)),e.ulid=r=>e.check(ua(fi,r)),e.base64=r=>e.check(ga(bi,r)),e.base64url=r=>e.check(va(ki,r)),e.xid=r=>e.check(la(hi,r)),e.ksuid=r=>e.check(da(gi,r)),e.ipv4=r=>e.check(pa(vi,r)),e.ipv6=r=>e.check(ma(yi,r)),e.cidrv4=r=>e.check(fa(_i,r)),e.cidrv6=r=>e.check(ha($i,r)),e.e164=r=>e.check(ya(wi,r)),e.datetime=r=>e.check(za(r)),e.date=r=>e.check(Gm(r)),e.time=r=>e.check(Lm(r)),e.duration=r=>e.check(Vm(r))});function _(e){return yp(Xn,e)}const ke=w("ZodStringFormat",(e,t)=>{be.init(e,t),ci.init(e,t)}),ui=w("ZodEmail",(e,t)=>{Al.init(e,t),ke.init(e,t)});function sf(e){return ea(ui,e)}const Yn=w("ZodGUID",(e,t)=>{Cl.init(e,t),ke.init(e,t)});function cf(e){return Kr(Yn,e)}const St=w("ZodUUID",(e,t)=>{Dl.init(e,t),ke.init(e,t)});function uf(e){return ta(St,e)}function lf(e){return na(St,e)}function df(e){return ra(St,e)}function pf(e){return ia(St,e)}const Qn=w("ZodURL",(e,t)=>{Rl.init(e,t),ke.init(e,t)});function mf(e){return Hr(Qn,e)}function ff(e){return Hr(Qn,{protocol:Uo,hostname:Wu,...z(e)})}const li=w("ZodEmoji",(e,t)=>{Ul.init(e,t),ke.init(e,t)});function hf(e){return oa(li,e)}const di=w("ZodNanoID",(e,t)=>{Zl.init(e,t),ke.init(e,t)});function gf(e){return aa(di,e)}const pi=w("ZodCUID",(e,t)=>{Ml.init(e,t),ke.init(e,t)});function vf(e){return sa(pi,e)}const mi=w("ZodCUID2",(e,t)=>{Fl.init(e,t),ke.init(e,t)});function yf(e){return ca(mi,e)}const fi=w("ZodULID",(e,t)=>{Gl.init(e,t),ke.init(e,t)});function _f(e){return ua(fi,e)}const hi=w("ZodXID",(e,t)=>{Ll.init(e,t),ke.init(e,t)});function $f(e){return la(hi,e)}const gi=w("ZodKSUID",(e,t)=>{Vl.init(e,t),ke.init(e,t)});function bf(e){return da(gi,e)}const vi=w("ZodIPv4",(e,t)=>{Hl.init(e,t),ke.init(e,t)});function kf(e){return pa(vi,e)}const Ca=w("ZodMAC",(e,t)=>{Xl.init(e,t),ke.init(e,t)});function wf(e){return $p(Ca,e)}const yi=w("ZodIPv6",(e,t)=>{Wl.init(e,t),ke.init(e,t)});function Sf(e){return ma(yi,e)}const _i=w("ZodCIDRv4",(e,t)=>{Yl.init(e,t),ke.init(e,t)});function If(e){return fa(_i,e)}const $i=w("ZodCIDRv6",(e,t)=>{Ql.init(e,t),ke.init(e,t)});function Of(e){return ha($i,e)}const bi=w("ZodBase64",(e,t)=>{ed.init(e,t),ke.init(e,t)});function Tf(e){return ga(bi,e)}const ki=w("ZodBase64URL",(e,t)=>{nd.init(e,t),ke.init(e,t)});function Pf(e){return va(ki,e)}const wi=w("ZodE164",(e,t)=>{rd.init(e,t),ke.init(e,t)});function Ef(e){return ya(wi,e)}const Si=w("ZodJWT",(e,t)=>{od.init(e,t),ke.init(e,t)});function zf(e){return _a(Si,e)}const gn=w("ZodCustomStringFormat",(e,t)=>{ad.init(e,t),ke.init(e,t)});function Nf(e,t,r={}){return Kn(gn,e,t,r)}function xf(e){return Kn(gn,"hostname",Hu,e)}function jf(e){return Kn(gn,"hex",dl,e)}function Cf(e,t){const r=t?.enc??"hex",i=`${e}_${r}`,n=Mo[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return Kn(gn,i,n,t)}const er=w("ZodNumber",(e,t)=>{Vo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>am(e,i,n),Wn(e,"ZodNumber",{gt(i,n){return this.check(Dt(i,n))},gte(i,n){return this.check(We(i,n))},min(i,n){return this.check(We(i,n))},lt(i,n){return this.check(Ct(i,n))},lte(i,n){return this.check(lt(i,n))},max(i,n){return this.check(lt(i,n))},int(i){return this.check(Ii(i))},safe(i){return this.check(Ii(i))},positive(i){return this.check(Dt(0,i))},nonnegative(i){return this.check(We(0,i))},negative(i){return this.check(Ct(0,i))},nonpositive(i){return this.check(lt(0,i))},multipleOf(i,n){return this.check(dn(i,n))},step(i,n){return this.check(dn(i,n))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ee(e){return Op(er,e)}const Kt=w("ZodNumberFormat",(e,t)=>{sd.init(e,t),er.init(e,t)});function Ii(e){return Pp(Kt,e)}function Df(e){return Ep(Kt,e)}function Af(e){return zp(Kt,e)}function Rf(e){return Np(Kt,e)}function Uf(e){return xp(Kt,e)}const tr=w("ZodBoolean",(e,t)=>{Bo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sm(e,r,i)});function ze(e){return jp(tr,e)}const nr=w("ZodBigInt",(e,t)=>{qo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>cm(e,i),e.gte=(i,n)=>e.check(We(i,n)),e.min=(i,n)=>e.check(We(i,n)),e.gt=(i,n)=>e.check(Dt(i,n)),e.gte=(i,n)=>e.check(We(i,n)),e.min=(i,n)=>e.check(We(i,n)),e.lt=(i,n)=>e.check(Ct(i,n)),e.lte=(i,n)=>e.check(lt(i,n)),e.max=(i,n)=>e.check(lt(i,n)),e.positive=i=>e.check(Dt(BigInt(0),i)),e.negative=i=>e.check(Ct(BigInt(0),i)),e.nonpositive=i=>e.check(lt(BigInt(0),i)),e.nonnegative=i=>e.check(We(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(dn(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Zf(e){return Dp(nr,e)}const Oi=w("ZodBigIntFormat",(e,t)=>{cd.init(e,t),nr.init(e,t)});function Mf(e){return Rp(Oi,e)}function Ff(e){return Up(Oi,e)}const Da=w("ZodSymbol",(e,t)=>{ud.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>um(e,r)});function Gf(e){return Zp(Da,e)}const Aa=w("ZodUndefined",(e,t)=>{ld.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dm(e,r)});function Lf(e){return Mp(Aa,e)}const Ra=w("ZodNull",(e,t)=>{dd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lm(e,r,i)});function Ti(e){return Fp(Ra,e)}const Ua=w("ZodAny",(e,t)=>{pd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fm()});function Vf(){return Gp(Ua)}const Za=w("ZodUnknown",(e,t)=>{md.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>hm()});function fe(){return Lp(Za)}const Ma=w("ZodNever",(e,t)=>{fd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>mm(e,r,i)});function Pi(e){return Vp(Ma,e)}const Fa=w("ZodVoid",(e,t)=>{hd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>pm(e,r)});function Bf(e){return Bp(Fa,e)}const Ei=w("ZodDate",(e,t)=>{gd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>gm(e,i),e.min=(i,n)=>e.check(We(i,n)),e.max=(i,n)=>e.check(lt(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function qf(e){return qp(Ei,e)}const Ga=w("ZodArray",(e,t)=>{yd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pm(e,r,i,n),e.element=t.element,Wn(e,"ZodArray",{min(r,i){return this.check(Jt(r,i))},nonempty(r){return this.check(Jt(1,r))},max(r,i){return this.check(qn(r,i))},length(r,i){return this.check(Jn(r,i))},unwrap(){return this.element}})});function ie(e,t){return Hp(Ga,e,t)}function Jf(e){const t=e._zod.def.shape;return Le(Object.keys(t))}const rr=w("ZodObject",(e,t)=>{bd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Em(e,r,i,n),se(e,"shape",()=>t.shape),Wn(e,"ZodObject",{keyof(){return Le(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:fe()})},loose(){return this.clone({...this._zod.def,catchall:fe()})},strict(){return this.clone({...this._zod.def,catchall:Pi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return _u(this,r)},safeExtend(r){return $u(this,r)},merge(r){return bu(this,r)},pick(r){return vu(this,r)},omit(r){return yu(this,r)},partial(...r){return ku(ar,this,r[0])},required(...r){return wu(xi,this,r[0])}})});function U(e,t){const r={type:"object",shape:e??{},...z(t)};return new rr(r)}function Kf(e,t){return new rr({type:"object",shape:e,catchall:Pi(),...z(t)})}function Ge(e,t){return new rr({type:"object",shape:e,catchall:fe(),...z(t)})}const ir=w("ZodUnion",(e,t)=>{Vr.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ia(e,r,i,n),e.options=t.options});function we(e,t){return new ir({type:"union",options:e,...z(t)})}const La=w("ZodXor",(e,t)=>{ir.init(e,t),Sd.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ia(e,r,i,n),e.options=t.options});function Hf(e,t){return new La({type:"union",options:e,inclusive:!1,...z(t)})}const Va=w("ZodDiscriminatedUnion",(e,t)=>{ir.init(e,t),Id.init(e,t)});function zi(e,t,r){return new Va({type:"union",options:t,discriminator:e,...z(r)})}const Ba=w("ZodIntersection",(e,t)=>{Od.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zm(e,r,i,n)});function or(e,t){return new Ba({type:"intersection",left:e,right:t})}const qa=w("ZodTuple",(e,t)=>{Ho.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nm(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Ja(e,t,r){const i=t instanceof Q,n=i?r:t,o=i?t:null;return new qa({type:"tuple",items:e,rest:o,...z(n)})}const vn=w("ZodRecord",(e,t)=>{Nd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xm(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function he(e,t,r){return!t||!t._zod?new vn({type:"record",keyType:_(),valueType:e,...z(t)}):new vn({type:"record",keyType:e,valueType:t,...z(r)})}function Wf(e,t,r){const i=et(e);return i._zod.values=void 0,new vn({type:"record",keyType:i,valueType:t,...z(r)})}function Xf(e,t,r){return new vn({type:"record",keyType:e,valueType:t,mode:"loose",...z(r)})}const Ka=w("ZodMap",(e,t)=>{xd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Om(e,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(At(...r)),e.nonempty=r=>e.check(At(1,r)),e.max=(...r)=>e.check(pn(...r)),e.size=(...r)=>e.check(Bn(...r))});function Yf(e,t,r){return new Ka({type:"map",keyType:e,valueType:t,...z(r)})}const Ha=w("ZodSet",(e,t)=>{Cd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Tm(e,r),e.min=(...r)=>e.check(At(...r)),e.nonempty=r=>e.check(At(1,r)),e.max=(...r)=>e.check(pn(...r)),e.size=(...r)=>e.check(Bn(...r))});function Qf(e,t){return new Ha({type:"set",valueType:e,...z(t)})}const yn=w("ZodEnum",(e,t)=>{Ad.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>vm(e,i,n),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new yn({...t,checks:[],...z(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new yn({...t,checks:[],...z(n),entries:o})}});function Le(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new yn({type:"enum",entries:r,...z(t)})}function eh(e,t){return new yn({type:"enum",entries:e,...z(t)})}const Wa=w("ZodLiteral",(e,t)=>{Rd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ym(e,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function G(e,t){return new Wa({type:"literal",values:Array.isArray(e)?e:[e],...z(t)})}const Xa=w("ZodFile",(e,t)=>{Ud.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bm(e,r,i),e.min=(r,i)=>e.check(At(r,i)),e.max=(r,i)=>e.check(pn(r,i)),e.mime=(r,i)=>e.check(ni(Array.isArray(r)?r:[r],i))});function th(e){return Wp(Xa,e)}const Ya=w("ZodTransform",(e,t)=>{Zd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Im(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new xr(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(cn(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(cn(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});function Ni(e){return new Ya({type:"transform",transform:e})}const ar=w("ZodOptional",(e,t)=>{Wo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Oa(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Oe(e){return new ar({type:"optional",innerType:e})}const Qa=w("ZodExactOptional",(e,t)=>{Fd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Oa(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function es(e){return new Qa({type:"optional",innerType:e})}const ts=w("ZodNullable",(e,t)=>{Gd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function sr(e){return new ts({type:"nullable",innerType:e})}function nh(e){return Oe(sr(e))}const ns=w("ZodDefault",(e,t)=>{Ld.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function rs(e,t){return new ns({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Dr(t)}})}const is=w("ZodPrefault",(e,t)=>{Bd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Am(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function os(e,t){return new is({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Dr(t)}})}const xi=w("ZodNonOptional",(e,t)=>{qd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function as(e,t){return new xi({type:"nonoptional",innerType:e,...z(t)})}const ss=w("ZodSuccess",(e,t)=>{Kd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>km(e,r,i),e.unwrap=()=>e._zod.def.innerType});function rh(e){return new ss({type:"success",innerType:e})}const cs=w("ZodCatch",(e,t)=>{Hd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function us(e,t){return new cs({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ls=w("ZodNaN",(e,t)=>{Wd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_m(e,r)});function ih(e){return Kp(ls,e)}const cr=w("ZodPipe",(e,t)=>{Xo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Um(e,r,i,n),e.in=t.in,e.out=t.out});function ji(e,t){return new cr({type:"pipe",in:e,out:t})}const ur=w("ZodCodec",(e,t)=>{cr.init(e,t),Yo.init(e,t)});function oh(e,t,r){return new ur({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function ah(e){const t=e._zod.def;return new ur({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}const ds=w("ZodPreprocess",(e,t)=>{cr.init(e,t),Xd.init(e,t)}),ps=w("ZodReadonly",(e,t)=>{Yd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ms(e){return new ps({type:"readonly",innerType:e})}const fs=w("ZodTemplateLiteral",(e,t)=>{ep.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$m(e,r,i)});function sh(e,t){return new fs({type:"template_literal",parts:e,...z(t)})}const hs=w("ZodLazy",(e,t)=>{rp.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fm(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function gs(e){return new hs({type:"lazy",getter:e})}const vs=w("ZodPromise",(e,t)=>{np.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Mm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ch(e){return new vs({type:"promise",innerType:e})}const ys=w("ZodFunction",(e,t)=>{tp.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sm(e,r)});function Ci(e){return new ys({type:"function",input:Array.isArray(e?.input)?Ja(e?.input):e?.input??ie(fe()),output:e?.output??fe()})}const lr=w("ZodCustom",(e,t)=>{ip.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wm(e,r)});function uh(e){const t=new Te({check:"custom"});return t._zod.check=e,t}function _s(e,t){return Xp(lr,e??(()=>!0),t)}function $s(e,t={}){return Yp(lr,e,t)}function bs(e,t){return Qp(e,t)}const lh=tm,dh=nm;function ph(e,t={}){const r=new lr({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...z(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}const mh=(...e)=>rm({Codec:ur,Boolean:tr,String:Xn},...e);function fh(e){const t=gs(()=>we([_(e),ee(),ze(),Ti(),ie(t),he(_(),t)]));return t}function Di(e,t){return new ds({type:"pipe",in:Ni(e),out:t})}var Q$=Object.freeze({__proto__:null,ZodAny:Ua,ZodArray:Ga,ZodBase64:bi,ZodBase64URL:ki,ZodBigInt:nr,ZodBigIntFormat:Oi,ZodBoolean:tr,ZodCIDRv4:_i,ZodCIDRv6:$i,ZodCUID:pi,ZodCUID2:mi,ZodCatch:cs,ZodCodec:ur,ZodCustom:lr,ZodCustomStringFormat:gn,ZodDate:Ei,ZodDefault:ns,ZodDiscriminatedUnion:Va,ZodE164:wi,ZodEmail:ui,ZodEmoji:li,ZodEnum:yn,ZodExactOptional:Qa,ZodFile:Xa,ZodFunction:ys,ZodGUID:Yn,ZodIPv4:vi,ZodIPv6:yi,ZodIntersection:Ba,ZodJWT:Si,ZodKSUID:gi,ZodLazy:hs,ZodLiteral:Wa,ZodMAC:Ca,ZodMap:Ka,ZodNaN:ls,ZodNanoID:di,ZodNever:Ma,ZodNonOptional:xi,ZodNull:Ra,ZodNullable:ts,ZodNumber:er,ZodNumberFormat:Kt,ZodObject:rr,ZodOptional:ar,ZodPipe:cr,ZodPrefault:is,ZodPreprocess:ds,ZodPromise:vs,ZodReadonly:ps,ZodRecord:vn,ZodSet:Ha,ZodString:Xn,ZodStringFormat:ke,ZodSuccess:ss,ZodSymbol:Da,ZodTemplateLiteral:fs,ZodTransform:Ya,ZodTuple:qa,ZodType:re,ZodULID:fi,ZodURL:Qn,ZodUUID:St,ZodUndefined:Aa,ZodUnion:ir,ZodUnknown:Za,ZodVoid:Fa,ZodXID:hi,ZodXor:La,_ZodString:ci,_default:rs,_function:Ci,any:Vf,array:ie,base64:Tf,base64url:Pf,bigint:Zf,boolean:ze,catch:us,check:uh,cidrv4:If,cidrv6:Of,codec:oh,cuid:vf,cuid2:yf,custom:_s,date:qf,describe:lh,discriminatedUnion:zi,e164:Ef,email:sf,emoji:hf,enum:Le,exactOptional:es,file:th,float32:Df,float64:Af,function:Ci,guid:cf,hash:Cf,hex:jf,hostname:xf,httpUrl:ff,instanceof:ph,int:Ii,int32:Rf,int64:Mf,intersection:or,invertCodec:ah,ipv4:kf,ipv6:Sf,json:fh,jwt:zf,keyof:Jf,ksuid:bf,lazy:gs,literal:G,looseObject:Ge,looseRecord:Xf,mac:wf,map:Yf,meta:dh,nan:ih,nanoid:gf,nativeEnum:eh,never:Pi,nonoptional:as,null:Ti,nullable:sr,nullish:nh,number:ee,object:U,optional:Oe,partialRecord:Wf,pipe:ji,prefault:os,preprocess:Di,promise:ch,readonly:ms,record:he,refine:$s,set:Qf,strictObject:Kf,string:_,stringFormat:Nf,stringbool:mh,success:rh,superRefine:bs,symbol:Gf,templateLiteral:sh,transform:Ni,tuple:Ja,uint32:Uf,uint64:Ff,ulid:_f,undefined:Lf,union:we,unknown:fe,url:mf,uuid:uf,uuidv4:lf,uuidv6:df,uuidv7:pf,void:Bf,xid:$f,xor:Hf});const eb={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 tb(e){Re({customError:e})}function nb(){return Re().customError}var te;te||(te={});const R={...Q$,...X$,iso:Bm},rb=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 ib(e,t){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function ob(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;const i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){const n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function hh(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return R.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return R.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const o=ob(n,t),a=Ve(o,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){const n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return R.null();if(n.length===0)return R.never();if(n.length===1)return R.literal(n[0]);if(n.every(a=>typeof a=="string"))return R.enum(n);const o=n.map(a=>R.literal(a));return o.length<2?o[0]:R.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return R.literal(e.const);const r=e.type;if(Array.isArray(r)){const n=r.map(o=>{const a={...e,type:o};return hh(a,t)});return n.length===0?R.never():n.length===1?n[0]:R.union(n)}if(!r)return R.any();let i;switch(r){case"string":{let n=R.string();if(e.format){const o=e.format;o==="email"?n=n.check(R.email()):o==="uri"||o==="uri-reference"?n=n.check(R.url()):o==="uuid"||o==="guid"?n=n.check(R.uuid()):o==="date-time"?n=n.check(R.iso.datetime()):o==="date"?n=n.check(R.iso.date()):o==="time"?n=n.check(R.iso.time()):o==="duration"?n=n.check(R.iso.duration()):o==="ipv4"?n=n.check(R.ipv4()):o==="ipv6"?n=n.check(R.ipv6()):o==="mac"?n=n.check(R.mac()):o==="cidr"?n=n.check(R.cidrv4()):o==="cidr-v6"?n=n.check(R.cidrv6()):o==="base64"?n=n.check(R.base64()):o==="base64url"?n=n.check(R.base64url()):o==="e164"?n=n.check(R.e164()):o==="jwt"?n=n.check(R.jwt()):o==="emoji"?n=n.check(R.emoji()):o==="nanoid"?n=n.check(R.nanoid()):o==="cuid"?n=n.check(R.cuid()):o==="cuid2"?n=n.check(R.cuid2()):o==="ulid"?n=n.check(R.ulid()):o==="xid"?n=n.check(R.xid()):o==="ksuid"&&(n=n.check(R.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?R.number().int():R.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=R.boolean();break}case"null":{i=R.null();break}case"object":{const n={},o=e.properties||{},a=new Set(e.required||[]);for(const[c,u]of Object.entries(o)){const l=Ve(u,t);n[c]=a.has(c)?l:l.optional()}if(e.propertyNames){const c=Ve(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Ve(e.additionalProperties,t):R.any();if(Object.keys(n).length===0){i=R.record(c,u);break}const l=R.object(n).passthrough(),d=R.looseRecord(c,u);i=R.intersection(l,d);break}if(e.patternProperties){const c=e.patternProperties,u=Object.keys(c),l=[];for(const m of u){const p=Ve(c[m],t),h=R.string().regex(new RegExp(m));l.push(R.looseRecord(h,p))}const d=[];if(Object.keys(n).length>0&&d.push(R.object(n).passthrough()),d.push(...l),d.length===0)i=R.object({}).passthrough();else if(d.length===1)i=d[0];else{let m=R.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)m=R.intersection(m,d[p]);i=m}break}const s=R.object(n);e.additionalProperties===!1?i=s.strict():typeof e.additionalProperties=="object"?i=s.catchall(Ve(e.additionalProperties,t)):i=s.passthrough();break}case"array":{const n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){const a=n.map(c=>Ve(c,t)),s=o&&typeof o=="object"&&!Array.isArray(o)?Ve(o,t):void 0;s?i=R.tuple(a).rest(s):i=R.tuple(a),typeof e.minItems=="number"&&(i=i.check(R.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(R.maxLength(e.maxItems)))}else if(Array.isArray(o)){const a=o.map(c=>Ve(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?Ve(e.additionalItems,t):void 0;s?i=R.tuple(a).rest(s):i=R.tuple(a),typeof e.minItems=="number"&&(i=i.check(R.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(R.maxLength(e.maxItems)))}else if(o!==void 0){const a=Ve(o,t);let s=R.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=R.array(R.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}function Ve(e,t){if(typeof e=="boolean")return e?R.any():R.never();let r=hh(e,t);const i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const s=e.anyOf.map(u=>Ve(u,t)),c=R.union(s);r=i?R.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){const s=e.oneOf.map(u=>Ve(u,t)),c=R.xor(s);r=i?R.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:R.any();else{let s=i?r:Ve(e.allOf[0],t);const c=i?0:1;for(let u=c;u<e.allOf.length;u++)s=R.intersection(s,Ve(e.allOf[u],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=R.nullable(r)),e.readOnly===!0&&(r=R.readonly(r)),e.default!==void 0&&(r=r.default(e.default));const n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const s of o)s in e&&(n[s]=e[s]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const s of a)s in e&&(n[s]=e[s]);for(const s of Object.keys(e))rb.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function ab(e,t){if(typeof e=="boolean")return e?R.any():R.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}const i=ib(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??ut};return Ve(r,o)}function sb(e){return _p(Xn,e)}function cb(e){return Tp(er,e)}function ub(e){return Cp(tr,e)}function lb(e){return Ap(nr,e)}function db(e){return Jp(Ei,e)}var pb=Object.freeze({__proto__:null,bigint:lb,boolean:ub,date:db,number:cb,string:sb});Re(sp());var ks=Object.freeze({__proto__:null,$brand:cu,$input:gp,$output:hp,NEVER:su,TimePrecision:bp,ZodAny:Ua,ZodArray:Ga,ZodBase64:bi,ZodBase64URL:ki,ZodBigInt:nr,ZodBigIntFormat:Oi,ZodBoolean:tr,ZodCIDRv4:_i,ZodCIDRv6:$i,ZodCUID:pi,ZodCUID2:mi,ZodCatch:cs,ZodCodec:ur,ZodCustom:lr,ZodCustomStringFormat:gn,ZodDate:Ei,ZodDefault:ns,ZodDiscriminatedUnion:Va,ZodE164:wi,ZodEmail:ui,ZodEmoji:li,ZodEnum:yn,ZodError:Y$,ZodExactOptional:Qa,ZodFile:Xa,get ZodFirstPartyTypeKind(){return te},ZodFunction:ys,ZodGUID:Yn,ZodIPv4:vi,ZodIPv6:yi,ZodISODate:Na,ZodISODateTime:Ea,ZodISODuration:ja,ZodISOTime:xa,ZodIntersection:Ba,ZodIssueCode:eb,ZodJWT:Si,ZodKSUID:gi,ZodLazy:hs,ZodLiteral:Wa,ZodMAC:Ca,ZodMap:Ka,ZodNaN:ls,ZodNanoID:di,ZodNever:Ma,ZodNonOptional:xi,ZodNull:Ra,ZodNullable:ts,ZodNumber:er,ZodNumberFormat:Kt,ZodObject:rr,ZodOptional:ar,ZodPipe:cr,ZodPrefault:is,ZodPreprocess:ds,ZodPromise:vs,ZodReadonly:ps,ZodRealError:rt,ZodRecord:vn,ZodSet:Ha,ZodString:Xn,ZodStringFormat:ke,ZodSuccess:ss,ZodSymbol:Da,ZodTemplateLiteral:fs,ZodTransform:Ya,ZodTuple:qa,ZodType:re,ZodULID:fi,ZodURL:Qn,ZodUUID:St,ZodUndefined:Aa,ZodUnion:ir,ZodUnknown:Za,ZodVoid:Fa,ZodXID:hi,ZodXor:La,_ZodString:ci,_default:rs,_function:Ci,any:Vf,array:ie,base64:Tf,base64url:Pf,bigint:Zf,boolean:ze,catch:us,check:uh,cidrv4:If,cidrv6:Of,clone:et,codec:oh,coerce:pb,config:Re,core:W$,cuid:vf,cuid2:yf,custom:_s,date:qf,decode:Ym,decodeAsync:ef,describe:lh,discriminatedUnion:zi,e164:Ef,email:sf,emoji:hf,encode:Xm,encodeAsync:Qm,endsWith:ti,enum:Le,exactOptional:es,file:th,flattenError:To,float32:Df,float64:Af,formatError:Po,fromJSONSchema:ab,function:Ci,getErrorMap:nb,globalRegistry:ut,gt:Dt,gte:We,guid:cf,hash:Cf,hex:jf,hostname:xf,httpUrl:ff,includes:Qr,instanceof:ph,int:Ii,int32:Rf,int64:Mf,intersection:or,invertCodec:ah,ipv4:kf,ipv6:Sf,iso:Bm,json:fh,jwt:zf,keyof:Jf,ksuid:bf,lazy:gs,length:Jn,literal:G,locales:mp,looseObject:Ge,looseRecord:Xf,lowercase:Xr,lt:Ct,lte:lt,mac:wf,map:Yf,maxLength:qn,maxSize:pn,meta:dh,mime:ni,minLength:Jt,minSize:At,multipleOf:dn,nan:ih,nanoid:gf,nativeEnum:eh,negative:ba,never:Pi,nonnegative:wa,nonoptional:as,nonpositive:ka,normalize:ri,null:Ti,nullable:sr,nullish:nh,number:ee,object:U,optional:Oe,overwrite:Pt,parse:Jm,parseAsync:Km,partialRecord:Wf,pipe:ji,positive:$a,prefault:os,preprocess:Di,prettifyError:Nu,promise:ch,property:Sa,readonly:ms,record:he,refine:$s,regex:Wr,regexes:Mo,registry:Qo,safeDecode:nf,safeDecodeAsync:of,safeEncode:tf,safeEncodeAsync:rf,safeParse:Hm,safeParseAsync:Wm,set:Qf,setErrorMap:tb,size:Bn,slugify:si,startsWith:ei,strictObject:Kf,string:_,stringFormat:Nf,stringbool:mh,success:rh,superRefine:bs,symbol:Gf,templateLiteral:sh,toJSONSchema:Pa,toLowerCase:oi,toUpperCase:ai,transform:Ni,treeifyError:Eu,trim:ii,tuple:Ja,uint32:Uf,uint64:Ff,ulid:_f,undefined:Lf,union:we,unknown:fe,uppercase:Yr,url:mf,util:Tu,uuid:uf,uuidv4:lf,uuidv6:df,uuidv7:pf,void:Bf,xid:$f,xor:Hf});const mb=w("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");Q.init(e,t),e.def=t,e.type=t.type,e.parse=(r,i)=>Zr(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Fr(e,r,i),e.parseAsync=async(r,i)=>Mr(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Gr(e,r,i),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]},{parent:!0}),e.with=e.check,e.clone=(r,i)=>et(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.apply=r=>r(e)}),fb=w("ZodMiniObject",(e,t)=>{Jo.init(e,t),mb.init(e,t),se(e,"shape",()=>t.shape)});function gh(e,t){const r={type:"object",shape:e??{},...z(t)};return new fb(r)}function Et(e){return!!e._zod}function _n(e){const t=Object.values(e);if(t.length===0)return gh({});const r=t.every(Et),i=t.every(n=>!Et(n));if(r)return gh(e);if(i)return U(e);throw new Error("Mixed Zod versions detected in object shape.")}function dr(e,t){return Et(e)?Fr(e,t):e.safeParse(t)}async function ws(e,t){return Et(e)?await Gr(e,t):await e.safeParseAsync(t)}function pr(e){if(!e)return;let t;if(Et(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function mr(e){if(e){if(typeof e=="object"){const t=e,r=e;if(!t._def&&!r._zod){const i=Object.values(e);if(i.length>0&&i.every(n=>typeof n=="object"&&n!==null&&(n._def!==void 0||n._zod!==void 0||typeof n.parse=="function")))return _n(e)}}if(Et(e)){const r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function hb(e){return e.length===0?"object root":e.reduce((t,r,i)=>i===0?String(r):typeof r=="number"?`${t}[${r}]`:`${t}.${r}`,"")}function Ss(e){if(e&&typeof e=="object"){if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0)return e.issues.map(t=>t.path?.length?`${t.message} at ${hb(t.path)}`:t.message).join(`
67
- `);if("message"in e&&typeof e.message=="string")return e.message;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function gb(e){return e.description}function vb(e){if(Et(e))return e._zod?.def?.type==="optional";const t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function Is(e){if(Et(e)){const o=e._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]}}const r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}const i=e.value;if(i!==void 0)return i}const vh="2025-11-25",yb=[vh,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ht="io.modelcontextprotocol/related-task",Ai="2.0",xe=_s(e=>e!==null&&(typeof e=="object"||typeof e=="function")),yh=we([_(),ee().int()]),_h=_();Ge({ttl:ee().optional(),pollInterval:ee().optional()});const _b=U({ttl:ee().optional()}),$b=U({taskId:_()}),Os=Ge({progressToken:yh.optional(),[Ht]:$b.optional()}),it=U({_meta:Os.optional()}),fr=it.extend({task:_b.optional()}),bb=e=>fr.safeParse(e).success,Ue=U({method:_(),params:it.loose().optional()}),dt=U({_meta:Os.optional()}),pt=U({method:_(),params:dt.loose().optional()}),Ze=Ge({_meta:Os.optional()}),Ri=we([_(),ee().int()]),$h=U({jsonrpc:G(Ai),id:Ri,...Ue.shape}).strict(),bh=e=>$h.safeParse(e).success,kh=U({jsonrpc:G(Ai),...pt.shape}).strict(),kb=e=>kh.safeParse(e).success,Ts=U({jsonrpc:G(Ai),id:Ri,result:Ze}).strict(),Ui=e=>Ts.safeParse(e).success;var H;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(H||(H={}));const Ps=U({jsonrpc:G(Ai),id:Ri.optional(),error:U({code:ee().int(),message:_(),data:fe().optional()})}).strict(),wb=e=>Ps.safeParse(e).success,Sb=we([$h,kh,Ts,Ps]);we([Ts,Ps]);const Es=Ze.strict(),Ib=dt.extend({requestId:Ri.optional(),reason:_().optional()}),zs=pt.extend({method:G("notifications/cancelled"),params:Ib}),Ob=U({src:_(),mimeType:_().optional(),sizes:ie(_()).optional(),theme:Le(["light","dark"]).optional()}),hr=U({icons:ie(Ob).optional()}),$n=U({name:_(),title:_().optional()}),wh=$n.extend({...$n.shape,...hr.shape,version:_(),websiteUrl:_().optional(),description:_().optional()}),Tb=or(U({applyDefaults:ze().optional()}),he(_(),fe())),Pb=Di(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,or(U({form:Tb.optional(),url:xe.optional()}),he(_(),fe()).optional())),Eb=Ge({list:xe.optional(),cancel:xe.optional(),requests:Ge({sampling:Ge({createMessage:xe.optional()}).optional(),elicitation:Ge({create:xe.optional()}).optional()}).optional()}),zb=Ge({list:xe.optional(),cancel:xe.optional(),requests:Ge({tools:Ge({call:xe.optional()}).optional()}).optional()}),Nb=U({experimental:he(_(),xe).optional(),sampling:U({context:xe.optional(),tools:xe.optional()}).optional(),elicitation:Pb.optional(),roots:U({listChanged:ze().optional()}).optional(),tasks:Eb.optional(),extensions:he(_(),xe).optional()}),xb=it.extend({protocolVersion:_(),capabilities:Nb,clientInfo:wh}),Sh=Ue.extend({method:G("initialize"),params:xb}),jb=U({experimental:he(_(),xe).optional(),logging:xe.optional(),completions:xe.optional(),prompts:U({listChanged:ze().optional()}).optional(),resources:U({subscribe:ze().optional(),listChanged:ze().optional()}).optional(),tools:U({listChanged:ze().optional()}).optional(),tasks:zb.optional(),extensions:he(_(),xe).optional()}),Cb=Ze.extend({protocolVersion:_(),capabilities:jb,serverInfo:wh,instructions:_().optional()}),Ih=pt.extend({method:G("notifications/initialized"),params:dt.optional()}),Ns=Ue.extend({method:G("ping"),params:it.optional()}),Db=U({progress:ee(),total:Oe(ee()),message:Oe(_())}),Ab=U({...dt.shape,...Db.shape,progressToken:yh}),xs=pt.extend({method:G("notifications/progress"),params:Ab}),Rb=it.extend({cursor:_h.optional()}),gr=Ue.extend({params:Rb.optional()}),vr=Ze.extend({nextCursor:_h.optional()}),Ub=Le(["working","input_required","completed","failed","cancelled"]),yr=U({taskId:_(),status:Ub,ttl:we([ee(),Ti()]),createdAt:_(),lastUpdatedAt:_(),pollInterval:Oe(ee()),statusMessage:Oe(_())}),Zi=Ze.extend({task:yr}),Zb=dt.merge(yr),Mi=pt.extend({method:G("notifications/tasks/status"),params:Zb}),js=Ue.extend({method:G("tasks/get"),params:it.extend({taskId:_()})}),Cs=Ze.merge(yr),Ds=Ue.extend({method:G("tasks/result"),params:it.extend({taskId:_()})});Ze.loose();const As=gr.extend({method:G("tasks/list")}),Rs=vr.extend({tasks:ie(yr)}),Us=Ue.extend({method:G("tasks/cancel"),params:it.extend({taskId:_()})}),Mb=Ze.merge(yr),Oh=U({uri:_(),mimeType:Oe(_()),_meta:he(_(),fe()).optional()}),Th=Oh.extend({text:_()}),Zs=_().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ph=Oh.extend({blob:Zs}),_r=Le(["user","assistant"]),bn=U({audience:ie(_r).optional(),priority:ee().min(0).max(1).optional(),lastModified:za({offset:!0}).optional()}),Eh=U({...$n.shape,...hr.shape,uri:_(),description:Oe(_()),mimeType:Oe(_()),size:Oe(ee()),annotations:bn.optional(),_meta:Oe(Ge({}))}),Fb=U({...$n.shape,...hr.shape,uriTemplate:_(),description:Oe(_()),mimeType:Oe(_()),annotations:bn.optional(),_meta:Oe(Ge({}))}),Ms=gr.extend({method:G("resources/list")}),Gb=vr.extend({resources:ie(Eh)}),Fs=gr.extend({method:G("resources/templates/list")}),Lb=vr.extend({resourceTemplates:ie(Fb)}),Gs=it.extend({uri:_()}),Vb=Gs,Ls=Ue.extend({method:G("resources/read"),params:Vb}),Bb=Ze.extend({contents:ie(we([Th,Ph]))}),qb=pt.extend({method:G("notifications/resources/list_changed"),params:dt.optional()}),Jb=Gs,Kb=Ue.extend({method:G("resources/subscribe"),params:Jb}),Hb=Gs,Wb=Ue.extend({method:G("resources/unsubscribe"),params:Hb}),Xb=dt.extend({uri:_()}),Yb=pt.extend({method:G("notifications/resources/updated"),params:Xb}),Qb=U({name:_(),description:Oe(_()),required:Oe(ze())}),ek=U({...$n.shape,...hr.shape,description:Oe(_()),arguments:Oe(ie(Qb)),_meta:Oe(Ge({}))}),Vs=gr.extend({method:G("prompts/list")}),tk=vr.extend({prompts:ie(ek)}),nk=it.extend({name:_(),arguments:he(_(),_()).optional()}),Bs=Ue.extend({method:G("prompts/get"),params:nk}),qs=U({type:G("text"),text:_(),annotations:bn.optional(),_meta:he(_(),fe()).optional()}),Js=U({type:G("image"),data:Zs,mimeType:_(),annotations:bn.optional(),_meta:he(_(),fe()).optional()}),Ks=U({type:G("audio"),data:Zs,mimeType:_(),annotations:bn.optional(),_meta:he(_(),fe()).optional()}),rk=U({type:G("tool_use"),name:_(),id:_(),input:he(_(),fe()),_meta:he(_(),fe()).optional()}),ik=U({type:G("resource"),resource:we([Th,Ph]),annotations:bn.optional(),_meta:he(_(),fe()).optional()}),ok=Eh.extend({type:G("resource_link")}),Hs=we([qs,Js,Ks,ok,ik]),ak=U({role:_r,content:Hs}),sk=Ze.extend({description:_().optional(),messages:ie(ak)}),ck=pt.extend({method:G("notifications/prompts/list_changed"),params:dt.optional()}),uk=U({title:_().optional(),readOnlyHint:ze().optional(),destructiveHint:ze().optional(),idempotentHint:ze().optional(),openWorldHint:ze().optional()}),lk=U({taskSupport:Le(["required","optional","forbidden"]).optional()}),zh=U({...$n.shape,...hr.shape,description:_().optional(),inputSchema:U({type:G("object"),properties:he(_(),xe).optional(),required:ie(_()).optional()}).catchall(fe()),outputSchema:U({type:G("object"),properties:he(_(),xe).optional(),required:ie(_()).optional()}).catchall(fe()).optional(),annotations:uk.optional(),execution:lk.optional(),_meta:he(_(),fe()).optional()}),Ws=gr.extend({method:G("tools/list")}),dk=vr.extend({tools:ie(zh)}),Xs=Ze.extend({content:ie(Hs).default([]),structuredContent:he(_(),fe()).optional(),isError:ze().optional()});Xs.or(Ze.extend({toolResult:fe()}));const pk=fr.extend({name:_(),arguments:he(_(),fe()).optional()}),Fi=Ue.extend({method:G("tools/call"),params:pk}),mk=pt.extend({method:G("notifications/tools/list_changed"),params:dt.optional()});U({autoRefresh:ze().default(!0),debounceMs:ee().int().nonnegative().default(300)});const Gi=Le(["debug","info","notice","warning","error","critical","alert","emergency"]),fk=it.extend({level:Gi}),Nh=Ue.extend({method:G("logging/setLevel"),params:fk}),hk=dt.extend({level:Gi,logger:_().optional(),data:fe()}),gk=pt.extend({method:G("notifications/message"),params:hk}),vk=U({name:_().optional()}),yk=U({hints:ie(vk).optional(),costPriority:ee().min(0).max(1).optional(),speedPriority:ee().min(0).max(1).optional(),intelligencePriority:ee().min(0).max(1).optional()}),_k=U({mode:Le(["auto","required","none"]).optional()}),$k=U({type:G("tool_result"),toolUseId:_().describe("The unique identifier for the corresponding tool call."),content:ie(Hs).default([]),structuredContent:U({}).loose().optional(),isError:ze().optional(),_meta:he(_(),fe()).optional()}),bk=zi("type",[qs,Js,Ks]),Li=zi("type",[qs,Js,Ks,rk,$k]),kk=U({role:_r,content:we([Li,ie(Li)]),_meta:he(_(),fe()).optional()}),wk=fr.extend({messages:ie(kk),modelPreferences:yk.optional(),systemPrompt:_().optional(),includeContext:Le(["none","thisServer","allServers"]).optional(),temperature:ee().optional(),maxTokens:ee().int(),stopSequences:ie(_()).optional(),metadata:xe.optional(),tools:ie(zh).optional(),toolChoice:_k.optional()}),Sk=Ue.extend({method:G("sampling/createMessage"),params:wk}),Ys=Ze.extend({model:_(),stopReason:Oe(Le(["endTurn","stopSequence","maxTokens"]).or(_())),role:_r,content:bk}),xh=Ze.extend({model:_(),stopReason:Oe(Le(["endTurn","stopSequence","maxTokens","toolUse"]).or(_())),role:_r,content:we([Li,ie(Li)])}),Ik=U({type:G("boolean"),title:_().optional(),description:_().optional(),default:ze().optional()}),Ok=U({type:G("string"),title:_().optional(),description:_().optional(),minLength:ee().optional(),maxLength:ee().optional(),format:Le(["email","uri","date","date-time"]).optional(),default:_().optional()}),Tk=U({type:Le(["number","integer"]),title:_().optional(),description:_().optional(),minimum:ee().optional(),maximum:ee().optional(),default:ee().optional()}),Pk=U({type:G("string"),title:_().optional(),description:_().optional(),enum:ie(_()),default:_().optional()}),Ek=U({type:G("string"),title:_().optional(),description:_().optional(),oneOf:ie(U({const:_(),title:_()})),default:_().optional()}),zk=U({type:G("string"),title:_().optional(),description:_().optional(),enum:ie(_()),enumNames:ie(_()).optional(),default:_().optional()}),Nk=we([Pk,Ek]),xk=U({type:G("array"),title:_().optional(),description:_().optional(),minItems:ee().optional(),maxItems:ee().optional(),items:U({type:G("string"),enum:ie(_())}),default:ie(_()).optional()}),jk=U({type:G("array"),title:_().optional(),description:_().optional(),minItems:ee().optional(),maxItems:ee().optional(),items:U({anyOf:ie(U({const:_(),title:_()}))}),default:ie(_()).optional()}),Ck=we([xk,jk]),Dk=we([zk,Nk,Ck]),Ak=we([Dk,Ik,Ok,Tk]),Rk=fr.extend({mode:G("form").optional(),message:_(),requestedSchema:U({type:G("object"),properties:he(_(),Ak),required:ie(_()).optional()})}),Uk=fr.extend({mode:G("url"),message:_(),elicitationId:_(),url:_().url()}),Zk=we([Rk,Uk]),Mk=Ue.extend({method:G("elicitation/create"),params:Zk}),Fk=dt.extend({elicitationId:_()}),Gk=pt.extend({method:G("notifications/elicitation/complete"),params:Fk}),Vi=Ze.extend({action:Le(["accept","decline","cancel"]),content:Di(e=>e===null?void 0:e,he(_(),we([_(),ee(),ze(),ie(_())])).optional())}),Lk=U({type:G("ref/resource"),uri:_()}),Vk=U({type:G("ref/prompt"),name:_()}),Bk=it.extend({ref:we([Vk,Lk]),argument:U({name:_(),value:_()}),context:U({arguments:he(_(),_()).optional()}).optional()}),Qs=Ue.extend({method:G("completion/complete"),params:Bk});function qk(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Jk(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}const Kk=Ze.extend({completion:Ge({values:ie(_()).max(100),total:Oe(ee().int()),hasMore:Oe(ze())})}),Hk=U({uri:_().startsWith("file://"),name:_().optional(),_meta:he(_(),fe()).optional()}),Wk=Ue.extend({method:G("roots/list"),params:it.optional()}),jh=Ze.extend({roots:ie(Hk)}),Xk=pt.extend({method:G("notifications/roots/list_changed"),params:dt.optional()});we([Ns,Sh,Qs,Nh,Bs,Vs,Ms,Fs,Ls,Kb,Wb,Fi,Ws,js,Ds,As,Us]),we([zs,xs,Ih,Xk,Mi]),we([Es,Ys,xh,Vi,jh,Cs,Rs,Zi]),we([Ns,Sk,Mk,Wk,js,Ds,As,Us]),we([zs,xs,gk,Yb,qb,mk,ck,Mi,Gk]),we([Es,Cb,Kk,sk,tk,Gb,Lb,Bb,Xs,dk,Cs,Rs,Zi]);class B extends Error{constructor(t,r,i){super(`MCP error ${t}: ${r}`),this.code=t,this.data=i,this.name="McpError"}static fromError(t,r,i){if(t===H.UrlElicitationRequired&&i){const n=i;if(n.elicitations)return new Yk(n.elicitations,r)}return new B(t,r,i)}}class Yk extends B{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(H.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function Wt(e){return e==="completed"||e==="failed"||e==="cancelled"}const Qk=Symbol("Let zodToJsonSchema decide on which parser to use"),Ch={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},ew=e=>typeof e=="string"?{...Ch,name:e}:{...Ch,...e},tw=e=>{const t=ew(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([i,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,i],jsonSchema:void 0}]))}};function Dh(e,t,r,i){i?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function ve(e,t,r,i,n){e[t]=r,Dh(e,t,i,n)}const Ah=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function Xe(e){if(e.target!=="openAi")return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Ah(t,e.currentPath):t.join("/")}}function nw(e,t){const r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==te.ZodAny&&(r.items=ge(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ve(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ve(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ve(r,"minItems",e.exactLength.value,e.exactLength.message,t),ve(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function rw(e,t){const r={type:"integer",format:"int64"};if(!e.checks)return r;for(const i of e.checks)switch(i.kind){case"min":t.target==="jsonSchema7"?i.inclusive?ve(r,"minimum",i.value,i.message,t):ve(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),ve(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?ve(r,"maximum",i.value,i.message,t):ve(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),ve(r,"maximum",i.value,i.message,t));break;case"multipleOf":ve(r,"multipleOf",i.value,i.message,t);break}return r}function iw(){return{type:"boolean"}}function Rh(e,t){return ge(e.type._def,t)}const ow=(e,t)=>ge(e.innerType._def,t);function Uh(e,t,r){const i=r??t.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((n,o)=>Uh(e,t,n))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return aw(e,t)}}const aw=(e,t)=>{const r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(const i of e.checks)switch(i.kind){case"min":ve(r,"minimum",i.value,i.message,t);break;case"max":ve(r,"maximum",i.value,i.message,t);break}return r};function sw(e,t){return{...ge(e.innerType._def,t),default:e.defaultValue()}}function cw(e,t){return t.effectStrategy==="input"?ge(e.schema._def,t):Xe(t)}function uw(e){return{type:"string",enum:Array.from(e.values)}}const lw=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function dw(e,t){const r=[ge(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),ge(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(o=>!!o);let i=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const n=[];return r.forEach(o=>{if(lw(o))n.push(...o.allOf),o.unevaluatedProperties===void 0&&(i=void 0);else{let a=o;if("additionalProperties"in o&&o.additionalProperties===!1){const{additionalProperties:s,...c}=o;a=c}else i=void 0;n.push(a)}}),n.length?{allOf:n,...i}:void 0}function pw(e,t){const r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}let ec;const gt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(ec===void 0&&(ec=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ec),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Zh(e,t){const r={type:"string"};if(e.checks)for(const i of e.checks)switch(i.kind){case"min":ve(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t);break;case"max":ve(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"email":switch(t.emailStrategy){case"format:email":vt(r,"email",i.message,t);break;case"format:idn-email":vt(r,"idn-email",i.message,t);break;case"pattern:zod":Je(r,gt.email,i.message,t);break}break;case"url":vt(r,"uri",i.message,t);break;case"uuid":vt(r,"uuid",i.message,t);break;case"regex":Je(r,i.regex,i.message,t);break;case"cuid":Je(r,gt.cuid,i.message,t);break;case"cuid2":Je(r,gt.cuid2,i.message,t);break;case"startsWith":Je(r,RegExp(`^${tc(i.value,t)}`),i.message,t);break;case"endsWith":Je(r,RegExp(`${tc(i.value,t)}$`),i.message,t);break;case"datetime":vt(r,"date-time",i.message,t);break;case"date":vt(r,"date",i.message,t);break;case"time":vt(r,"time",i.message,t);break;case"duration":vt(r,"duration",i.message,t);break;case"length":ve(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t),ve(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"includes":{Je(r,RegExp(tc(i.value,t)),i.message,t);break}case"ip":{i.version!=="v6"&&vt(r,"ipv4",i.message,t),i.version!=="v4"&&vt(r,"ipv6",i.message,t);break}case"base64url":Je(r,gt.base64url,i.message,t);break;case"jwt":Je(r,gt.jwt,i.message,t);break;case"cidr":{i.version!=="v6"&&Je(r,gt.ipv4Cidr,i.message,t),i.version!=="v4"&&Je(r,gt.ipv6Cidr,i.message,t);break}case"emoji":Je(r,gt.emoji(),i.message,t);break;case"ulid":{Je(r,gt.ulid,i.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{vt(r,"binary",i.message,t);break}case"contentEncoding:base64":{ve(r,"contentEncoding","base64",i.message,t);break}case"pattern:zod":{Je(r,gt.base64,i.message,t);break}}break}case"nanoid":Je(r,gt.nanoid,i.message,t)}return r}function tc(e,t){return t.patternStrategy==="escape"?fw(e):e}const mw=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function fw(e){let t="";for(let r=0;r<e.length;r++)mw.has(e[r])||(t+="\\"),t+=e[r];return t}function vt(e,t,r,i){e.format||e.anyOf?.some(n=>n.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&i.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&i.errorMessages&&{errorMessage:{format:r}}})):ve(e,"format",t,r,i)}function Je(e,t,r,i){e.pattern||e.allOf?.some(n=>n.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&i.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Mh(t,i),...r&&i.errorMessages&&{errorMessage:{pattern:r}}})):ve(e,"pattern",Mh(t,i),r,i)}function Mh(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},i=r.i?e.source.toLowerCase():e.source;let n="",o=!1,a=!1,s=!1;for(let c=0;c<i.length;c++){if(o){n+=i[c],o=!1;continue}if(r.i){if(a){if(i[c].match(/[a-z]/)){s?(n+=i[c],n+=`${i[c-2]}-${i[c]}`.toUpperCase(),s=!1):i[c+1]==="-"&&i[c+2]?.match(/[a-z]/)?(n+=i[c],s=!0):n+=`${i[c]}${i[c].toUpperCase()}`;continue}}else if(i[c].match(/[a-z]/)){n+=`[${i[c]}${i[c].toUpperCase()}]`;continue}}if(r.m){if(i[c]==="^"){n+=`(^|(?<=[\r
66
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const s=a[1];if(t===a[0]){o(a);continue}if(e.external){const u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&e.reused==="ref"){o(a);continue}}}function hn(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=s=>{const c=e.seen.get(s);if(c.ref===null)return;const u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){i(d);const p=e.seen.get(d),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,l),s._zod.parent===d)for(const $ in u)$==="$ref"||$==="allOf"||$ in l||delete u[$];if(h.$ref&&p.def)for(const $ in u)$==="$ref"||$==="allOf"||$ in p.def&&JSON.stringify(u[$])===JSON.stringify(p.def[$])&&delete u[$]}const m=s._zod.parent;if(m&&m!==d){i(m);const p=e.seen.get(m);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const h in u)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(u[h])===JSON.stringify(p.def[h])&&delete u[h]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};for(const s of[...e.seen.entries()].reverse())i(s[0]);const n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);const o=e.metadataRegistry.get(t)?.id;o!==void 0&&n.id===o&&delete n.id;const a=e.external?.defs??{};for(const s of e.seen.entries()){const c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{const s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Hn(t,"input",e.processors),output:Hn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function qe(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return qe(i.element,r);if(i.type==="set")return qe(i.valueType,r);if(i.type==="lazy")return qe(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return qe(i.innerType,r);if(i.type==="intersection")return qe(i.left,r)||qe(i.right,r);if(i.type==="record"||i.type==="map")return qe(i.keyType,r)||qe(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:qe(i.in,r)||qe(i.out,r);if(i.type==="object"){for(const n in i.shape)if(qe(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(const n of i.options)if(qe(n,r))return!0;return!1}if(i.type==="tuple"){for(const n of i.items)if(qe(n,r))return!0;return!!(i.rest&&qe(i.rest,r))}return!1}const im=(e,t={})=>r=>{const i=mn({...r,processors:t});return $e(e,i),fn(i,e),hn(i,e)},Hn=(e,t,r={})=>i=>{const{libraryOptions:n,target:o}=i??{},a=mn({...n??{},target:o,io:t,processors:r});return $e(e,a),fn(a,e),hn(a,e)},J$={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},om=(e,t,r,i)=>{const n=r;n.type="string";const{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),s&&(n.format=J$[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),u&&(n.contentEncoding=u),c&&c.size>0){const l=[...c];l.length===1?n.pattern=l[0].source:l.length>1&&(n.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},am=(e,t,r,i)=>{const n=r,{minimum:o,maximum:a,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number";const d=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),m=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:typeof o=="number"&&(n.minimum=o),m?p?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(n.multipleOf=c)},sm=(e,t,r,i)=>{r.type="boolean"},cm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},um=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},lm=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},dm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},pm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},mm=(e,t,r,i)=>{r.not={}},fm=(e,t,r,i)=>{},hm=(e,t,r,i)=>{},gm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},vm=(e,t,r,i)=>{const n=e._zod.def,o=ko(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},ym=(e,t,r,i)=>{const n=e._zod.def,o=[];for(const a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){const a=o[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},_m=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},$m=(e,t,r,i)=>{const n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},bm=(e,t,r,i)=>{const n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),c?c.length===1?(o.contentMediaType=c[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(n,o)},wm=(e,t,r,i)=>{r.type="boolean"},km=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Sm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Im=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Om=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Tm=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Pm=(e,t,r,i)=>{const n=r,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=$e(o.element,t,{...i,path:[...i.path,"items"]})},Em=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="object",n.properties={};const a=o.shape;for(const u in a)n.properties[u]=$e(a[u],t,{...i,path:[...i.path,"properties",u]});const s=new Set(Object.keys(a)),c=new Set([...s].filter(u=>{const l=o.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(n.required=Array.from(c)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=$e(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Ia=(e,t,r,i)=>{const n=e._zod.def,o=n.inclusive===!1,a=n.options.map((s,c)=>$e(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},zm=(e,t,r,i)=>{const n=e._zod.def,o=$e(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=$e(n.right,t,{...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]];r.allOf=c},xm=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((m,p)=>$e(m,t,{...i,path:[...i.path,a,p]})),u=o.rest?$e(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,u&&(n.items=u)):t.target==="openapi-3.0"?(n.items={anyOf:c},u&&n.items.anyOf.push(u),n.minItems=c.length,u||(n.maxItems=c.length)):(n.items=c,u&&(n.additionalItems=u));const{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},Nm=(e,t,r,i)=>{const n=r,o=e._zod.def;n.type="object";const a=o.keyType,c=a._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){const l=$e(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(const d of c)n.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=$e(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=$e(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const u=a._zod.values;if(u){const l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},jm=(e,t,r,i)=>{const n=e._zod.def,o=$e(n.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Cm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Dm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Am=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Rm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Um=(e,t,r,i)=>{const n=e._zod.def,o=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?n.out:n.in:n.out;$e(a,t,i);const s=t.seen.get(e);s.ref=a},Zm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},Fm=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Oa=(e,t,r,i)=>{const n=e._zod.def;$e(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Mm=(e,t,r,i)=>{const n=e._zod.innerType;$e(n,t,i);const o=t.seen.get(e);o.ref=n},Ta={string:om,number:am,boolean:sm,bigint:cm,symbol:um,null:lm,undefined:dm,void:pm,never:mm,any:fm,unknown:hm,date:gm,enum:vm,literal:ym,nan:_m,template_literal:$m,file:bm,success:wm,custom:km,function:Sm,transform:Im,map:Om,set:Tm,array:Pm,object:Em,union:Ia,intersection:zm,tuple:xm,record:Nm,nullable:jm,nonoptional:Cm,default:Dm,prefault:Am,catch:Rm,pipe:Um,readonly:Zm,promise:Fm,optional:Oa,lazy:Mm};function Pa(e,t){if("_idmap"in e){const i=e,n=mn({...t,processors:Ta}),o={};for(const c of i._idmap.entries()){const[u,l]=c;$e(l,n)}const a={},s={registry:i,uri:t?.uri,defs:o};n.external=s;for(const c of i._idmap.entries()){const[u,l]=c;fn(n,l),a[u]=hn(n,l)}if(Object.keys(o).length>0){const c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}const r=mn({...t,processors:Ta});return $e(e,r),fn(r,e),hn(r,e)}class K${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(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=mn({processors:Ta,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return $e(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),fn(this.ctx,t);const i=hn(this.ctx,t),{"~standard":n,...o}=i;return o}}var H$=Object.freeze({__proto__:null}),W$=Object.freeze({__proto__:null,$ZodAny:pd,$ZodArray:yd,$ZodAsyncError:Lt,$ZodBase64:ed,$ZodBase64URL:nd,$ZodBigInt:qo,$ZodBigIntFormat:cd,$ZodBoolean:Bo,$ZodCIDRv4:Ql,$ZodCIDRv6:Yl,$ZodCUID:Fl,$ZodCUID2:Ml,$ZodCatch:Hd,$ZodCheck:Te,$ZodCheckBigIntFormat:hl,$ZodCheckEndsWith:Tl,$ZodCheckGreaterThan:Go,$ZodCheckIncludes:Il,$ZodCheckLengthEquals:bl,$ZodCheckLessThan:Mo,$ZodCheckLowerCase:kl,$ZodCheckMaxLength:_l,$ZodCheckMaxSize:gl,$ZodCheckMimeType:zl,$ZodCheckMinLength:$l,$ZodCheckMinSize:vl,$ZodCheckMultipleOf:ml,$ZodCheckNumberFormat:fl,$ZodCheckOverwrite:xl,$ZodCheckProperty:El,$ZodCheckRegex:wl,$ZodCheckSizeEquals:yl,$ZodCheckStartsWith:Ol,$ZodCheckStringFormat:Gn,$ZodCheckUpperCase:Sl,$ZodCodec:Qo,$ZodCustom:ip,$ZodCustomStringFormat:ad,$ZodDate:gd,$ZodDefault:Ld,$ZodDiscriminatedUnion:Id,$ZodE164:rd,$ZodEmail:Al,$ZodEmoji:Ul,$ZodEncodeError:Nr,$ZodEnum:Ad,$ZodError:Oo,$ZodExactOptional:Md,$ZodFile:Ud,$ZodFunction:tp,$ZodGUID:Cl,$ZodIPv4:Hl,$ZodIPv6:Wl,$ZodISODate:ql,$ZodISODateTime:Bl,$ZodISODuration:Kl,$ZodISOTime:Jl,$ZodIntersection:Od,$ZodJWT:od,$ZodKSUID:Vl,$ZodLazy:rp,$ZodLiteral:Rd,$ZodMAC:Xl,$ZodMap:Nd,$ZodNaN:Wd,$ZodNanoID:Zl,$ZodNever:fd,$ZodNonOptional:qd,$ZodNull:dd,$ZodNullable:Gd,$ZodNumber:Vo,$ZodNumberFormat:sd,$ZodObject:Jo,$ZodObjectJIT:bd,$ZodOptional:Wo,$ZodPipe:Xo,$ZodPrefault:Bd,$ZodPreprocess:Xd,$ZodPromise:np,$ZodReadonly:Qd,$ZodRealError:nt,$ZodRecord:xd,$ZodRegistry:vp,$ZodSet:Cd,$ZodString:Ln,$ZodStringFormat:be,$ZodSuccess:Kd,$ZodSymbol:ud,$ZodTemplateLiteral:ep,$ZodTransform:Zd,$ZodTuple:Ho,$ZodType:Y,$ZodULID:Gl,$ZodURL:Rl,$ZodUUID:Dl,$ZodUndefined:ld,$ZodUnion:Vr,$ZodUnknown:md,$ZodVoid:hd,$ZodXID:Ll,$ZodXor:Sd,$brand:cu,$constructor:k,$input:gp,$output:hp,Doc:Nl,JSONSchema:H$,JSONSchemaGenerator:K$,NEVER:su,TimePrecision:bp,_any:Gp,_array:Hp,_base64:ga,_base64url:va,_bigint:Dp,_boolean:jp,_catch:M$,_check:em,_cidrv4:fa,_cidrv6:ha,_coercedBigint:Ap,_coercedBoolean:Cp,_coercedDate:Jp,_coercedNumber:Tp,_coercedString:_p,_cuid:sa,_cuid2:ca,_custom:Xp,_date:qp,_decode:zo,_decodeAsync:No,_default:U$,_discriminatedUnion:O$,_e164:ya,_email:ea,_emoji:oa,_encode:Eo,_encodeAsync:xo,_endsWith:ti,_enum:N$,_file:Wp,_float32:Ep,_float64:zp,_gt:Dt,_gte:We,_guid:Kr,_includes:Yr,_int:Pp,_int32:xp,_int64:Rp,_intersection:T$,_ipv4:pa,_ipv6:ma,_isoDate:kp,_isoDateTime:wp,_isoDuration:Ip,_isoTime:Sp,_jwt:_a,_ksuid:da,_lazy:B$,_length:Jn,_literal:C$,_lowercase:Xr,_lt:Ct,_lte:lt,_mac:$p,_map:z$,_max:lt,_maxLength:qn,_maxSize:pn,_mime:ni,_min:We,_minLength:Jt,_minSize:At,_multipleOf:dn,_nan:Kp,_nanoid:aa,_nativeEnum:j$,_negative:ba,_never:Vp,_nonnegative:ka,_nonoptional:Z$,_nonpositive:wa,_normalize:ri,_null:Mp,_nullable:R$,_number:Op,_optional:A$,_overwrite:Pt,_parse:An,_parseAsync:Rn,_pipe:G$,_positive:$a,_promise:q$,_property:Sa,_readonly:L$,_record:E$,_refine:Qp,_regex:Wr,_safeDecode:Co,_safeDecodeAsync:Ao,_safeEncode:jo,_safeEncodeAsync:Do,_safeParse:Un,_safeParseAsync:Zn,_set:x$,_size:Bn,_slugify:si,_startsWith:ei,_string:yp,_stringFormat:Kn,_stringbool:rm,_success:F$,_superRefine:Yp,_symbol:Zp,_templateLiteral:V$,_toLowerCase:oi,_toUpperCase:ai,_transform:D$,_trim:ii,_tuple:P$,_uint32:Np,_uint64:Up,_ulid:ua,_undefined:Fp,_union:S$,_unknown:Lp,_uppercase:Qr,_url:Hr,_uuid:ta,_uuidv4:na,_uuidv6:ra,_uuidv7:ia,_void:Bp,_xid:la,_xor:I$,clone:et,config:Re,createStandardJSONSchemaMethod:Hn,createToJSONSchemaMethod:im,decode:ny,decodeAsync:iy,describe:tm,encode:ty,encodeAsync:ry,extractDefs:fn,finalize:hn,flattenError:To,formatError:Po,globalConfig:jn,globalRegistry:ut,initializeContext:mn,isValidBase64:Lo,isValidBase64URL:td,isValidJWT:id,locales:mp,meta:nm,parse:Zr,parseAsync:Fr,prettifyError:xu,process:$e,regexes:Fo,registry:Yo,safeDecode:ay,safeDecodeAsync:cy,safeEncode:oy,safeEncodeAsync:sy,safeParse:Mr,safeParseAsync:Gr,toDotPath:zu,toJSONSchema:Pa,treeifyError:Eu,util:Tu,version:jl}),X$=Object.freeze({__proto__:null,endsWith:ti,gt:Dt,gte:We,includes:Yr,length:Jn,lowercase:Xr,lt:Ct,lte:lt,maxLength:qn,maxSize:pn,mime:ni,minLength:Jt,minSize:At,multipleOf:dn,negative:ba,nonnegative:ka,nonpositive:wa,normalize:ri,overwrite:Pt,positive:$a,property:Sa,regex:Wr,size:Bn,slugify:si,startsWith:ei,toLowerCase:oi,toUpperCase:ai,trim:ii,uppercase:Qr});const Ea=k("ZodISODateTime",(e,t)=>{Bl.init(e,t),we.init(e,t)});function za(e){return wp(Ea,e)}const xa=k("ZodISODate",(e,t)=>{ql.init(e,t),we.init(e,t)});function Gm(e){return kp(xa,e)}const Na=k("ZodISOTime",(e,t)=>{Jl.init(e,t),we.init(e,t)});function Lm(e){return Sp(Na,e)}const ja=k("ZodISODuration",(e,t)=>{Kl.init(e,t),we.init(e,t)});function Vm(e){return Ip(ja,e)}var Bm=Object.freeze({__proto__:null,ZodISODate:xa,ZodISODateTime:Ea,ZodISODuration:ja,ZodISOTime:Na,date:Gm,datetime:za,duration:Vm,time:Lm});const qm=(e,t)=>{Oo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Po(e,r)},flatten:{value:r=>To(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,jr,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,jr,2)}},isEmpty:{get(){return e.issues.length===0}}})},Q$=k("ZodError",qm),rt=k("ZodError",qm,{Parent:Error}),Jm=An(rt),Km=Rn(rt),Hm=Un(rt),Wm=Zn(rt),Xm=Eo(rt),Qm=zo(rt),Ym=xo(rt),ef=No(rt),tf=jo(rt),nf=Co(rt),rf=Do(rt),of=Ao(rt),af=new WeakMap;function Wn(e,t,r){const i=Object.getPrototypeOf(e);let n=af.get(i);if(n||(n=new Set,af.set(i,n)),!n.has(t)){n.add(t);for(const o in r){const a=r[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){const s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}const re=k("ZodType",(e,t)=>(Y.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Hn(e,"input"),output:Hn(e,"output")}}),e.toJSONSchema=im(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>Jm(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Hm(e,r,i),e.parseAsync=async(r,i)=>Km(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Wm(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Xm(e,r,i),e.decode=(r,i)=>Qm(e,r,i),e.encodeAsync=async(r,i)=>Ym(e,r,i),e.decodeAsync=async(r,i)=>ef(e,r,i),e.safeEncode=(r,i)=>tf(e,r,i),e.safeDecode=(r,i)=>nf(e,r,i),e.safeEncodeAsync=async(r,i)=>rf(e,r,i),e.safeDecodeAsync=async(r,i)=>of(e,r,i),Wn(e,"ZodType",{check(...r){const i=this.def;return this.clone(kt(i,{checks:[...i.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return et(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check($s(r,i))},superRefine(r,i){return this.check(bs(r,i))},overwrite(r){return this.check(Pt(r))},optional(){return Oe(this)},exactOptional(){return es(this)},nullable(){return sr(this)},nullish(){return Oe(sr(this))},nonoptional(r){return as(this,r)},array(){return ie(this)},or(r){return ke([this,r])},and(r){return or(this,r)},transform(r){return ji(this,xi(r))},default(r){return rs(this,r)},prefault(r){return os(this,r)},catch(r){return us(this,r)},pipe(r){return ji(this,r)},readonly(){return ms(this)},describe(r){const i=this.clone();return ut.add(i,{description:r}),i},meta(...r){if(r.length===0)return ut.get(this);const i=this.clone();return ut.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return ut.get(e)?.description},configurable:!0}),e)),ci=k("_ZodString",(e,t)=>{Ln.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>om(e,i,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Wn(e,"_ZodString",{regex(...i){return this.check(Wr(...i))},includes(...i){return this.check(Yr(...i))},startsWith(...i){return this.check(ei(...i))},endsWith(...i){return this.check(ti(...i))},min(...i){return this.check(Jt(...i))},max(...i){return this.check(qn(...i))},length(...i){return this.check(Jn(...i))},nonempty(...i){return this.check(Jt(1,...i))},lowercase(i){return this.check(Xr(i))},uppercase(i){return this.check(Qr(i))},trim(){return this.check(ii())},normalize(...i){return this.check(ri(...i))},toLowerCase(){return this.check(oi())},toUpperCase(){return this.check(ai())},slugify(){return this.check(si())}})}),Xn=k("ZodString",(e,t)=>{Ln.init(e,t),ci.init(e,t),e.email=r=>e.check(ea(ui,r)),e.url=r=>e.check(Hr(Yn,r)),e.jwt=r=>e.check(_a(Si,r)),e.emoji=r=>e.check(oa(li,r)),e.guid=r=>e.check(Kr(Qn,r)),e.uuid=r=>e.check(ta(St,r)),e.uuidv4=r=>e.check(na(St,r)),e.uuidv6=r=>e.check(ra(St,r)),e.uuidv7=r=>e.check(ia(St,r)),e.nanoid=r=>e.check(aa(di,r)),e.guid=r=>e.check(Kr(Qn,r)),e.cuid=r=>e.check(sa(pi,r)),e.cuid2=r=>e.check(ca(mi,r)),e.ulid=r=>e.check(ua(fi,r)),e.base64=r=>e.check(ga(bi,r)),e.base64url=r=>e.check(va(wi,r)),e.xid=r=>e.check(la(hi,r)),e.ksuid=r=>e.check(da(gi,r)),e.ipv4=r=>e.check(pa(vi,r)),e.ipv6=r=>e.check(ma(yi,r)),e.cidrv4=r=>e.check(fa(_i,r)),e.cidrv6=r=>e.check(ha($i,r)),e.e164=r=>e.check(ya(ki,r)),e.datetime=r=>e.check(za(r)),e.date=r=>e.check(Gm(r)),e.time=r=>e.check(Lm(r)),e.duration=r=>e.check(Vm(r))});function _(e){return yp(Xn,e)}const we=k("ZodStringFormat",(e,t)=>{be.init(e,t),ci.init(e,t)}),ui=k("ZodEmail",(e,t)=>{Al.init(e,t),we.init(e,t)});function sf(e){return ea(ui,e)}const Qn=k("ZodGUID",(e,t)=>{Cl.init(e,t),we.init(e,t)});function cf(e){return Kr(Qn,e)}const St=k("ZodUUID",(e,t)=>{Dl.init(e,t),we.init(e,t)});function uf(e){return ta(St,e)}function lf(e){return na(St,e)}function df(e){return ra(St,e)}function pf(e){return ia(St,e)}const Yn=k("ZodURL",(e,t)=>{Rl.init(e,t),we.init(e,t)});function mf(e){return Hr(Yn,e)}function ff(e){return Hr(Yn,{protocol:Uo,hostname:Wu,...z(e)})}const li=k("ZodEmoji",(e,t)=>{Ul.init(e,t),we.init(e,t)});function hf(e){return oa(li,e)}const di=k("ZodNanoID",(e,t)=>{Zl.init(e,t),we.init(e,t)});function gf(e){return aa(di,e)}const pi=k("ZodCUID",(e,t)=>{Fl.init(e,t),we.init(e,t)});function vf(e){return sa(pi,e)}const mi=k("ZodCUID2",(e,t)=>{Ml.init(e,t),we.init(e,t)});function yf(e){return ca(mi,e)}const fi=k("ZodULID",(e,t)=>{Gl.init(e,t),we.init(e,t)});function _f(e){return ua(fi,e)}const hi=k("ZodXID",(e,t)=>{Ll.init(e,t),we.init(e,t)});function $f(e){return la(hi,e)}const gi=k("ZodKSUID",(e,t)=>{Vl.init(e,t),we.init(e,t)});function bf(e){return da(gi,e)}const vi=k("ZodIPv4",(e,t)=>{Hl.init(e,t),we.init(e,t)});function wf(e){return pa(vi,e)}const Ca=k("ZodMAC",(e,t)=>{Xl.init(e,t),we.init(e,t)});function kf(e){return $p(Ca,e)}const yi=k("ZodIPv6",(e,t)=>{Wl.init(e,t),we.init(e,t)});function Sf(e){return ma(yi,e)}const _i=k("ZodCIDRv4",(e,t)=>{Ql.init(e,t),we.init(e,t)});function If(e){return fa(_i,e)}const $i=k("ZodCIDRv6",(e,t)=>{Yl.init(e,t),we.init(e,t)});function Of(e){return ha($i,e)}const bi=k("ZodBase64",(e,t)=>{ed.init(e,t),we.init(e,t)});function Tf(e){return ga(bi,e)}const wi=k("ZodBase64URL",(e,t)=>{nd.init(e,t),we.init(e,t)});function Pf(e){return va(wi,e)}const ki=k("ZodE164",(e,t)=>{rd.init(e,t),we.init(e,t)});function Ef(e){return ya(ki,e)}const Si=k("ZodJWT",(e,t)=>{od.init(e,t),we.init(e,t)});function zf(e){return _a(Si,e)}const gn=k("ZodCustomStringFormat",(e,t)=>{ad.init(e,t),we.init(e,t)});function xf(e,t,r={}){return Kn(gn,e,t,r)}function Nf(e){return Kn(gn,"hostname",Hu,e)}function jf(e){return Kn(gn,"hex",dl,e)}function Cf(e,t){const r=t?.enc??"hex",i=`${e}_${r}`,n=Fo[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return Kn(gn,i,n,t)}const er=k("ZodNumber",(e,t)=>{Vo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>am(e,i,n),Wn(e,"ZodNumber",{gt(i,n){return this.check(Dt(i,n))},gte(i,n){return this.check(We(i,n))},min(i,n){return this.check(We(i,n))},lt(i,n){return this.check(Ct(i,n))},lte(i,n){return this.check(lt(i,n))},max(i,n){return this.check(lt(i,n))},int(i){return this.check(Ii(i))},safe(i){return this.check(Ii(i))},positive(i){return this.check(Dt(0,i))},nonnegative(i){return this.check(We(0,i))},negative(i){return this.check(Ct(0,i))},nonpositive(i){return this.check(lt(0,i))},multipleOf(i,n){return this.check(dn(i,n))},step(i,n){return this.check(dn(i,n))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ee(e){return Op(er,e)}const Kt=k("ZodNumberFormat",(e,t)=>{sd.init(e,t),er.init(e,t)});function Ii(e){return Pp(Kt,e)}function Df(e){return Ep(Kt,e)}function Af(e){return zp(Kt,e)}function Rf(e){return xp(Kt,e)}function Uf(e){return Np(Kt,e)}const tr=k("ZodBoolean",(e,t)=>{Bo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sm(e,r,i)});function ze(e){return jp(tr,e)}const nr=k("ZodBigInt",(e,t)=>{qo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>cm(e,i),e.gte=(i,n)=>e.check(We(i,n)),e.min=(i,n)=>e.check(We(i,n)),e.gt=(i,n)=>e.check(Dt(i,n)),e.gte=(i,n)=>e.check(We(i,n)),e.min=(i,n)=>e.check(We(i,n)),e.lt=(i,n)=>e.check(Ct(i,n)),e.lte=(i,n)=>e.check(lt(i,n)),e.max=(i,n)=>e.check(lt(i,n)),e.positive=i=>e.check(Dt(BigInt(0),i)),e.negative=i=>e.check(Ct(BigInt(0),i)),e.nonpositive=i=>e.check(lt(BigInt(0),i)),e.nonnegative=i=>e.check(We(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(dn(i,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Zf(e){return Dp(nr,e)}const Oi=k("ZodBigIntFormat",(e,t)=>{cd.init(e,t),nr.init(e,t)});function Ff(e){return Rp(Oi,e)}function Mf(e){return Up(Oi,e)}const Da=k("ZodSymbol",(e,t)=>{ud.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>um(e,r)});function Gf(e){return Zp(Da,e)}const Aa=k("ZodUndefined",(e,t)=>{ld.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dm(e,r)});function Lf(e){return Fp(Aa,e)}const Ra=k("ZodNull",(e,t)=>{dd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lm(e,r,i)});function Ti(e){return Mp(Ra,e)}const Ua=k("ZodAny",(e,t)=>{pd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fm()});function Vf(){return Gp(Ua)}const Za=k("ZodUnknown",(e,t)=>{md.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>hm()});function fe(){return Lp(Za)}const Fa=k("ZodNever",(e,t)=>{fd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>mm(e,r,i)});function Pi(e){return Vp(Fa,e)}const Ma=k("ZodVoid",(e,t)=>{hd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>pm(e,r)});function Bf(e){return Bp(Ma,e)}const Ei=k("ZodDate",(e,t)=>{gd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>gm(e,i),e.min=(i,n)=>e.check(We(i,n)),e.max=(i,n)=>e.check(lt(i,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function qf(e){return qp(Ei,e)}const Ga=k("ZodArray",(e,t)=>{yd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pm(e,r,i,n),e.element=t.element,Wn(e,"ZodArray",{min(r,i){return this.check(Jt(r,i))},nonempty(r){return this.check(Jt(1,r))},max(r,i){return this.check(qn(r,i))},length(r,i){return this.check(Jn(r,i))},unwrap(){return this.element}})});function ie(e,t){return Hp(Ga,e,t)}function Jf(e){const t=e._zod.def.shape;return Le(Object.keys(t))}const rr=k("ZodObject",(e,t)=>{bd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Em(e,r,i,n),se(e,"shape",()=>t.shape),Wn(e,"ZodObject",{keyof(){return Le(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:fe()})},loose(){return this.clone({...this._zod.def,catchall:fe()})},strict(){return this.clone({...this._zod.def,catchall:Pi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return _u(this,r)},safeExtend(r){return $u(this,r)},merge(r){return bu(this,r)},pick(r){return vu(this,r)},omit(r){return yu(this,r)},partial(...r){return wu(ar,this,r[0])},required(...r){return ku(Ni,this,r[0])}})});function U(e,t){const r={type:"object",shape:e??{},...z(t)};return new rr(r)}function Kf(e,t){return new rr({type:"object",shape:e,catchall:Pi(),...z(t)})}function Ge(e,t){return new rr({type:"object",shape:e,catchall:fe(),...z(t)})}const ir=k("ZodUnion",(e,t)=>{Vr.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ia(e,r,i,n),e.options=t.options});function ke(e,t){return new ir({type:"union",options:e,...z(t)})}const La=k("ZodXor",(e,t)=>{ir.init(e,t),Sd.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ia(e,r,i,n),e.options=t.options});function Hf(e,t){return new La({type:"union",options:e,inclusive:!1,...z(t)})}const Va=k("ZodDiscriminatedUnion",(e,t)=>{ir.init(e,t),Id.init(e,t)});function zi(e,t,r){return new Va({type:"union",options:t,discriminator:e,...z(r)})}const Ba=k("ZodIntersection",(e,t)=>{Od.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zm(e,r,i,n)});function or(e,t){return new Ba({type:"intersection",left:e,right:t})}const qa=k("ZodTuple",(e,t)=>{Ho.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xm(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Ja(e,t,r){const i=t instanceof Y,n=i?r:t,o=i?t:null;return new qa({type:"tuple",items:e,rest:o,...z(n)})}const vn=k("ZodRecord",(e,t)=>{xd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nm(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function he(e,t,r){return!t||!t._zod?new vn({type:"record",keyType:_(),valueType:e,...z(t)}):new vn({type:"record",keyType:e,valueType:t,...z(r)})}function Wf(e,t,r){const i=et(e);return i._zod.values=void 0,new vn({type:"record",keyType:i,valueType:t,...z(r)})}function Xf(e,t,r){return new vn({type:"record",keyType:e,valueType:t,mode:"loose",...z(r)})}const Ka=k("ZodMap",(e,t)=>{Nd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Om(e,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(At(...r)),e.nonempty=r=>e.check(At(1,r)),e.max=(...r)=>e.check(pn(...r)),e.size=(...r)=>e.check(Bn(...r))});function Qf(e,t,r){return new Ka({type:"map",keyType:e,valueType:t,...z(r)})}const Ha=k("ZodSet",(e,t)=>{Cd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Tm(e,r),e.min=(...r)=>e.check(At(...r)),e.nonempty=r=>e.check(At(1,r)),e.max=(...r)=>e.check(pn(...r)),e.size=(...r)=>e.check(Bn(...r))});function Yf(e,t){return new Ha({type:"set",valueType:e,...z(t)})}const yn=k("ZodEnum",(e,t)=>{Ad.init(e,t),re.init(e,t),e._zod.processJSONSchema=(i,n,o)=>vm(e,i,n),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{const o={};for(const a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new yn({...t,checks:[],...z(n),entries:o})},e.exclude=(i,n)=>{const o={...t.entries};for(const a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new yn({...t,checks:[],...z(n),entries:o})}});function Le(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new yn({type:"enum",entries:r,...z(t)})}function eh(e,t){return new yn({type:"enum",entries:e,...z(t)})}const Wa=k("ZodLiteral",(e,t)=>{Rd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ym(e,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function G(e,t){return new Wa({type:"literal",values:Array.isArray(e)?e:[e],...z(t)})}const Xa=k("ZodFile",(e,t)=>{Ud.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bm(e,r,i),e.min=(r,i)=>e.check(At(r,i)),e.max=(r,i)=>e.check(pn(r,i)),e.mime=(r,i)=>e.check(ni(Array.isArray(r)?r:[r],i))});function th(e){return Wp(Xa,e)}const Qa=k("ZodTransform",(e,t)=>{Zd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Im(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Nr(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(cn(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(cn(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});function xi(e){return new Qa({type:"transform",transform:e})}const ar=k("ZodOptional",(e,t)=>{Wo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Oa(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Oe(e){return new ar({type:"optional",innerType:e})}const Ya=k("ZodExactOptional",(e,t)=>{Md.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Oa(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function es(e){return new Ya({type:"optional",innerType:e})}const ts=k("ZodNullable",(e,t)=>{Gd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function sr(e){return new ts({type:"nullable",innerType:e})}function nh(e){return Oe(sr(e))}const ns=k("ZodDefault",(e,t)=>{Ld.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function rs(e,t){return new ns({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Dr(t)}})}const is=k("ZodPrefault",(e,t)=>{Bd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Am(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function os(e,t){return new is({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Dr(t)}})}const Ni=k("ZodNonOptional",(e,t)=>{qd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function as(e,t){return new Ni({type:"nonoptional",innerType:e,...z(t)})}const ss=k("ZodSuccess",(e,t)=>{Kd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wm(e,r,i),e.unwrap=()=>e._zod.def.innerType});function rh(e){return new ss({type:"success",innerType:e})}const cs=k("ZodCatch",(e,t)=>{Hd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function us(e,t){return new cs({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ls=k("ZodNaN",(e,t)=>{Wd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_m(e,r)});function ih(e){return Kp(ls,e)}const cr=k("ZodPipe",(e,t)=>{Xo.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Um(e,r,i,n),e.in=t.in,e.out=t.out});function ji(e,t){return new cr({type:"pipe",in:e,out:t})}const ur=k("ZodCodec",(e,t)=>{cr.init(e,t),Qo.init(e,t)});function oh(e,t,r){return new ur({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function ah(e){const t=e._zod.def;return new ur({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}const ds=k("ZodPreprocess",(e,t)=>{cr.init(e,t),Xd.init(e,t)}),ps=k("ZodReadonly",(e,t)=>{Qd.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ms(e){return new ps({type:"readonly",innerType:e})}const fs=k("ZodTemplateLiteral",(e,t)=>{ep.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$m(e,r,i)});function sh(e,t){return new fs({type:"template_literal",parts:e,...z(t)})}const hs=k("ZodLazy",(e,t)=>{rp.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Mm(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function gs(e){return new hs({type:"lazy",getter:e})}const vs=k("ZodPromise",(e,t)=>{np.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ch(e){return new vs({type:"promise",innerType:e})}const ys=k("ZodFunction",(e,t)=>{tp.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sm(e,r)});function Ci(e){return new ys({type:"function",input:Array.isArray(e?.input)?Ja(e?.input):e?.input??ie(fe()),output:e?.output??fe()})}const lr=k("ZodCustom",(e,t)=>{ip.init(e,t),re.init(e,t),e._zod.processJSONSchema=(r,i,n)=>km(e,r)});function uh(e){const t=new Te({check:"custom"});return t._zod.check=e,t}function _s(e,t){return Xp(lr,e??(()=>!0),t)}function $s(e,t={}){return Qp(lr,e,t)}function bs(e,t){return Yp(e,t)}const lh=tm,dh=nm;function ph(e,t={}){const r=new lr({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...z(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}const mh=(...e)=>rm({Codec:ur,Boolean:tr,String:Xn},...e);function fh(e){const t=gs(()=>ke([_(e),ee(),ze(),Ti(),ie(t),he(_(),t)]));return t}function Di(e,t){return new ds({type:"pipe",in:xi(e),out:t})}var Y$=Object.freeze({__proto__:null,ZodAny:Ua,ZodArray:Ga,ZodBase64:bi,ZodBase64URL:wi,ZodBigInt:nr,ZodBigIntFormat:Oi,ZodBoolean:tr,ZodCIDRv4:_i,ZodCIDRv6:$i,ZodCUID:pi,ZodCUID2:mi,ZodCatch:cs,ZodCodec:ur,ZodCustom:lr,ZodCustomStringFormat:gn,ZodDate:Ei,ZodDefault:ns,ZodDiscriminatedUnion:Va,ZodE164:ki,ZodEmail:ui,ZodEmoji:li,ZodEnum:yn,ZodExactOptional:Ya,ZodFile:Xa,ZodFunction:ys,ZodGUID:Qn,ZodIPv4:vi,ZodIPv6:yi,ZodIntersection:Ba,ZodJWT:Si,ZodKSUID:gi,ZodLazy:hs,ZodLiteral:Wa,ZodMAC:Ca,ZodMap:Ka,ZodNaN:ls,ZodNanoID:di,ZodNever:Fa,ZodNonOptional:Ni,ZodNull:Ra,ZodNullable:ts,ZodNumber:er,ZodNumberFormat:Kt,ZodObject:rr,ZodOptional:ar,ZodPipe:cr,ZodPrefault:is,ZodPreprocess:ds,ZodPromise:vs,ZodReadonly:ps,ZodRecord:vn,ZodSet:Ha,ZodString:Xn,ZodStringFormat:we,ZodSuccess:ss,ZodSymbol:Da,ZodTemplateLiteral:fs,ZodTransform:Qa,ZodTuple:qa,ZodType:re,ZodULID:fi,ZodURL:Yn,ZodUUID:St,ZodUndefined:Aa,ZodUnion:ir,ZodUnknown:Za,ZodVoid:Ma,ZodXID:hi,ZodXor:La,_ZodString:ci,_default:rs,_function:Ci,any:Vf,array:ie,base64:Tf,base64url:Pf,bigint:Zf,boolean:ze,catch:us,check:uh,cidrv4:If,cidrv6:Of,codec:oh,cuid:vf,cuid2:yf,custom:_s,date:qf,describe:lh,discriminatedUnion:zi,e164:Ef,email:sf,emoji:hf,enum:Le,exactOptional:es,file:th,float32:Df,float64:Af,function:Ci,guid:cf,hash:Cf,hex:jf,hostname:Nf,httpUrl:ff,instanceof:ph,int:Ii,int32:Rf,int64:Ff,intersection:or,invertCodec:ah,ipv4:wf,ipv6:Sf,json:fh,jwt:zf,keyof:Jf,ksuid:bf,lazy:gs,literal:G,looseObject:Ge,looseRecord:Xf,mac:kf,map:Qf,meta:dh,nan:ih,nanoid:gf,nativeEnum:eh,never:Pi,nonoptional:as,null:Ti,nullable:sr,nullish:nh,number:ee,object:U,optional:Oe,partialRecord:Wf,pipe:ji,prefault:os,preprocess:Di,promise:ch,readonly:ms,record:he,refine:$s,set:Yf,strictObject:Kf,string:_,stringFormat:xf,stringbool:mh,success:rh,superRefine:bs,symbol:Gf,templateLiteral:sh,transform:xi,tuple:Ja,uint32:Uf,uint64:Mf,ulid:_f,undefined:Lf,union:ke,unknown:fe,url:mf,uuid:uf,uuidv4:lf,uuidv6:df,uuidv7:pf,void:Bf,xid:$f,xor:Hf});const eb={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 tb(e){Re({customError:e})}function nb(){return Re().customError}var te;te||(te={});const R={...Y$,...X$,iso:Bm},rb=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 ib(e,t){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function ob(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;const i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){const n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function hh(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return R.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return R.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const o=ob(n,t),a=Ve(o,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){const n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return R.null();if(n.length===0)return R.never();if(n.length===1)return R.literal(n[0]);if(n.every(a=>typeof a=="string"))return R.enum(n);const o=n.map(a=>R.literal(a));return o.length<2?o[0]:R.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return R.literal(e.const);const r=e.type;if(Array.isArray(r)){const n=r.map(o=>{const a={...e,type:o};return hh(a,t)});return n.length===0?R.never():n.length===1?n[0]:R.union(n)}if(!r)return R.any();let i;switch(r){case"string":{let n=R.string();if(e.format){const o=e.format;o==="email"?n=n.check(R.email()):o==="uri"||o==="uri-reference"?n=n.check(R.url()):o==="uuid"||o==="guid"?n=n.check(R.uuid()):o==="date-time"?n=n.check(R.iso.datetime()):o==="date"?n=n.check(R.iso.date()):o==="time"?n=n.check(R.iso.time()):o==="duration"?n=n.check(R.iso.duration()):o==="ipv4"?n=n.check(R.ipv4()):o==="ipv6"?n=n.check(R.ipv6()):o==="mac"?n=n.check(R.mac()):o==="cidr"?n=n.check(R.cidrv4()):o==="cidr-v6"?n=n.check(R.cidrv6()):o==="base64"?n=n.check(R.base64()):o==="base64url"?n=n.check(R.base64url()):o==="e164"?n=n.check(R.e164()):o==="jwt"?n=n.check(R.jwt()):o==="emoji"?n=n.check(R.emoji()):o==="nanoid"?n=n.check(R.nanoid()):o==="cuid"?n=n.check(R.cuid()):o==="cuid2"?n=n.check(R.cuid2()):o==="ulid"?n=n.check(R.ulid()):o==="xid"?n=n.check(R.xid()):o==="ksuid"&&(n=n.check(R.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?R.number().int():R.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=R.boolean();break}case"null":{i=R.null();break}case"object":{const n={},o=e.properties||{},a=new Set(e.required||[]);for(const[c,u]of Object.entries(o)){const l=Ve(u,t);n[c]=a.has(c)?l:l.optional()}if(e.propertyNames){const c=Ve(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Ve(e.additionalProperties,t):R.any();if(Object.keys(n).length===0){i=R.record(c,u);break}const l=R.object(n).passthrough(),d=R.looseRecord(c,u);i=R.intersection(l,d);break}if(e.patternProperties){const c=e.patternProperties,u=Object.keys(c),l=[];for(const m of u){const p=Ve(c[m],t),h=R.string().regex(new RegExp(m));l.push(R.looseRecord(h,p))}const d=[];if(Object.keys(n).length>0&&d.push(R.object(n).passthrough()),d.push(...l),d.length===0)i=R.object({}).passthrough();else if(d.length===1)i=d[0];else{let m=R.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)m=R.intersection(m,d[p]);i=m}break}const s=R.object(n);e.additionalProperties===!1?i=s.strict():typeof e.additionalProperties=="object"?i=s.catchall(Ve(e.additionalProperties,t)):i=s.passthrough();break}case"array":{const n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){const a=n.map(c=>Ve(c,t)),s=o&&typeof o=="object"&&!Array.isArray(o)?Ve(o,t):void 0;s?i=R.tuple(a).rest(s):i=R.tuple(a),typeof e.minItems=="number"&&(i=i.check(R.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(R.maxLength(e.maxItems)))}else if(Array.isArray(o)){const a=o.map(c=>Ve(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?Ve(e.additionalItems,t):void 0;s?i=R.tuple(a).rest(s):i=R.tuple(a),typeof e.minItems=="number"&&(i=i.check(R.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(R.maxLength(e.maxItems)))}else if(o!==void 0){const a=Ve(o,t);let s=R.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=R.array(R.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}function Ve(e,t){if(typeof e=="boolean")return e?R.any():R.never();let r=hh(e,t);const i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const s=e.anyOf.map(u=>Ve(u,t)),c=R.union(s);r=i?R.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){const s=e.oneOf.map(u=>Ve(u,t)),c=R.xor(s);r=i?R.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:R.any();else{let s=i?r:Ve(e.allOf[0],t);const c=i?0:1;for(let u=c;u<e.allOf.length;u++)s=R.intersection(s,Ve(e.allOf[u],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=R.nullable(r)),e.readOnly===!0&&(r=R.readonly(r)),e.default!==void 0&&(r=r.default(e.default));const n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const s of o)s in e&&(n[s]=e[s]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const s of a)s in e&&(n[s]=e[s]);for(const s of Object.keys(e))rb.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function ab(e,t){if(typeof e=="boolean")return e?R.any():R.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}const i=ib(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??ut};return Ve(r,o)}function sb(e){return _p(Xn,e)}function cb(e){return Tp(er,e)}function ub(e){return Cp(tr,e)}function lb(e){return Ap(nr,e)}function db(e){return Jp(Ei,e)}var pb=Object.freeze({__proto__:null,bigint:lb,boolean:ub,date:db,number:cb,string:sb});Re(sp());var ws=Object.freeze({__proto__:null,$brand:cu,$input:gp,$output:hp,NEVER:su,TimePrecision:bp,ZodAny:Ua,ZodArray:Ga,ZodBase64:bi,ZodBase64URL:wi,ZodBigInt:nr,ZodBigIntFormat:Oi,ZodBoolean:tr,ZodCIDRv4:_i,ZodCIDRv6:$i,ZodCUID:pi,ZodCUID2:mi,ZodCatch:cs,ZodCodec:ur,ZodCustom:lr,ZodCustomStringFormat:gn,ZodDate:Ei,ZodDefault:ns,ZodDiscriminatedUnion:Va,ZodE164:ki,ZodEmail:ui,ZodEmoji:li,ZodEnum:yn,ZodError:Q$,ZodExactOptional:Ya,ZodFile:Xa,get ZodFirstPartyTypeKind(){return te},ZodFunction:ys,ZodGUID:Qn,ZodIPv4:vi,ZodIPv6:yi,ZodISODate:xa,ZodISODateTime:Ea,ZodISODuration:ja,ZodISOTime:Na,ZodIntersection:Ba,ZodIssueCode:eb,ZodJWT:Si,ZodKSUID:gi,ZodLazy:hs,ZodLiteral:Wa,ZodMAC:Ca,ZodMap:Ka,ZodNaN:ls,ZodNanoID:di,ZodNever:Fa,ZodNonOptional:Ni,ZodNull:Ra,ZodNullable:ts,ZodNumber:er,ZodNumberFormat:Kt,ZodObject:rr,ZodOptional:ar,ZodPipe:cr,ZodPrefault:is,ZodPreprocess:ds,ZodPromise:vs,ZodReadonly:ps,ZodRealError:rt,ZodRecord:vn,ZodSet:Ha,ZodString:Xn,ZodStringFormat:we,ZodSuccess:ss,ZodSymbol:Da,ZodTemplateLiteral:fs,ZodTransform:Qa,ZodTuple:qa,ZodType:re,ZodULID:fi,ZodURL:Yn,ZodUUID:St,ZodUndefined:Aa,ZodUnion:ir,ZodUnknown:Za,ZodVoid:Ma,ZodXID:hi,ZodXor:La,_ZodString:ci,_default:rs,_function:Ci,any:Vf,array:ie,base64:Tf,base64url:Pf,bigint:Zf,boolean:ze,catch:us,check:uh,cidrv4:If,cidrv6:Of,clone:et,codec:oh,coerce:pb,config:Re,core:W$,cuid:vf,cuid2:yf,custom:_s,date:qf,decode:Qm,decodeAsync:ef,describe:lh,discriminatedUnion:zi,e164:Ef,email:sf,emoji:hf,encode:Xm,encodeAsync:Ym,endsWith:ti,enum:Le,exactOptional:es,file:th,flattenError:To,float32:Df,float64:Af,formatError:Po,fromJSONSchema:ab,function:Ci,getErrorMap:nb,globalRegistry:ut,gt:Dt,gte:We,guid:cf,hash:Cf,hex:jf,hostname:Nf,httpUrl:ff,includes:Yr,instanceof:ph,int:Ii,int32:Rf,int64:Ff,intersection:or,invertCodec:ah,ipv4:wf,ipv6:Sf,iso:Bm,json:fh,jwt:zf,keyof:Jf,ksuid:bf,lazy:gs,length:Jn,literal:G,locales:mp,looseObject:Ge,looseRecord:Xf,lowercase:Xr,lt:Ct,lte:lt,mac:kf,map:Qf,maxLength:qn,maxSize:pn,meta:dh,mime:ni,minLength:Jt,minSize:At,multipleOf:dn,nan:ih,nanoid:gf,nativeEnum:eh,negative:ba,never:Pi,nonnegative:ka,nonoptional:as,nonpositive:wa,normalize:ri,null:Ti,nullable:sr,nullish:nh,number:ee,object:U,optional:Oe,overwrite:Pt,parse:Jm,parseAsync:Km,partialRecord:Wf,pipe:ji,positive:$a,prefault:os,preprocess:Di,prettifyError:xu,promise:ch,property:Sa,readonly:ms,record:he,refine:$s,regex:Wr,regexes:Fo,registry:Yo,safeDecode:nf,safeDecodeAsync:of,safeEncode:tf,safeEncodeAsync:rf,safeParse:Hm,safeParseAsync:Wm,set:Yf,setErrorMap:tb,size:Bn,slugify:si,startsWith:ei,strictObject:Kf,string:_,stringFormat:xf,stringbool:mh,success:rh,superRefine:bs,symbol:Gf,templateLiteral:sh,toJSONSchema:Pa,toLowerCase:oi,toUpperCase:ai,transform:xi,treeifyError:Eu,trim:ii,tuple:Ja,uint32:Uf,uint64:Mf,ulid:_f,undefined:Lf,union:ke,unknown:fe,uppercase:Qr,url:mf,util:Tu,uuid:uf,uuidv4:lf,uuidv6:df,uuidv7:pf,void:Bf,xid:$f,xor:Hf});const mb=k("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");Y.init(e,t),e.def=t,e.type=t.type,e.parse=(r,i)=>Zr(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Mr(e,r,i),e.parseAsync=async(r,i)=>Fr(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Gr(e,r,i),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]},{parent:!0}),e.with=e.check,e.clone=(r,i)=>et(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.apply=r=>r(e)}),fb=k("ZodMiniObject",(e,t)=>{Jo.init(e,t),mb.init(e,t),se(e,"shape",()=>t.shape)});function gh(e,t){const r={type:"object",shape:e??{},...z(t)};return new fb(r)}function Et(e){return!!e._zod}function _n(e){const t=Object.values(e);if(t.length===0)return gh({});const r=t.every(Et),i=t.every(n=>!Et(n));if(r)return gh(e);if(i)return U(e);throw new Error("Mixed Zod versions detected in object shape.")}function dr(e,t){return Et(e)?Mr(e,t):e.safeParse(t)}async function ks(e,t){return Et(e)?await Gr(e,t):await e.safeParseAsync(t)}function pr(e){if(!e)return;let t;if(Et(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function mr(e){if(e){if(typeof e=="object"){const t=e,r=e;if(!t._def&&!r._zod){const i=Object.values(e);if(i.length>0&&i.every(n=>typeof n=="object"&&n!==null&&(n._def!==void 0||n._zod!==void 0||typeof n.parse=="function")))return _n(e)}}if(Et(e)){const r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function hb(e){return e.length===0?"object root":e.reduce((t,r,i)=>i===0?String(r):typeof r=="number"?`${t}[${r}]`:`${t}.${r}`,"")}function Ss(e){if(e&&typeof e=="object"){if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0)return e.issues.map(t=>t.path?.length?`${t.message} at ${hb(t.path)}`:t.message).join(`
67
+ `);if("message"in e&&typeof e.message=="string")return e.message;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function gb(e){return e.description}function vb(e){if(Et(e))return e._zod?.def?.type==="optional";const t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function Is(e){if(Et(e)){const o=e._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]}}const r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}const i=e.value;if(i!==void 0)return i}const vh="2025-11-25",yb=[vh,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ht="io.modelcontextprotocol/related-task",Ai="2.0",Ne=_s(e=>e!==null&&(typeof e=="object"||typeof e=="function")),yh=ke([_(),ee().int()]),_h=_();Ge({ttl:ee().optional(),pollInterval:ee().optional()});const _b=U({ttl:ee().optional()}),$b=U({taskId:_()}),Os=Ge({progressToken:yh.optional(),[Ht]:$b.optional()}),it=U({_meta:Os.optional()}),fr=it.extend({task:_b.optional()}),bb=e=>fr.safeParse(e).success,Ue=U({method:_(),params:it.loose().optional()}),dt=U({_meta:Os.optional()}),pt=U({method:_(),params:dt.loose().optional()}),Ze=Ge({_meta:Os.optional()}),Ri=ke([_(),ee().int()]),$h=U({jsonrpc:G(Ai),id:Ri,...Ue.shape}).strict(),bh=e=>$h.safeParse(e).success,wh=U({jsonrpc:G(Ai),...pt.shape}).strict(),wb=e=>wh.safeParse(e).success,Ts=U({jsonrpc:G(Ai),id:Ri,result:Ze}).strict(),Ui=e=>Ts.safeParse(e).success;var H;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(H||(H={}));const Ps=U({jsonrpc:G(Ai),id:Ri.optional(),error:U({code:ee().int(),message:_(),data:fe().optional()})}).strict(),kb=e=>Ps.safeParse(e).success,Sb=ke([$h,wh,Ts,Ps]);ke([Ts,Ps]);const Es=Ze.strict(),Ib=dt.extend({requestId:Ri.optional(),reason:_().optional()}),zs=pt.extend({method:G("notifications/cancelled"),params:Ib}),Ob=U({src:_(),mimeType:_().optional(),sizes:ie(_()).optional(),theme:Le(["light","dark"]).optional()}),hr=U({icons:ie(Ob).optional()}),$n=U({name:_(),title:_().optional()}),kh=$n.extend({...$n.shape,...hr.shape,version:_(),websiteUrl:_().optional(),description:_().optional()}),Tb=or(U({applyDefaults:ze().optional()}),he(_(),fe())),Pb=Di(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,or(U({form:Tb.optional(),url:Ne.optional()}),he(_(),fe()).optional())),Eb=Ge({list:Ne.optional(),cancel:Ne.optional(),requests:Ge({sampling:Ge({createMessage:Ne.optional()}).optional(),elicitation:Ge({create:Ne.optional()}).optional()}).optional()}),zb=Ge({list:Ne.optional(),cancel:Ne.optional(),requests:Ge({tools:Ge({call:Ne.optional()}).optional()}).optional()}),xb=U({experimental:he(_(),Ne).optional(),sampling:U({context:Ne.optional(),tools:Ne.optional()}).optional(),elicitation:Pb.optional(),roots:U({listChanged:ze().optional()}).optional(),tasks:Eb.optional(),extensions:he(_(),Ne).optional()}),Nb=it.extend({protocolVersion:_(),capabilities:xb,clientInfo:kh}),Sh=Ue.extend({method:G("initialize"),params:Nb}),jb=U({experimental:he(_(),Ne).optional(),logging:Ne.optional(),completions:Ne.optional(),prompts:U({listChanged:ze().optional()}).optional(),resources:U({subscribe:ze().optional(),listChanged:ze().optional()}).optional(),tools:U({listChanged:ze().optional()}).optional(),tasks:zb.optional(),extensions:he(_(),Ne).optional()}),Cb=Ze.extend({protocolVersion:_(),capabilities:jb,serverInfo:kh,instructions:_().optional()}),Ih=pt.extend({method:G("notifications/initialized"),params:dt.optional()}),xs=Ue.extend({method:G("ping"),params:it.optional()}),Db=U({progress:ee(),total:Oe(ee()),message:Oe(_())}),Ab=U({...dt.shape,...Db.shape,progressToken:yh}),Ns=pt.extend({method:G("notifications/progress"),params:Ab}),Rb=it.extend({cursor:_h.optional()}),gr=Ue.extend({params:Rb.optional()}),vr=Ze.extend({nextCursor:_h.optional()}),Ub=Le(["working","input_required","completed","failed","cancelled"]),yr=U({taskId:_(),status:Ub,ttl:ke([ee(),Ti()]),createdAt:_(),lastUpdatedAt:_(),pollInterval:Oe(ee()),statusMessage:Oe(_())}),Zi=Ze.extend({task:yr}),Zb=dt.merge(yr),Fi=pt.extend({method:G("notifications/tasks/status"),params:Zb}),js=Ue.extend({method:G("tasks/get"),params:it.extend({taskId:_()})}),Cs=Ze.merge(yr),Ds=Ue.extend({method:G("tasks/result"),params:it.extend({taskId:_()})});Ze.loose();const As=gr.extend({method:G("tasks/list")}),Rs=vr.extend({tasks:ie(yr)}),Us=Ue.extend({method:G("tasks/cancel"),params:it.extend({taskId:_()})}),Fb=Ze.merge(yr),Oh=U({uri:_(),mimeType:Oe(_()),_meta:he(_(),fe()).optional()}),Th=Oh.extend({text:_()}),Zs=_().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ph=Oh.extend({blob:Zs}),_r=Le(["user","assistant"]),bn=U({audience:ie(_r).optional(),priority:ee().min(0).max(1).optional(),lastModified:za({offset:!0}).optional()}),Eh=U({...$n.shape,...hr.shape,uri:_(),description:Oe(_()),mimeType:Oe(_()),size:Oe(ee()),annotations:bn.optional(),_meta:Oe(Ge({}))}),Mb=U({...$n.shape,...hr.shape,uriTemplate:_(),description:Oe(_()),mimeType:Oe(_()),annotations:bn.optional(),_meta:Oe(Ge({}))}),Fs=gr.extend({method:G("resources/list")}),Gb=vr.extend({resources:ie(Eh)}),Ms=gr.extend({method:G("resources/templates/list")}),Lb=vr.extend({resourceTemplates:ie(Mb)}),Gs=it.extend({uri:_()}),Vb=Gs,Ls=Ue.extend({method:G("resources/read"),params:Vb}),Bb=Ze.extend({contents:ie(ke([Th,Ph]))}),qb=pt.extend({method:G("notifications/resources/list_changed"),params:dt.optional()}),Jb=Gs,Kb=Ue.extend({method:G("resources/subscribe"),params:Jb}),Hb=Gs,Wb=Ue.extend({method:G("resources/unsubscribe"),params:Hb}),Xb=dt.extend({uri:_()}),Qb=pt.extend({method:G("notifications/resources/updated"),params:Xb}),Yb=U({name:_(),description:Oe(_()),required:Oe(ze())}),ew=U({...$n.shape,...hr.shape,description:Oe(_()),arguments:Oe(ie(Yb)),_meta:Oe(Ge({}))}),Vs=gr.extend({method:G("prompts/list")}),tw=vr.extend({prompts:ie(ew)}),nw=it.extend({name:_(),arguments:he(_(),_()).optional()}),Bs=Ue.extend({method:G("prompts/get"),params:nw}),qs=U({type:G("text"),text:_(),annotations:bn.optional(),_meta:he(_(),fe()).optional()}),Js=U({type:G("image"),data:Zs,mimeType:_(),annotations:bn.optional(),_meta:he(_(),fe()).optional()}),Ks=U({type:G("audio"),data:Zs,mimeType:_(),annotations:bn.optional(),_meta:he(_(),fe()).optional()}),rw=U({type:G("tool_use"),name:_(),id:_(),input:he(_(),fe()),_meta:he(_(),fe()).optional()}),iw=U({type:G("resource"),resource:ke([Th,Ph]),annotations:bn.optional(),_meta:he(_(),fe()).optional()}),ow=Eh.extend({type:G("resource_link")}),Hs=ke([qs,Js,Ks,ow,iw]),aw=U({role:_r,content:Hs}),sw=Ze.extend({description:_().optional(),messages:ie(aw)}),cw=pt.extend({method:G("notifications/prompts/list_changed"),params:dt.optional()}),uw=U({title:_().optional(),readOnlyHint:ze().optional(),destructiveHint:ze().optional(),idempotentHint:ze().optional(),openWorldHint:ze().optional()}),lw=U({taskSupport:Le(["required","optional","forbidden"]).optional()}),zh=U({...$n.shape,...hr.shape,description:_().optional(),inputSchema:U({type:G("object"),properties:he(_(),Ne).optional(),required:ie(_()).optional()}).catchall(fe()),outputSchema:U({type:G("object"),properties:he(_(),Ne).optional(),required:ie(_()).optional()}).catchall(fe()).optional(),annotations:uw.optional(),execution:lw.optional(),_meta:he(_(),fe()).optional()}),Ws=gr.extend({method:G("tools/list")}),dw=vr.extend({tools:ie(zh)}),Xs=Ze.extend({content:ie(Hs).default([]),structuredContent:he(_(),fe()).optional(),isError:ze().optional()});Xs.or(Ze.extend({toolResult:fe()}));const pw=fr.extend({name:_(),arguments:he(_(),fe()).optional()}),Mi=Ue.extend({method:G("tools/call"),params:pw}),mw=pt.extend({method:G("notifications/tools/list_changed"),params:dt.optional()});U({autoRefresh:ze().default(!0),debounceMs:ee().int().nonnegative().default(300)});const Gi=Le(["debug","info","notice","warning","error","critical","alert","emergency"]),fw=it.extend({level:Gi}),xh=Ue.extend({method:G("logging/setLevel"),params:fw}),hw=dt.extend({level:Gi,logger:_().optional(),data:fe()}),gw=pt.extend({method:G("notifications/message"),params:hw}),vw=U({name:_().optional()}),yw=U({hints:ie(vw).optional(),costPriority:ee().min(0).max(1).optional(),speedPriority:ee().min(0).max(1).optional(),intelligencePriority:ee().min(0).max(1).optional()}),_w=U({mode:Le(["auto","required","none"]).optional()}),$w=U({type:G("tool_result"),toolUseId:_().describe("The unique identifier for the corresponding tool call."),content:ie(Hs).default([]),structuredContent:U({}).loose().optional(),isError:ze().optional(),_meta:he(_(),fe()).optional()}),bw=zi("type",[qs,Js,Ks]),Li=zi("type",[qs,Js,Ks,rw,$w]),ww=U({role:_r,content:ke([Li,ie(Li)]),_meta:he(_(),fe()).optional()}),kw=fr.extend({messages:ie(ww),modelPreferences:yw.optional(),systemPrompt:_().optional(),includeContext:Le(["none","thisServer","allServers"]).optional(),temperature:ee().optional(),maxTokens:ee().int(),stopSequences:ie(_()).optional(),metadata:Ne.optional(),tools:ie(zh).optional(),toolChoice:_w.optional()}),Sw=Ue.extend({method:G("sampling/createMessage"),params:kw}),Qs=Ze.extend({model:_(),stopReason:Oe(Le(["endTurn","stopSequence","maxTokens"]).or(_())),role:_r,content:bw}),Nh=Ze.extend({model:_(),stopReason:Oe(Le(["endTurn","stopSequence","maxTokens","toolUse"]).or(_())),role:_r,content:ke([Li,ie(Li)])}),Iw=U({type:G("boolean"),title:_().optional(),description:_().optional(),default:ze().optional()}),Ow=U({type:G("string"),title:_().optional(),description:_().optional(),minLength:ee().optional(),maxLength:ee().optional(),format:Le(["email","uri","date","date-time"]).optional(),default:_().optional()}),Tw=U({type:Le(["number","integer"]),title:_().optional(),description:_().optional(),minimum:ee().optional(),maximum:ee().optional(),default:ee().optional()}),Pw=U({type:G("string"),title:_().optional(),description:_().optional(),enum:ie(_()),default:_().optional()}),Ew=U({type:G("string"),title:_().optional(),description:_().optional(),oneOf:ie(U({const:_(),title:_()})),default:_().optional()}),zw=U({type:G("string"),title:_().optional(),description:_().optional(),enum:ie(_()),enumNames:ie(_()).optional(),default:_().optional()}),xw=ke([Pw,Ew]),Nw=U({type:G("array"),title:_().optional(),description:_().optional(),minItems:ee().optional(),maxItems:ee().optional(),items:U({type:G("string"),enum:ie(_())}),default:ie(_()).optional()}),jw=U({type:G("array"),title:_().optional(),description:_().optional(),minItems:ee().optional(),maxItems:ee().optional(),items:U({anyOf:ie(U({const:_(),title:_()}))}),default:ie(_()).optional()}),Cw=ke([Nw,jw]),Dw=ke([zw,xw,Cw]),Aw=ke([Dw,Iw,Ow,Tw]),Rw=fr.extend({mode:G("form").optional(),message:_(),requestedSchema:U({type:G("object"),properties:he(_(),Aw),required:ie(_()).optional()})}),Uw=fr.extend({mode:G("url"),message:_(),elicitationId:_(),url:_().url()}),Zw=ke([Rw,Uw]),Fw=Ue.extend({method:G("elicitation/create"),params:Zw}),Mw=dt.extend({elicitationId:_()}),Gw=pt.extend({method:G("notifications/elicitation/complete"),params:Mw}),Vi=Ze.extend({action:Le(["accept","decline","cancel"]),content:Di(e=>e===null?void 0:e,he(_(),ke([_(),ee(),ze(),ie(_())])).optional())}),Lw=U({type:G("ref/resource"),uri:_()}),Vw=U({type:G("ref/prompt"),name:_()}),Bw=it.extend({ref:ke([Vw,Lw]),argument:U({name:_(),value:_()}),context:U({arguments:he(_(),_()).optional()}).optional()}),Ys=Ue.extend({method:G("completion/complete"),params:Bw});function qw(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Jw(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}const Kw=Ze.extend({completion:Ge({values:ie(_()).max(100),total:Oe(ee().int()),hasMore:Oe(ze())})}),Hw=U({uri:_().startsWith("file://"),name:_().optional(),_meta:he(_(),fe()).optional()}),Ww=Ue.extend({method:G("roots/list"),params:it.optional()}),jh=Ze.extend({roots:ie(Hw)}),Xw=pt.extend({method:G("notifications/roots/list_changed"),params:dt.optional()});ke([xs,Sh,Ys,xh,Bs,Vs,Fs,Ms,Ls,Kb,Wb,Mi,Ws,js,Ds,As,Us]),ke([zs,Ns,Ih,Xw,Fi]),ke([Es,Qs,Nh,Vi,jh,Cs,Rs,Zi]),ke([xs,Sw,Fw,Ww,js,Ds,As,Us]),ke([zs,Ns,gw,Qb,qb,mw,cw,Fi,Gw]),ke([Es,Cb,Kw,sw,tw,Gb,Lb,Bb,Xs,dw,Cs,Rs,Zi]);class B extends Error{constructor(t,r,i){super(`MCP error ${t}: ${r}`),this.code=t,this.data=i,this.name="McpError"}static fromError(t,r,i){if(t===H.UrlElicitationRequired&&i){const n=i;if(n.elicitations)return new Qw(n.elicitations,r)}return new B(t,r,i)}}class Qw extends B{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(H.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function Wt(e){return e==="completed"||e==="failed"||e==="cancelled"}const Yw=Symbol("Let zodToJsonSchema decide on which parser to use"),Ch={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},ek=e=>typeof e=="string"?{...Ch,name:e}:{...Ch,...e},tk=e=>{const t=ek(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([i,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,i],jsonSchema:void 0}]))}};function Dh(e,t,r,i){i?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function ve(e,t,r,i,n){e[t]=r,Dh(e,t,i,n)}const Ah=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function Xe(e){if(e.target!=="openAi")return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Ah(t,e.currentPath):t.join("/")}}function nk(e,t){const r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==te.ZodAny&&(r.items=ge(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ve(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ve(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ve(r,"minItems",e.exactLength.value,e.exactLength.message,t),ve(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function rk(e,t){const r={type:"integer",format:"int64"};if(!e.checks)return r;for(const i of e.checks)switch(i.kind){case"min":t.target==="jsonSchema7"?i.inclusive?ve(r,"minimum",i.value,i.message,t):ve(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),ve(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?ve(r,"maximum",i.value,i.message,t):ve(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),ve(r,"maximum",i.value,i.message,t));break;case"multipleOf":ve(r,"multipleOf",i.value,i.message,t);break}return r}function ik(){return{type:"boolean"}}function Rh(e,t){return ge(e.type._def,t)}const ok=(e,t)=>ge(e.innerType._def,t);function Uh(e,t,r){const i=r??t.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((n,o)=>Uh(e,t,n))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ak(e,t)}}const ak=(e,t)=>{const r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(const i of e.checks)switch(i.kind){case"min":ve(r,"minimum",i.value,i.message,t);break;case"max":ve(r,"maximum",i.value,i.message,t);break}return r};function sk(e,t){return{...ge(e.innerType._def,t),default:e.defaultValue()}}function ck(e,t){return t.effectStrategy==="input"?ge(e.schema._def,t):Xe(t)}function uk(e){return{type:"string",enum:Array.from(e.values)}}const lk=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function dk(e,t){const r=[ge(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),ge(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(o=>!!o);let i=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const n=[];return r.forEach(o=>{if(lk(o))n.push(...o.allOf),o.unevaluatedProperties===void 0&&(i=void 0);else{let a=o;if("additionalProperties"in o&&o.additionalProperties===!1){const{additionalProperties:s,...c}=o;a=c}else i=void 0;n.push(a)}}),n.length?{allOf:n,...i}:void 0}function pk(e,t){const r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}let ec;const gt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(ec===void 0&&(ec=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ec),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Zh(e,t){const r={type:"string"};if(e.checks)for(const i of e.checks)switch(i.kind){case"min":ve(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t);break;case"max":ve(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"email":switch(t.emailStrategy){case"format:email":vt(r,"email",i.message,t);break;case"format:idn-email":vt(r,"idn-email",i.message,t);break;case"pattern:zod":Je(r,gt.email,i.message,t);break}break;case"url":vt(r,"uri",i.message,t);break;case"uuid":vt(r,"uuid",i.message,t);break;case"regex":Je(r,i.regex,i.message,t);break;case"cuid":Je(r,gt.cuid,i.message,t);break;case"cuid2":Je(r,gt.cuid2,i.message,t);break;case"startsWith":Je(r,RegExp(`^${tc(i.value,t)}`),i.message,t);break;case"endsWith":Je(r,RegExp(`${tc(i.value,t)}$`),i.message,t);break;case"datetime":vt(r,"date-time",i.message,t);break;case"date":vt(r,"date",i.message,t);break;case"time":vt(r,"time",i.message,t);break;case"duration":vt(r,"duration",i.message,t);break;case"length":ve(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t),ve(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"includes":{Je(r,RegExp(tc(i.value,t)),i.message,t);break}case"ip":{i.version!=="v6"&&vt(r,"ipv4",i.message,t),i.version!=="v4"&&vt(r,"ipv6",i.message,t);break}case"base64url":Je(r,gt.base64url,i.message,t);break;case"jwt":Je(r,gt.jwt,i.message,t);break;case"cidr":{i.version!=="v6"&&Je(r,gt.ipv4Cidr,i.message,t),i.version!=="v4"&&Je(r,gt.ipv6Cidr,i.message,t);break}case"emoji":Je(r,gt.emoji(),i.message,t);break;case"ulid":{Je(r,gt.ulid,i.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{vt(r,"binary",i.message,t);break}case"contentEncoding:base64":{ve(r,"contentEncoding","base64",i.message,t);break}case"pattern:zod":{Je(r,gt.base64,i.message,t);break}}break}case"nanoid":Je(r,gt.nanoid,i.message,t)}return r}function tc(e,t){return t.patternStrategy==="escape"?fk(e):e}const mk=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function fk(e){let t="";for(let r=0;r<e.length;r++)mk.has(e[r])||(t+="\\"),t+=e[r];return t}function vt(e,t,r,i){e.format||e.anyOf?.some(n=>n.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&i.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&i.errorMessages&&{errorMessage:{format:r}}})):ve(e,"format",t,r,i)}function Je(e,t,r,i){e.pattern||e.allOf?.some(n=>n.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&i.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Fh(t,i),...r&&i.errorMessages&&{errorMessage:{pattern:r}}})):ve(e,"pattern",Fh(t,i),r,i)}function Fh(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},i=r.i?e.source.toLowerCase():e.source;let n="",o=!1,a=!1,s=!1;for(let c=0;c<i.length;c++){if(o){n+=i[c],o=!1;continue}if(r.i){if(a){if(i[c].match(/[a-z]/)){s?(n+=i[c],n+=`${i[c-2]}-${i[c]}`.toUpperCase(),s=!1):i[c+1]==="-"&&i[c+2]?.match(/[a-z]/)?(n+=i[c],s=!0):n+=`${i[c]}${i[c].toUpperCase()}`;continue}}else if(i[c].match(/[a-z]/)){n+=`[${i[c]}${i[c].toUpperCase()}]`;continue}}if(r.m){if(i[c]==="^"){n+=`(^|(?<=[\r
68
68
  ]))`;continue}else if(i[c]==="$"){n+=`($|(?=[\r
69
69
  ]))`;continue}}if(r.s&&i[c]==="."){n+=a?`${i[c]}\r
70
70
  `:`[${i[c]}\r
71
- ]`;continue}n+=i[c],i[c]==="\\"?o=!0:a&&i[c]==="]"?a=!1:!a&&i[c]==="["&&(a=!0)}try{new RegExp(n)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return n}function Fh(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===te.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((i,n)=>({...i,[n]:ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??Xe(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};const r={type:"object",additionalProperties:ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===te.ZodString&&e.keyType._def.checks?.length){const{type:i,...n}=Zh(e.keyType._def,t);return{...r,propertyNames:n}}else{if(e.keyType?._def.typeName===te.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===te.ZodBranded&&e.keyType._def.type._def.typeName===te.ZodString&&e.keyType._def.type._def.checks?.length){const{type:i,...n}=Rh(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function hw(e,t){if(t.mapStrategy==="record")return Fh(e,t);const r=ge(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Xe(t),i=ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Xe(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,i],minItems:2,maxItems:2}}}function gw(e){const t=e.values,i=Object.keys(e.values).filter(o=>typeof t[t[o]]!="number").map(o=>t[o]),n=Array.from(new Set(i.map(o=>typeof o)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:i}}function vw(e){return e.target==="openAi"?void 0:{not:Xe({...e,currentPath:[...e.currentPath,"not"]})}}function yw(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const Bi={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function _w(e,t){if(t.target==="openApi3")return Gh(e,t);const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(i=>i._def.typeName in Bi&&(!i._def.checks||!i._def.checks.length))){const i=r.reduce((n,o)=>{const a=Bi[o._def.typeName];return a&&!n.includes(a)?[...n,a]:n},[]);return{type:i.length>1?i:i[0]}}else if(r.every(i=>i._def.typeName==="ZodLiteral"&&!i.description)){const i=r.reduce((n,o)=>{const a=typeof o._def.value;switch(a){case"string":case"number":case"boolean":return[...n,a];case"bigint":return[...n,"integer"];case"object":if(o._def.value===null)return[...n,"null"];default:return n}},[]);if(i.length===r.length){const n=i.filter((o,a,s)=>s.indexOf(o)===a);return{type:n.length>1?n:n[0],enum:r.reduce((o,a)=>o.includes(a._def.value)?o:[...o,a._def.value],[])}}}else if(r.every(i=>i._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((i,n)=>[...i,...n._def.values.filter(o=>!i.includes(o))],[])};return Gh(e,t)}const Gh=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((i,n)=>ge(i._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(i=>!!i&&(!t.strictUnions||typeof i=="object"&&Object.keys(i).length>0));return r.length?{anyOf:r}:void 0};function $w(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:Bi[e.innerType._def.typeName],nullable:!0}:{type:[Bi[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const i=ge(e.innerType._def,{...t,currentPath:[...t.currentPath]});return i&&"$ref"in i?{allOf:[i],nullable:!0}:i&&{...i,nullable:!0}}const r=ge(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function bw(e,t){const r={type:"number"};if(!e.checks)return r;for(const i of e.checks)switch(i.kind){case"int":r.type="integer",Dh(r,"type",i.message,t);break;case"min":t.target==="jsonSchema7"?i.inclusive?ve(r,"minimum",i.value,i.message,t):ve(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),ve(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?ve(r,"maximum",i.value,i.message,t):ve(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),ve(r,"maximum",i.value,i.message,t));break;case"multipleOf":ve(r,"multipleOf",i.value,i.message,t);break}return r}function kw(e,t){const r=t.target==="openAi",i={type:"object",properties:{}},n=[],o=e.shape();for(const s in o){let c=o[s];if(c===void 0||c._def===void 0)continue;let u=Sw(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);const l=ge(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});l!==void 0&&(i.properties[s]=l,u||n.push(s))}n.length&&(i.required=n);const a=ww(e,t);return a!==void 0&&(i.additionalProperties=a),i}function ww(e,t){if(e.catchall._def.typeName!=="ZodNever")return ge(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function Sw(e){try{return e.isOptional()}catch{return!0}}const Iw=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return ge(e.innerType._def,t);const r=ge(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Xe(t)},r]}:Xe(t)},Ow=(e,t)=>{if(t.pipeStrategy==="input")return ge(e.in._def,t);if(t.pipeStrategy==="output")return ge(e.out._def,t);const r=ge(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),i=ge(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,i].filter(n=>n!==void 0)}};function Tw(e,t){return ge(e.type._def,t)}function Pw(e,t){const i={type:"array",uniqueItems:!0,items:ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ve(i,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ve(i,"maxItems",e.maxSize.value,e.maxSize.message,t),i}function Ew(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,i)=>ge(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[]),additionalItems:ge(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,i)=>ge(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[])}}function zw(e){return{not:Xe(e)}}function Nw(e){return Xe(e)}const xw=(e,t)=>ge(e.innerType._def,t),jw=(e,t,r)=>{switch(t){case te.ZodString:return Zh(e,r);case te.ZodNumber:return bw(e,r);case te.ZodObject:return kw(e,r);case te.ZodBigInt:return rw(e,r);case te.ZodBoolean:return iw();case te.ZodDate:return Uh(e,r);case te.ZodUndefined:return zw(r);case te.ZodNull:return yw(r);case te.ZodArray:return nw(e,r);case te.ZodUnion:case te.ZodDiscriminatedUnion:return _w(e,r);case te.ZodIntersection:return dw(e,r);case te.ZodTuple:return Ew(e,r);case te.ZodRecord:return Fh(e,r);case te.ZodLiteral:return pw(e,r);case te.ZodEnum:return uw(e);case te.ZodNativeEnum:return gw(e);case te.ZodNullable:return $w(e,r);case te.ZodOptional:return Iw(e,r);case te.ZodMap:return hw(e,r);case te.ZodSet:return Pw(e,r);case te.ZodLazy:return()=>e.getter()._def;case te.ZodPromise:return Tw(e,r);case te.ZodNaN:case te.ZodNever:return vw(r);case te.ZodEffects:return cw(e,r);case te.ZodAny:return Xe(r);case te.ZodUnknown:return Nw(r);case te.ZodDefault:return sw(e,r);case te.ZodBranded:return Rh(e,r);case te.ZodReadonly:return xw(e,r);case te.ZodCatch:return ow(e,r);case te.ZodPipeline:return Ow(e,r);case te.ZodFunction:case te.ZodVoid:case te.ZodSymbol:return;default:return(i=>{})()}};function ge(e,t,r=!1){const i=t.seen.get(e);if(t.override){const s=t.override?.(e,t,i,r);if(s!==Qk)return s}if(i&&!r){const s=Cw(i,t);if(s!==void 0)return s}const n={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,n);const o=jw(e,e.typeName,t),a=typeof o=="function"?ge(o(),t):o;if(a&&Dw(e,t,a),t.postProcess){const s=t.postProcess(a,e,t);return n.jsonSchema=a,s}return n.jsonSchema=a,a}const Cw=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Ah(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,i)=>t.currentPath[i]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Xe(t)):t.$refStrategy==="seen"?Xe(t):void 0}},Dw=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r),Aw=(e,t)=>{const r=tw(t);let i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:ge(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Xe(r)}),{}):void 0;const n=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=ge(e._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??Xe(r),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(o.title=a),r.flags.hasReferencedOpenAiAnyType&&(i||(i={}),i[r.openAiAnyTypeName]||(i[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));const s=n===void 0?i?{...o,[r.definitionPath]:i}:o:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...i,[n]:o}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function Rw(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Lh(e,t){return Et(e)?Pa(e,{target:Rw(t?.target),io:t?.pipeStrategy??"input"}):Aw(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Vh(e){const r=pr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=Is(r);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Bh(e,t){const r=dr(e,t);if(!r.success)throw r.error;return r.data}const Uw=6e4;class Zw{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(zs,r=>{this._oncancel(r)}),this.setNotificationHandler(xs,r=>{this._onprogress(r)}),this.setRequestHandler(Ns,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(js,async(r,i)=>{const n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new B(H.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(Ds,async(r,i)=>{const n=async()=>{const o=r.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(o,i.sessionId);){if(s.type==="response"||s.type==="error"){const c=s.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),s.type==="response")l(c);else{const d=c,m=new B(d.error.code,d.error.message,d.error.data);l(m)}else{const 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})}}const a=await this._taskStore.getTask(o,i.sessionId);if(!a)throw new B(H.InvalidParams,`Task not found: ${o}`);if(!Wt(a.status))return await this._waitForTaskUpdate(o,i.signal),await n();if(Wt(a.status)){const s=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o),{...s,_meta:{...s._meta,[Ht]:{taskId:o}}}}return await n()};return await n()}),this.setRequestHandler(As,async(r,i)=>{try{const{tasks:n,nextCursor:o}=await this._taskStore.listTasks(r.params?.cursor,i.sessionId);return{tasks:n,nextCursor:o,_meta:{}}}catch(n){throw new B(H.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(Us,async(r,i)=>{try{const n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new B(H.InvalidParams,`Task not found: ${r.params.taskId}`);if(Wt(n.status))throw new B(H.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(r.params.taskId);const o=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!o)throw new B(H.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...o}}catch(n){throw n instanceof B?n:new B(H.InvalidRequest,`Failed to cancel task: ${n instanceof Error?n.message:String(n)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,i,n,o=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(n,r),startTime:Date.now(),timeout:r,maxTotalTimeout:i,resetTimeoutOnProgress:o,onTimeout:n})}_resetTimeout(t){const r=this._timeoutInfo.get(t);if(!r)return!1;const i=Date.now()-r.startTime;if(r.maxTotalTimeout&&i>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),B.fromError(H.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:i});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){const r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;const r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};const i=this.transport?.onerror;this._transport.onerror=o=>{i?.(o),this._onerror(o)};const n=this._transport?.onmessage;this._transport.onmessage=(o,a)=>{n?.(o,a),Ui(o)||wb(o)?this._onresponse(o):bh(o)?this._onrequest(o,a):kb(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();for(const i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();const r=B.fromError(H.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const i of t.values())i(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){const r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,r){const i=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,n=this._transport,o=t.params?._meta?.[Ht]?.taskId;if(i===void 0){const l={jsonrpc:"2.0",id:t.id,error:{code:H.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:l,timestamp:Date.now()},n?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):n?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}const a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);const s=bb(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,n?.sessionId):void 0,u={signal:a.signal,sessionId:n?.sessionId,_meta:t.params?._meta,sendNotification:async l=>{if(a.signal.aborted)return;const d={relatedRequestId:t.id};o&&(d.relatedTask={taskId:o}),await this.notification(l,d)},sendRequest:async(l,d,m)=>{if(a.signal.aborted)throw new B(H.ConnectionClosed,"Request was cancelled");const p={...m,relatedRequestId:t.id};o&&!p.relatedTask&&(p.relatedTask={taskId:o});const h=p.relatedTask?.taskId??o;return h&&c&&await c.updateTaskStatus(h,"input_required"),await this.request(l,d,p)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:o,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,u)).then(async l=>{if(a.signal.aborted)return;const d={result:l,jsonrpc:"2.0",id:t.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:d,timestamp:Date.now()},n?.sessionId):await n?.send(d)},async l=>{if(a.signal.aborted)return;const d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(l.code)?l.code:H.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},n?.sessionId):await n?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===a&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:r,...i}=t.params,n=Number(r),o=this._progressHandlers.get(n);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const a=this._responseHandlers.get(n),s=this._timeoutInfo.get(n);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(c){this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),a(c);return}o(i)}_onresponse(t){const r=Number(t.id),i=this._requestResolvers.get(r);if(i){if(this._requestResolvers.delete(r),Ui(t))i(t);else{const a=new B(t.error.code,t.error.message,t.error.data);i(a)}return}const n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let o=!1;if(Ui(t)&&t.result&&typeof t.result=="object"){const a=t.result;if(a.task&&typeof a.task=="object"){const s=a.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,r))}}if(o||this._progressHandlers.delete(r),Ui(t))n(t);else{const a=B.fromError(t.error.code,t.error.message,t.error.data);n(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,i){const{task:n}=i??{};if(!n){try{yield{type:"result",result:await this.request(t,r,i)}}catch(a){yield{type:"error",error:a instanceof B?a:new B(H.InternalError,String(a))}}return}let o;try{const a=await this.request(t,Zi,i);if(a.task)o=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new B(H.InternalError,"Task creation did not return a task");for(;;){const s=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:s},Wt(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},r,i)}:s.status==="failed"?yield{type:"error",error:new B(H.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new B(H.InternalError,`Task ${o} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},r,i)};return}const 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(H.InternalError,String(a))}}}request(t,r,i){const{relatedRequestId:n,resumptionToken:o,onresumptiontoken:a,task:s,relatedTask:c}=i??{};return new Promise((u,l)=>{const d=g=>{l(g)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch(g){d(g);return}i?.signal?.throwIfAborted();const m=this._requestMessageId++,p={...t,jsonrpc:"2.0",id:m};i?.onprogress&&(this._progressHandlers.set(m,i.onprogress),p.params={...t.params,_meta:{...t.params?._meta||{},progressToken:m}}),s&&(p.params={...p.params,task:s}),c&&(p.params={...p.params,_meta:{...p.params?._meta||{},[Ht]:c}});const h=g=>{this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(g)}},{relatedRequestId:n,resumptionToken:o,onresumptiontoken:a}).catch(O=>this._onerror(new Error(`Failed to send cancellation: ${O}`)));const k=g instanceof B?g:new B(H.RequestTimeout,String(g));l(k)};this._responseHandlers.set(m,g=>{if(!i?.signal?.aborted){if(g instanceof Error)return l(g);try{const k=dr(r,g.result);k.success?u(k.data):l(k.error)}catch(k){l(k)}}}),i?.signal?.addEventListener("abort",()=>{h(i?.signal?.reason)});const b=i?.timeout??Uw,$=()=>h(B.fromError(H.RequestTimeout,"Request timed out",{timeout:b}));this._setupTimeout(m,b,i?.maxTotalTimeout,$,i?.resetTimeoutOnProgress??!1);const y=c?.taskId;if(y){const g=k=>{const O=this._responseHandlers.get(m);O?O(k):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))};this._requestResolvers.set(m,g),this._enqueueTaskMessage(y,{type:"request",message:p,timestamp:Date.now()}).catch(k=>{this._cleanupTimeout(m),l(k)})}else this._transport.send(p,{relatedRequestId:n,resumptionToken:o,onresumptiontoken:a}).catch(g=>{this._cleanupTimeout(m),l(g)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},Cs,r)}async getTaskResult(t,r,i){return this.request({method:"tasks/result",params:t},r,i)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},Rs,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},Mb,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const i=r?.relatedTask?.taskId;if(i){const s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Ht]:r.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Ht]:r.relatedTask}}}),this._transport?.send(s,r).catch(c=>this._onerror(c))});return}let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Ht]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(t,r){const i=Vh(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(n,o)=>{const a=Bh(t,n);return Promise.resolve(r(a,o))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){const i=Vh(t);this._notificationHandlers.set(i,n=>{const o=Bh(t,n);return Promise.resolve(r(o))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const n=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,i,n)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){const i=await this._taskMessageQueue.dequeueAll(t,r);for(const n of i)if(n.type==="request"&&bh(n.message)){const o=n.message.id,a=this._requestResolvers.get(o);a?(a(new B(H.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let i=this._options?.defaultTaskPollInterval??1e3;try{const n=await this._taskStore?.getTask(t);n?.pollInterval&&(i=n.pollInterval)}catch{}return new Promise((n,o)=>{if(r.aborted){o(new B(H.InvalidRequest,"Request cancelled"));return}const a=setTimeout(n,i);r.addEventListener("abort",()=>{clearTimeout(a),o(new B(H.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){const i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async n=>{if(!t)throw new Error("No request provided");return await i.createTask(n,t.id,{method:t.method,params:t.params},r)},getTask:async n=>{const o=await i.getTask(n,r);if(!o)throw new B(H.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(n,o,a)=>{await i.storeTaskResult(n,o,a,r);const s=await i.getTask(n,r);if(s){const c=Mi.parse({method:"notifications/tasks/status",params:s});await this.notification(c),Wt(s.status)&&this._cleanupTaskProgressHandler(n)}},getTaskResult:n=>i.getTaskResult(n,r),updateTaskStatus:async(n,o,a)=>{const s=await i.getTask(n,r);if(!s)throw new B(H.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(Wt(s.status))throw new B(H.InvalidParams,`Cannot update task "${n}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(n,o,a,r);const c=await i.getTask(n,r);if(c){const u=Mi.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Wt(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>i.listTasks(n,r)}}}function qh(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Mw(e,t){const r={...e};for(const i in t){const n=i,o=t[n];if(o===void 0)continue;const a=r[n];qh(a)&&qh(o)?r[n]={...a,...o}:r[n]=o}return r}function Jh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nc={exports:{}},Kh={},zt={},Xt={},rc={},ce={},$r={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(g){if(super(),!e.IDENTIFIER.test(g))throw new Error("CodeGen: name must be a valid identifier");this.str=g}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(g){super(),this._items=typeof g=="string"?[g]:g}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const g=this._items[0];return g===""||g==='""'}get str(){var g;return(g=this._str)!==null&&g!==void 0?g:this._str=this._items.reduce((k,O)=>`${k}${O}`,"")}get names(){var g;return(g=this._names)!==null&&g!==void 0?g:this._names=this._items.reduce((k,O)=>(O instanceof r&&(k[O.str]=(k[O.str]||0)+1),k),{})}}e._Code=i,e.nil=new i("");function n(y,...g){const k=[y[0]];let O=0;for(;O<g.length;)s(k,g[O]),k.push(y[++O]);return new i(k)}e._=n;const o=new i("+");function a(y,...g){const k=[p(y[0])];let O=0;for(;O<g.length;)k.push(o),s(k,g[O]),k.push(o,p(y[++O]));return c(k),new i(k)}e.str=a;function s(y,g){g instanceof i?y.push(...g._items):g instanceof r?y.push(g):y.push(d(g))}e.addCodeArg=s;function c(y){let g=1;for(;g<y.length-1;){if(y[g]===o){const k=u(y[g-1],y[g+1]);if(k!==void 0){y.splice(g-1,3,k);continue}y[g++]="+"}g++}}function u(y,g){if(g==='""')return y;if(y==='""')return g;if(typeof y=="string")return g instanceof r||y[y.length-1]!=='"'?void 0:typeof g!="string"?`${y.slice(0,-1)}${g}"`:g[0]==='"'?y.slice(0,-1)+g.slice(1):void 0;if(typeof g=="string"&&g[0]==='"'&&!(y instanceof r))return`"${y}${g.slice(1)}`}function l(y,g){return g.emptyStr()?y:y.emptyStr()?g:a`${y}${g}`}e.strConcat=l;function d(y){return typeof y=="number"||typeof y=="boolean"||y===null?y:p(Array.isArray(y)?y.join(","):y)}function m(y){return new i(p(y))}e.stringify=m;function p(y){return JSON.stringify(y).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=p;function h(y){return typeof y=="string"&&e.IDENTIFIER.test(y)?new i(`.${y}`):n`[${y}]`}e.getProperty=h;function b(y){if(typeof y=="string"&&e.IDENTIFIER.test(y))return new i(`${y}`);throw new Error(`CodeGen: invalid export name: ${y}, use explicit $id name mapping`)}e.getEsmExportName=b;function $(y){return new i(y.toString())}e.regexpCode=$})($r);var ic={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=$r;class r extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var i;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:u,parent:l}={}){this._names={},this._prefixes=u,this._parent=l}toName(u){return u instanceof t.Name?u:this.name(u)}name(u){return new t.Name(this._newName(u))}_newName(u){const l=this._names[u]||this._nameGroup(u);return`${u}${l.index++}`}_nameGroup(u){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}e.Scope=n;class o extends t.Name{constructor(u,l){super(l),this.prefix=u}setValue(u,{property:l,itemIndex:d}){this.value=u,this.scopePath=(0,t._)`.${new t.Name(l)}[${d}]`}}e.ValueScopeName=o;const a=(0,t._)`\n`;class s extends n{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:t.nil}}get(){return this._scope}name(u){return new o(u,this._newName(u))}value(u,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(u),{prefix:p}=m,h=(d=l.key)!==null&&d!==void 0?d:l.ref;let b=this._values[p];if(b){const g=b.get(h);if(g)return g}else b=this._values[p]=new Map;b.set(h,m);const $=this._scope[p]||(this._scope[p]=[]),y=$.length;return $[y]=l.ref,m.setValue(l,{property:p,itemIndex:y}),m}getValue(u,l){const d=this._values[u];if(d)return d.get(l)}scopeRefs(u,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${u}${d.scopePath}`})}scopeCode(u=this._values,l,d){return this._reduceValues(u,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},l,d)}_reduceValues(u,l,d={},m){let p=t.nil;for(const h in u){const b=u[h];if(!b)continue;const $=d[h]=d[h]||new Map;b.forEach(y=>{if($.has(y))return;$.set(y,i.Started);let g=l(y);if(g){const k=this.opts.es5?e.varKinds.var:e.varKinds.const;p=(0,t._)`${p}${k} ${y} = ${g};${this.opts._n}`}else if(g=m?.(y))p=(0,t._)`${p}${g}${this.opts._n}`;else throw new r(y);$.set(y,i.Completed)})}return p}}e.ValueScope=s})(ic),(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=$r,r=ic;var i=$r;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var n=ic;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(f,v){return this}}class a extends o{constructor(f,v,E){super(),this.varKind=f,this.name=v,this.rhs=E}render({es5:f,_n:v}){const E=f?r.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${E} ${this.name}${F};`+v}optimizeNames(f,v){if(f[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,f,v)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends o{constructor(f,v,E){super(),this.lhs=f,this.rhs=v,this.sideEffects=E}render({_n:f}){return`${this.lhs} = ${this.rhs};`+f}optimizeNames(f,v){if(!(this.lhs instanceof t.Name&&!f[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,f,v),this}get names(){const f=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ne(f,this.rhs)}}class c extends s{constructor(f,v,E,F){super(f,E,F),this.op=v}render({_n:f}){return`${this.lhs} ${this.op}= ${this.rhs};`+f}}class u extends o{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`${this.label}:`+f}}class l extends o{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`break${this.label?` ${this.label}`:""};`+f}}class d extends o{constructor(f){super(),this.error=f}render({_n:f}){return`throw ${this.error};`+f}get names(){return this.error.names}}class m extends o{constructor(f){super(),this.code=f}render({_n:f}){return`${this.code};`+f}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(f,v){return this.code=K(this.code,f,v),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class p extends o{constructor(f=[]){super(),this.nodes=f}render(f){return this.nodes.reduce((v,E)=>v+E.render(f),"")}optimizeNodes(){const{nodes:f}=this;let v=f.length;for(;v--;){const E=f[v].optimizeNodes();Array.isArray(E)?f.splice(v,1,...E):E?f[v]=E:f.splice(v,1)}return f.length>0?this:void 0}optimizeNames(f,v){const{nodes:E}=this;let F=E.length;for(;F--;){const q=E[F];q.optimizeNames(f,v)||(Ee(f,q.names),E.splice(F,1))}return E.length>0?this:void 0}get names(){return this.nodes.reduce((f,v)=>X(f,v.names),{})}}class h extends p{render(f){return"{"+f._n+super.render(f)+"}"+f._n}}class b extends p{}class $ extends h{}$.kind="else";class y extends h{constructor(f,v){super(v),this.condition=f}render(f){let v=`if(${this.condition})`+super.render(f);return this.else&&(v+="else "+this.else.render(f)),v}optimizeNodes(){super.optimizeNodes();const f=this.condition;if(f===!0)return this.nodes;let v=this.else;if(v){const E=v.optimizeNodes();v=this.else=Array.isArray(E)?new $(E):E}if(v)return f===!1?v instanceof y?v:v.nodes:this.nodes.length?this:new y(ot(f),v instanceof y?[v]:v.nodes);if(!(f===!1||!this.nodes.length))return this}optimizeNames(f,v){var E;if(this.else=(E=this.else)===null||E===void 0?void 0:E.optimizeNames(f,v),!!(super.optimizeNames(f,v)||this.else))return this.condition=K(this.condition,f,v),this}get names(){const f=super.names;return ne(f,this.condition),this.else&&X(f,this.else.names),f}}y.kind="if";class g extends h{}g.kind="for";class k extends g{constructor(f){super(),this.iteration=f}render(f){return`for(${this.iteration})`+super.render(f)}optimizeNames(f,v){if(super.optimizeNames(f,v))return this.iteration=K(this.iteration,f,v),this}get names(){return X(super.names,this.iteration.names)}}class O extends g{constructor(f,v,E,F){super(),this.varKind=f,this.name=v,this.from=E,this.to=F}render(f){const v=f.es5?r.varKinds.var:this.varKind,{name:E,from:F,to:q}=this;return`for(${v} ${E}=${F}; ${E}<${q}; ${E}++)`+super.render(f)}get names(){const f=ne(super.names,this.from);return ne(f,this.to)}}class N extends g{constructor(f,v,E,F){super(),this.loop=f,this.varKind=v,this.name=E,this.iterable=F}render(f){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(f)}optimizeNames(f,v){if(super.optimizeNames(f,v))return this.iterable=K(this.iterable,f,v),this}get names(){return X(super.names,this.iterable.names)}}class L extends h{constructor(f,v,E){super(),this.name=f,this.args=v,this.async=E}render(f){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(f)}}L.kind="func";class Y extends p{render(f){return"return "+super.render(f)}}Y.kind="return";class pe extends h{render(f){let v="try"+super.render(f);return this.catch&&(v+=this.catch.render(f)),this.finally&&(v+=this.finally.render(f)),v}optimizeNodes(){var f,v;return super.optimizeNodes(),(f=this.catch)===null||f===void 0||f.optimizeNodes(),(v=this.finally)===null||v===void 0||v.optimizeNodes(),this}optimizeNames(f,v){var E,F;return super.optimizeNames(f,v),(E=this.catch)===null||E===void 0||E.optimizeNames(f,v),(F=this.finally)===null||F===void 0||F.optimizeNames(f,v),this}get names(){const f=super.names;return this.catch&&X(f,this.catch.names),this.finally&&X(f,this.finally.names),f}}class Ie extends h{constructor(f){super(),this.error=f}render(f){return`catch(${this.error})`+super.render(f)}}Ie.kind="catch";class Pe extends h{render(f){return"finally"+super.render(f)}}Pe.kind="finally";class M{constructor(f,v={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...v,_n:v.lines?`
72
- `:""},this._extScope=f,this._scope=new r.Scope({parent:f}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(f){return this._scope.name(f)}scopeName(f){return this._extScope.name(f)}scopeValue(f,v){const E=this._extScope.value(f,v);return(this._values[E.prefix]||(this._values[E.prefix]=new Set)).add(E),E}getScopeValue(f,v){return this._extScope.getValue(f,v)}scopeRefs(f){return this._extScope.scopeRefs(f,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(f,v,E,F){const q=this._scope.toName(v);return E!==void 0&&F&&(this._constants[q.str]=E),this._leafNode(new a(f,q,E)),q}const(f,v,E){return this._def(r.varKinds.const,f,v,E)}let(f,v,E){return this._def(r.varKinds.let,f,v,E)}var(f,v,E){return this._def(r.varKinds.var,f,v,E)}assign(f,v,E){return this._leafNode(new s(f,v,E))}add(f,v){return this._leafNode(new c(f,e.operators.ADD,v))}code(f){return typeof f=="function"?f():f!==t.nil&&this._leafNode(new m(f)),this}object(...f){const v=["{"];for(const[E,F]of f)v.length>1&&v.push(","),v.push(E),(E!==F||this.opts.es5)&&(v.push(":"),(0,t.addCodeArg)(v,F));return v.push("}"),new t._Code(v)}if(f,v,E){if(this._blockNode(new y(f)),v&&E)this.code(v).else().code(E).endIf();else if(v)this.code(v).endIf();else if(E)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(f){return this._elseNode(new y(f))}else(){return this._elseNode(new $)}endIf(){return this._endBlockNode(y,$)}_for(f,v){return this._blockNode(f),v&&this.code(v).endFor(),this}for(f,v){return this._for(new k(f),v)}forRange(f,v,E,F,q=this.opts.es5?r.varKinds.var:r.varKinds.let){const me=this._scope.toName(f);return this._for(new O(q,me,v,E),()=>F(me))}forOf(f,v,E,F=r.varKinds.const){const q=this._scope.toName(f);if(this.opts.es5){const me=v instanceof t.Name?v:this.var("_arr",v);return this.forRange("_i",0,(0,t._)`${me}.length`,de=>{this.var(q,(0,t._)`${me}[${de}]`),E(q)})}return this._for(new N("of",F,q,v),()=>E(q))}forIn(f,v,E,F=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(f,(0,t._)`Object.keys(${v})`,E);const q=this._scope.toName(f);return this._for(new N("in",F,q,v),()=>E(q))}endFor(){return this._endBlockNode(g)}label(f){return this._leafNode(new u(f))}break(f){return this._leafNode(new l(f))}return(f){const v=new Y;if(this._blockNode(v),this.code(f),v.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Y)}try(f,v,E){if(!v&&!E)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new pe;if(this._blockNode(F),this.code(f),v){const q=this.name("e");this._currNode=F.catch=new Ie(q),v(q)}return E&&(this._currNode=F.finally=new Pe,this.code(E)),this._endBlockNode(Ie,Pe)}throw(f){return this._leafNode(new d(f))}block(f,v){return this._blockStarts.push(this._nodes.length),f&&this.code(f).endBlock(v),this}endBlock(f){const v=this._blockStarts.pop();if(v===void 0)throw new Error("CodeGen: not in self-balancing block");const E=this._nodes.length-v;if(E<0||f!==void 0&&E!==f)throw new Error(`CodeGen: wrong number of nodes: ${E} vs ${f} expected`);return this._nodes.length=v,this}func(f,v=t.nil,E,F){return this._blockNode(new L(f,v,E)),F&&this.code(F).endFunc(),this}endFunc(){return this._endBlockNode(L)}optimize(f=1){for(;f-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(f){return this._currNode.nodes.push(f),this}_blockNode(f){this._currNode.nodes.push(f),this._nodes.push(f)}_endBlockNode(f,v){const E=this._currNode;if(E instanceof f||v&&E instanceof v)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${v?`${f.kind}/${v.kind}`:f.kind}"`)}_elseNode(f){const v=this._currNode;if(!(v instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=v.else=f,this}get _root(){return this._nodes[0]}get _currNode(){const f=this._nodes;return f[f.length-1]}set _currNode(f){const v=this._nodes;v[v.length-1]=f}}e.CodeGen=M;function X(P,f){for(const v in f)P[v]=(P[v]||0)+(f[v]||0);return P}function ne(P,f){return f instanceof t._CodeOrName?X(P,f.names):P}function K(P,f,v){if(P instanceof t.Name)return E(P);if(!F(P))return P;return new t._Code(P._items.reduce((q,me)=>(me instanceof t.Name&&(me=E(me)),me instanceof t._Code?q.push(...me._items):q.push(me),q),[]));function E(q){const me=v[q.str];return me===void 0||f[q.str]!==1?q:(delete f[q.str],me)}function F(q){return q instanceof t._Code&&q._items.some(me=>me instanceof t.Name&&f[me.str]===1&&v[me.str]!==void 0)}}function Ee(P,f){for(const v in f)P[v]=(P[v]||0)-(f[v]||0)}function ot(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${j(P)}`}e.not=ot;const at=I(e.operators.AND);function Gt(...P){return P.reduce(at)}e.and=Gt;const Ot=I(e.operators.OR);function A(...P){return P.reduce(Ot)}e.or=A;function I(P){return(f,v)=>f===t.nil?v:v===t.nil?f:(0,t._)`${j(f)} ${P} ${j(v)}`}function j(P){return P instanceof t.Name?P:(0,t._)`(${P})`}})(ce);var Z={};Object.defineProperty(Z,"__esModule",{value:!0}),Z.checkStrictMode=Z.getErrorPath=Z.Type=Z.useFunc=Z.setEvaluated=Z.evaluatedPropsToName=Z.mergeEvaluated=Z.eachItem=Z.unescapeJsonPointer=Z.escapeJsonPointer=Z.escapeFragment=Z.unescapeFragment=Z.schemaRefOrVal=Z.schemaHasRulesButRef=Z.schemaHasRules=Z.checkUnknownRules=Z.alwaysValidSchema=Z.toHash=void 0;const Se=ce,Fw=$r;function Gw(e){const t={};for(const r of e)t[r]=!0;return t}Z.toHash=Gw;function Lw(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Hh(e,t),!Wh(t,e.self.RULES.all))}Z.alwaysValidSchema=Lw;function Hh(e,t=e.schema){const{opts:r,self:i}=e;if(!r.strictSchema||typeof t=="boolean")return;const n=i.RULES.keywords;for(const o in t)n[o]||tg(e,`unknown keyword: "${o}"`)}Z.checkUnknownRules=Hh;function Wh(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}Z.schemaHasRules=Wh;function Vw(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Z.schemaHasRulesButRef=Vw;function Bw({topSchemaRef:e,schemaPath:t},r,i,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Se._)`${r}`}return(0,Se._)`${e}${t}${(0,Se.getProperty)(i)}`}Z.schemaRefOrVal=Bw;function qw(e){return Xh(decodeURIComponent(e))}Z.unescapeFragment=qw;function Jw(e){return encodeURIComponent(oc(e))}Z.escapeFragment=Jw;function oc(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Z.escapeJsonPointer=oc;function Xh(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Z.unescapeJsonPointer=Xh;function Kw(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}Z.eachItem=Kw;function Yh({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(n,o,a,s)=>{const c=a===void 0?o:a instanceof Se.Name?(o instanceof Se.Name?e(n,o,a):t(n,o,a),a):o instanceof Se.Name?(t(n,a,o),o):r(o,a);return s===Se.Name&&!(c instanceof Se.Name)?i(n,c):c}}Z.mergeEvaluated={props:Yh({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Se._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Se._)`${r} || {}`).code((0,Se._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Se._)`${r} || {}`),ac(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Qh}),items:Yh({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Se._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Se._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Qh(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,Se._)`{}`);return t!==void 0&&ac(e,r,t),r}Z.evaluatedPropsToName=Qh;function ac(e,t,r){Object.keys(r).forEach(i=>e.assign((0,Se._)`${t}${(0,Se.getProperty)(i)}`,!0))}Z.setEvaluated=ac;const eg={};function Hw(e,t){return e.scopeValue("func",{ref:t,code:eg[t.code]||(eg[t.code]=new Fw._Code(t.code))})}Z.useFunc=Hw;var sc;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(sc||(Z.Type=sc={}));function Ww(e,t,r){if(e instanceof Se.Name){const i=t===sc.Num;return r?i?(0,Se._)`"[" + ${e} + "]"`:(0,Se._)`"['" + ${e} + "']"`:i?(0,Se._)`"/" + ${e}`:(0,Se._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Se.getProperty)(e).toString():"/"+oc(e)}Z.getErrorPath=Ww;function tg(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}Z.checkStrictMode=tg;var qi={},ng;function Rt(){if(ng)return qi;ng=1,Object.defineProperty(qi,"__esModule",{value:!0});const e=ce,t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return qi.default=t,qi}var rg;function Ji(){return rg||(rg=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ce,r=Z,i=Rt();e.keywordError={message:({keyword:$})=>(0,t.str)`must pass "${$}" keyword validation`},e.keyword$DataError={message:({keyword:$,schemaType:y})=>y?(0,t.str)`"${$}" keyword must be ${y} ($data)`:(0,t.str)`"${$}" keyword is invalid ($data)`};function n($,y=e.keywordError,g,k){const{it:O}=$,{gen:N,compositeRule:L,allErrors:Y}=O,pe=d($,y,g);k??(L||Y)?c(N,pe):u(O,(0,t._)`[${pe}]`)}e.reportError=n;function o($,y=e.keywordError,g){const{it:k}=$,{gen:O,compositeRule:N,allErrors:L}=k,Y=d($,y,g);c(O,Y),N||L||u(k,i.default.vErrors)}e.reportExtraError=o;function a($,y){$.assign(i.default.errors,y),$.if((0,t._)`${i.default.vErrors} !== null`,()=>$.if(y,()=>$.assign((0,t._)`${i.default.vErrors}.length`,y),()=>$.assign(i.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:$,keyword:y,schemaValue:g,data:k,errsCount:O,it:N}){if(O===void 0)throw new Error("ajv implementation error");const L=$.name("err");$.forRange("i",O,i.default.errors,Y=>{$.const(L,(0,t._)`${i.default.vErrors}[${Y}]`),$.if((0,t._)`${L}.instancePath === undefined`,()=>$.assign((0,t._)`${L}.instancePath`,(0,t.strConcat)(i.default.instancePath,N.errorPath))),$.assign((0,t._)`${L}.schemaPath`,(0,t.str)`${N.errSchemaPath}/${y}`),N.opts.verbose&&($.assign((0,t._)`${L}.schema`,g),$.assign((0,t._)`${L}.data`,k))})}e.extendErrors=s;function c($,y){const g=$.const("err",y);$.if((0,t._)`${i.default.vErrors} === null`,()=>$.assign(i.default.vErrors,(0,t._)`[${g}]`),(0,t._)`${i.default.vErrors}.push(${g})`),$.code((0,t._)`${i.default.errors}++`)}function u($,y){const{gen:g,validateName:k,schemaEnv:O}=$;O.$async?g.throw((0,t._)`new ${$.ValidationError}(${y})`):(g.assign((0,t._)`${k}.errors`,y),g.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d($,y,g){const{createErrors:k}=$.it;return k===!1?(0,t._)`{}`:m($,y,g)}function m($,y,g={}){const{gen:k,it:O}=$,N=[p(O,g),h($,g)];return b($,y,N),k.object(...N)}function p({errorPath:$},{instancePath:y}){const g=y?(0,t.str)`${$}${(0,r.getErrorPath)(y,r.Type.Str)}`:$;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,g)]}function h({keyword:$,it:{errSchemaPath:y}},{schemaPath:g,parentSchema:k}){let O=k?y:(0,t.str)`${y}/${$}`;return g&&(O=(0,t.str)`${O}${(0,r.getErrorPath)(g,r.Type.Str)}`),[l.schemaPath,O]}function b($,{params:y,message:g},k){const{keyword:O,data:N,schemaValue:L,it:Y}=$,{opts:pe,propertyName:Ie,topSchemaRef:Pe,schemaPath:M}=Y;k.push([l.keyword,O],[l.params,typeof y=="function"?y($):y||(0,t._)`{}`]),pe.messages&&k.push([l.message,typeof g=="function"?g($):g]),pe.verbose&&k.push([l.schema,L],[l.parentSchema,(0,t._)`${Pe}${M}`],[i.default.data,N]),Ie&&k.push([l.propertyName,Ie])}})(rc)),rc}var ig;function Xw(){if(ig)return Xt;ig=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.boolOrEmptySchema=Xt.topBoolOrEmptySchema=void 0;const e=Ji(),t=ce,r=Rt(),i={message:"boolean schema is false"};function n(s){const{gen:c,schema:u,validateName:l}=s;u===!1?a(s,!1):typeof u=="object"&&u.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${l}.errors`,null),c.return(!0))}Xt.topBoolOrEmptySchema=n;function o(s,c){const{gen:u,schema:l}=s;l===!1?(u.var(c,!1),a(s)):u.var(c,!0)}Xt.boolOrEmptySchema=o;function a(s,c){const{gen:u,data:l}=s,d={gen:u,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:s};(0,e.reportError)(d,i,void 0,c)}return Xt}var je={},Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.getRules=Yt.isJSONType=void 0;const Yw=["string","number","integer","boolean","null","object","array"],Qw=new Set(Yw);function eS(e){return typeof e=="string"&&Qw.has(e)}Yt.isJSONType=eS;function tS(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Yt.getRules=tS;var Nt={},og;function ag(){if(og)return Nt;og=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.shouldUseRule=Nt.shouldUseGroup=Nt.schemaHasRulesForType=void 0;function e({schema:i,self:n},o){const a=n.RULES.types[o];return a&&a!==!0&&t(i,a)}Nt.schemaHasRulesForType=e;function t(i,n){return n.rules.some(o=>r(i,o))}Nt.shouldUseGroup=t;function r(i,n){var o;return i[n.keyword]!==void 0||((o=n.definition.implements)===null||o===void 0?void 0:o.some(a=>i[a]!==void 0))}return Nt.shouldUseRule=r,Nt}Object.defineProperty(je,"__esModule",{value:!0}),je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;const nS=Yt,rS=ag(),iS=Ji(),oe=ce,sg=Z;var kn;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(kn||(je.DataType=kn={}));function oS(e){const t=cg(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}je.getSchemaTypes=oS;function cg(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(nS.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}je.getJSONTypes=cg;function aS(e,t){const{gen:r,data:i,opts:n}=e,o=sS(t,n.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,rS.schemaHasRulesForType)(e,t[0]));if(a){const s=uc(t,i,n.strictNumbers,kn.Wrong);r.if(s,()=>{o.length?cS(e,t,o):lc(e)})}return a}je.coerceAndCheckDataType=aS;const ug=new Set(["string","number","integer","boolean","null"]);function sS(e,t){return t?e.filter(r=>ug.has(r)||t==="array"&&r==="array"):[]}function cS(e,t,r){const{gen:i,data:n,opts:o}=e,a=i.let("dataType",(0,oe._)`typeof ${n}`),s=i.let("coerced",(0,oe._)`undefined`);o.coerceTypes==="array"&&i.if((0,oe._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,oe._)`${n}[0]`).assign(a,(0,oe._)`typeof ${n}`).if(uc(t,n,o.strictNumbers),()=>i.assign(s,n))),i.if((0,oe._)`${s} !== undefined`);for(const u of r)(ug.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);i.else(),lc(e),i.endIf(),i.if((0,oe._)`${s} !== undefined`,()=>{i.assign(n,s),uS(e,s)});function c(u){switch(u){case"string":i.elseIf((0,oe._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,oe._)`"" + ${n}`).elseIf((0,oe._)`${n} === null`).assign(s,(0,oe._)`""`);return;case"number":i.elseIf((0,oe._)`${a} == "boolean" || ${n} === null
71
+ ]`;continue}n+=i[c],i[c]==="\\"?o=!0:a&&i[c]==="]"?a=!1:!a&&i[c]==="["&&(a=!0)}try{new RegExp(n)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return n}function Mh(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===te.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((i,n)=>({...i,[n]:ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??Xe(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};const r={type:"object",additionalProperties:ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===te.ZodString&&e.keyType._def.checks?.length){const{type:i,...n}=Zh(e.keyType._def,t);return{...r,propertyNames:n}}else{if(e.keyType?._def.typeName===te.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===te.ZodBranded&&e.keyType._def.type._def.typeName===te.ZodString&&e.keyType._def.type._def.checks?.length){const{type:i,...n}=Rh(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function hk(e,t){if(t.mapStrategy==="record")return Mh(e,t);const r=ge(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Xe(t),i=ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Xe(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,i],minItems:2,maxItems:2}}}function gk(e){const t=e.values,i=Object.keys(e.values).filter(o=>typeof t[t[o]]!="number").map(o=>t[o]),n=Array.from(new Set(i.map(o=>typeof o)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:i}}function vk(e){return e.target==="openAi"?void 0:{not:Xe({...e,currentPath:[...e.currentPath,"not"]})}}function yk(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const Bi={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function _k(e,t){if(t.target==="openApi3")return Gh(e,t);const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(i=>i._def.typeName in Bi&&(!i._def.checks||!i._def.checks.length))){const i=r.reduce((n,o)=>{const a=Bi[o._def.typeName];return a&&!n.includes(a)?[...n,a]:n},[]);return{type:i.length>1?i:i[0]}}else if(r.every(i=>i._def.typeName==="ZodLiteral"&&!i.description)){const i=r.reduce((n,o)=>{const a=typeof o._def.value;switch(a){case"string":case"number":case"boolean":return[...n,a];case"bigint":return[...n,"integer"];case"object":if(o._def.value===null)return[...n,"null"];default:return n}},[]);if(i.length===r.length){const n=i.filter((o,a,s)=>s.indexOf(o)===a);return{type:n.length>1?n:n[0],enum:r.reduce((o,a)=>o.includes(a._def.value)?o:[...o,a._def.value],[])}}}else if(r.every(i=>i._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((i,n)=>[...i,...n._def.values.filter(o=>!i.includes(o))],[])};return Gh(e,t)}const Gh=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((i,n)=>ge(i._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(i=>!!i&&(!t.strictUnions||typeof i=="object"&&Object.keys(i).length>0));return r.length?{anyOf:r}:void 0};function $k(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:Bi[e.innerType._def.typeName],nullable:!0}:{type:[Bi[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const i=ge(e.innerType._def,{...t,currentPath:[...t.currentPath]});return i&&"$ref"in i?{allOf:[i],nullable:!0}:i&&{...i,nullable:!0}}const r=ge(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function bk(e,t){const r={type:"number"};if(!e.checks)return r;for(const i of e.checks)switch(i.kind){case"int":r.type="integer",Dh(r,"type",i.message,t);break;case"min":t.target==="jsonSchema7"?i.inclusive?ve(r,"minimum",i.value,i.message,t):ve(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),ve(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?ve(r,"maximum",i.value,i.message,t):ve(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),ve(r,"maximum",i.value,i.message,t));break;case"multipleOf":ve(r,"multipleOf",i.value,i.message,t);break}return r}function wk(e,t){const r=t.target==="openAi",i={type:"object",properties:{}},n=[],o=e.shape();for(const s in o){let c=o[s];if(c===void 0||c._def===void 0)continue;let u=Sk(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);const l=ge(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});l!==void 0&&(i.properties[s]=l,u||n.push(s))}n.length&&(i.required=n);const a=kk(e,t);return a!==void 0&&(i.additionalProperties=a),i}function kk(e,t){if(e.catchall._def.typeName!=="ZodNever")return ge(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function Sk(e){try{return e.isOptional()}catch{return!0}}const Ik=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return ge(e.innerType._def,t);const r=ge(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Xe(t)},r]}:Xe(t)},Ok=(e,t)=>{if(t.pipeStrategy==="input")return ge(e.in._def,t);if(t.pipeStrategy==="output")return ge(e.out._def,t);const r=ge(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),i=ge(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,i].filter(n=>n!==void 0)}};function Tk(e,t){return ge(e.type._def,t)}function Pk(e,t){const i={type:"array",uniqueItems:!0,items:ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ve(i,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ve(i,"maxItems",e.maxSize.value,e.maxSize.message,t),i}function Ek(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,i)=>ge(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[]),additionalItems:ge(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,i)=>ge(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[])}}function zk(e){return{not:Xe(e)}}function xk(e){return Xe(e)}const Nk=(e,t)=>ge(e.innerType._def,t),jk=(e,t,r)=>{switch(t){case te.ZodString:return Zh(e,r);case te.ZodNumber:return bk(e,r);case te.ZodObject:return wk(e,r);case te.ZodBigInt:return rk(e,r);case te.ZodBoolean:return ik();case te.ZodDate:return Uh(e,r);case te.ZodUndefined:return zk(r);case te.ZodNull:return yk(r);case te.ZodArray:return nk(e,r);case te.ZodUnion:case te.ZodDiscriminatedUnion:return _k(e,r);case te.ZodIntersection:return dk(e,r);case te.ZodTuple:return Ek(e,r);case te.ZodRecord:return Mh(e,r);case te.ZodLiteral:return pk(e,r);case te.ZodEnum:return uk(e);case te.ZodNativeEnum:return gk(e);case te.ZodNullable:return $k(e,r);case te.ZodOptional:return Ik(e,r);case te.ZodMap:return hk(e,r);case te.ZodSet:return Pk(e,r);case te.ZodLazy:return()=>e.getter()._def;case te.ZodPromise:return Tk(e,r);case te.ZodNaN:case te.ZodNever:return vk(r);case te.ZodEffects:return ck(e,r);case te.ZodAny:return Xe(r);case te.ZodUnknown:return xk(r);case te.ZodDefault:return sk(e,r);case te.ZodBranded:return Rh(e,r);case te.ZodReadonly:return Nk(e,r);case te.ZodCatch:return ok(e,r);case te.ZodPipeline:return Ok(e,r);case te.ZodFunction:case te.ZodVoid:case te.ZodSymbol:return;default:return(i=>{})()}};function ge(e,t,r=!1){const i=t.seen.get(e);if(t.override){const s=t.override?.(e,t,i,r);if(s!==Yw)return s}if(i&&!r){const s=Ck(i,t);if(s!==void 0)return s}const n={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,n);const o=jk(e,e.typeName,t),a=typeof o=="function"?ge(o(),t):o;if(a&&Dk(e,t,a),t.postProcess){const s=t.postProcess(a,e,t);return n.jsonSchema=a,s}return n.jsonSchema=a,a}const Ck=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Ah(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,i)=>t.currentPath[i]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Xe(t)):t.$refStrategy==="seen"?Xe(t):void 0}},Dk=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r),Ak=(e,t)=>{const r=tk(t);let i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:ge(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Xe(r)}),{}):void 0;const n=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=ge(e._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??Xe(r),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(o.title=a),r.flags.hasReferencedOpenAiAnyType&&(i||(i={}),i[r.openAiAnyTypeName]||(i[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));const s=n===void 0?i?{...o,[r.definitionPath]:i}:o:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...i,[n]:o}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function Rk(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Lh(e,t){return Et(e)?Pa(e,{target:Rk(t?.target),io:t?.pipeStrategy??"input"}):Ak(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Vh(e){const r=pr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=Is(r);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Bh(e,t){const r=dr(e,t);if(!r.success)throw r.error;return r.data}const Uk=6e4;class Zk{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(zs,r=>{this._oncancel(r)}),this.setNotificationHandler(Ns,r=>{this._onprogress(r)}),this.setRequestHandler(xs,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(js,async(r,i)=>{const n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new B(H.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(Ds,async(r,i)=>{const n=async()=>{const o=r.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(o,i.sessionId);){if(s.type==="response"||s.type==="error"){const c=s.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),s.type==="response")l(c);else{const d=c,m=new B(d.error.code,d.error.message,d.error.data);l(m)}else{const 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})}}const a=await this._taskStore.getTask(o,i.sessionId);if(!a)throw new B(H.InvalidParams,`Task not found: ${o}`);if(!Wt(a.status))return await this._waitForTaskUpdate(o,i.signal),await n();if(Wt(a.status)){const s=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o),{...s,_meta:{...s._meta,[Ht]:{taskId:o}}}}return await n()};return await n()}),this.setRequestHandler(As,async(r,i)=>{try{const{tasks:n,nextCursor:o}=await this._taskStore.listTasks(r.params?.cursor,i.sessionId);return{tasks:n,nextCursor:o,_meta:{}}}catch(n){throw new B(H.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(Us,async(r,i)=>{try{const n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new B(H.InvalidParams,`Task not found: ${r.params.taskId}`);if(Wt(n.status))throw new B(H.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(r.params.taskId);const o=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!o)throw new B(H.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...o}}catch(n){throw n instanceof B?n:new B(H.InvalidRequest,`Failed to cancel task: ${n instanceof Error?n.message:String(n)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,i,n,o=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(n,r),startTime:Date.now(),timeout:r,maxTotalTimeout:i,resetTimeoutOnProgress:o,onTimeout:n})}_resetTimeout(t){const r=this._timeoutInfo.get(t);if(!r)return!1;const i=Date.now()-r.startTime;if(r.maxTotalTimeout&&i>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),B.fromError(H.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:i});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){const r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;const r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};const i=this.transport?.onerror;this._transport.onerror=o=>{i?.(o),this._onerror(o)};const n=this._transport?.onmessage;this._transport.onmessage=(o,a)=>{n?.(o,a),Ui(o)||kb(o)?this._onresponse(o):bh(o)?this._onrequest(o,a):wb(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();for(const i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();const r=B.fromError(H.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const i of t.values())i(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){const r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,r){const i=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,n=this._transport,o=t.params?._meta?.[Ht]?.taskId;if(i===void 0){const l={jsonrpc:"2.0",id:t.id,error:{code:H.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:l,timestamp:Date.now()},n?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):n?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}const a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);const s=bb(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,n?.sessionId):void 0,u={signal:a.signal,sessionId:n?.sessionId,_meta:t.params?._meta,sendNotification:async l=>{if(a.signal.aborted)return;const d={relatedRequestId:t.id};o&&(d.relatedTask={taskId:o}),await this.notification(l,d)},sendRequest:async(l,d,m)=>{if(a.signal.aborted)throw new B(H.ConnectionClosed,"Request was cancelled");const p={...m,relatedRequestId:t.id};o&&!p.relatedTask&&(p.relatedTask={taskId:o});const h=p.relatedTask?.taskId??o;return h&&c&&await c.updateTaskStatus(h,"input_required"),await this.request(l,d,p)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:o,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,u)).then(async l=>{if(a.signal.aborted)return;const d={result:l,jsonrpc:"2.0",id:t.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:d,timestamp:Date.now()},n?.sessionId):await n?.send(d)},async l=>{if(a.signal.aborted)return;const d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(l.code)?l.code:H.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},n?.sessionId):await n?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===a&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:r,...i}=t.params,n=Number(r),o=this._progressHandlers.get(n);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const a=this._responseHandlers.get(n),s=this._timeoutInfo.get(n);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(c){this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),a(c);return}o(i)}_onresponse(t){const r=Number(t.id),i=this._requestResolvers.get(r);if(i){if(this._requestResolvers.delete(r),Ui(t))i(t);else{const a=new B(t.error.code,t.error.message,t.error.data);i(a)}return}const n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let o=!1;if(Ui(t)&&t.result&&typeof t.result=="object"){const a=t.result;if(a.task&&typeof a.task=="object"){const s=a.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,r))}}if(o||this._progressHandlers.delete(r),Ui(t))n(t);else{const a=B.fromError(t.error.code,t.error.message,t.error.data);n(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,i){const{task:n}=i??{};if(!n){try{yield{type:"result",result:await this.request(t,r,i)}}catch(a){yield{type:"error",error:a instanceof B?a:new B(H.InternalError,String(a))}}return}let o;try{const a=await this.request(t,Zi,i);if(a.task)o=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new B(H.InternalError,"Task creation did not return a task");for(;;){const s=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:s},Wt(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},r,i)}:s.status==="failed"?yield{type:"error",error:new B(H.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new B(H.InternalError,`Task ${o} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},r,i)};return}const 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(H.InternalError,String(a))}}}request(t,r,i){const{relatedRequestId:n,resumptionToken:o,onresumptiontoken:a,task:s,relatedTask:c}=i??{};return new Promise((u,l)=>{const d=g=>{l(g)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch(g){d(g);return}i?.signal?.throwIfAborted();const m=this._requestMessageId++,p={...t,jsonrpc:"2.0",id:m};i?.onprogress&&(this._progressHandlers.set(m,i.onprogress),p.params={...t.params,_meta:{...t.params?._meta||{},progressToken:m}}),s&&(p.params={...p.params,task:s}),c&&(p.params={...p.params,_meta:{...p.params?._meta||{},[Ht]:c}});const h=g=>{this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(g)}},{relatedRequestId:n,resumptionToken:o,onresumptiontoken:a}).catch(O=>this._onerror(new Error(`Failed to send cancellation: ${O}`)));const w=g instanceof B?g:new B(H.RequestTimeout,String(g));l(w)};this._responseHandlers.set(m,g=>{if(!i?.signal?.aborted){if(g instanceof Error)return l(g);try{const w=dr(r,g.result);w.success?u(w.data):l(w.error)}catch(w){l(w)}}}),i?.signal?.addEventListener("abort",()=>{h(i?.signal?.reason)});const b=i?.timeout??Uk,$=()=>h(B.fromError(H.RequestTimeout,"Request timed out",{timeout:b}));this._setupTimeout(m,b,i?.maxTotalTimeout,$,i?.resetTimeoutOnProgress??!1);const y=c?.taskId;if(y){const g=w=>{const O=this._responseHandlers.get(m);O?O(w):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))};this._requestResolvers.set(m,g),this._enqueueTaskMessage(y,{type:"request",message:p,timestamp:Date.now()}).catch(w=>{this._cleanupTimeout(m),l(w)})}else this._transport.send(p,{relatedRequestId:n,resumptionToken:o,onresumptiontoken:a}).catch(g=>{this._cleanupTimeout(m),l(g)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},Cs,r)}async getTaskResult(t,r,i){return this.request({method:"tasks/result",params:t},r,i)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},Rs,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},Fb,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const i=r?.relatedTask?.taskId;if(i){const s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Ht]:r.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Ht]:r.relatedTask}}}),this._transport?.send(s,r).catch(c=>this._onerror(c))});return}let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Ht]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(t,r){const i=Vh(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(n,o)=>{const a=Bh(t,n);return Promise.resolve(r(a,o))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){const i=Vh(t);this._notificationHandlers.set(i,n=>{const o=Bh(t,n);return Promise.resolve(r(o))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const n=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,i,n)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){const i=await this._taskMessageQueue.dequeueAll(t,r);for(const n of i)if(n.type==="request"&&bh(n.message)){const o=n.message.id,a=this._requestResolvers.get(o);a?(a(new B(H.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let i=this._options?.defaultTaskPollInterval??1e3;try{const n=await this._taskStore?.getTask(t);n?.pollInterval&&(i=n.pollInterval)}catch{}return new Promise((n,o)=>{if(r.aborted){o(new B(H.InvalidRequest,"Request cancelled"));return}const a=setTimeout(n,i);r.addEventListener("abort",()=>{clearTimeout(a),o(new B(H.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){const i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async n=>{if(!t)throw new Error("No request provided");return await i.createTask(n,t.id,{method:t.method,params:t.params},r)},getTask:async n=>{const o=await i.getTask(n,r);if(!o)throw new B(H.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(n,o,a)=>{await i.storeTaskResult(n,o,a,r);const s=await i.getTask(n,r);if(s){const c=Fi.parse({method:"notifications/tasks/status",params:s});await this.notification(c),Wt(s.status)&&this._cleanupTaskProgressHandler(n)}},getTaskResult:n=>i.getTaskResult(n,r),updateTaskStatus:async(n,o,a)=>{const s=await i.getTask(n,r);if(!s)throw new B(H.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(Wt(s.status))throw new B(H.InvalidParams,`Cannot update task "${n}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(n,o,a,r);const c=await i.getTask(n,r);if(c){const u=Fi.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Wt(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>i.listTasks(n,r)}}}function qh(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Fk(e,t){const r={...e};for(const i in t){const n=i,o=t[n];if(o===void 0)continue;const a=r[n];qh(a)&&qh(o)?r[n]={...a,...o}:r[n]=o}return r}function Jh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nc={exports:{}},Kh={},zt={},Xt={},rc={},ce={},$r={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(g){if(super(),!e.IDENTIFIER.test(g))throw new Error("CodeGen: name must be a valid identifier");this.str=g}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(g){super(),this._items=typeof g=="string"?[g]:g}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const g=this._items[0];return g===""||g==='""'}get str(){var g;return(g=this._str)!==null&&g!==void 0?g:this._str=this._items.reduce((w,O)=>`${w}${O}`,"")}get names(){var g;return(g=this._names)!==null&&g!==void 0?g:this._names=this._items.reduce((w,O)=>(O instanceof r&&(w[O.str]=(w[O.str]||0)+1),w),{})}}e._Code=i,e.nil=new i("");function n(y,...g){const w=[y[0]];let O=0;for(;O<g.length;)s(w,g[O]),w.push(y[++O]);return new i(w)}e._=n;const o=new i("+");function a(y,...g){const w=[p(y[0])];let O=0;for(;O<g.length;)w.push(o),s(w,g[O]),w.push(o,p(y[++O]));return c(w),new i(w)}e.str=a;function s(y,g){g instanceof i?y.push(...g._items):g instanceof r?y.push(g):y.push(d(g))}e.addCodeArg=s;function c(y){let g=1;for(;g<y.length-1;){if(y[g]===o){const w=u(y[g-1],y[g+1]);if(w!==void 0){y.splice(g-1,3,w);continue}y[g++]="+"}g++}}function u(y,g){if(g==='""')return y;if(y==='""')return g;if(typeof y=="string")return g instanceof r||y[y.length-1]!=='"'?void 0:typeof g!="string"?`${y.slice(0,-1)}${g}"`:g[0]==='"'?y.slice(0,-1)+g.slice(1):void 0;if(typeof g=="string"&&g[0]==='"'&&!(y instanceof r))return`"${y}${g.slice(1)}`}function l(y,g){return g.emptyStr()?y:y.emptyStr()?g:a`${y}${g}`}e.strConcat=l;function d(y){return typeof y=="number"||typeof y=="boolean"||y===null?y:p(Array.isArray(y)?y.join(","):y)}function m(y){return new i(p(y))}e.stringify=m;function p(y){return JSON.stringify(y).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=p;function h(y){return typeof y=="string"&&e.IDENTIFIER.test(y)?new i(`.${y}`):n`[${y}]`}e.getProperty=h;function b(y){if(typeof y=="string"&&e.IDENTIFIER.test(y))return new i(`${y}`);throw new Error(`CodeGen: invalid export name: ${y}, use explicit $id name mapping`)}e.getEsmExportName=b;function $(y){return new i(y.toString())}e.regexpCode=$})($r);var ic={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=$r;class r extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var i;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:u,parent:l}={}){this._names={},this._prefixes=u,this._parent=l}toName(u){return u instanceof t.Name?u:this.name(u)}name(u){return new t.Name(this._newName(u))}_newName(u){const l=this._names[u]||this._nameGroup(u);return`${u}${l.index++}`}_nameGroup(u){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}e.Scope=n;class o extends t.Name{constructor(u,l){super(l),this.prefix=u}setValue(u,{property:l,itemIndex:d}){this.value=u,this.scopePath=(0,t._)`.${new t.Name(l)}[${d}]`}}e.ValueScopeName=o;const a=(0,t._)`\n`;class s extends n{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:t.nil}}get(){return this._scope}name(u){return new o(u,this._newName(u))}value(u,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(u),{prefix:p}=m,h=(d=l.key)!==null&&d!==void 0?d:l.ref;let b=this._values[p];if(b){const g=b.get(h);if(g)return g}else b=this._values[p]=new Map;b.set(h,m);const $=this._scope[p]||(this._scope[p]=[]),y=$.length;return $[y]=l.ref,m.setValue(l,{property:p,itemIndex:y}),m}getValue(u,l){const d=this._values[u];if(d)return d.get(l)}scopeRefs(u,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${u}${d.scopePath}`})}scopeCode(u=this._values,l,d){return this._reduceValues(u,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},l,d)}_reduceValues(u,l,d={},m){let p=t.nil;for(const h in u){const b=u[h];if(!b)continue;const $=d[h]=d[h]||new Map;b.forEach(y=>{if($.has(y))return;$.set(y,i.Started);let g=l(y);if(g){const w=this.opts.es5?e.varKinds.var:e.varKinds.const;p=(0,t._)`${p}${w} ${y} = ${g};${this.opts._n}`}else if(g=m?.(y))p=(0,t._)`${p}${g}${this.opts._n}`;else throw new r(y);$.set(y,i.Completed)})}return p}}e.ValueScope=s})(ic),(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=$r,r=ic;var i=$r;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var n=ic;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(f,v){return this}}class a extends o{constructor(f,v,E){super(),this.varKind=f,this.name=v,this.rhs=E}render({es5:f,_n:v}){const E=f?r.varKinds.var:this.varKind,M=this.rhs===void 0?"":` = ${this.rhs}`;return`${E} ${this.name}${M};`+v}optimizeNames(f,v){if(f[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,f,v)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends o{constructor(f,v,E){super(),this.lhs=f,this.rhs=v,this.sideEffects=E}render({_n:f}){return`${this.lhs} = ${this.rhs};`+f}optimizeNames(f,v){if(!(this.lhs instanceof t.Name&&!f[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,f,v),this}get names(){const f=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ne(f,this.rhs)}}class c extends s{constructor(f,v,E,M){super(f,E,M),this.op=v}render({_n:f}){return`${this.lhs} ${this.op}= ${this.rhs};`+f}}class u extends o{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`${this.label}:`+f}}class l extends o{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`break${this.label?` ${this.label}`:""};`+f}}class d extends o{constructor(f){super(),this.error=f}render({_n:f}){return`throw ${this.error};`+f}get names(){return this.error.names}}class m extends o{constructor(f){super(),this.code=f}render({_n:f}){return`${this.code};`+f}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(f,v){return this.code=K(this.code,f,v),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class p extends o{constructor(f=[]){super(),this.nodes=f}render(f){return this.nodes.reduce((v,E)=>v+E.render(f),"")}optimizeNodes(){const{nodes:f}=this;let v=f.length;for(;v--;){const E=f[v].optimizeNodes();Array.isArray(E)?f.splice(v,1,...E):E?f[v]=E:f.splice(v,1)}return f.length>0?this:void 0}optimizeNames(f,v){const{nodes:E}=this;let M=E.length;for(;M--;){const q=E[M];q.optimizeNames(f,v)||(Ee(f,q.names),E.splice(M,1))}return E.length>0?this:void 0}get names(){return this.nodes.reduce((f,v)=>X(f,v.names),{})}}class h extends p{render(f){return"{"+f._n+super.render(f)+"}"+f._n}}class b extends p{}class $ extends h{}$.kind="else";class y extends h{constructor(f,v){super(v),this.condition=f}render(f){let v=`if(${this.condition})`+super.render(f);return this.else&&(v+="else "+this.else.render(f)),v}optimizeNodes(){super.optimizeNodes();const f=this.condition;if(f===!0)return this.nodes;let v=this.else;if(v){const E=v.optimizeNodes();v=this.else=Array.isArray(E)?new $(E):E}if(v)return f===!1?v instanceof y?v:v.nodes:this.nodes.length?this:new y(ot(f),v instanceof y?[v]:v.nodes);if(!(f===!1||!this.nodes.length))return this}optimizeNames(f,v){var E;if(this.else=(E=this.else)===null||E===void 0?void 0:E.optimizeNames(f,v),!!(super.optimizeNames(f,v)||this.else))return this.condition=K(this.condition,f,v),this}get names(){const f=super.names;return ne(f,this.condition),this.else&&X(f,this.else.names),f}}y.kind="if";class g extends h{}g.kind="for";class w extends g{constructor(f){super(),this.iteration=f}render(f){return`for(${this.iteration})`+super.render(f)}optimizeNames(f,v){if(super.optimizeNames(f,v))return this.iteration=K(this.iteration,f,v),this}get names(){return X(super.names,this.iteration.names)}}class O extends g{constructor(f,v,E,M){super(),this.varKind=f,this.name=v,this.from=E,this.to=M}render(f){const v=f.es5?r.varKinds.var:this.varKind,{name:E,from:M,to:q}=this;return`for(${v} ${E}=${M}; ${E}<${q}; ${E}++)`+super.render(f)}get names(){const f=ne(super.names,this.from);return ne(f,this.to)}}class x extends g{constructor(f,v,E,M){super(),this.loop=f,this.varKind=v,this.name=E,this.iterable=M}render(f){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(f)}optimizeNames(f,v){if(super.optimizeNames(f,v))return this.iterable=K(this.iterable,f,v),this}get names(){return X(super.names,this.iterable.names)}}class L extends h{constructor(f,v,E){super(),this.name=f,this.args=v,this.async=E}render(f){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(f)}}L.kind="func";class Q extends p{render(f){return"return "+super.render(f)}}Q.kind="return";class pe extends h{render(f){let v="try"+super.render(f);return this.catch&&(v+=this.catch.render(f)),this.finally&&(v+=this.finally.render(f)),v}optimizeNodes(){var f,v;return super.optimizeNodes(),(f=this.catch)===null||f===void 0||f.optimizeNodes(),(v=this.finally)===null||v===void 0||v.optimizeNodes(),this}optimizeNames(f,v){var E,M;return super.optimizeNames(f,v),(E=this.catch)===null||E===void 0||E.optimizeNames(f,v),(M=this.finally)===null||M===void 0||M.optimizeNames(f,v),this}get names(){const f=super.names;return this.catch&&X(f,this.catch.names),this.finally&&X(f,this.finally.names),f}}class Ie extends h{constructor(f){super(),this.error=f}render(f){return`catch(${this.error})`+super.render(f)}}Ie.kind="catch";class Pe extends h{render(f){return"finally"+super.render(f)}}Pe.kind="finally";class F{constructor(f,v={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...v,_n:v.lines?`
72
+ `:""},this._extScope=f,this._scope=new r.Scope({parent:f}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(f){return this._scope.name(f)}scopeName(f){return this._extScope.name(f)}scopeValue(f,v){const E=this._extScope.value(f,v);return(this._values[E.prefix]||(this._values[E.prefix]=new Set)).add(E),E}getScopeValue(f,v){return this._extScope.getValue(f,v)}scopeRefs(f){return this._extScope.scopeRefs(f,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(f,v,E,M){const q=this._scope.toName(v);return E!==void 0&&M&&(this._constants[q.str]=E),this._leafNode(new a(f,q,E)),q}const(f,v,E){return this._def(r.varKinds.const,f,v,E)}let(f,v,E){return this._def(r.varKinds.let,f,v,E)}var(f,v,E){return this._def(r.varKinds.var,f,v,E)}assign(f,v,E){return this._leafNode(new s(f,v,E))}add(f,v){return this._leafNode(new c(f,e.operators.ADD,v))}code(f){return typeof f=="function"?f():f!==t.nil&&this._leafNode(new m(f)),this}object(...f){const v=["{"];for(const[E,M]of f)v.length>1&&v.push(","),v.push(E),(E!==M||this.opts.es5)&&(v.push(":"),(0,t.addCodeArg)(v,M));return v.push("}"),new t._Code(v)}if(f,v,E){if(this._blockNode(new y(f)),v&&E)this.code(v).else().code(E).endIf();else if(v)this.code(v).endIf();else if(E)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(f){return this._elseNode(new y(f))}else(){return this._elseNode(new $)}endIf(){return this._endBlockNode(y,$)}_for(f,v){return this._blockNode(f),v&&this.code(v).endFor(),this}for(f,v){return this._for(new w(f),v)}forRange(f,v,E,M,q=this.opts.es5?r.varKinds.var:r.varKinds.let){const me=this._scope.toName(f);return this._for(new O(q,me,v,E),()=>M(me))}forOf(f,v,E,M=r.varKinds.const){const q=this._scope.toName(f);if(this.opts.es5){const me=v instanceof t.Name?v:this.var("_arr",v);return this.forRange("_i",0,(0,t._)`${me}.length`,de=>{this.var(q,(0,t._)`${me}[${de}]`),E(q)})}return this._for(new x("of",M,q,v),()=>E(q))}forIn(f,v,E,M=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(f,(0,t._)`Object.keys(${v})`,E);const q=this._scope.toName(f);return this._for(new x("in",M,q,v),()=>E(q))}endFor(){return this._endBlockNode(g)}label(f){return this._leafNode(new u(f))}break(f){return this._leafNode(new l(f))}return(f){const v=new Q;if(this._blockNode(v),this.code(f),v.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Q)}try(f,v,E){if(!v&&!E)throw new Error('CodeGen: "try" without "catch" and "finally"');const M=new pe;if(this._blockNode(M),this.code(f),v){const q=this.name("e");this._currNode=M.catch=new Ie(q),v(q)}return E&&(this._currNode=M.finally=new Pe,this.code(E)),this._endBlockNode(Ie,Pe)}throw(f){return this._leafNode(new d(f))}block(f,v){return this._blockStarts.push(this._nodes.length),f&&this.code(f).endBlock(v),this}endBlock(f){const v=this._blockStarts.pop();if(v===void 0)throw new Error("CodeGen: not in self-balancing block");const E=this._nodes.length-v;if(E<0||f!==void 0&&E!==f)throw new Error(`CodeGen: wrong number of nodes: ${E} vs ${f} expected`);return this._nodes.length=v,this}func(f,v=t.nil,E,M){return this._blockNode(new L(f,v,E)),M&&this.code(M).endFunc(),this}endFunc(){return this._endBlockNode(L)}optimize(f=1){for(;f-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(f){return this._currNode.nodes.push(f),this}_blockNode(f){this._currNode.nodes.push(f),this._nodes.push(f)}_endBlockNode(f,v){const E=this._currNode;if(E instanceof f||v&&E instanceof v)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${v?`${f.kind}/${v.kind}`:f.kind}"`)}_elseNode(f){const v=this._currNode;if(!(v instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=v.else=f,this}get _root(){return this._nodes[0]}get _currNode(){const f=this._nodes;return f[f.length-1]}set _currNode(f){const v=this._nodes;v[v.length-1]=f}}e.CodeGen=F;function X(P,f){for(const v in f)P[v]=(P[v]||0)+(f[v]||0);return P}function ne(P,f){return f instanceof t._CodeOrName?X(P,f.names):P}function K(P,f,v){if(P instanceof t.Name)return E(P);if(!M(P))return P;return new t._Code(P._items.reduce((q,me)=>(me instanceof t.Name&&(me=E(me)),me instanceof t._Code?q.push(...me._items):q.push(me),q),[]));function E(q){const me=v[q.str];return me===void 0||f[q.str]!==1?q:(delete f[q.str],me)}function M(q){return q instanceof t._Code&&q._items.some(me=>me instanceof t.Name&&f[me.str]===1&&v[me.str]!==void 0)}}function Ee(P,f){for(const v in f)P[v]=(P[v]||0)-(f[v]||0)}function ot(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${j(P)}`}e.not=ot;const at=I(e.operators.AND);function Gt(...P){return P.reduce(at)}e.and=Gt;const Ot=I(e.operators.OR);function A(...P){return P.reduce(Ot)}e.or=A;function I(P){return(f,v)=>f===t.nil?v:v===t.nil?f:(0,t._)`${j(f)} ${P} ${j(v)}`}function j(P){return P instanceof t.Name?P:(0,t._)`(${P})`}})(ce);var Z={};Object.defineProperty(Z,"__esModule",{value:!0}),Z.checkStrictMode=Z.getErrorPath=Z.Type=Z.useFunc=Z.setEvaluated=Z.evaluatedPropsToName=Z.mergeEvaluated=Z.eachItem=Z.unescapeJsonPointer=Z.escapeJsonPointer=Z.escapeFragment=Z.unescapeFragment=Z.schemaRefOrVal=Z.schemaHasRulesButRef=Z.schemaHasRules=Z.checkUnknownRules=Z.alwaysValidSchema=Z.toHash=void 0;const Se=ce,Mk=$r;function Gk(e){const t={};for(const r of e)t[r]=!0;return t}Z.toHash=Gk;function Lk(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Hh(e,t),!Wh(t,e.self.RULES.all))}Z.alwaysValidSchema=Lk;function Hh(e,t=e.schema){const{opts:r,self:i}=e;if(!r.strictSchema||typeof t=="boolean")return;const n=i.RULES.keywords;for(const o in t)n[o]||tg(e,`unknown keyword: "${o}"`)}Z.checkUnknownRules=Hh;function Wh(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}Z.schemaHasRules=Wh;function Vk(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Z.schemaHasRulesButRef=Vk;function Bk({topSchemaRef:e,schemaPath:t},r,i,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Se._)`${r}`}return(0,Se._)`${e}${t}${(0,Se.getProperty)(i)}`}Z.schemaRefOrVal=Bk;function qk(e){return Xh(decodeURIComponent(e))}Z.unescapeFragment=qk;function Jk(e){return encodeURIComponent(oc(e))}Z.escapeFragment=Jk;function oc(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Z.escapeJsonPointer=oc;function Xh(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Z.unescapeJsonPointer=Xh;function Kk(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}Z.eachItem=Kk;function Qh({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(n,o,a,s)=>{const c=a===void 0?o:a instanceof Se.Name?(o instanceof Se.Name?e(n,o,a):t(n,o,a),a):o instanceof Se.Name?(t(n,a,o),o):r(o,a);return s===Se.Name&&!(c instanceof Se.Name)?i(n,c):c}}Z.mergeEvaluated={props:Qh({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Se._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Se._)`${r} || {}`).code((0,Se._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Se._)`${r} || {}`),ac(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Yh}),items:Qh({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Se._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Se._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Yh(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,Se._)`{}`);return t!==void 0&&ac(e,r,t),r}Z.evaluatedPropsToName=Yh;function ac(e,t,r){Object.keys(r).forEach(i=>e.assign((0,Se._)`${t}${(0,Se.getProperty)(i)}`,!0))}Z.setEvaluated=ac;const eg={};function Hk(e,t){return e.scopeValue("func",{ref:t,code:eg[t.code]||(eg[t.code]=new Mk._Code(t.code))})}Z.useFunc=Hk;var sc;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(sc||(Z.Type=sc={}));function Wk(e,t,r){if(e instanceof Se.Name){const i=t===sc.Num;return r?i?(0,Se._)`"[" + ${e} + "]"`:(0,Se._)`"['" + ${e} + "']"`:i?(0,Se._)`"/" + ${e}`:(0,Se._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Se.getProperty)(e).toString():"/"+oc(e)}Z.getErrorPath=Wk;function tg(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}Z.checkStrictMode=tg;var qi={},ng;function Rt(){if(ng)return qi;ng=1,Object.defineProperty(qi,"__esModule",{value:!0});const e=ce,t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return qi.default=t,qi}var rg;function Ji(){return rg||(rg=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ce,r=Z,i=Rt();e.keywordError={message:({keyword:$})=>(0,t.str)`must pass "${$}" keyword validation`},e.keyword$DataError={message:({keyword:$,schemaType:y})=>y?(0,t.str)`"${$}" keyword must be ${y} ($data)`:(0,t.str)`"${$}" keyword is invalid ($data)`};function n($,y=e.keywordError,g,w){const{it:O}=$,{gen:x,compositeRule:L,allErrors:Q}=O,pe=d($,y,g);w??(L||Q)?c(x,pe):u(O,(0,t._)`[${pe}]`)}e.reportError=n;function o($,y=e.keywordError,g){const{it:w}=$,{gen:O,compositeRule:x,allErrors:L}=w,Q=d($,y,g);c(O,Q),x||L||u(w,i.default.vErrors)}e.reportExtraError=o;function a($,y){$.assign(i.default.errors,y),$.if((0,t._)`${i.default.vErrors} !== null`,()=>$.if(y,()=>$.assign((0,t._)`${i.default.vErrors}.length`,y),()=>$.assign(i.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:$,keyword:y,schemaValue:g,data:w,errsCount:O,it:x}){if(O===void 0)throw new Error("ajv implementation error");const L=$.name("err");$.forRange("i",O,i.default.errors,Q=>{$.const(L,(0,t._)`${i.default.vErrors}[${Q}]`),$.if((0,t._)`${L}.instancePath === undefined`,()=>$.assign((0,t._)`${L}.instancePath`,(0,t.strConcat)(i.default.instancePath,x.errorPath))),$.assign((0,t._)`${L}.schemaPath`,(0,t.str)`${x.errSchemaPath}/${y}`),x.opts.verbose&&($.assign((0,t._)`${L}.schema`,g),$.assign((0,t._)`${L}.data`,w))})}e.extendErrors=s;function c($,y){const g=$.const("err",y);$.if((0,t._)`${i.default.vErrors} === null`,()=>$.assign(i.default.vErrors,(0,t._)`[${g}]`),(0,t._)`${i.default.vErrors}.push(${g})`),$.code((0,t._)`${i.default.errors}++`)}function u($,y){const{gen:g,validateName:w,schemaEnv:O}=$;O.$async?g.throw((0,t._)`new ${$.ValidationError}(${y})`):(g.assign((0,t._)`${w}.errors`,y),g.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d($,y,g){const{createErrors:w}=$.it;return w===!1?(0,t._)`{}`:m($,y,g)}function m($,y,g={}){const{gen:w,it:O}=$,x=[p(O,g),h($,g)];return b($,y,x),w.object(...x)}function p({errorPath:$},{instancePath:y}){const g=y?(0,t.str)`${$}${(0,r.getErrorPath)(y,r.Type.Str)}`:$;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,g)]}function h({keyword:$,it:{errSchemaPath:y}},{schemaPath:g,parentSchema:w}){let O=w?y:(0,t.str)`${y}/${$}`;return g&&(O=(0,t.str)`${O}${(0,r.getErrorPath)(g,r.Type.Str)}`),[l.schemaPath,O]}function b($,{params:y,message:g},w){const{keyword:O,data:x,schemaValue:L,it:Q}=$,{opts:pe,propertyName:Ie,topSchemaRef:Pe,schemaPath:F}=Q;w.push([l.keyword,O],[l.params,typeof y=="function"?y($):y||(0,t._)`{}`]),pe.messages&&w.push([l.message,typeof g=="function"?g($):g]),pe.verbose&&w.push([l.schema,L],[l.parentSchema,(0,t._)`${Pe}${F}`],[i.default.data,x]),Ie&&w.push([l.propertyName,Ie])}})(rc)),rc}var ig;function Xk(){if(ig)return Xt;ig=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.boolOrEmptySchema=Xt.topBoolOrEmptySchema=void 0;const e=Ji(),t=ce,r=Rt(),i={message:"boolean schema is false"};function n(s){const{gen:c,schema:u,validateName:l}=s;u===!1?a(s,!1):typeof u=="object"&&u.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${l}.errors`,null),c.return(!0))}Xt.topBoolOrEmptySchema=n;function o(s,c){const{gen:u,schema:l}=s;l===!1?(u.var(c,!1),a(s)):u.var(c,!0)}Xt.boolOrEmptySchema=o;function a(s,c){const{gen:u,data:l}=s,d={gen:u,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:s};(0,e.reportError)(d,i,void 0,c)}return Xt}var je={},Qt={};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.getRules=Qt.isJSONType=void 0;const Qk=["string","number","integer","boolean","null","object","array"],Yk=new Set(Qk);function eS(e){return typeof e=="string"&&Yk.has(e)}Qt.isJSONType=eS;function tS(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Qt.getRules=tS;var xt={},og;function ag(){if(og)return xt;og=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.shouldUseRule=xt.shouldUseGroup=xt.schemaHasRulesForType=void 0;function e({schema:i,self:n},o){const a=n.RULES.types[o];return a&&a!==!0&&t(i,a)}xt.schemaHasRulesForType=e;function t(i,n){return n.rules.some(o=>r(i,o))}xt.shouldUseGroup=t;function r(i,n){var o;return i[n.keyword]!==void 0||((o=n.definition.implements)===null||o===void 0?void 0:o.some(a=>i[a]!==void 0))}return xt.shouldUseRule=r,xt}Object.defineProperty(je,"__esModule",{value:!0}),je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;const nS=Qt,rS=ag(),iS=Ji(),oe=ce,sg=Z;var wn;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(wn||(je.DataType=wn={}));function oS(e){const t=cg(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}je.getSchemaTypes=oS;function cg(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(nS.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}je.getJSONTypes=cg;function aS(e,t){const{gen:r,data:i,opts:n}=e,o=sS(t,n.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,rS.schemaHasRulesForType)(e,t[0]));if(a){const s=uc(t,i,n.strictNumbers,wn.Wrong);r.if(s,()=>{o.length?cS(e,t,o):lc(e)})}return a}je.coerceAndCheckDataType=aS;const ug=new Set(["string","number","integer","boolean","null"]);function sS(e,t){return t?e.filter(r=>ug.has(r)||t==="array"&&r==="array"):[]}function cS(e,t,r){const{gen:i,data:n,opts:o}=e,a=i.let("dataType",(0,oe._)`typeof ${n}`),s=i.let("coerced",(0,oe._)`undefined`);o.coerceTypes==="array"&&i.if((0,oe._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,oe._)`${n}[0]`).assign(a,(0,oe._)`typeof ${n}`).if(uc(t,n,o.strictNumbers),()=>i.assign(s,n))),i.if((0,oe._)`${s} !== undefined`);for(const u of r)(ug.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);i.else(),lc(e),i.endIf(),i.if((0,oe._)`${s} !== undefined`,()=>{i.assign(n,s),uS(e,s)});function c(u){switch(u){case"string":i.elseIf((0,oe._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,oe._)`"" + ${n}`).elseIf((0,oe._)`${n} === null`).assign(s,(0,oe._)`""`);return;case"number":i.elseIf((0,oe._)`${a} == "boolean" || ${n} === null
73
73
  || (${a} == "string" && ${n} && ${n} == +${n})`).assign(s,(0,oe._)`+${n}`);return;case"integer":i.elseIf((0,oe._)`${a} === "boolean" || ${n} === null
74
74
  || (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(s,(0,oe._)`+${n}`);return;case"boolean":i.elseIf((0,oe._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(s,!1).elseIf((0,oe._)`${n} === "true" || ${n} === 1`).assign(s,!0);return;case"null":i.elseIf((0,oe._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(s,null);return;case"array":i.elseIf((0,oe._)`${a} === "string" || ${a} === "number"
75
- || ${a} === "boolean" || ${n} === null`).assign(s,(0,oe._)`[${n}]`)}}}function uS({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,oe._)`${t} !== undefined`,()=>e.assign((0,oe._)`${t}[${r}]`,i))}function cc(e,t,r,i=kn.Correct){const n=i===kn.Correct?oe.operators.EQ:oe.operators.NEQ;let o;switch(e){case"null":return(0,oe._)`${t} ${n} null`;case"array":o=(0,oe._)`Array.isArray(${t})`;break;case"object":o=(0,oe._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,oe._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,oe._)`typeof ${t} ${n} ${e}`}return i===kn.Correct?o:(0,oe.not)(o);function a(s=oe.nil){return(0,oe.and)((0,oe._)`typeof ${t} == "number"`,s,r?(0,oe._)`isFinite(${t})`:oe.nil)}}je.checkDataType=cc;function uc(e,t,r,i){if(e.length===1)return cc(e[0],t,r,i);let n;const o=(0,sg.toHash)(e);if(o.array&&o.object){const a=(0,oe._)`typeof ${t} != "object"`;n=o.null?a:(0,oe._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else n=oe.nil;o.number&&delete o.integer;for(const a in o)n=(0,oe.and)(n,cc(a,t,r,i));return n}je.checkDataTypes=uc;const lS={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,oe._)`{type: ${e}}`:(0,oe._)`{type: ${t}}`};function lc(e){const t=dS(e);(0,iS.reportError)(t,lS)}je.reportTypeError=lc;function dS(e){const{gen:t,data:r,schema:i}=e,n=(0,sg.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}var br={},lg;function pS(){if(lg)return br;lg=1,Object.defineProperty(br,"__esModule",{value:!0}),br.assignDefaults=void 0;const e=ce,t=Z;function r(n,o){const{properties:a,items:s}=n.schema;if(o==="object"&&a)for(const c in a)i(n,c,a[c].default);else o==="array"&&Array.isArray(s)&&s.forEach((c,u)=>i(n,u,c.default))}br.assignDefaults=r;function i(n,o,a){const{gen:s,compositeRule:c,data:u,opts:l}=n;if(a===void 0)return;const d=(0,e._)`${u}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(n,`default is ignored for: ${d}`);return}let m=(0,e._)`${d} === undefined`;l.useDefaults==="empty"&&(m=(0,e._)`${m} || ${d} === null || ${d} === ""`),s.if(m,(0,e._)`${d} = ${(0,e.stringify)(a)}`)}return br}var yt={},ye={},dg;function _t(){if(dg)return ye;dg=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.validateUnion=ye.validateArray=ye.usePattern=ye.callValidateCode=ye.schemaProperties=ye.allSchemaProperties=ye.noPropertyInData=ye.propertyInData=ye.isOwnProperty=ye.hasPropFunc=ye.reportMissingProp=ye.checkMissingProp=ye.checkReportMissingProp=void 0;const e=ce,t=Z,r=Rt(),i=Z;function n(g,k){const{gen:O,data:N,it:L}=g;O.if(l(O,N,k,L.opts.ownProperties),()=>{g.setParams({missingProperty:(0,e._)`${k}`},!0),g.error()})}ye.checkReportMissingProp=n;function o({gen:g,data:k,it:{opts:O}},N,L){return(0,e.or)(...N.map(Y=>(0,e.and)(l(g,k,Y,O.ownProperties),(0,e._)`${L} = ${Y}`)))}ye.checkMissingProp=o;function a(g,k){g.setParams({missingProperty:k},!0),g.error()}ye.reportMissingProp=a;function s(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ye.hasPropFunc=s;function c(g,k,O){return(0,e._)`${s(g)}.call(${k}, ${O})`}ye.isOwnProperty=c;function u(g,k,O,N){const L=(0,e._)`${k}${(0,e.getProperty)(O)} !== undefined`;return N?(0,e._)`${L} && ${c(g,k,O)}`:L}ye.propertyInData=u;function l(g,k,O,N){const L=(0,e._)`${k}${(0,e.getProperty)(O)} === undefined`;return N?(0,e.or)(L,(0,e.not)(c(g,k,O))):L}ye.noPropertyInData=l;function d(g){return g?Object.keys(g).filter(k=>k!=="__proto__"):[]}ye.allSchemaProperties=d;function m(g,k){return d(k).filter(O=>!(0,t.alwaysValidSchema)(g,k[O]))}ye.schemaProperties=m;function p({schemaCode:g,data:k,it:{gen:O,topSchemaRef:N,schemaPath:L,errorPath:Y},it:pe},Ie,Pe,M){const X=M?(0,e._)`${g}, ${k}, ${N}${L}`:k,ne=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,Y)],[r.default.parentData,pe.parentData],[r.default.parentDataProperty,pe.parentDataProperty],[r.default.rootData,r.default.rootData]];pe.opts.dynamicRef&&ne.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const K=(0,e._)`${X}, ${O.object(...ne)}`;return Pe!==e.nil?(0,e._)`${Ie}.call(${Pe}, ${K})`:(0,e._)`${Ie}(${K})`}ye.callValidateCode=p;const h=(0,e._)`new RegExp`;function b({gen:g,it:{opts:k}},O){const N=k.unicodeRegExp?"u":"",{regExp:L}=k.code,Y=L(O,N);return g.scopeValue("pattern",{key:Y.toString(),ref:Y,code:(0,e._)`${L.code==="new RegExp"?h:(0,i.useFunc)(g,L)}(${O}, ${N})`})}ye.usePattern=b;function $(g){const{gen:k,data:O,keyword:N,it:L}=g,Y=k.name("valid");if(L.allErrors){const Ie=k.let("valid",!0);return pe(()=>k.assign(Ie,!1)),Ie}return k.var(Y,!0),pe(()=>k.break()),Y;function pe(Ie){const Pe=k.const("len",(0,e._)`${O}.length`);k.forRange("i",0,Pe,M=>{g.subschema({keyword:N,dataProp:M,dataPropType:t.Type.Num},Y),k.if((0,e.not)(Y),Ie)})}}ye.validateArray=$;function y(g){const{gen:k,schema:O,keyword:N,it:L}=g;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(Pe=>(0,t.alwaysValidSchema)(L,Pe))&&!L.opts.unevaluated)return;const pe=k.let("valid",!1),Ie=k.name("_valid");k.block(()=>O.forEach((Pe,M)=>{const X=g.subschema({keyword:N,schemaProp:M,compositeRule:!0},Ie);k.assign(pe,(0,e._)`${pe} || ${Ie}`),g.mergeValidEvaluated(X,Ie)||k.if((0,e.not)(pe))})),g.result(pe,()=>g.reset(),()=>g.error(!0))}return ye.validateUnion=y,ye}var pg;function mS(){if(pg)return yt;pg=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.validateKeywordUsage=yt.validSchemaType=yt.funcKeywordCode=yt.macroKeywordCode=void 0;const e=ce,t=Rt(),r=_t(),i=Ji();function n(m,p){const{gen:h,keyword:b,schema:$,parentSchema:y,it:g}=m,k=p.macro.call(g.self,$,y,g),O=u(h,b,k);g.opts.validateSchema!==!1&&g.self.validateSchema(k,!0);const N=h.name("valid");m.subschema({schema:k,schemaPath:e.nil,errSchemaPath:`${g.errSchemaPath}/${b}`,topSchemaRef:O,compositeRule:!0},N),m.pass(N,()=>m.error(!0))}yt.macroKeywordCode=n;function o(m,p){var h;const{gen:b,keyword:$,schema:y,parentSchema:g,$data:k,it:O}=m;c(O,p);const N=!k&&p.compile?p.compile.call(O.self,y,g,O):p.validate,L=u(b,$,N),Y=b.let("valid");m.block$data(Y,pe),m.ok((h=p.valid)!==null&&h!==void 0?h:Y);function pe(){if(p.errors===!1)M(),p.modifying&&a(m),X(()=>m.error());else{const ne=p.async?Ie():Pe();p.modifying&&a(m),X(()=>s(m,ne))}}function Ie(){const ne=b.let("ruleErrs",null);return b.try(()=>M((0,e._)`await `),K=>b.assign(Y,!1).if((0,e._)`${K} instanceof ${O.ValidationError}`,()=>b.assign(ne,(0,e._)`${K}.errors`),()=>b.throw(K))),ne}function Pe(){const ne=(0,e._)`${L}.errors`;return b.assign(ne,null),M(e.nil),ne}function M(ne=p.async?(0,e._)`await `:e.nil){const K=O.opts.passContext?t.default.this:t.default.self,Ee=!("compile"in p&&!k||p.schema===!1);b.assign(Y,(0,e._)`${ne}${(0,r.callValidateCode)(m,L,K,Ee)}`,p.modifying)}function X(ne){var K;b.if((0,e.not)((K=p.valid)!==null&&K!==void 0?K:Y),ne)}}yt.funcKeywordCode=o;function a(m){const{gen:p,data:h,it:b}=m;p.if(b.parentData,()=>p.assign(h,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function s(m,p){const{gen:h}=m;h.if((0,e._)`Array.isArray(${p})`,()=>{h.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${p} : ${t.default.vErrors}.concat(${p})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},p){if(p.async&&!m.$async)throw new Error("async keyword in sync schema")}function u(m,p,h){if(h===void 0)throw new Error(`keyword "${p}" failed to compile`);return m.scopeValue("keyword",typeof h=="function"?{ref:h}:{ref:h,code:(0,e.stringify)(h)})}function l(m,p,h=!1){return!p.length||p.some(b=>b==="array"?Array.isArray(m):b==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==b||h&&typeof m>"u")}yt.validSchemaType=l;function d({schema:m,opts:p,self:h,errSchemaPath:b},$,y){if(Array.isArray($.keyword)?!$.keyword.includes(y):$.keyword!==y)throw new Error("ajv implementation error");const g=$.dependencies;if(g?.some(k=>!Object.prototype.hasOwnProperty.call(m,k)))throw new Error(`parent schema must have dependencies of ${y}: ${g.join(",")}`);if($.validateSchema&&!$.validateSchema(m[y])){const O=`keyword "${y}" value is invalid at path "${b}": `+h.errorsText($.validateSchema.errors);if(p.validateSchema==="log")h.logger.error(O);else throw new Error(O)}}return yt.validateKeywordUsage=d,yt}var xt={},mg;function fS(){if(mg)return xt;mg=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.extendSubschemaMode=xt.extendSubschemaData=xt.getSubschema=void 0;const e=ce,t=Z;function r(o,{keyword:a,schemaProp:s,schema:c,schemaPath:u,errSchemaPath:l,topSchemaRef:d}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const m=o.schema[a];return s===void 0?{schema:m,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:m[s],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,t.escapeFragment)(s)}`}}if(c!==void 0){if(u===void 0||l===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:u,topSchemaRef:d,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}xt.getSubschema=r;function i(o,a,{dataProp:s,dataPropType:c,data:u,dataTypes:l,propertyName:d}){if(u!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=a;if(s!==void 0){const{errorPath:h,dataPathArr:b,opts:$}=a,y=m.let("data",(0,e._)`${a.data}${(0,e.getProperty)(s)}`,!0);p(y),o.errorPath=(0,e.str)`${h}${(0,t.getErrorPath)(s,c,$.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${s}`,o.dataPathArr=[...b,o.parentDataProperty]}if(u!==void 0){const h=u instanceof e.Name?u:m.let("data",u,!0);p(h),d!==void 0&&(o.propertyName=d)}l&&(o.dataTypes=l);function p(h){o.data=h,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,h]}}xt.extendSubschemaData=i;function n(o,{jtdDiscriminator:a,jtdMetadata:s,compositeRule:c,createErrors:u,allErrors:l}){c!==void 0&&(o.compositeRule=c),u!==void 0&&(o.createErrors=u),l!==void 0&&(o.allErrors=l),o.jtdDiscriminator=a,o.jtdMetadata=s}return xt.extendSubschemaMode=n,xt}var Me={},fg=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var a=o[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},hg={exports:{}},Ut=hg.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var i=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Ki(t,i,n,e,"",e)};Ut.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Ut.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Ut.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Ut.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 Ki(e,t,r,i,n,o,a,s,c,u){if(i&&typeof i=="object"&&!Array.isArray(i)){t(i,n,o,a,s,c,u);for(var l in i){var d=i[l];if(Array.isArray(d)){if(l in Ut.arrayKeywords)for(var m=0;m<d.length;m++)Ki(e,t,r,d[m],n+"/"+l+"/"+m,o,n,l,i,m)}else if(l in Ut.propsKeywords){if(d&&typeof d=="object")for(var p in d)Ki(e,t,r,d[p],n+"/"+l+"/"+hS(p),o,n,l,i,p)}else(l in Ut.keywords||e.allKeys&&!(l in Ut.skipKeywords))&&Ki(e,t,r,d,n+"/"+l,o,n,l,i)}r(i,n,o,a,s,c,u)}}function hS(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var gS=hg.exports;Object.defineProperty(Me,"__esModule",{value:!0}),Me.getSchemaRefs=Me.resolveUrl=Me.normalizeId=Me._getFullPath=Me.getFullPath=Me.inlineRef=void 0;const vS=Z,yS=fg,_S=gS,$S=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function bS(e,t=!0){return typeof e=="boolean"?!0:t===!0?!dc(e):t?gg(e)<=t:!1}Me.inlineRef=bS;const kS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function dc(e){for(const t in e){if(kS.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(dc)||typeof r=="object"&&dc(r))return!0}return!1}function gg(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!$S.has(r)&&(typeof e[r]=="object"&&(0,vS.eachItem)(e[r],i=>t+=gg(i)),t===1/0))return 1/0}return t}function vg(e,t="",r){r!==!1&&(t=wn(t));const i=e.parse(t);return yg(e,i)}Me.getFullPath=vg;function yg(e,t){return e.serialize(t).split("#")[0]+"#"}Me._getFullPath=yg;const wS=/#\/?$/;function wn(e){return e?e.replace(wS,""):""}Me.normalizeId=wn;function SS(e,t,r){return r=wn(r),e.resolve(t,r)}Me.resolveUrl=SS;const IS=/^[a-z_][-a-z0-9._]*$/i;function OS(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:i}=this.opts,n=wn(e[r]||t),o={"":n},a=vg(i,n,!1),s={},c=new Set;return _S(e,{allKeys:!0},(d,m,p,h)=>{if(h===void 0)return;const b=a+m;let $=o[h];typeof d[r]=="string"&&($=y.call(this,d[r])),g.call(this,d.$anchor),g.call(this,d.$dynamicAnchor),o[m]=$;function y(k){const O=this.opts.uriResolver.resolve;if(k=wn($?O($,k):k),c.has(k))throw l(k);c.add(k);let N=this.refs[k];return typeof N=="string"&&(N=this.refs[N]),typeof N=="object"?u(d,N.schema,k):k!==wn(b)&&(k[0]==="#"?(u(d,s[k],k),s[k]=d):this.refs[k]=b),k}function g(k){if(typeof k=="string"){if(!IS.test(k))throw new Error(`invalid anchor "${k}"`);y.call(this,`#${k}`)}}}),s;function u(d,m,p){if(m!==void 0&&!yS(d,m))throw l(p)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Me.getSchemaRefs=OS;var _g;function Hi(){if(_g)return zt;_g=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.getData=zt.KeywordCxt=zt.validateFunctionCode=void 0;const e=Xw(),t=je,r=ag(),i=je,n=pS(),o=mS(),a=fS(),s=ce,c=Rt(),u=Me,l=Z,d=Ji();function m(S){if(N(S)&&(Y(S),O(S))){$(S);return}p(S,()=>(0,e.topBoolOrEmptySchema)(S))}zt.validateFunctionCode=m;function p({gen:S,validateName:T,schema:x,schemaEnv:D,opts:V},ue){V.code.es5?S.func(T,(0,s._)`${c.default.data}, ${c.default.valCxt}`,D.$async,()=>{S.code((0,s._)`"use strict"; ${g(x,V)}`),b(S,V),S.code(ue)}):S.func(T,(0,s._)`${c.default.data}, ${h(V)}`,D.$async,()=>S.code(g(x,V)).code(ue))}function h(S){return(0,s._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${S.dynamicRef?(0,s._)`, ${c.default.dynamicAnchors}={}`:s.nil}}={}`}function b(S,T){S.if(c.default.valCxt,()=>{S.var(c.default.instancePath,(0,s._)`${c.default.valCxt}.${c.default.instancePath}`),S.var(c.default.parentData,(0,s._)`${c.default.valCxt}.${c.default.parentData}`),S.var(c.default.parentDataProperty,(0,s._)`${c.default.valCxt}.${c.default.parentDataProperty}`),S.var(c.default.rootData,(0,s._)`${c.default.valCxt}.${c.default.rootData}`),T.dynamicRef&&S.var(c.default.dynamicAnchors,(0,s._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{S.var(c.default.instancePath,(0,s._)`""`),S.var(c.default.parentData,(0,s._)`undefined`),S.var(c.default.parentDataProperty,(0,s._)`undefined`),S.var(c.default.rootData,c.default.data),T.dynamicRef&&S.var(c.default.dynamicAnchors,(0,s._)`{}`)})}function $(S){const{schema:T,opts:x,gen:D}=S;p(S,()=>{x.$comment&&T.$comment&&ne(S),Pe(S),D.let(c.default.vErrors,null),D.let(c.default.errors,0),x.unevaluated&&y(S),pe(S),K(S)})}function y(S){const{gen:T,validateName:x}=S;S.evaluated=T.const("evaluated",(0,s._)`${x}.evaluated`),T.if((0,s._)`${S.evaluated}.dynamicProps`,()=>T.assign((0,s._)`${S.evaluated}.props`,(0,s._)`undefined`)),T.if((0,s._)`${S.evaluated}.dynamicItems`,()=>T.assign((0,s._)`${S.evaluated}.items`,(0,s._)`undefined`))}function g(S,T){const x=typeof S=="object"&&S[T.schemaId];return x&&(T.code.source||T.code.process)?(0,s._)`/*# sourceURL=${x} */`:s.nil}function k(S,T){if(N(S)&&(Y(S),O(S))){L(S,T);return}(0,e.boolOrEmptySchema)(S,T)}function O({schema:S,self:T}){if(typeof S=="boolean")return!S;for(const x in S)if(T.RULES.all[x])return!0;return!1}function N(S){return typeof S.schema!="boolean"}function L(S,T){const{schema:x,gen:D,opts:V}=S;V.$comment&&x.$comment&&ne(S),M(S),X(S);const ue=D.const("_errs",c.default.errors);pe(S,ue),D.var(T,(0,s._)`${ue} === ${c.default.errors}`)}function Y(S){(0,l.checkUnknownRules)(S),Ie(S)}function pe(S,T){if(S.opts.jtd)return ot(S,[],!1,T);const x=(0,t.getSchemaTypes)(S.schema),D=(0,t.coerceAndCheckDataType)(S,x);ot(S,x,!D,T)}function Ie(S){const{schema:T,errSchemaPath:x,opts:D,self:V}=S;T.$ref&&D.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(T,V.RULES)&&V.logger.warn(`$ref: keywords ignored in schema at path "${x}"`)}function Pe(S){const{schema:T,opts:x}=S;T.default!==void 0&&x.useDefaults&&x.strictSchema&&(0,l.checkStrictMode)(S,"default is ignored in the schema root")}function M(S){const T=S.schema[S.opts.schemaId];T&&(S.baseId=(0,u.resolveUrl)(S.opts.uriResolver,S.baseId,T))}function X(S){if(S.schema.$async&&!S.schemaEnv.$async)throw new Error("async schema in sync schema")}function ne({gen:S,schemaEnv:T,schema:x,errSchemaPath:D,opts:V}){const ue=x.$comment;if(V.$comment===!0)S.code((0,s._)`${c.default.self}.logger.log(${ue})`);else if(typeof V.$comment=="function"){const De=(0,s.str)`${D}/$comment`,ht=S.scopeValue("root",{ref:T.root});S.code((0,s._)`${c.default.self}.opts.$comment(${ue}, ${De}, ${ht}.schema)`)}}function K(S){const{gen:T,schemaEnv:x,validateName:D,ValidationError:V,opts:ue}=S;x.$async?T.if((0,s._)`${c.default.errors} === 0`,()=>T.return(c.default.data),()=>T.throw((0,s._)`new ${V}(${c.default.vErrors})`)):(T.assign((0,s._)`${D}.errors`,c.default.vErrors),ue.unevaluated&&Ee(S),T.return((0,s._)`${c.default.errors} === 0`))}function Ee({gen:S,evaluated:T,props:x,items:D}){x instanceof s.Name&&S.assign((0,s._)`${T}.props`,x),D instanceof s.Name&&S.assign((0,s._)`${T}.items`,D)}function ot(S,T,x,D){const{gen:V,schema:ue,data:De,allErrors:ht,opts:Ke,self:He}=S,{RULES:Ae}=He;if(ue.$ref&&(Ke.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(ue,Ae))){V.block(()=>F(S,"$ref",Ae.all.$ref.definition));return}Ke.jtd||Gt(S,T),V.block(()=>{for(const st of Ae.rules)an(st);an(Ae.post)});function an(st){(0,r.shouldUseGroup)(ue,st)&&(st.type?(V.if((0,i.checkDataType)(st.type,De,Ke.strictNumbers)),at(S,st),T.length===1&&T[0]===st.type&&x&&(V.else(),(0,i.reportTypeError)(S)),V.endIf()):at(S,st),ht||V.if((0,s._)`${c.default.errors} === ${D||0}`))}}function at(S,T){const{gen:x,schema:D,opts:{useDefaults:V}}=S;V&&(0,n.assignDefaults)(S,T.type),x.block(()=>{for(const ue of T.rules)(0,r.shouldUseRule)(D,ue)&&F(S,ue.keyword,ue.definition,T.type)})}function Gt(S,T){S.schemaEnv.meta||!S.opts.strictTypes||(Ot(S,T),S.opts.allowUnionTypes||A(S,T),I(S,S.dataTypes))}function Ot(S,T){if(T.length){if(!S.dataTypes.length){S.dataTypes=T;return}T.forEach(x=>{P(S.dataTypes,x)||v(S,`type "${x}" not allowed by context "${S.dataTypes.join(",")}"`)}),f(S,T)}}function A(S,T){T.length>1&&!(T.length===2&&T.includes("null"))&&v(S,"use allowUnionTypes to allow union type keyword")}function I(S,T){const x=S.self.RULES.all;for(const D in x){const V=x[D];if(typeof V=="object"&&(0,r.shouldUseRule)(S.schema,V)){const{type:ue}=V.definition;ue.length&&!ue.some(De=>j(T,De))&&v(S,`missing type "${ue.join(",")}" for keyword "${D}"`)}}}function j(S,T){return S.includes(T)||T==="number"&&S.includes("integer")}function P(S,T){return S.includes(T)||T==="integer"&&S.includes("number")}function f(S,T){const x=[];for(const D of S.dataTypes)P(T,D)?x.push(D):T.includes("integer")&&D==="number"&&x.push("integer");S.dataTypes=x}function v(S,T){const x=S.schemaEnv.baseId+S.errSchemaPath;T+=` at "${x}" (strictTypes)`,(0,l.checkStrictMode)(S,T,S.opts.strictTypes)}class E{constructor(T,x,D){if((0,o.validateKeywordUsage)(T,x,D),this.gen=T.gen,this.allErrors=T.allErrors,this.keyword=D,this.data=T.data,this.schema=T.schema[D],this.$data=x.$data&&T.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(T,this.schema,D,this.$data),this.schemaType=x.schemaType,this.parentSchema=T.schema,this.params={},this.it=T,this.def=x,this.$data)this.schemaCode=T.gen.const("vSchema",de(this.$data,T));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,x.schemaType,x.allowUndefined))throw new Error(`${D} value must be ${JSON.stringify(x.schemaType)}`);("code"in x?x.trackErrors:x.errors!==!1)&&(this.errsCount=T.gen.const("_errs",c.default.errors))}result(T,x,D){this.failResult((0,s.not)(T),x,D)}failResult(T,x,D){this.gen.if(T),D?D():this.error(),x?(this.gen.else(),x(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(T,x){this.failResult((0,s.not)(T),void 0,x)}fail(T){if(T===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(T),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(T){if(!this.$data)return this.fail(T);const{schemaCode:x}=this;this.fail((0,s._)`${x} !== undefined && (${(0,s.or)(this.invalid$data(),T)})`)}error(T,x,D){if(x){this.setParams(x),this._error(T,D),this.setParams({});return}this._error(T,D)}_error(T,x){(T?d.reportExtraError:d.reportError)(this,this.def.error,x)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(T){this.allErrors||this.gen.if(T)}setParams(T,x){x?Object.assign(this.params,T):this.params=T}block$data(T,x,D=s.nil){this.gen.block(()=>{this.check$data(T,D),x()})}check$data(T=s.nil,x=s.nil){if(!this.$data)return;const{gen:D,schemaCode:V,schemaType:ue,def:De}=this;D.if((0,s.or)((0,s._)`${V} === undefined`,x)),T!==s.nil&&D.assign(T,!0),(ue.length||De.validateSchema)&&(D.elseIf(this.invalid$data()),this.$dataError(),T!==s.nil&&D.assign(T,!1)),D.else()}invalid$data(){const{gen:T,schemaCode:x,schemaType:D,def:V,it:ue}=this;return(0,s.or)(De(),ht());function De(){if(D.length){if(!(x instanceof s.Name))throw new Error("ajv implementation error");const Ke=Array.isArray(D)?D:[D];return(0,s._)`${(0,i.checkDataTypes)(Ke,x,ue.opts.strictNumbers,i.DataType.Wrong)}`}return s.nil}function ht(){if(V.validateSchema){const Ke=T.scopeValue("validate$data",{ref:V.validateSchema});return(0,s._)`!${Ke}(${x})`}return s.nil}}subschema(T,x){const D=(0,a.getSubschema)(this.it,T);(0,a.extendSubschemaData)(D,this.it,T),(0,a.extendSubschemaMode)(D,T);const V={...this.it,...D,items:void 0,props:void 0};return k(V,x),V}mergeEvaluated(T,x){const{it:D,gen:V}=this;D.opts.unevaluated&&(D.props!==!0&&T.props!==void 0&&(D.props=l.mergeEvaluated.props(V,T.props,D.props,x)),D.items!==!0&&T.items!==void 0&&(D.items=l.mergeEvaluated.items(V,T.items,D.items,x)))}mergeValidEvaluated(T,x){const{it:D,gen:V}=this;if(D.opts.unevaluated&&(D.props!==!0||D.items!==!0))return V.if(x,()=>this.mergeEvaluated(T,s.Name)),!0}}zt.KeywordCxt=E;function F(S,T,x,D){const V=new E(S,x,T);"code"in x?x.code(V,D):V.$data&&x.validate?(0,o.funcKeywordCode)(V,x):"macro"in x?(0,o.macroKeywordCode)(V,x):(x.compile||x.validate)&&(0,o.funcKeywordCode)(V,x)}const q=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function de(S,{dataLevel:T,dataNames:x,dataPathArr:D}){let V,ue;if(S==="")return c.default.rootData;if(S[0]==="/"){if(!q.test(S))throw new Error(`Invalid JSON-pointer: ${S}`);V=S,ue=c.default.rootData}else{const He=me.exec(S);if(!He)throw new Error(`Invalid JSON-pointer: ${S}`);const Ae=+He[1];if(V=He[2],V==="#"){if(Ae>=T)throw new Error(Ke("property/index",Ae));return D[T-Ae]}if(Ae>T)throw new Error(Ke("data",Ae));if(ue=x[T-Ae],!V)return ue}let De=ue;const ht=V.split("/");for(const He of ht)He&&(ue=(0,s._)`${ue}${(0,s.getProperty)((0,l.unescapeJsonPointer)(He))}`,De=(0,s._)`${De} && ${ue}`);return De;function Ke(He,Ae){return`Cannot access ${He} ${Ae} levels up, current level is ${T}`}}return zt.getData=de,zt}var Wi={},$g;function pc(){if($g)return Wi;$g=1,Object.defineProperty(Wi,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Wi.default=e,Wi}var Xi={},bg;function Yi(){if(bg)return Xi;bg=1,Object.defineProperty(Xi,"__esModule",{value:!0});const e=Me;class t extends Error{constructor(i,n,o,a){super(a||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,e.resolveUrl)(i,n,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return Xi.default=t,Xi}var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.resolveSchema=Ye.getCompilingSchema=Ye.resolveRef=Ye.compileSchema=Ye.SchemaEnv=void 0;const $t=ce,TS=pc(),Qt=Rt(),bt=Me,kg=Z,PS=Hi();class Qi{constructor(t){var r;this.refs={},this.dynamicAnchors={};let i;typeof t.schema=="object"&&(i=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,bt.normalizeId)(i?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=i?.$async,this.refs={}}}Ye.SchemaEnv=Qi;function mc(e){const t=wg.call(this,e);if(t)return t;const r=(0,bt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:n}=this.opts.code,{ownProperties:o}=this.opts,a=new $t.CodeGen(this.scope,{es5:i,lines:n,ownProperties:o});let s;e.$async&&(s=a.scopeValue("Error",{ref:TS.default,code:(0,$t._)`require("ajv/dist/runtime/validation_error").default`}));const c=a.scopeName("validate");e.validateName=c;const u={gen:a,allErrors:this.opts.allErrors,data:Qt.default.data,parentData:Qt.default.parentData,parentDataProperty:Qt.default.parentDataProperty,dataNames:[Qt.default.data],dataPathArr:[$t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,$t.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:$t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,$t._)`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,PS.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);const d=a.toString();l=`${a.scopeRefs(Qt.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const p=new Function(`${Qt.default.self}`,`${Qt.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){const{props:h,items:b}=u;p.evaluated={props:h instanceof $t.Name?void 0:h,items:b instanceof $t.Name?void 0:b,dynamicProps:h instanceof $t.Name,dynamicItems:b instanceof $t.Name},p.source&&(p.source.evaluated=(0,$t.stringify)(p.evaluated))}return e.validate=p,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}Ye.compileSchema=mc;function ES(e,t,r){var i;r=(0,bt.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let o=xS.call(this,e,r);if(o===void 0){const a=(i=e.localRefs)===null||i===void 0?void 0:i[r],{schemaId:s}=this.opts;a&&(o=new Qi({schema:a,schemaId:s,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=zS.call(this,o)}Ye.resolveRef=ES;function zS(e){return(0,bt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:mc.call(this,e)}function wg(e){for(const t of this._compilations)if(NS(t,e))return t}Ye.getCompilingSchema=wg;function NS(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function xS(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||eo.call(this,e,t)}function eo(e,t){const r=this.opts.uriResolver.parse(t),i=(0,bt._getFullPath)(this.opts.uriResolver,r);let n=(0,bt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return fc.call(this,r,e);const o=(0,bt.normalizeId)(i),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){const s=eo.call(this,e,a);return typeof s?.schema!="object"?void 0:fc.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||mc.call(this,a),o===(0,bt.normalizeId)(t)){const{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(n=(0,bt.resolveUrl)(this.opts.uriResolver,n,u)),new Qi({schema:s,schemaId:c,root:e,baseId:n})}return fc.call(this,r,a)}}Ye.resolveSchema=eo;const jS=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function fc(e,{baseId:t,schema:r,root:i}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const s of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const c=r[(0,kg.unescapeFragment)(s)];if(c===void 0)return;r=c;const u=typeof r=="object"&&r[this.opts.schemaId];!jS.has(s)&&u&&(t=(0,bt.resolveUrl)(this.opts.uriResolver,t,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,kg.schemaHasRulesButRef)(r,this.RULES)){const s=(0,bt.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=eo.call(this,i,s)}const{schemaId:a}=this.opts;if(o=o||new Qi({schema:r,schemaId:a,root:i,baseId:t}),o.schema!==o.root.schema)return o}var CS="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",DS="Meta-schema for $data reference (JSON AnySchema extension proposal)",AS="object",RS=["$data"],US={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ZS=!1,MS={$id:CS,description:DS,type:AS,required:RS,properties:US,additionalProperties:ZS},hc={},to={exports:{}};const FS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Sg=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),gc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Ig=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),GS=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Og(e){let t="",r=0,i=0;for(i=0;i<e.length;i++)if(r=e[i].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i<e.length;i++){if(r=e[i].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}const LS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Tg(e){return e.length=0,!0}function VS(e,t,r){if(e.length){const i=Og(e);if(i!=="")t.push(i);else return r.error=!0,!1;e.length=0}return!0}function BS(e){let t=0;const r={error:!1,address:"",zone:""},i=[],n=[];let o=!1,a=!1,s=VS;for(let c=0;c<e.length;c++){const u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(o===!0&&(a=!0),!s(n,i,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(o=!0),i.push(":");continue}else if(u==="%"){if(!s(n,i,r))break;s=Tg}else{n.push(u);continue}}return n.length&&(s===Tg?r.zone=n.join(""):a?i.push(n.join("")):i.push(Og(n))),r.address=i.join(""),r}function Pg(e){if(qS(e,":")<2)return{host:e,isIPV6:!1};const t=BS(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,i=t.address;return t.zone&&(r+="%"+t.zone,i+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:i}}}function qS(e,t){let r=0;for(let i=0;i<e.length;i++)e[i]===t&&r++;return r}function JS(e){let t=e;const r=[];let i=-1,n=0;for(;n=t.length;){if(n===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(n===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(n===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((i=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,i)),t=t.slice(i)}return r.join("")}const KS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},HS=/[@/?#:]/g,WS=/[@/?#]/g;function Eg(e,t){const r=t?WS:HS;return r.lastIndex=0,e.replace(r,i=>KS[i])}function XS(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let i=0;i<e.length;i++){if(e[i]==="%"&&i+2<e.length){const n=e.slice(i+1,i+3);if(gc(n)){const o=n.toUpperCase(),a=String.fromCharCode(parseInt(o,16));t&&Ig(a)?r+=a:r+="%"+o,i+=2;continue}}r+=e[i]}return r}function YS(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){const i=e.slice(r+1,r+3);if(gc(i)){const n=i.toUpperCase(),o=String.fromCharCode(parseInt(n,16));o!=="."&&Ig(o)?t+=o:t+="%"+n,r+=2;continue}}GS(e[r])?t+=e[r]:t+=escape(e[r])}return t}function QS(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){const i=e.slice(r+1,r+3);if(gc(i)){t+="%"+i.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function eI(e){const t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!Sg(r)){const i=Pg(r);i.isIPV6===!0?r=`[${i.escapedHost}]`:r=Eg(r,!1)}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}var zg={nonSimpleDomain:LS,recomposeAuthority:eI,reescapeHostDelimiters:Eg,normalizePercentEncoding:XS,normalizePathEncoding:YS,escapePreservingEscapes:QS,removeDotSegments:JS,isIPv4:Sg,isUUID:FS,normalizeIPv6:Pg};const{isUUID:tI}=zg,nI=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Ng(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function xg(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function jg(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function rI(e){return e.secure=Ng(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function iI(e){if((e.port===(Ng(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function oI(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(nI);if(r){const i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const n=`${i}:${t.nid||e.nid}`,o=vc(n);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function aI(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");const r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),n=`${r}:${t.nid||i}`,o=vc(n);o&&(e=o.serialize(e,t));const a=e,s=e.nss;return a.path=`${i||t.nid}:${s}`,t.skipEscape=!0,a}function sI(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!tI(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function cI(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const Cg={scheme:"http",domainHost:!0,parse:xg,serialize:jg},uI={scheme:"https",domainHost:Cg.domainHost,parse:xg,serialize:jg},no={scheme:"ws",domainHost:!0,parse:rI,serialize:iI},lI={scheme:"wss",domainHost:no.domainHost,parse:no.parse,serialize:no.serialize},dI={scheme:"urn",parse:oI,serialize:aI,skipNormalize:!0},pI={scheme:"urn:uuid",parse:sI,serialize:cI,skipNormalize:!0},ro={http:Cg,https:uI,ws:no,wss:lI,urn:dI,"urn:uuid":pI};Object.setPrototypeOf(ro,null);function vc(e){return e&&(ro[e]||ro[e.toLowerCase()])||void 0}var mI={SCHEMES:ro,getSchemeHandler:vc};const{normalizeIPv6:fI,removeDotSegments:kr,recomposeAuthority:hI,normalizePercentEncoding:gI,normalizePathEncoding:vI,escapePreservingEscapes:yI,reescapeHostDelimiters:_I,isIPv4:$I,nonSimpleDomain:bI}=zg,{SCHEMES:kI,getSchemeHandler:Dg}=mI;function wI(e,t){return typeof e=="string"?e=EI(e,t):typeof e=="object"&&(e=Sn(en(e,t),t)),e}function SI(e,t,r){const i=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=Ag(Sn(e,i),Sn(t,i),i,!0);return i.skipEscape=!0,en(n,i)}function Ag(e,t,r,i){const n={};return i||(e=Sn(en(e,r),r),t=Sn(en(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=kr(t.path||""),n.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=kr(t.path||""),n.query=t.query):(t.path?(t.path[0]==="/"?n.path=kr(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?n.path="/"+t.path:e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path,n.path=kr(n.path)),n.query=t.query):(n.path=e.path,t.query!==void 0?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function II(e,t,r){const i=Zg(e,r),n=Zg(t,r);return i!==void 0&&n!==void 0&&i.toLowerCase()===n.toLowerCase()}function en(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},i=Object.assign({},t),n=[],o=Dg(i.scheme||r.scheme);o&&o.serialize&&o.serialize(r,i),r.path!==void 0&&(i.skipEscape?r.path=gI(r.path):(r.path=yI(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),i.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");const a=hI(r);if(a!==void 0&&(i.reference!=="suffix"&&n.push("//"),n.push(a),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let s=r.path;!i.absolutePath&&(!o||!o.absolutePath)&&(s=kr(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),n.push(s)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}const OI=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,TI=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function PI(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Rg(e,t){const r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let n=!1,o=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);const a=e.match(TI);a!==null&&a[1].indexOf("\\")!==-1&&(i.error="URI authority must not contain a literal backslash.",n=!0);const s=e.match(OI);if(s){i.scheme=s[1],i.userinfo=s[3],i.host=s[4],i.port=parseInt(s[5],10),i.path=s[6]||"",i.query=s[7],i.fragment=s[8],isNaN(i.port)&&(i.port=s[5]);const c=PI(i,s);if(c!==void 0&&(i.error=i.error||c,n=!0),i.host)if($I(i.host)===!1){const d=fI(i.host);i.host=d.host.toLowerCase(),o=d.isIPV6}else o=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference="same-document":i.scheme===void 0?i.reference="relative":i.fragment===void 0?i.reference="absolute":i.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const u=Dg(r.scheme||i.scheme);if(!r.unicodeSupport&&(!u||!u.unicodeSupport)&&i.host&&(r.domainHost||u&&u.domainHost)&&o===!1&&bI(i.host))try{i.host=new URL("http://"+i.host).hostname}catch(l){i.error=i.error||"Host's domain name can not be converted to ASCII: "+l}if((!u||u&&!u.skipNormalize)&&(e.indexOf("%")!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=_I(unescape(i.host),o))),i.path&&(i.path=vI(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||"URI malformed"}u&&u.parse&&u.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n}}function Sn(e,t){return Rg(e,t).parsed}function EI(e,t){return Ug(e,t).normalized}function Ug(e,t){const{parsed:r,malformedAuthorityOrPort:i}=Rg(e,t);return{normalized:i?e:en(r,t),malformedAuthorityOrPort:i}}function Zg(e,t){if(typeof e=="string"){const{normalized:r,malformedAuthorityOrPort:i}=Ug(e,t);return i?void 0:r}if(typeof e=="object")return en(e,t)}const yc={SCHEMES:kI,normalize:wI,resolve:SI,resolveComponent:Ag,equal:II,serialize:en,parse:Sn};to.exports=yc,to.exports.default=yc,to.exports.fastUri=yc;var zI=to.exports;Object.defineProperty(hc,"__esModule",{value:!0});const Mg=zI;Mg.code='require("ajv/dist/runtime/uri").default',hc.default=Mg,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Hi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ce;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=pc(),n=Yi(),o=Yt,a=Ye,s=ce,c=Me,u=je,l=Z,d=MS,m=hc,p=(A,I)=>new RegExp(A,I);p.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),$={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."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},g=200;function k(A){var I,j,P,f,v,E,F,q,me,de,S,T,x,D,V,ue,De,ht,Ke,He,Ae,an,st,_o,$o;const xn=A.strict,bo=(I=A.code)===null||I===void 0?void 0:I.optimize,ru=bo===!0||bo===void 0?1:bo||0,iu=(P=(j=A.code)===null||j===void 0?void 0:j.regExp)!==null&&P!==void 0?P:p,zv=(f=A.uriResolver)!==null&&f!==void 0?f:m.default;return{strictSchema:(E=(v=A.strictSchema)!==null&&v!==void 0?v:xn)!==null&&E!==void 0?E:!0,strictNumbers:(q=(F=A.strictNumbers)!==null&&F!==void 0?F:xn)!==null&&q!==void 0?q:!0,strictTypes:(de=(me=A.strictTypes)!==null&&me!==void 0?me:xn)!==null&&de!==void 0?de:"log",strictTuples:(T=(S=A.strictTuples)!==null&&S!==void 0?S:xn)!==null&&T!==void 0?T:"log",strictRequired:(D=(x=A.strictRequired)!==null&&x!==void 0?x:xn)!==null&&D!==void 0?D:!1,code:A.code?{...A.code,optimize:ru,regExp:iu}:{optimize:ru,regExp:iu},loopRequired:(V=A.loopRequired)!==null&&V!==void 0?V:g,loopEnum:(ue=A.loopEnum)!==null&&ue!==void 0?ue:g,meta:(De=A.meta)!==null&&De!==void 0?De:!0,messages:(ht=A.messages)!==null&&ht!==void 0?ht:!0,inlineRefs:(Ke=A.inlineRefs)!==null&&Ke!==void 0?Ke:!0,schemaId:(He=A.schemaId)!==null&&He!==void 0?He:"$id",addUsedSchema:(Ae=A.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(an=A.validateSchema)!==null&&an!==void 0?an:!0,validateFormats:(st=A.validateFormats)!==null&&st!==void 0?st:!0,unicodeRegExp:(_o=A.unicodeRegExp)!==null&&_o!==void 0?_o:!0,int32range:($o=A.int32range)!==null&&$o!==void 0?$o:!0,uriResolver:zv}}class O{constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,...k(I)};const{es5:j,lines:P}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:b,es5:j,lines:P}),this.logger=X(I.logger);const f=I.validateFormats;I.validateFormats=!1,this.RULES=(0,o.getRules)(),N.call(this,$,I,"NOT SUPPORTED"),N.call(this,y,I,"DEPRECATED","warn"),this._metaOpts=Pe.call(this),I.formats&&pe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&Ie.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),Y.call(this),I.validateFormats=f}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:I,meta:j,schemaId:P}=this.opts;let f=d;P==="id"&&(f={...d},f.id=f.$id,delete f.$id),j&&I&&this.addMetaSchema(f,f[P],!1)}defaultMeta(){const{meta:I,schemaId:j}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[j]||I:void 0}validate(I,j){let P;if(typeof I=="string"){if(P=this.getSchema(I),!P)throw new Error(`no schema with key or ref "${I}"`)}else P=this.compile(I);const f=P(j);return"$async"in P||(this.errors=P.errors),f}compile(I,j){const P=this._addSchema(I,j);return P.validate||this._compileSchemaEnv(P)}compileAsync(I,j){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return f.call(this,I,j);async function f(de,S){await v.call(this,de.$schema);const T=this._addSchema(de,S);return T.validate||E.call(this,T)}async function v(de){de&&!this.getSchema(de)&&await f.call(this,{$ref:de},!0)}async function E(de){try{return this._compileSchemaEnv(de)}catch(S){if(!(S instanceof n.default))throw S;return F.call(this,S),await q.call(this,S.missingSchema),E.call(this,de)}}function F({missingSchema:de,missingRef:S}){if(this.refs[de])throw new Error(`AnySchema ${de} is loaded but ${S} cannot be resolved`)}async function q(de){const S=await me.call(this,de);this.refs[de]||await v.call(this,S.$schema),this.refs[de]||this.addSchema(S,de,j)}async function me(de){const S=this._loading[de];if(S)return S;try{return await(this._loading[de]=P(de))}finally{delete this._loading[de]}}}addSchema(I,j,P,f=this.opts.validateSchema){if(Array.isArray(I)){for(const E of I)this.addSchema(E,void 0,P,f);return this}let v;if(typeof I=="object"){const{schemaId:E}=this.opts;if(v=I[E],v!==void 0&&typeof v!="string")throw new Error(`schema ${E} must be string`)}return j=(0,c.normalizeId)(j||v),this._checkUnique(j),this.schemas[j]=this._addSchema(I,P,j,f,!0),this}addMetaSchema(I,j,P=this.opts.validateSchema){return this.addSchema(I,j,!0,P),this}validateSchema(I,j){if(typeof I=="boolean")return!0;let P;if(P=I.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const f=this.validate(P,I);if(!f&&j){const v="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(v);else throw new Error(v)}return f}getSchema(I){let j;for(;typeof(j=L.call(this,I))=="string";)I=j;if(j===void 0){const{schemaId:P}=this.opts,f=new a.SchemaEnv({schema:{},schemaId:P});if(j=a.resolveSchema.call(this,f,I),!j)return;this.refs[I]=j}return j.validate||this._compileSchemaEnv(j)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const j=L.call(this,I);return typeof j=="object"&&this._cache.delete(j.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{const j=I;this._cache.delete(j);let P=I[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(const j of I)this.addKeyword(j);return this}addKeyword(I,j){let P;if(typeof I=="string")P=I,typeof j=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),j.keyword=P);else if(typeof I=="object"&&j===void 0){if(j=I,P=j.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,P,j),!j)return(0,l.eachItem)(P,v=>Ee.call(this,v)),this;at.call(this,j);const f={...j,type:(0,u.getJSONTypes)(j.type),schemaType:(0,u.getJSONTypes)(j.schemaType)};return(0,l.eachItem)(P,f.type.length===0?v=>Ee.call(this,v,f):v=>f.type.forEach(E=>Ee.call(this,v,f,E))),this}getKeyword(I){const j=this.RULES.all[I];return typeof j=="object"?j.definition:!!j}removeKeyword(I){const{RULES:j}=this;delete j.keywords[I],delete j.all[I];for(const P of j.rules){const f=P.rules.findIndex(v=>v.keyword===I);f>=0&&P.rules.splice(f,1)}return this}addFormat(I,j){return typeof j=="string"&&(j=new RegExp(j)),this.formats[I]=j,this}errorsText(I=this.errors,{separator:j=", ",dataVar:P="data"}={}){return!I||I.length===0?"No errors":I.map(f=>`${P}${f.instancePath} ${f.message}`).reduce((f,v)=>f+j+v)}$dataMetaSchema(I,j){const P=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(const f of j){const v=f.split("/").slice(1);let E=I;for(const F of v)E=E[F];for(const F in P){const q=P[F];if(typeof q!="object")continue;const{$data:me}=q.definition,de=E[F];me&&de&&(E[F]=Ot(de))}}return I}_removeAllSchemas(I,j){for(const P in I){const f=I[P];(!j||j.test(P))&&(typeof f=="string"?delete I[P]:f&&!f.meta&&(this._cache.delete(f.schema),delete I[P]))}}_addSchema(I,j,P,f=this.opts.validateSchema,v=this.opts.addUsedSchema){let E;const{schemaId:F}=this.opts;if(typeof I=="object")E=I[F];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof I!="boolean")throw new Error("schema must be object or boolean")}let q=this._cache.get(I);if(q!==void 0)return q;P=(0,c.normalizeId)(E||P);const me=c.getSchemaRefs.call(this,I,P);return q=new a.SchemaEnv({schema:I,schemaId:F,meta:j,baseId:P,localRefs:me}),this._cache.set(q.schema,q),v&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=q),f&&this.validateSchema(I,!0),q}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw new Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):a.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}_compileMetaSchema(I){const j=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,I)}finally{this.opts=j}}}O.ValidationError=i.default,O.MissingRefError=n.default,e.default=O;function N(A,I,j,P="error"){for(const f in A){const v=f;v in I&&this.logger[P](`${j}: option ${f}. ${A[v]}`)}}function L(A){return A=(0,c.normalizeId)(A),this.schemas[A]||this.refs[A]}function Y(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const I in A)this.addSchema(A[I],I)}function pe(){for(const A in this.opts.formats){const I=this.opts.formats[A];I&&this.addFormat(A,I)}}function Ie(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const I in A){const j=A[I];j.keyword||(j.keyword=I),this.addKeyword(j)}}function Pe(){const A={...this.opts};for(const I of h)delete A[I];return A}const M={log(){},warn(){},error(){}};function X(A){if(A===!1)return M;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const ne=/^[a-z_$][a-z0-9_$:-]*$/i;function K(A,I){const{RULES:j}=this;if((0,l.eachItem)(A,P=>{if(j.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!ne.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function Ee(A,I,j){var P;const f=I?.post;if(j&&f)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:v}=this;let E=f?v.post:v.rules.find(({type:q})=>q===j);if(E||(E={type:j,rules:[]},v.rules.push(E)),v.keywords[A]=!0,!I)return;const F={keyword:A,definition:{...I,type:(0,u.getJSONTypes)(I.type),schemaType:(0,u.getJSONTypes)(I.schemaType)}};I.before?ot.call(this,E,F,I.before):E.rules.push(F),v.all[A]=F,(P=I.implements)===null||P===void 0||P.forEach(q=>this.addKeyword(q))}function ot(A,I,j){const P=A.rules.findIndex(f=>f.keyword===j);P>=0?A.rules.splice(P,0,I):(A.rules.push(I),this.logger.warn(`rule ${j} is not defined`))}function at(A){let{metaSchema:I}=A;I!==void 0&&(A.$data&&this.opts.$data&&(I=Ot(I)),A.validateSchema=this.compile(I,!0))}const Gt={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ot(A){return{anyOf:[A,Gt]}}})(Kh);var _c={},$c={},bc={};Object.defineProperty(bc,"__esModule",{value:!0});const NI={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};bc.default=NI;var tn={};Object.defineProperty(tn,"__esModule",{value:!0}),tn.callRef=tn.getValidate=void 0;const xI=Yi(),Fg=_t(),Qe=ce,In=Rt(),Gg=Ye,io=Z,jI={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:n,schemaEnv:o,validateName:a,opts:s,self:c}=i,{root:u}=o;if((r==="#"||r==="#/")&&n===u.baseId)return d();const l=Gg.resolveRef.call(c,u,n,r);if(l===void 0)throw new xI.default(i.opts.uriResolver,n,r);if(l instanceof Gg.SchemaEnv)return m(l);return p(l);function d(){if(o===u)return oo(e,a,o,o.$async);const h=t.scopeValue("root",{ref:u});return oo(e,(0,Qe._)`${h}.validate`,u,u.$async)}function m(h){const b=Lg(e,h);oo(e,b,h,h.$async)}function p(h){const b=t.scopeValue("schema",s.code.source===!0?{ref:h,code:(0,Qe.stringify)(h)}:{ref:h}),$=t.name("valid"),y=e.subschema({schema:h,dataTypes:[],schemaPath:Qe.nil,topSchemaRef:b,errSchemaPath:r},$);e.mergeEvaluated(y),e.ok($)}}};function Lg(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Qe._)`${r.scopeValue("wrapper",{ref:t})}.validate`}tn.getValidate=Lg;function oo(e,t,r,i){const{gen:n,it:o}=e,{allErrors:a,schemaEnv:s,opts:c}=o,u=c.passContext?In.default.this:Qe.nil;i?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");const h=n.let("valid");n.try(()=>{n.code((0,Qe._)`await ${(0,Fg.callValidateCode)(e,t,u)}`),p(t),a||n.assign(h,!0)},b=>{n.if((0,Qe._)`!(${b} instanceof ${o.ValidationError})`,()=>n.throw(b)),m(b),a||n.assign(h,!1)}),e.ok(h)}function d(){e.result((0,Fg.callValidateCode)(e,t,u),()=>p(t),()=>m(t))}function m(h){const b=(0,Qe._)`${h}.errors`;n.assign(In.default.vErrors,(0,Qe._)`${In.default.vErrors} === null ? ${b} : ${In.default.vErrors}.concat(${b})`),n.assign(In.default.errors,(0,Qe._)`${In.default.vErrors}.length`)}function p(h){var b;if(!o.opts.unevaluated)return;const $=(b=r?.validate)===null||b===void 0?void 0:b.evaluated;if(o.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(o.props=io.mergeEvaluated.props(n,$.props,o.props));else{const y=n.var("props",(0,Qe._)`${h}.evaluated.props`);o.props=io.mergeEvaluated.props(n,y,o.props,Qe.Name)}if(o.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(o.items=io.mergeEvaluated.items(n,$.items,o.items));else{const y=n.var("items",(0,Qe._)`${h}.evaluated.items`);o.items=io.mergeEvaluated.items(n,y,o.items,Qe.Name)}}}tn.callRef=oo,tn.default=jI,Object.defineProperty($c,"__esModule",{value:!0});const CI=bc,DI=tn,AI=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",CI.default,DI.default];$c.default=AI;var kc={},wc={};Object.defineProperty(wc,"__esModule",{value:!0});const ao=ce,Zt=ao.operators,so={maximum:{okStr:"<=",ok:Zt.LTE,fail:Zt.GT},minimum:{okStr:">=",ok:Zt.GTE,fail:Zt.LT},exclusiveMaximum:{okStr:"<",ok:Zt.LT,fail:Zt.GTE},exclusiveMinimum:{okStr:">",ok:Zt.GT,fail:Zt.LTE}},RI={message:({keyword:e,schemaCode:t})=>(0,ao.str)`must be ${so[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,ao._)`{comparison: ${so[e].okStr}, limit: ${t}}`},UI={keyword:Object.keys(so),type:"number",schemaType:"number",$data:!0,error:RI,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,ao._)`${r} ${so[t].fail} ${i} || isNaN(${r})`)}};wc.default=UI;var Sc={};Object.defineProperty(Sc,"__esModule",{value:!0});const wr=ce,ZI={message:({schemaCode:e})=>(0,wr.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,wr._)`{multipleOf: ${e}}`},MI={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:ZI,code(e){const{gen:t,data:r,schemaCode:i,it:n}=e,o=n.opts.multipleOfPrecision,a=t.let("res"),s=o?(0,wr._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,wr._)`${a} !== parseInt(${a})`;e.fail$data((0,wr._)`(${i} === 0 || (${a} = ${r}/${i}, ${s}))`)}};Sc.default=MI;var Ic={},Oc={};Object.defineProperty(Oc,"__esModule",{value:!0});function Vg(e){const t=e.length;let r=0,i=0,n;for(;i<t;)r++,n=e.charCodeAt(i++),n>=55296&&n<=56319&&i<t&&(n=e.charCodeAt(i),(n&64512)===56320&&i++);return r}Oc.default=Vg,Vg.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(Ic,"__esModule",{value:!0});const nn=ce,FI=Z,GI=Oc,LI={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,nn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,nn._)`{limit: ${e}}`},VI={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:LI,code(e){const{keyword:t,data:r,schemaCode:i,it:n}=e,o=t==="maxLength"?nn.operators.GT:nn.operators.LT,a=n.opts.unicode===!1?(0,nn._)`${r}.length`:(0,nn._)`${(0,FI.useFunc)(e.gen,GI.default)}(${r})`;e.fail$data((0,nn._)`${a} ${o} ${i}`)}};Ic.default=VI;var Tc={};Object.defineProperty(Tc,"__esModule",{value:!0});const BI=_t(),qI=Z,On=ce,JI={message:({schemaCode:e})=>(0,On.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,On._)`{pattern: ${e}}`},KI={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:JI,code(e){const{gen:t,data:r,$data:i,schema:n,schemaCode:o,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(i){const{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,On._)`new RegExp`:(0,qI.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,On._)`${u}(${o}, ${s}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,On._)`!${l}`)}else{const c=(0,BI.usePattern)(e,n);e.fail$data((0,On._)`!${c}.test(${r})`)}}};Tc.default=KI;var Pc={};Object.defineProperty(Pc,"__esModule",{value:!0});const Sr=ce,HI={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Sr.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Sr._)`{limit: ${e}}`},WI={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:HI,code(e){const{keyword:t,data:r,schemaCode:i}=e,n=t==="maxProperties"?Sr.operators.GT:Sr.operators.LT;e.fail$data((0,Sr._)`Object.keys(${r}).length ${n} ${i}`)}};Pc.default=WI;var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});const Ir=_t(),Or=ce,XI=Z,YI={message:({params:{missingProperty:e}})=>(0,Or.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Or._)`{missingProperty: ${e}}`},QI={keyword:"required",type:"object",schemaType:"array",$data:!0,error:YI,code(e){const{gen:t,schema:r,schemaCode:i,data:n,$data:o,it:a}=e,{opts:s}=a;if(!o&&r.length===0)return;const c=r.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){const p=e.parentSchema.properties,{definedProperties:h}=e.it;for(const b of r)if(p?.[b]===void 0&&!h.has(b)){const $=a.schemaEnv.baseId+a.errSchemaPath,y=`required property "${b}" is not defined at "${$}" (strictRequired)`;(0,XI.checkStrictMode)(a,y,a.opts.strictRequired)}}function u(){if(c||o)e.block$data(Or.nil,d);else for(const p of r)(0,Ir.checkReportMissingProp)(e,p)}function l(){const p=t.let("missing");if(c||o){const h=t.let("valid",!0);e.block$data(h,()=>m(p,h)),e.ok(h)}else t.if((0,Ir.checkMissingProp)(e,r,p)),(0,Ir.reportMissingProp)(e,p),t.else()}function d(){t.forOf("prop",i,p=>{e.setParams({missingProperty:p}),t.if((0,Ir.noPropertyInData)(t,n,p,s.ownProperties),()=>e.error())})}function m(p,h){e.setParams({missingProperty:p}),t.forOf(p,i,()=>{t.assign(h,(0,Ir.propertyInData)(t,n,p,s.ownProperties)),t.if((0,Or.not)(h),()=>{e.error(),t.break()})},Or.nil)}}};Ec.default=QI;var zc={};Object.defineProperty(zc,"__esModule",{value:!0});const Tr=ce,e0={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Tr.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Tr._)`{limit: ${e}}`},t0={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:e0,code(e){const{keyword:t,data:r,schemaCode:i}=e,n=t==="maxItems"?Tr.operators.GT:Tr.operators.LT;e.fail$data((0,Tr._)`${r}.length ${n} ${i}`)}};zc.default=t0;var Nc={},Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});const Bg=fg;Bg.code='require("ajv/dist/runtime/equal").default',Pr.default=Bg,Object.defineProperty(Nc,"__esModule",{value:!0});const xc=je,Fe=ce,n0=Z,r0=Pr,i0={message:({params:{i:e,j:t}})=>(0,Fe.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Fe._)`{i: ${e}, j: ${t}}`},o0={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:i0,code(e){const{gen:t,data:r,$data:i,schema:n,parentSchema:o,schemaCode:a,it:s}=e;if(!i&&!n)return;const c=t.let("valid"),u=o.items?(0,xc.getSchemaTypes)(o.items):[];e.block$data(c,l,(0,Fe._)`${a} === false`),e.ok(c);function l(){const h=t.let("i",(0,Fe._)`${r}.length`),b=t.let("j");e.setParams({i:h,j:b}),t.assign(c,!0),t.if((0,Fe._)`${h} > 1`,()=>(d()?m:p)(h,b))}function d(){return u.length>0&&!u.some(h=>h==="object"||h==="array")}function m(h,b){const $=t.name("item"),y=(0,xc.checkDataTypes)(u,$,s.opts.strictNumbers,xc.DataType.Wrong),g=t.const("indices",(0,Fe._)`{}`);t.for((0,Fe._)`;${h}--;`,()=>{t.let($,(0,Fe._)`${r}[${h}]`),t.if(y,(0,Fe._)`continue`),u.length>1&&t.if((0,Fe._)`typeof ${$} == "string"`,(0,Fe._)`${$} += "_"`),t.if((0,Fe._)`typeof ${g}[${$}] == "number"`,()=>{t.assign(b,(0,Fe._)`${g}[${$}]`),e.error(),t.assign(c,!1).break()}).code((0,Fe._)`${g}[${$}] = ${h}`)})}function p(h,b){const $=(0,n0.useFunc)(t,r0.default),y=t.name("outer");t.label(y).for((0,Fe._)`;${h}--;`,()=>t.for((0,Fe._)`${b} = ${h}; ${b}--;`,()=>t.if((0,Fe._)`${$}(${r}[${h}], ${r}[${b}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};Nc.default=o0;var jc={};Object.defineProperty(jc,"__esModule",{value:!0});const Cc=ce,a0=Z,s0=Pr,c0={message:"must be equal to constant",params:({schemaCode:e})=>(0,Cc._)`{allowedValue: ${e}}`},u0={keyword:"const",$data:!0,error:c0,code(e){const{gen:t,data:r,$data:i,schemaCode:n,schema:o}=e;i||o&&typeof o=="object"?e.fail$data((0,Cc._)`!${(0,a0.useFunc)(t,s0.default)}(${r}, ${n})`):e.fail((0,Cc._)`${o} !== ${r}`)}};jc.default=u0;var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0});const Er=ce,l0=Z,d0=Pr,p0={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Er._)`{allowedValues: ${e}}`},m0={keyword:"enum",schemaType:"array",$data:!0,error:p0,code(e){const{gen:t,data:r,$data:i,schema:n,schemaCode:o,it:a}=e;if(!i&&n.length===0)throw new Error("enum must have non-empty array");const s=n.length>=a.opts.loopEnum;let c;const u=()=>c??(c=(0,l0.useFunc)(t,d0.default));let l;if(s||i)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const p=t.const("vSchema",o);l=(0,Er.or)(...n.map((h,b)=>m(p,b)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",o,p=>t.if((0,Er._)`${u()}(${r}, ${p})`,()=>t.assign(l,!0).break()))}function m(p,h){const b=n[h];return typeof b=="object"&&b!==null?(0,Er._)`${u()}(${r}, ${p}[${h}])`:(0,Er._)`${r} === ${b}`}}};Dc.default=m0,Object.defineProperty(kc,"__esModule",{value:!0});const f0=wc,h0=Sc,g0=Ic,v0=Tc,y0=Pc,_0=Ec,$0=zc,b0=Nc,k0=jc,w0=Dc,S0=[f0.default,h0.default,g0.default,v0.default,y0.default,_0.default,$0.default,b0.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},k0.default,w0.default];kc.default=S0;var Ac={},Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.validateAdditionalItems=void 0;const rn=ce,Rc=Z,I0={message:({params:{len:e}})=>(0,rn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,rn._)`{limit: ${e}}`},O0={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:I0,code(e){const{parentSchema:t,it:r}=e,{items:i}=t;if(!Array.isArray(i)){(0,Rc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}qg(e,i)}};function qg(e,t){const{gen:r,schema:i,data:n,keyword:o,it:a}=e;a.items=!0;const s=r.const("len",(0,rn._)`${n}.length`);if(i===!1)e.setParams({len:t.length}),e.pass((0,rn._)`${s} <= ${t.length}`);else if(typeof i=="object"&&!(0,Rc.alwaysValidSchema)(a,i)){const u=r.var("valid",(0,rn._)`${s} <= ${t.length}`);r.if((0,rn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,s,l=>{e.subschema({keyword:o,dataProp:l,dataPropType:Rc.Type.Num},u),a.allErrors||r.if((0,rn.not)(u),()=>r.break())})}}Tn.validateAdditionalItems=qg,Tn.default=O0;var Uc={},Pn={};Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.validateTuple=void 0;const Jg=ce,co=Z,T0=_t(),P0={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return Kg(e,"additionalItems",t);r.items=!0,!(0,co.alwaysValidSchema)(r,t)&&e.ok((0,T0.validateArray)(e))}};function Kg(e,t,r=e.schema){const{gen:i,parentSchema:n,data:o,keyword:a,it:s}=e;l(n),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=co.mergeEvaluated.items(i,r.length,s.items));const c=i.name("valid"),u=i.const("len",(0,Jg._)`${o}.length`);r.forEach((d,m)=>{(0,co.alwaysValidSchema)(s,d)||(i.if((0,Jg._)`${u} > ${m}`,()=>e.subschema({keyword:a,schemaProp:m,dataProp:m},c)),e.ok(c))});function l(d){const{opts:m,errSchemaPath:p}=s,h=r.length,b=h===d.minItems&&(h===d.maxItems||d[t]===!1);if(m.strictTuples&&!b){const $=`"${a}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,co.checkStrictMode)(s,$,m.strictTuples)}}}Pn.validateTuple=Kg,Pn.default=P0,Object.defineProperty(Uc,"__esModule",{value:!0});const E0=Pn,z0={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,E0.validateTuple)(e,"items")};Uc.default=z0;var Zc={};Object.defineProperty(Zc,"__esModule",{value:!0});const Hg=ce,N0=Z,x0=_t(),j0=Tn,C0={message:({params:{len:e}})=>(0,Hg.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Hg._)`{limit: ${e}}`},D0={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:C0,code(e){const{schema:t,parentSchema:r,it:i}=e,{prefixItems:n}=r;i.items=!0,!(0,N0.alwaysValidSchema)(i,t)&&(n?(0,j0.validateAdditionalItems)(e,n):e.ok((0,x0.validateArray)(e)))}};Zc.default=D0;var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0});const mt=ce,uo=Z,A0={message:({params:{min:e,max:t}})=>t===void 0?(0,mt.str)`must contain at least ${e} valid item(s)`:(0,mt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,mt._)`{minContains: ${e}}`:(0,mt._)`{minContains: ${e}, maxContains: ${t}}`},R0={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:A0,code(e){const{gen:t,schema:r,parentSchema:i,data:n,it:o}=e;let a,s;const{minContains:c,maxContains:u}=i;o.opts.next?(a=c===void 0?1:c,s=u):a=1;const l=t.const("len",(0,mt._)`${n}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,uo.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,uo.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,uo.alwaysValidSchema)(o,r)){let b=(0,mt._)`${l} >= ${a}`;s!==void 0&&(b=(0,mt._)`${b} && ${l} <= ${s}`),e.pass(b);return}o.items=!0;const d=t.name("valid");s===void 0&&a===1?p(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),s!==void 0&&t.if((0,mt._)`${n}.length > 0`,m)):(t.let(d,!1),m()),e.result(d,()=>e.reset());function m(){const b=t.name("_valid"),$=t.let("count",0);p(b,()=>t.if(b,()=>h($)))}function p(b,$){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:uo.Type.Num,compositeRule:!0},b),$()})}function h(b){t.code((0,mt._)`${b}++`),s===void 0?t.if((0,mt._)`${b} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,mt._)`${b} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,mt._)`${b} >= ${a}`,()=>t.assign(d,!0)))}}};Mc.default=R0;var Wg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ce,r=Z,i=_t();e.error={message:({params:{property:c,depsCount:u,deps:l}})=>{const d=u===1?"property":"properties";return(0,t.str)`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>(0,t._)`{property: ${c},
75
+ || ${a} === "boolean" || ${n} === null`).assign(s,(0,oe._)`[${n}]`)}}}function uS({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,oe._)`${t} !== undefined`,()=>e.assign((0,oe._)`${t}[${r}]`,i))}function cc(e,t,r,i=wn.Correct){const n=i===wn.Correct?oe.operators.EQ:oe.operators.NEQ;let o;switch(e){case"null":return(0,oe._)`${t} ${n} null`;case"array":o=(0,oe._)`Array.isArray(${t})`;break;case"object":o=(0,oe._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,oe._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,oe._)`typeof ${t} ${n} ${e}`}return i===wn.Correct?o:(0,oe.not)(o);function a(s=oe.nil){return(0,oe.and)((0,oe._)`typeof ${t} == "number"`,s,r?(0,oe._)`isFinite(${t})`:oe.nil)}}je.checkDataType=cc;function uc(e,t,r,i){if(e.length===1)return cc(e[0],t,r,i);let n;const o=(0,sg.toHash)(e);if(o.array&&o.object){const a=(0,oe._)`typeof ${t} != "object"`;n=o.null?a:(0,oe._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else n=oe.nil;o.number&&delete o.integer;for(const a in o)n=(0,oe.and)(n,cc(a,t,r,i));return n}je.checkDataTypes=uc;const lS={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,oe._)`{type: ${e}}`:(0,oe._)`{type: ${t}}`};function lc(e){const t=dS(e);(0,iS.reportError)(t,lS)}je.reportTypeError=lc;function dS(e){const{gen:t,data:r,schema:i}=e,n=(0,sg.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}var br={},lg;function pS(){if(lg)return br;lg=1,Object.defineProperty(br,"__esModule",{value:!0}),br.assignDefaults=void 0;const e=ce,t=Z;function r(n,o){const{properties:a,items:s}=n.schema;if(o==="object"&&a)for(const c in a)i(n,c,a[c].default);else o==="array"&&Array.isArray(s)&&s.forEach((c,u)=>i(n,u,c.default))}br.assignDefaults=r;function i(n,o,a){const{gen:s,compositeRule:c,data:u,opts:l}=n;if(a===void 0)return;const d=(0,e._)`${u}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(n,`default is ignored for: ${d}`);return}let m=(0,e._)`${d} === undefined`;l.useDefaults==="empty"&&(m=(0,e._)`${m} || ${d} === null || ${d} === ""`),s.if(m,(0,e._)`${d} = ${(0,e.stringify)(a)}`)}return br}var yt={},ye={},dg;function _t(){if(dg)return ye;dg=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.validateUnion=ye.validateArray=ye.usePattern=ye.callValidateCode=ye.schemaProperties=ye.allSchemaProperties=ye.noPropertyInData=ye.propertyInData=ye.isOwnProperty=ye.hasPropFunc=ye.reportMissingProp=ye.checkMissingProp=ye.checkReportMissingProp=void 0;const e=ce,t=Z,r=Rt(),i=Z;function n(g,w){const{gen:O,data:x,it:L}=g;O.if(l(O,x,w,L.opts.ownProperties),()=>{g.setParams({missingProperty:(0,e._)`${w}`},!0),g.error()})}ye.checkReportMissingProp=n;function o({gen:g,data:w,it:{opts:O}},x,L){return(0,e.or)(...x.map(Q=>(0,e.and)(l(g,w,Q,O.ownProperties),(0,e._)`${L} = ${Q}`)))}ye.checkMissingProp=o;function a(g,w){g.setParams({missingProperty:w},!0),g.error()}ye.reportMissingProp=a;function s(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ye.hasPropFunc=s;function c(g,w,O){return(0,e._)`${s(g)}.call(${w}, ${O})`}ye.isOwnProperty=c;function u(g,w,O,x){const L=(0,e._)`${w}${(0,e.getProperty)(O)} !== undefined`;return x?(0,e._)`${L} && ${c(g,w,O)}`:L}ye.propertyInData=u;function l(g,w,O,x){const L=(0,e._)`${w}${(0,e.getProperty)(O)} === undefined`;return x?(0,e.or)(L,(0,e.not)(c(g,w,O))):L}ye.noPropertyInData=l;function d(g){return g?Object.keys(g).filter(w=>w!=="__proto__"):[]}ye.allSchemaProperties=d;function m(g,w){return d(w).filter(O=>!(0,t.alwaysValidSchema)(g,w[O]))}ye.schemaProperties=m;function p({schemaCode:g,data:w,it:{gen:O,topSchemaRef:x,schemaPath:L,errorPath:Q},it:pe},Ie,Pe,F){const X=F?(0,e._)`${g}, ${w}, ${x}${L}`:w,ne=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,Q)],[r.default.parentData,pe.parentData],[r.default.parentDataProperty,pe.parentDataProperty],[r.default.rootData,r.default.rootData]];pe.opts.dynamicRef&&ne.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const K=(0,e._)`${X}, ${O.object(...ne)}`;return Pe!==e.nil?(0,e._)`${Ie}.call(${Pe}, ${K})`:(0,e._)`${Ie}(${K})`}ye.callValidateCode=p;const h=(0,e._)`new RegExp`;function b({gen:g,it:{opts:w}},O){const x=w.unicodeRegExp?"u":"",{regExp:L}=w.code,Q=L(O,x);return g.scopeValue("pattern",{key:Q.toString(),ref:Q,code:(0,e._)`${L.code==="new RegExp"?h:(0,i.useFunc)(g,L)}(${O}, ${x})`})}ye.usePattern=b;function $(g){const{gen:w,data:O,keyword:x,it:L}=g,Q=w.name("valid");if(L.allErrors){const Ie=w.let("valid",!0);return pe(()=>w.assign(Ie,!1)),Ie}return w.var(Q,!0),pe(()=>w.break()),Q;function pe(Ie){const Pe=w.const("len",(0,e._)`${O}.length`);w.forRange("i",0,Pe,F=>{g.subschema({keyword:x,dataProp:F,dataPropType:t.Type.Num},Q),w.if((0,e.not)(Q),Ie)})}}ye.validateArray=$;function y(g){const{gen:w,schema:O,keyword:x,it:L}=g;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(Pe=>(0,t.alwaysValidSchema)(L,Pe))&&!L.opts.unevaluated)return;const pe=w.let("valid",!1),Ie=w.name("_valid");w.block(()=>O.forEach((Pe,F)=>{const X=g.subschema({keyword:x,schemaProp:F,compositeRule:!0},Ie);w.assign(pe,(0,e._)`${pe} || ${Ie}`),g.mergeValidEvaluated(X,Ie)||w.if((0,e.not)(pe))})),g.result(pe,()=>g.reset(),()=>g.error(!0))}return ye.validateUnion=y,ye}var pg;function mS(){if(pg)return yt;pg=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.validateKeywordUsage=yt.validSchemaType=yt.funcKeywordCode=yt.macroKeywordCode=void 0;const e=ce,t=Rt(),r=_t(),i=Ji();function n(m,p){const{gen:h,keyword:b,schema:$,parentSchema:y,it:g}=m,w=p.macro.call(g.self,$,y,g),O=u(h,b,w);g.opts.validateSchema!==!1&&g.self.validateSchema(w,!0);const x=h.name("valid");m.subschema({schema:w,schemaPath:e.nil,errSchemaPath:`${g.errSchemaPath}/${b}`,topSchemaRef:O,compositeRule:!0},x),m.pass(x,()=>m.error(!0))}yt.macroKeywordCode=n;function o(m,p){var h;const{gen:b,keyword:$,schema:y,parentSchema:g,$data:w,it:O}=m;c(O,p);const x=!w&&p.compile?p.compile.call(O.self,y,g,O):p.validate,L=u(b,$,x),Q=b.let("valid");m.block$data(Q,pe),m.ok((h=p.valid)!==null&&h!==void 0?h:Q);function pe(){if(p.errors===!1)F(),p.modifying&&a(m),X(()=>m.error());else{const ne=p.async?Ie():Pe();p.modifying&&a(m),X(()=>s(m,ne))}}function Ie(){const ne=b.let("ruleErrs",null);return b.try(()=>F((0,e._)`await `),K=>b.assign(Q,!1).if((0,e._)`${K} instanceof ${O.ValidationError}`,()=>b.assign(ne,(0,e._)`${K}.errors`),()=>b.throw(K))),ne}function Pe(){const ne=(0,e._)`${L}.errors`;return b.assign(ne,null),F(e.nil),ne}function F(ne=p.async?(0,e._)`await `:e.nil){const K=O.opts.passContext?t.default.this:t.default.self,Ee=!("compile"in p&&!w||p.schema===!1);b.assign(Q,(0,e._)`${ne}${(0,r.callValidateCode)(m,L,K,Ee)}`,p.modifying)}function X(ne){var K;b.if((0,e.not)((K=p.valid)!==null&&K!==void 0?K:Q),ne)}}yt.funcKeywordCode=o;function a(m){const{gen:p,data:h,it:b}=m;p.if(b.parentData,()=>p.assign(h,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function s(m,p){const{gen:h}=m;h.if((0,e._)`Array.isArray(${p})`,()=>{h.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${p} : ${t.default.vErrors}.concat(${p})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},p){if(p.async&&!m.$async)throw new Error("async keyword in sync schema")}function u(m,p,h){if(h===void 0)throw new Error(`keyword "${p}" failed to compile`);return m.scopeValue("keyword",typeof h=="function"?{ref:h}:{ref:h,code:(0,e.stringify)(h)})}function l(m,p,h=!1){return!p.length||p.some(b=>b==="array"?Array.isArray(m):b==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==b||h&&typeof m>"u")}yt.validSchemaType=l;function d({schema:m,opts:p,self:h,errSchemaPath:b},$,y){if(Array.isArray($.keyword)?!$.keyword.includes(y):$.keyword!==y)throw new Error("ajv implementation error");const g=$.dependencies;if(g?.some(w=>!Object.prototype.hasOwnProperty.call(m,w)))throw new Error(`parent schema must have dependencies of ${y}: ${g.join(",")}`);if($.validateSchema&&!$.validateSchema(m[y])){const O=`keyword "${y}" value is invalid at path "${b}": `+h.errorsText($.validateSchema.errors);if(p.validateSchema==="log")h.logger.error(O);else throw new Error(O)}}return yt.validateKeywordUsage=d,yt}var Nt={},mg;function fS(){if(mg)return Nt;mg=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.extendSubschemaMode=Nt.extendSubschemaData=Nt.getSubschema=void 0;const e=ce,t=Z;function r(o,{keyword:a,schemaProp:s,schema:c,schemaPath:u,errSchemaPath:l,topSchemaRef:d}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const m=o.schema[a];return s===void 0?{schema:m,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:m[s],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,t.escapeFragment)(s)}`}}if(c!==void 0){if(u===void 0||l===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:u,topSchemaRef:d,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}Nt.getSubschema=r;function i(o,a,{dataProp:s,dataPropType:c,data:u,dataTypes:l,propertyName:d}){if(u!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=a;if(s!==void 0){const{errorPath:h,dataPathArr:b,opts:$}=a,y=m.let("data",(0,e._)`${a.data}${(0,e.getProperty)(s)}`,!0);p(y),o.errorPath=(0,e.str)`${h}${(0,t.getErrorPath)(s,c,$.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${s}`,o.dataPathArr=[...b,o.parentDataProperty]}if(u!==void 0){const h=u instanceof e.Name?u:m.let("data",u,!0);p(h),d!==void 0&&(o.propertyName=d)}l&&(o.dataTypes=l);function p(h){o.data=h,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,h]}}Nt.extendSubschemaData=i;function n(o,{jtdDiscriminator:a,jtdMetadata:s,compositeRule:c,createErrors:u,allErrors:l}){c!==void 0&&(o.compositeRule=c),u!==void 0&&(o.createErrors=u),l!==void 0&&(o.allErrors=l),o.jtdDiscriminator=a,o.jtdMetadata=s}return Nt.extendSubschemaMode=n,Nt}var Fe={},fg=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var a=o[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},hg={exports:{}},Ut=hg.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var i=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Ki(t,i,n,e,"",e)};Ut.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Ut.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Ut.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Ut.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 Ki(e,t,r,i,n,o,a,s,c,u){if(i&&typeof i=="object"&&!Array.isArray(i)){t(i,n,o,a,s,c,u);for(var l in i){var d=i[l];if(Array.isArray(d)){if(l in Ut.arrayKeywords)for(var m=0;m<d.length;m++)Ki(e,t,r,d[m],n+"/"+l+"/"+m,o,n,l,i,m)}else if(l in Ut.propsKeywords){if(d&&typeof d=="object")for(var p in d)Ki(e,t,r,d[p],n+"/"+l+"/"+hS(p),o,n,l,i,p)}else(l in Ut.keywords||e.allKeys&&!(l in Ut.skipKeywords))&&Ki(e,t,r,d,n+"/"+l,o,n,l,i)}r(i,n,o,a,s,c,u)}}function hS(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var gS=hg.exports;Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.getSchemaRefs=Fe.resolveUrl=Fe.normalizeId=Fe._getFullPath=Fe.getFullPath=Fe.inlineRef=void 0;const vS=Z,yS=fg,_S=gS,$S=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function bS(e,t=!0){return typeof e=="boolean"?!0:t===!0?!dc(e):t?gg(e)<=t:!1}Fe.inlineRef=bS;const wS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function dc(e){for(const t in e){if(wS.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(dc)||typeof r=="object"&&dc(r))return!0}return!1}function gg(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!$S.has(r)&&(typeof e[r]=="object"&&(0,vS.eachItem)(e[r],i=>t+=gg(i)),t===1/0))return 1/0}return t}function vg(e,t="",r){r!==!1&&(t=kn(t));const i=e.parse(t);return yg(e,i)}Fe.getFullPath=vg;function yg(e,t){return e.serialize(t).split("#")[0]+"#"}Fe._getFullPath=yg;const kS=/#\/?$/;function kn(e){return e?e.replace(kS,""):""}Fe.normalizeId=kn;function SS(e,t,r){return r=kn(r),e.resolve(t,r)}Fe.resolveUrl=SS;const IS=/^[a-z_][-a-z0-9._]*$/i;function OS(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:i}=this.opts,n=kn(e[r]||t),o={"":n},a=vg(i,n,!1),s={},c=new Set;return _S(e,{allKeys:!0},(d,m,p,h)=>{if(h===void 0)return;const b=a+m;let $=o[h];typeof d[r]=="string"&&($=y.call(this,d[r])),g.call(this,d.$anchor),g.call(this,d.$dynamicAnchor),o[m]=$;function y(w){const O=this.opts.uriResolver.resolve;if(w=kn($?O($,w):w),c.has(w))throw l(w);c.add(w);let x=this.refs[w];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?u(d,x.schema,w):w!==kn(b)&&(w[0]==="#"?(u(d,s[w],w),s[w]=d):this.refs[w]=b),w}function g(w){if(typeof w=="string"){if(!IS.test(w))throw new Error(`invalid anchor "${w}"`);y.call(this,`#${w}`)}}}),s;function u(d,m,p){if(m!==void 0&&!yS(d,m))throw l(p)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Fe.getSchemaRefs=OS;var _g;function Hi(){if(_g)return zt;_g=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.getData=zt.KeywordCxt=zt.validateFunctionCode=void 0;const e=Xk(),t=je,r=ag(),i=je,n=pS(),o=mS(),a=fS(),s=ce,c=Rt(),u=Fe,l=Z,d=Ji();function m(S){if(x(S)&&(Q(S),O(S))){$(S);return}p(S,()=>(0,e.topBoolOrEmptySchema)(S))}zt.validateFunctionCode=m;function p({gen:S,validateName:T,schema:N,schemaEnv:D,opts:V},ue){V.code.es5?S.func(T,(0,s._)`${c.default.data}, ${c.default.valCxt}`,D.$async,()=>{S.code((0,s._)`"use strict"; ${g(N,V)}`),b(S,V),S.code(ue)}):S.func(T,(0,s._)`${c.default.data}, ${h(V)}`,D.$async,()=>S.code(g(N,V)).code(ue))}function h(S){return(0,s._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${S.dynamicRef?(0,s._)`, ${c.default.dynamicAnchors}={}`:s.nil}}={}`}function b(S,T){S.if(c.default.valCxt,()=>{S.var(c.default.instancePath,(0,s._)`${c.default.valCxt}.${c.default.instancePath}`),S.var(c.default.parentData,(0,s._)`${c.default.valCxt}.${c.default.parentData}`),S.var(c.default.parentDataProperty,(0,s._)`${c.default.valCxt}.${c.default.parentDataProperty}`),S.var(c.default.rootData,(0,s._)`${c.default.valCxt}.${c.default.rootData}`),T.dynamicRef&&S.var(c.default.dynamicAnchors,(0,s._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{S.var(c.default.instancePath,(0,s._)`""`),S.var(c.default.parentData,(0,s._)`undefined`),S.var(c.default.parentDataProperty,(0,s._)`undefined`),S.var(c.default.rootData,c.default.data),T.dynamicRef&&S.var(c.default.dynamicAnchors,(0,s._)`{}`)})}function $(S){const{schema:T,opts:N,gen:D}=S;p(S,()=>{N.$comment&&T.$comment&&ne(S),Pe(S),D.let(c.default.vErrors,null),D.let(c.default.errors,0),N.unevaluated&&y(S),pe(S),K(S)})}function y(S){const{gen:T,validateName:N}=S;S.evaluated=T.const("evaluated",(0,s._)`${N}.evaluated`),T.if((0,s._)`${S.evaluated}.dynamicProps`,()=>T.assign((0,s._)`${S.evaluated}.props`,(0,s._)`undefined`)),T.if((0,s._)`${S.evaluated}.dynamicItems`,()=>T.assign((0,s._)`${S.evaluated}.items`,(0,s._)`undefined`))}function g(S,T){const N=typeof S=="object"&&S[T.schemaId];return N&&(T.code.source||T.code.process)?(0,s._)`/*# sourceURL=${N} */`:s.nil}function w(S,T){if(x(S)&&(Q(S),O(S))){L(S,T);return}(0,e.boolOrEmptySchema)(S,T)}function O({schema:S,self:T}){if(typeof S=="boolean")return!S;for(const N in S)if(T.RULES.all[N])return!0;return!1}function x(S){return typeof S.schema!="boolean"}function L(S,T){const{schema:N,gen:D,opts:V}=S;V.$comment&&N.$comment&&ne(S),F(S),X(S);const ue=D.const("_errs",c.default.errors);pe(S,ue),D.var(T,(0,s._)`${ue} === ${c.default.errors}`)}function Q(S){(0,l.checkUnknownRules)(S),Ie(S)}function pe(S,T){if(S.opts.jtd)return ot(S,[],!1,T);const N=(0,t.getSchemaTypes)(S.schema),D=(0,t.coerceAndCheckDataType)(S,N);ot(S,N,!D,T)}function Ie(S){const{schema:T,errSchemaPath:N,opts:D,self:V}=S;T.$ref&&D.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(T,V.RULES)&&V.logger.warn(`$ref: keywords ignored in schema at path "${N}"`)}function Pe(S){const{schema:T,opts:N}=S;T.default!==void 0&&N.useDefaults&&N.strictSchema&&(0,l.checkStrictMode)(S,"default is ignored in the schema root")}function F(S){const T=S.schema[S.opts.schemaId];T&&(S.baseId=(0,u.resolveUrl)(S.opts.uriResolver,S.baseId,T))}function X(S){if(S.schema.$async&&!S.schemaEnv.$async)throw new Error("async schema in sync schema")}function ne({gen:S,schemaEnv:T,schema:N,errSchemaPath:D,opts:V}){const ue=N.$comment;if(V.$comment===!0)S.code((0,s._)`${c.default.self}.logger.log(${ue})`);else if(typeof V.$comment=="function"){const De=(0,s.str)`${D}/$comment`,ht=S.scopeValue("root",{ref:T.root});S.code((0,s._)`${c.default.self}.opts.$comment(${ue}, ${De}, ${ht}.schema)`)}}function K(S){const{gen:T,schemaEnv:N,validateName:D,ValidationError:V,opts:ue}=S;N.$async?T.if((0,s._)`${c.default.errors} === 0`,()=>T.return(c.default.data),()=>T.throw((0,s._)`new ${V}(${c.default.vErrors})`)):(T.assign((0,s._)`${D}.errors`,c.default.vErrors),ue.unevaluated&&Ee(S),T.return((0,s._)`${c.default.errors} === 0`))}function Ee({gen:S,evaluated:T,props:N,items:D}){N instanceof s.Name&&S.assign((0,s._)`${T}.props`,N),D instanceof s.Name&&S.assign((0,s._)`${T}.items`,D)}function ot(S,T,N,D){const{gen:V,schema:ue,data:De,allErrors:ht,opts:Ke,self:He}=S,{RULES:Ae}=He;if(ue.$ref&&(Ke.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(ue,Ae))){V.block(()=>M(S,"$ref",Ae.all.$ref.definition));return}Ke.jtd||Gt(S,T),V.block(()=>{for(const st of Ae.rules)an(st);an(Ae.post)});function an(st){(0,r.shouldUseGroup)(ue,st)&&(st.type?(V.if((0,i.checkDataType)(st.type,De,Ke.strictNumbers)),at(S,st),T.length===1&&T[0]===st.type&&N&&(V.else(),(0,i.reportTypeError)(S)),V.endIf()):at(S,st),ht||V.if((0,s._)`${c.default.errors} === ${D||0}`))}}function at(S,T){const{gen:N,schema:D,opts:{useDefaults:V}}=S;V&&(0,n.assignDefaults)(S,T.type),N.block(()=>{for(const ue of T.rules)(0,r.shouldUseRule)(D,ue)&&M(S,ue.keyword,ue.definition,T.type)})}function Gt(S,T){S.schemaEnv.meta||!S.opts.strictTypes||(Ot(S,T),S.opts.allowUnionTypes||A(S,T),I(S,S.dataTypes))}function Ot(S,T){if(T.length){if(!S.dataTypes.length){S.dataTypes=T;return}T.forEach(N=>{P(S.dataTypes,N)||v(S,`type "${N}" not allowed by context "${S.dataTypes.join(",")}"`)}),f(S,T)}}function A(S,T){T.length>1&&!(T.length===2&&T.includes("null"))&&v(S,"use allowUnionTypes to allow union type keyword")}function I(S,T){const N=S.self.RULES.all;for(const D in N){const V=N[D];if(typeof V=="object"&&(0,r.shouldUseRule)(S.schema,V)){const{type:ue}=V.definition;ue.length&&!ue.some(De=>j(T,De))&&v(S,`missing type "${ue.join(",")}" for keyword "${D}"`)}}}function j(S,T){return S.includes(T)||T==="number"&&S.includes("integer")}function P(S,T){return S.includes(T)||T==="integer"&&S.includes("number")}function f(S,T){const N=[];for(const D of S.dataTypes)P(T,D)?N.push(D):T.includes("integer")&&D==="number"&&N.push("integer");S.dataTypes=N}function v(S,T){const N=S.schemaEnv.baseId+S.errSchemaPath;T+=` at "${N}" (strictTypes)`,(0,l.checkStrictMode)(S,T,S.opts.strictTypes)}class E{constructor(T,N,D){if((0,o.validateKeywordUsage)(T,N,D),this.gen=T.gen,this.allErrors=T.allErrors,this.keyword=D,this.data=T.data,this.schema=T.schema[D],this.$data=N.$data&&T.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(T,this.schema,D,this.$data),this.schemaType=N.schemaType,this.parentSchema=T.schema,this.params={},this.it=T,this.def=N,this.$data)this.schemaCode=T.gen.const("vSchema",de(this.$data,T));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,N.schemaType,N.allowUndefined))throw new Error(`${D} value must be ${JSON.stringify(N.schemaType)}`);("code"in N?N.trackErrors:N.errors!==!1)&&(this.errsCount=T.gen.const("_errs",c.default.errors))}result(T,N,D){this.failResult((0,s.not)(T),N,D)}failResult(T,N,D){this.gen.if(T),D?D():this.error(),N?(this.gen.else(),N(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(T,N){this.failResult((0,s.not)(T),void 0,N)}fail(T){if(T===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(T),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(T){if(!this.$data)return this.fail(T);const{schemaCode:N}=this;this.fail((0,s._)`${N} !== undefined && (${(0,s.or)(this.invalid$data(),T)})`)}error(T,N,D){if(N){this.setParams(N),this._error(T,D),this.setParams({});return}this._error(T,D)}_error(T,N){(T?d.reportExtraError:d.reportError)(this,this.def.error,N)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(T){this.allErrors||this.gen.if(T)}setParams(T,N){N?Object.assign(this.params,T):this.params=T}block$data(T,N,D=s.nil){this.gen.block(()=>{this.check$data(T,D),N()})}check$data(T=s.nil,N=s.nil){if(!this.$data)return;const{gen:D,schemaCode:V,schemaType:ue,def:De}=this;D.if((0,s.or)((0,s._)`${V} === undefined`,N)),T!==s.nil&&D.assign(T,!0),(ue.length||De.validateSchema)&&(D.elseIf(this.invalid$data()),this.$dataError(),T!==s.nil&&D.assign(T,!1)),D.else()}invalid$data(){const{gen:T,schemaCode:N,schemaType:D,def:V,it:ue}=this;return(0,s.or)(De(),ht());function De(){if(D.length){if(!(N instanceof s.Name))throw new Error("ajv implementation error");const Ke=Array.isArray(D)?D:[D];return(0,s._)`${(0,i.checkDataTypes)(Ke,N,ue.opts.strictNumbers,i.DataType.Wrong)}`}return s.nil}function ht(){if(V.validateSchema){const Ke=T.scopeValue("validate$data",{ref:V.validateSchema});return(0,s._)`!${Ke}(${N})`}return s.nil}}subschema(T,N){const D=(0,a.getSubschema)(this.it,T);(0,a.extendSubschemaData)(D,this.it,T),(0,a.extendSubschemaMode)(D,T);const V={...this.it,...D,items:void 0,props:void 0};return w(V,N),V}mergeEvaluated(T,N){const{it:D,gen:V}=this;D.opts.unevaluated&&(D.props!==!0&&T.props!==void 0&&(D.props=l.mergeEvaluated.props(V,T.props,D.props,N)),D.items!==!0&&T.items!==void 0&&(D.items=l.mergeEvaluated.items(V,T.items,D.items,N)))}mergeValidEvaluated(T,N){const{it:D,gen:V}=this;if(D.opts.unevaluated&&(D.props!==!0||D.items!==!0))return V.if(N,()=>this.mergeEvaluated(T,s.Name)),!0}}zt.KeywordCxt=E;function M(S,T,N,D){const V=new E(S,N,T);"code"in N?N.code(V,D):V.$data&&N.validate?(0,o.funcKeywordCode)(V,N):"macro"in N?(0,o.macroKeywordCode)(V,N):(N.compile||N.validate)&&(0,o.funcKeywordCode)(V,N)}const q=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function de(S,{dataLevel:T,dataNames:N,dataPathArr:D}){let V,ue;if(S==="")return c.default.rootData;if(S[0]==="/"){if(!q.test(S))throw new Error(`Invalid JSON-pointer: ${S}`);V=S,ue=c.default.rootData}else{const He=me.exec(S);if(!He)throw new Error(`Invalid JSON-pointer: ${S}`);const Ae=+He[1];if(V=He[2],V==="#"){if(Ae>=T)throw new Error(Ke("property/index",Ae));return D[T-Ae]}if(Ae>T)throw new Error(Ke("data",Ae));if(ue=N[T-Ae],!V)return ue}let De=ue;const ht=V.split("/");for(const He of ht)He&&(ue=(0,s._)`${ue}${(0,s.getProperty)((0,l.unescapeJsonPointer)(He))}`,De=(0,s._)`${De} && ${ue}`);return De;function Ke(He,Ae){return`Cannot access ${He} ${Ae} levels up, current level is ${T}`}}return zt.getData=de,zt}var Wi={},$g;function pc(){if($g)return Wi;$g=1,Object.defineProperty(Wi,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Wi.default=e,Wi}var Xi={},bg;function Qi(){if(bg)return Xi;bg=1,Object.defineProperty(Xi,"__esModule",{value:!0});const e=Fe;class t extends Error{constructor(i,n,o,a){super(a||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,e.resolveUrl)(i,n,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return Xi.default=t,Xi}var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.resolveSchema=Qe.getCompilingSchema=Qe.resolveRef=Qe.compileSchema=Qe.SchemaEnv=void 0;const $t=ce,TS=pc(),Yt=Rt(),bt=Fe,wg=Z,PS=Hi();class Yi{constructor(t){var r;this.refs={},this.dynamicAnchors={};let i;typeof t.schema=="object"&&(i=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,bt.normalizeId)(i?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=i?.$async,this.refs={}}}Qe.SchemaEnv=Yi;function mc(e){const t=kg.call(this,e);if(t)return t;const r=(0,bt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:n}=this.opts.code,{ownProperties:o}=this.opts,a=new $t.CodeGen(this.scope,{es5:i,lines:n,ownProperties:o});let s;e.$async&&(s=a.scopeValue("Error",{ref:TS.default,code:(0,$t._)`require("ajv/dist/runtime/validation_error").default`}));const c=a.scopeName("validate");e.validateName=c;const u={gen:a,allErrors:this.opts.allErrors,data:Yt.default.data,parentData:Yt.default.parentData,parentDataProperty:Yt.default.parentDataProperty,dataNames:[Yt.default.data],dataPathArr:[$t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,$t.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:$t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,$t._)`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,PS.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);const d=a.toString();l=`${a.scopeRefs(Yt.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const p=new Function(`${Yt.default.self}`,`${Yt.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){const{props:h,items:b}=u;p.evaluated={props:h instanceof $t.Name?void 0:h,items:b instanceof $t.Name?void 0:b,dynamicProps:h instanceof $t.Name,dynamicItems:b instanceof $t.Name},p.source&&(p.source.evaluated=(0,$t.stringify)(p.evaluated))}return e.validate=p,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}Qe.compileSchema=mc;function ES(e,t,r){var i;r=(0,bt.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let o=NS.call(this,e,r);if(o===void 0){const a=(i=e.localRefs)===null||i===void 0?void 0:i[r],{schemaId:s}=this.opts;a&&(o=new Yi({schema:a,schemaId:s,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=zS.call(this,o)}Qe.resolveRef=ES;function zS(e){return(0,bt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:mc.call(this,e)}function kg(e){for(const t of this._compilations)if(xS(t,e))return t}Qe.getCompilingSchema=kg;function xS(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function NS(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||eo.call(this,e,t)}function eo(e,t){const r=this.opts.uriResolver.parse(t),i=(0,bt._getFullPath)(this.opts.uriResolver,r);let n=(0,bt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return fc.call(this,r,e);const o=(0,bt.normalizeId)(i),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){const s=eo.call(this,e,a);return typeof s?.schema!="object"?void 0:fc.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||mc.call(this,a),o===(0,bt.normalizeId)(t)){const{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(n=(0,bt.resolveUrl)(this.opts.uriResolver,n,u)),new Yi({schema:s,schemaId:c,root:e,baseId:n})}return fc.call(this,r,a)}}Qe.resolveSchema=eo;const jS=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function fc(e,{baseId:t,schema:r,root:i}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const s of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const c=r[(0,wg.unescapeFragment)(s)];if(c===void 0)return;r=c;const u=typeof r=="object"&&r[this.opts.schemaId];!jS.has(s)&&u&&(t=(0,bt.resolveUrl)(this.opts.uriResolver,t,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,wg.schemaHasRulesButRef)(r,this.RULES)){const s=(0,bt.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=eo.call(this,i,s)}const{schemaId:a}=this.opts;if(o=o||new Yi({schema:r,schemaId:a,root:i,baseId:t}),o.schema!==o.root.schema)return o}var CS="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",DS="Meta-schema for $data reference (JSON AnySchema extension proposal)",AS="object",RS=["$data"],US={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ZS=!1,FS={$id:CS,description:DS,type:AS,required:RS,properties:US,additionalProperties:ZS},hc={},to={exports:{}};const MS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Sg=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),gc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Ig=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),GS=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Og(e){let t="",r=0,i=0;for(i=0;i<e.length;i++)if(r=e[i].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i<e.length;i++){if(r=e[i].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}const LS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Tg(e){return e.length=0,!0}function VS(e,t,r){if(e.length){const i=Og(e);if(i!=="")t.push(i);else return r.error=!0,!1;e.length=0}return!0}function BS(e){let t=0;const r={error:!1,address:"",zone:""},i=[],n=[];let o=!1,a=!1,s=VS;for(let c=0;c<e.length;c++){const u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(o===!0&&(a=!0),!s(n,i,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(o=!0),i.push(":");continue}else if(u==="%"){if(!s(n,i,r))break;s=Tg}else{n.push(u);continue}}return n.length&&(s===Tg?r.zone=n.join(""):a?i.push(n.join("")):i.push(Og(n))),r.address=i.join(""),r}function Pg(e){if(qS(e,":")<2)return{host:e,isIPV6:!1};const t=BS(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,i=t.address;return t.zone&&(r+="%"+t.zone,i+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:i}}}function qS(e,t){let r=0;for(let i=0;i<e.length;i++)e[i]===t&&r++;return r}function JS(e){let t=e;const r=[];let i=-1,n=0;for(;n=t.length;){if(n===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(n===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(n===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((i=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,i)),t=t.slice(i)}return r.join("")}const KS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},HS=/[@/?#:]/g,WS=/[@/?#]/g;function Eg(e,t){const r=t?WS:HS;return r.lastIndex=0,e.replace(r,i=>KS[i])}function XS(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let i=0;i<e.length;i++){if(e[i]==="%"&&i+2<e.length){const n=e.slice(i+1,i+3);if(gc(n)){const o=n.toUpperCase(),a=String.fromCharCode(parseInt(o,16));t&&Ig(a)?r+=a:r+="%"+o,i+=2;continue}}r+=e[i]}return r}function QS(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){const i=e.slice(r+1,r+3);if(gc(i)){const n=i.toUpperCase(),o=String.fromCharCode(parseInt(n,16));o!=="."&&Ig(o)?t+=o:t+="%"+n,r+=2;continue}}GS(e[r])?t+=e[r]:t+=escape(e[r])}return t}function YS(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){const i=e.slice(r+1,r+3);if(gc(i)){t+="%"+i.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function eI(e){const t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!Sg(r)){const i=Pg(r);i.isIPV6===!0?r=`[${i.escapedHost}]`:r=Eg(r,!1)}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}var zg={nonSimpleDomain:LS,recomposeAuthority:eI,reescapeHostDelimiters:Eg,normalizePercentEncoding:XS,normalizePathEncoding:QS,escapePreservingEscapes:YS,removeDotSegments:JS,isIPv4:Sg,isUUID:MS,normalizeIPv6:Pg};const{isUUID:tI}=zg,nI=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function xg(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function Ng(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function jg(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function rI(e){return e.secure=xg(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function iI(e){if((e.port===(xg(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function oI(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(nI);if(r){const i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const n=`${i}:${t.nid||e.nid}`,o=vc(n);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function aI(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");const r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),n=`${r}:${t.nid||i}`,o=vc(n);o&&(e=o.serialize(e,t));const a=e,s=e.nss;return a.path=`${i||t.nid}:${s}`,t.skipEscape=!0,a}function sI(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!tI(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function cI(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const Cg={scheme:"http",domainHost:!0,parse:Ng,serialize:jg},uI={scheme:"https",domainHost:Cg.domainHost,parse:Ng,serialize:jg},no={scheme:"ws",domainHost:!0,parse:rI,serialize:iI},lI={scheme:"wss",domainHost:no.domainHost,parse:no.parse,serialize:no.serialize},dI={scheme:"urn",parse:oI,serialize:aI,skipNormalize:!0},pI={scheme:"urn:uuid",parse:sI,serialize:cI,skipNormalize:!0},ro={http:Cg,https:uI,ws:no,wss:lI,urn:dI,"urn:uuid":pI};Object.setPrototypeOf(ro,null);function vc(e){return e&&(ro[e]||ro[e.toLowerCase()])||void 0}var mI={SCHEMES:ro,getSchemeHandler:vc};const{normalizeIPv6:fI,removeDotSegments:wr,recomposeAuthority:hI,normalizePercentEncoding:gI,normalizePathEncoding:vI,escapePreservingEscapes:yI,reescapeHostDelimiters:_I,isIPv4:$I,nonSimpleDomain:bI}=zg,{SCHEMES:wI,getSchemeHandler:Dg}=mI;function kI(e,t){return typeof e=="string"?e=EI(e,t):typeof e=="object"&&(e=Sn(en(e,t),t)),e}function SI(e,t,r){const i=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=Ag(Sn(e,i),Sn(t,i),i,!0);return i.skipEscape=!0,en(n,i)}function Ag(e,t,r,i){const n={};return i||(e=Sn(en(e,r),r),t=Sn(en(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=wr(t.path||""),n.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=wr(t.path||""),n.query=t.query):(t.path?(t.path[0]==="/"?n.path=wr(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?n.path="/"+t.path:e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path,n.path=wr(n.path)),n.query=t.query):(n.path=e.path,t.query!==void 0?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function II(e,t,r){const i=Zg(e,r),n=Zg(t,r);return i!==void 0&&n!==void 0&&i.toLowerCase()===n.toLowerCase()}function en(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},i=Object.assign({},t),n=[],o=Dg(i.scheme||r.scheme);o&&o.serialize&&o.serialize(r,i),r.path!==void 0&&(i.skipEscape?r.path=gI(r.path):(r.path=yI(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),i.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");const a=hI(r);if(a!==void 0&&(i.reference!=="suffix"&&n.push("//"),n.push(a),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let s=r.path;!i.absolutePath&&(!o||!o.absolutePath)&&(s=wr(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),n.push(s)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}const OI=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,TI=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function PI(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Rg(e,t){const r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let n=!1,o=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);const a=e.match(TI);a!==null&&a[1].indexOf("\\")!==-1&&(i.error="URI authority must not contain a literal backslash.",n=!0);const s=e.match(OI);if(s){i.scheme=s[1],i.userinfo=s[3],i.host=s[4],i.port=parseInt(s[5],10),i.path=s[6]||"",i.query=s[7],i.fragment=s[8],isNaN(i.port)&&(i.port=s[5]);const c=PI(i,s);if(c!==void 0&&(i.error=i.error||c,n=!0),i.host)if($I(i.host)===!1){const d=fI(i.host);i.host=d.host.toLowerCase(),o=d.isIPV6}else o=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference="same-document":i.scheme===void 0?i.reference="relative":i.fragment===void 0?i.reference="absolute":i.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const u=Dg(r.scheme||i.scheme);if(!r.unicodeSupport&&(!u||!u.unicodeSupport)&&i.host&&(r.domainHost||u&&u.domainHost)&&o===!1&&bI(i.host))try{i.host=new URL("http://"+i.host).hostname}catch(l){i.error=i.error||"Host's domain name can not be converted to ASCII: "+l}if((!u||u&&!u.skipNormalize)&&(e.indexOf("%")!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=_I(unescape(i.host),o))),i.path&&(i.path=vI(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||"URI malformed"}u&&u.parse&&u.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n}}function Sn(e,t){return Rg(e,t).parsed}function EI(e,t){return Ug(e,t).normalized}function Ug(e,t){const{parsed:r,malformedAuthorityOrPort:i}=Rg(e,t);return{normalized:i?e:en(r,t),malformedAuthorityOrPort:i}}function Zg(e,t){if(typeof e=="string"){const{normalized:r,malformedAuthorityOrPort:i}=Ug(e,t);return i?void 0:r}if(typeof e=="object")return en(e,t)}const yc={SCHEMES:wI,normalize:kI,resolve:SI,resolveComponent:Ag,equal:II,serialize:en,parse:Sn};to.exports=yc,to.exports.default=yc,to.exports.fastUri=yc;var zI=to.exports;Object.defineProperty(hc,"__esModule",{value:!0});const Fg=zI;Fg.code='require("ajv/dist/runtime/uri").default',hc.default=Fg,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Hi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ce;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=pc(),n=Qi(),o=Qt,a=Qe,s=ce,c=Fe,u=je,l=Z,d=FS,m=hc,p=(A,I)=>new RegExp(A,I);p.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),$={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."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},g=200;function w(A){var I,j,P,f,v,E,M,q,me,de,S,T,N,D,V,ue,De,ht,Ke,He,Ae,an,st,_o,$o;const Nn=A.strict,bo=(I=A.code)===null||I===void 0?void 0:I.optimize,ru=bo===!0||bo===void 0?1:bo||0,iu=(P=(j=A.code)===null||j===void 0?void 0:j.regExp)!==null&&P!==void 0?P:p,zv=(f=A.uriResolver)!==null&&f!==void 0?f:m.default;return{strictSchema:(E=(v=A.strictSchema)!==null&&v!==void 0?v:Nn)!==null&&E!==void 0?E:!0,strictNumbers:(q=(M=A.strictNumbers)!==null&&M!==void 0?M:Nn)!==null&&q!==void 0?q:!0,strictTypes:(de=(me=A.strictTypes)!==null&&me!==void 0?me:Nn)!==null&&de!==void 0?de:"log",strictTuples:(T=(S=A.strictTuples)!==null&&S!==void 0?S:Nn)!==null&&T!==void 0?T:"log",strictRequired:(D=(N=A.strictRequired)!==null&&N!==void 0?N:Nn)!==null&&D!==void 0?D:!1,code:A.code?{...A.code,optimize:ru,regExp:iu}:{optimize:ru,regExp:iu},loopRequired:(V=A.loopRequired)!==null&&V!==void 0?V:g,loopEnum:(ue=A.loopEnum)!==null&&ue!==void 0?ue:g,meta:(De=A.meta)!==null&&De!==void 0?De:!0,messages:(ht=A.messages)!==null&&ht!==void 0?ht:!0,inlineRefs:(Ke=A.inlineRefs)!==null&&Ke!==void 0?Ke:!0,schemaId:(He=A.schemaId)!==null&&He!==void 0?He:"$id",addUsedSchema:(Ae=A.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(an=A.validateSchema)!==null&&an!==void 0?an:!0,validateFormats:(st=A.validateFormats)!==null&&st!==void 0?st:!0,unicodeRegExp:(_o=A.unicodeRegExp)!==null&&_o!==void 0?_o:!0,int32range:($o=A.int32range)!==null&&$o!==void 0?$o:!0,uriResolver:zv}}class O{constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,...w(I)};const{es5:j,lines:P}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:b,es5:j,lines:P}),this.logger=X(I.logger);const f=I.validateFormats;I.validateFormats=!1,this.RULES=(0,o.getRules)(),x.call(this,$,I,"NOT SUPPORTED"),x.call(this,y,I,"DEPRECATED","warn"),this._metaOpts=Pe.call(this),I.formats&&pe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&Ie.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),Q.call(this),I.validateFormats=f}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:I,meta:j,schemaId:P}=this.opts;let f=d;P==="id"&&(f={...d},f.id=f.$id,delete f.$id),j&&I&&this.addMetaSchema(f,f[P],!1)}defaultMeta(){const{meta:I,schemaId:j}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[j]||I:void 0}validate(I,j){let P;if(typeof I=="string"){if(P=this.getSchema(I),!P)throw new Error(`no schema with key or ref "${I}"`)}else P=this.compile(I);const f=P(j);return"$async"in P||(this.errors=P.errors),f}compile(I,j){const P=this._addSchema(I,j);return P.validate||this._compileSchemaEnv(P)}compileAsync(I,j){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return f.call(this,I,j);async function f(de,S){await v.call(this,de.$schema);const T=this._addSchema(de,S);return T.validate||E.call(this,T)}async function v(de){de&&!this.getSchema(de)&&await f.call(this,{$ref:de},!0)}async function E(de){try{return this._compileSchemaEnv(de)}catch(S){if(!(S instanceof n.default))throw S;return M.call(this,S),await q.call(this,S.missingSchema),E.call(this,de)}}function M({missingSchema:de,missingRef:S}){if(this.refs[de])throw new Error(`AnySchema ${de} is loaded but ${S} cannot be resolved`)}async function q(de){const S=await me.call(this,de);this.refs[de]||await v.call(this,S.$schema),this.refs[de]||this.addSchema(S,de,j)}async function me(de){const S=this._loading[de];if(S)return S;try{return await(this._loading[de]=P(de))}finally{delete this._loading[de]}}}addSchema(I,j,P,f=this.opts.validateSchema){if(Array.isArray(I)){for(const E of I)this.addSchema(E,void 0,P,f);return this}let v;if(typeof I=="object"){const{schemaId:E}=this.opts;if(v=I[E],v!==void 0&&typeof v!="string")throw new Error(`schema ${E} must be string`)}return j=(0,c.normalizeId)(j||v),this._checkUnique(j),this.schemas[j]=this._addSchema(I,P,j,f,!0),this}addMetaSchema(I,j,P=this.opts.validateSchema){return this.addSchema(I,j,!0,P),this}validateSchema(I,j){if(typeof I=="boolean")return!0;let P;if(P=I.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const f=this.validate(P,I);if(!f&&j){const v="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(v);else throw new Error(v)}return f}getSchema(I){let j;for(;typeof(j=L.call(this,I))=="string";)I=j;if(j===void 0){const{schemaId:P}=this.opts,f=new a.SchemaEnv({schema:{},schemaId:P});if(j=a.resolveSchema.call(this,f,I),!j)return;this.refs[I]=j}return j.validate||this._compileSchemaEnv(j)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const j=L.call(this,I);return typeof j=="object"&&this._cache.delete(j.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{const j=I;this._cache.delete(j);let P=I[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(const j of I)this.addKeyword(j);return this}addKeyword(I,j){let P;if(typeof I=="string")P=I,typeof j=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),j.keyword=P);else if(typeof I=="object"&&j===void 0){if(j=I,P=j.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,P,j),!j)return(0,l.eachItem)(P,v=>Ee.call(this,v)),this;at.call(this,j);const f={...j,type:(0,u.getJSONTypes)(j.type),schemaType:(0,u.getJSONTypes)(j.schemaType)};return(0,l.eachItem)(P,f.type.length===0?v=>Ee.call(this,v,f):v=>f.type.forEach(E=>Ee.call(this,v,f,E))),this}getKeyword(I){const j=this.RULES.all[I];return typeof j=="object"?j.definition:!!j}removeKeyword(I){const{RULES:j}=this;delete j.keywords[I],delete j.all[I];for(const P of j.rules){const f=P.rules.findIndex(v=>v.keyword===I);f>=0&&P.rules.splice(f,1)}return this}addFormat(I,j){return typeof j=="string"&&(j=new RegExp(j)),this.formats[I]=j,this}errorsText(I=this.errors,{separator:j=", ",dataVar:P="data"}={}){return!I||I.length===0?"No errors":I.map(f=>`${P}${f.instancePath} ${f.message}`).reduce((f,v)=>f+j+v)}$dataMetaSchema(I,j){const P=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(const f of j){const v=f.split("/").slice(1);let E=I;for(const M of v)E=E[M];for(const M in P){const q=P[M];if(typeof q!="object")continue;const{$data:me}=q.definition,de=E[M];me&&de&&(E[M]=Ot(de))}}return I}_removeAllSchemas(I,j){for(const P in I){const f=I[P];(!j||j.test(P))&&(typeof f=="string"?delete I[P]:f&&!f.meta&&(this._cache.delete(f.schema),delete I[P]))}}_addSchema(I,j,P,f=this.opts.validateSchema,v=this.opts.addUsedSchema){let E;const{schemaId:M}=this.opts;if(typeof I=="object")E=I[M];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof I!="boolean")throw new Error("schema must be object or boolean")}let q=this._cache.get(I);if(q!==void 0)return q;P=(0,c.normalizeId)(E||P);const me=c.getSchemaRefs.call(this,I,P);return q=new a.SchemaEnv({schema:I,schemaId:M,meta:j,baseId:P,localRefs:me}),this._cache.set(q.schema,q),v&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=q),f&&this.validateSchema(I,!0),q}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw new Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):a.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}_compileMetaSchema(I){const j=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,I)}finally{this.opts=j}}}O.ValidationError=i.default,O.MissingRefError=n.default,e.default=O;function x(A,I,j,P="error"){for(const f in A){const v=f;v in I&&this.logger[P](`${j}: option ${f}. ${A[v]}`)}}function L(A){return A=(0,c.normalizeId)(A),this.schemas[A]||this.refs[A]}function Q(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const I in A)this.addSchema(A[I],I)}function pe(){for(const A in this.opts.formats){const I=this.opts.formats[A];I&&this.addFormat(A,I)}}function Ie(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const I in A){const j=A[I];j.keyword||(j.keyword=I),this.addKeyword(j)}}function Pe(){const A={...this.opts};for(const I of h)delete A[I];return A}const F={log(){},warn(){},error(){}};function X(A){if(A===!1)return F;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const ne=/^[a-z_$][a-z0-9_$:-]*$/i;function K(A,I){const{RULES:j}=this;if((0,l.eachItem)(A,P=>{if(j.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!ne.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function Ee(A,I,j){var P;const f=I?.post;if(j&&f)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:v}=this;let E=f?v.post:v.rules.find(({type:q})=>q===j);if(E||(E={type:j,rules:[]},v.rules.push(E)),v.keywords[A]=!0,!I)return;const M={keyword:A,definition:{...I,type:(0,u.getJSONTypes)(I.type),schemaType:(0,u.getJSONTypes)(I.schemaType)}};I.before?ot.call(this,E,M,I.before):E.rules.push(M),v.all[A]=M,(P=I.implements)===null||P===void 0||P.forEach(q=>this.addKeyword(q))}function ot(A,I,j){const P=A.rules.findIndex(f=>f.keyword===j);P>=0?A.rules.splice(P,0,I):(A.rules.push(I),this.logger.warn(`rule ${j} is not defined`))}function at(A){let{metaSchema:I}=A;I!==void 0&&(A.$data&&this.opts.$data&&(I=Ot(I)),A.validateSchema=this.compile(I,!0))}const Gt={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ot(A){return{anyOf:[A,Gt]}}})(Kh);var _c={},$c={},bc={};Object.defineProperty(bc,"__esModule",{value:!0});const xI={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};bc.default=xI;var tn={};Object.defineProperty(tn,"__esModule",{value:!0}),tn.callRef=tn.getValidate=void 0;const NI=Qi(),Mg=_t(),Ye=ce,In=Rt(),Gg=Qe,io=Z,jI={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:n,schemaEnv:o,validateName:a,opts:s,self:c}=i,{root:u}=o;if((r==="#"||r==="#/")&&n===u.baseId)return d();const l=Gg.resolveRef.call(c,u,n,r);if(l===void 0)throw new NI.default(i.opts.uriResolver,n,r);if(l instanceof Gg.SchemaEnv)return m(l);return p(l);function d(){if(o===u)return oo(e,a,o,o.$async);const h=t.scopeValue("root",{ref:u});return oo(e,(0,Ye._)`${h}.validate`,u,u.$async)}function m(h){const b=Lg(e,h);oo(e,b,h,h.$async)}function p(h){const b=t.scopeValue("schema",s.code.source===!0?{ref:h,code:(0,Ye.stringify)(h)}:{ref:h}),$=t.name("valid"),y=e.subschema({schema:h,dataTypes:[],schemaPath:Ye.nil,topSchemaRef:b,errSchemaPath:r},$);e.mergeEvaluated(y),e.ok($)}}};function Lg(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ye._)`${r.scopeValue("wrapper",{ref:t})}.validate`}tn.getValidate=Lg;function oo(e,t,r,i){const{gen:n,it:o}=e,{allErrors:a,schemaEnv:s,opts:c}=o,u=c.passContext?In.default.this:Ye.nil;i?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");const h=n.let("valid");n.try(()=>{n.code((0,Ye._)`await ${(0,Mg.callValidateCode)(e,t,u)}`),p(t),a||n.assign(h,!0)},b=>{n.if((0,Ye._)`!(${b} instanceof ${o.ValidationError})`,()=>n.throw(b)),m(b),a||n.assign(h,!1)}),e.ok(h)}function d(){e.result((0,Mg.callValidateCode)(e,t,u),()=>p(t),()=>m(t))}function m(h){const b=(0,Ye._)`${h}.errors`;n.assign(In.default.vErrors,(0,Ye._)`${In.default.vErrors} === null ? ${b} : ${In.default.vErrors}.concat(${b})`),n.assign(In.default.errors,(0,Ye._)`${In.default.vErrors}.length`)}function p(h){var b;if(!o.opts.unevaluated)return;const $=(b=r?.validate)===null||b===void 0?void 0:b.evaluated;if(o.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(o.props=io.mergeEvaluated.props(n,$.props,o.props));else{const y=n.var("props",(0,Ye._)`${h}.evaluated.props`);o.props=io.mergeEvaluated.props(n,y,o.props,Ye.Name)}if(o.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(o.items=io.mergeEvaluated.items(n,$.items,o.items));else{const y=n.var("items",(0,Ye._)`${h}.evaluated.items`);o.items=io.mergeEvaluated.items(n,y,o.items,Ye.Name)}}}tn.callRef=oo,tn.default=jI,Object.defineProperty($c,"__esModule",{value:!0});const CI=bc,DI=tn,AI=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",CI.default,DI.default];$c.default=AI;var wc={},kc={};Object.defineProperty(kc,"__esModule",{value:!0});const ao=ce,Zt=ao.operators,so={maximum:{okStr:"<=",ok:Zt.LTE,fail:Zt.GT},minimum:{okStr:">=",ok:Zt.GTE,fail:Zt.LT},exclusiveMaximum:{okStr:"<",ok:Zt.LT,fail:Zt.GTE},exclusiveMinimum:{okStr:">",ok:Zt.GT,fail:Zt.LTE}},RI={message:({keyword:e,schemaCode:t})=>(0,ao.str)`must be ${so[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,ao._)`{comparison: ${so[e].okStr}, limit: ${t}}`},UI={keyword:Object.keys(so),type:"number",schemaType:"number",$data:!0,error:RI,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,ao._)`${r} ${so[t].fail} ${i} || isNaN(${r})`)}};kc.default=UI;var Sc={};Object.defineProperty(Sc,"__esModule",{value:!0});const kr=ce,ZI={message:({schemaCode:e})=>(0,kr.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,kr._)`{multipleOf: ${e}}`},FI={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:ZI,code(e){const{gen:t,data:r,schemaCode:i,it:n}=e,o=n.opts.multipleOfPrecision,a=t.let("res"),s=o?(0,kr._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,kr._)`${a} !== parseInt(${a})`;e.fail$data((0,kr._)`(${i} === 0 || (${a} = ${r}/${i}, ${s}))`)}};Sc.default=FI;var Ic={},Oc={};Object.defineProperty(Oc,"__esModule",{value:!0});function Vg(e){const t=e.length;let r=0,i=0,n;for(;i<t;)r++,n=e.charCodeAt(i++),n>=55296&&n<=56319&&i<t&&(n=e.charCodeAt(i),(n&64512)===56320&&i++);return r}Oc.default=Vg,Vg.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(Ic,"__esModule",{value:!0});const nn=ce,MI=Z,GI=Oc,LI={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,nn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,nn._)`{limit: ${e}}`},VI={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:LI,code(e){const{keyword:t,data:r,schemaCode:i,it:n}=e,o=t==="maxLength"?nn.operators.GT:nn.operators.LT,a=n.opts.unicode===!1?(0,nn._)`${r}.length`:(0,nn._)`${(0,MI.useFunc)(e.gen,GI.default)}(${r})`;e.fail$data((0,nn._)`${a} ${o} ${i}`)}};Ic.default=VI;var Tc={};Object.defineProperty(Tc,"__esModule",{value:!0});const BI=_t(),qI=Z,On=ce,JI={message:({schemaCode:e})=>(0,On.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,On._)`{pattern: ${e}}`},KI={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:JI,code(e){const{gen:t,data:r,$data:i,schema:n,schemaCode:o,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(i){const{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,On._)`new RegExp`:(0,qI.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,On._)`${u}(${o}, ${s}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,On._)`!${l}`)}else{const c=(0,BI.usePattern)(e,n);e.fail$data((0,On._)`!${c}.test(${r})`)}}};Tc.default=KI;var Pc={};Object.defineProperty(Pc,"__esModule",{value:!0});const Sr=ce,HI={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Sr.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Sr._)`{limit: ${e}}`},WI={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:HI,code(e){const{keyword:t,data:r,schemaCode:i}=e,n=t==="maxProperties"?Sr.operators.GT:Sr.operators.LT;e.fail$data((0,Sr._)`Object.keys(${r}).length ${n} ${i}`)}};Pc.default=WI;var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});const Ir=_t(),Or=ce,XI=Z,QI={message:({params:{missingProperty:e}})=>(0,Or.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Or._)`{missingProperty: ${e}}`},YI={keyword:"required",type:"object",schemaType:"array",$data:!0,error:QI,code(e){const{gen:t,schema:r,schemaCode:i,data:n,$data:o,it:a}=e,{opts:s}=a;if(!o&&r.length===0)return;const c=r.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){const p=e.parentSchema.properties,{definedProperties:h}=e.it;for(const b of r)if(p?.[b]===void 0&&!h.has(b)){const $=a.schemaEnv.baseId+a.errSchemaPath,y=`required property "${b}" is not defined at "${$}" (strictRequired)`;(0,XI.checkStrictMode)(a,y,a.opts.strictRequired)}}function u(){if(c||o)e.block$data(Or.nil,d);else for(const p of r)(0,Ir.checkReportMissingProp)(e,p)}function l(){const p=t.let("missing");if(c||o){const h=t.let("valid",!0);e.block$data(h,()=>m(p,h)),e.ok(h)}else t.if((0,Ir.checkMissingProp)(e,r,p)),(0,Ir.reportMissingProp)(e,p),t.else()}function d(){t.forOf("prop",i,p=>{e.setParams({missingProperty:p}),t.if((0,Ir.noPropertyInData)(t,n,p,s.ownProperties),()=>e.error())})}function m(p,h){e.setParams({missingProperty:p}),t.forOf(p,i,()=>{t.assign(h,(0,Ir.propertyInData)(t,n,p,s.ownProperties)),t.if((0,Or.not)(h),()=>{e.error(),t.break()})},Or.nil)}}};Ec.default=YI;var zc={};Object.defineProperty(zc,"__esModule",{value:!0});const Tr=ce,e0={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Tr.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Tr._)`{limit: ${e}}`},t0={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:e0,code(e){const{keyword:t,data:r,schemaCode:i}=e,n=t==="maxItems"?Tr.operators.GT:Tr.operators.LT;e.fail$data((0,Tr._)`${r}.length ${n} ${i}`)}};zc.default=t0;var xc={},Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});const Bg=fg;Bg.code='require("ajv/dist/runtime/equal").default',Pr.default=Bg,Object.defineProperty(xc,"__esModule",{value:!0});const Nc=je,Me=ce,n0=Z,r0=Pr,i0={message:({params:{i:e,j:t}})=>(0,Me.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Me._)`{i: ${e}, j: ${t}}`},o0={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:i0,code(e){const{gen:t,data:r,$data:i,schema:n,parentSchema:o,schemaCode:a,it:s}=e;if(!i&&!n)return;const c=t.let("valid"),u=o.items?(0,Nc.getSchemaTypes)(o.items):[];e.block$data(c,l,(0,Me._)`${a} === false`),e.ok(c);function l(){const h=t.let("i",(0,Me._)`${r}.length`),b=t.let("j");e.setParams({i:h,j:b}),t.assign(c,!0),t.if((0,Me._)`${h} > 1`,()=>(d()?m:p)(h,b))}function d(){return u.length>0&&!u.some(h=>h==="object"||h==="array")}function m(h,b){const $=t.name("item"),y=(0,Nc.checkDataTypes)(u,$,s.opts.strictNumbers,Nc.DataType.Wrong),g=t.const("indices",(0,Me._)`{}`);t.for((0,Me._)`;${h}--;`,()=>{t.let($,(0,Me._)`${r}[${h}]`),t.if(y,(0,Me._)`continue`),u.length>1&&t.if((0,Me._)`typeof ${$} == "string"`,(0,Me._)`${$} += "_"`),t.if((0,Me._)`typeof ${g}[${$}] == "number"`,()=>{t.assign(b,(0,Me._)`${g}[${$}]`),e.error(),t.assign(c,!1).break()}).code((0,Me._)`${g}[${$}] = ${h}`)})}function p(h,b){const $=(0,n0.useFunc)(t,r0.default),y=t.name("outer");t.label(y).for((0,Me._)`;${h}--;`,()=>t.for((0,Me._)`${b} = ${h}; ${b}--;`,()=>t.if((0,Me._)`${$}(${r}[${h}], ${r}[${b}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};xc.default=o0;var jc={};Object.defineProperty(jc,"__esModule",{value:!0});const Cc=ce,a0=Z,s0=Pr,c0={message:"must be equal to constant",params:({schemaCode:e})=>(0,Cc._)`{allowedValue: ${e}}`},u0={keyword:"const",$data:!0,error:c0,code(e){const{gen:t,data:r,$data:i,schemaCode:n,schema:o}=e;i||o&&typeof o=="object"?e.fail$data((0,Cc._)`!${(0,a0.useFunc)(t,s0.default)}(${r}, ${n})`):e.fail((0,Cc._)`${o} !== ${r}`)}};jc.default=u0;var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0});const Er=ce,l0=Z,d0=Pr,p0={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Er._)`{allowedValues: ${e}}`},m0={keyword:"enum",schemaType:"array",$data:!0,error:p0,code(e){const{gen:t,data:r,$data:i,schema:n,schemaCode:o,it:a}=e;if(!i&&n.length===0)throw new Error("enum must have non-empty array");const s=n.length>=a.opts.loopEnum;let c;const u=()=>c??(c=(0,l0.useFunc)(t,d0.default));let l;if(s||i)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const p=t.const("vSchema",o);l=(0,Er.or)(...n.map((h,b)=>m(p,b)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",o,p=>t.if((0,Er._)`${u()}(${r}, ${p})`,()=>t.assign(l,!0).break()))}function m(p,h){const b=n[h];return typeof b=="object"&&b!==null?(0,Er._)`${u()}(${r}, ${p}[${h}])`:(0,Er._)`${r} === ${b}`}}};Dc.default=m0,Object.defineProperty(wc,"__esModule",{value:!0});const f0=kc,h0=Sc,g0=Ic,v0=Tc,y0=Pc,_0=Ec,$0=zc,b0=xc,w0=jc,k0=Dc,S0=[f0.default,h0.default,g0.default,v0.default,y0.default,_0.default,$0.default,b0.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},w0.default,k0.default];wc.default=S0;var Ac={},Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.validateAdditionalItems=void 0;const rn=ce,Rc=Z,I0={message:({params:{len:e}})=>(0,rn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,rn._)`{limit: ${e}}`},O0={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:I0,code(e){const{parentSchema:t,it:r}=e,{items:i}=t;if(!Array.isArray(i)){(0,Rc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}qg(e,i)}};function qg(e,t){const{gen:r,schema:i,data:n,keyword:o,it:a}=e;a.items=!0;const s=r.const("len",(0,rn._)`${n}.length`);if(i===!1)e.setParams({len:t.length}),e.pass((0,rn._)`${s} <= ${t.length}`);else if(typeof i=="object"&&!(0,Rc.alwaysValidSchema)(a,i)){const u=r.var("valid",(0,rn._)`${s} <= ${t.length}`);r.if((0,rn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,s,l=>{e.subschema({keyword:o,dataProp:l,dataPropType:Rc.Type.Num},u),a.allErrors||r.if((0,rn.not)(u),()=>r.break())})}}Tn.validateAdditionalItems=qg,Tn.default=O0;var Uc={},Pn={};Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.validateTuple=void 0;const Jg=ce,co=Z,T0=_t(),P0={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return Kg(e,"additionalItems",t);r.items=!0,!(0,co.alwaysValidSchema)(r,t)&&e.ok((0,T0.validateArray)(e))}};function Kg(e,t,r=e.schema){const{gen:i,parentSchema:n,data:o,keyword:a,it:s}=e;l(n),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=co.mergeEvaluated.items(i,r.length,s.items));const c=i.name("valid"),u=i.const("len",(0,Jg._)`${o}.length`);r.forEach((d,m)=>{(0,co.alwaysValidSchema)(s,d)||(i.if((0,Jg._)`${u} > ${m}`,()=>e.subschema({keyword:a,schemaProp:m,dataProp:m},c)),e.ok(c))});function l(d){const{opts:m,errSchemaPath:p}=s,h=r.length,b=h===d.minItems&&(h===d.maxItems||d[t]===!1);if(m.strictTuples&&!b){const $=`"${a}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,co.checkStrictMode)(s,$,m.strictTuples)}}}Pn.validateTuple=Kg,Pn.default=P0,Object.defineProperty(Uc,"__esModule",{value:!0});const E0=Pn,z0={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,E0.validateTuple)(e,"items")};Uc.default=z0;var Zc={};Object.defineProperty(Zc,"__esModule",{value:!0});const Hg=ce,x0=Z,N0=_t(),j0=Tn,C0={message:({params:{len:e}})=>(0,Hg.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Hg._)`{limit: ${e}}`},D0={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:C0,code(e){const{schema:t,parentSchema:r,it:i}=e,{prefixItems:n}=r;i.items=!0,!(0,x0.alwaysValidSchema)(i,t)&&(n?(0,j0.validateAdditionalItems)(e,n):e.ok((0,N0.validateArray)(e)))}};Zc.default=D0;var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});const mt=ce,uo=Z,A0={message:({params:{min:e,max:t}})=>t===void 0?(0,mt.str)`must contain at least ${e} valid item(s)`:(0,mt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,mt._)`{minContains: ${e}}`:(0,mt._)`{minContains: ${e}, maxContains: ${t}}`},R0={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:A0,code(e){const{gen:t,schema:r,parentSchema:i,data:n,it:o}=e;let a,s;const{minContains:c,maxContains:u}=i;o.opts.next?(a=c===void 0?1:c,s=u):a=1;const l=t.const("len",(0,mt._)`${n}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,uo.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,uo.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,uo.alwaysValidSchema)(o,r)){let b=(0,mt._)`${l} >= ${a}`;s!==void 0&&(b=(0,mt._)`${b} && ${l} <= ${s}`),e.pass(b);return}o.items=!0;const d=t.name("valid");s===void 0&&a===1?p(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),s!==void 0&&t.if((0,mt._)`${n}.length > 0`,m)):(t.let(d,!1),m()),e.result(d,()=>e.reset());function m(){const b=t.name("_valid"),$=t.let("count",0);p(b,()=>t.if(b,()=>h($)))}function p(b,$){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:uo.Type.Num,compositeRule:!0},b),$()})}function h(b){t.code((0,mt._)`${b}++`),s===void 0?t.if((0,mt._)`${b} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,mt._)`${b} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,mt._)`${b} >= ${a}`,()=>t.assign(d,!0)))}}};Fc.default=R0;var Wg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ce,r=Z,i=_t();e.error={message:({params:{property:c,depsCount:u,deps:l}})=>{const d=u===1?"property":"properties";return(0,t.str)`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>(0,t._)`{property: ${c},
76
76
  missingProperty: ${d},
77
77
  depsCount: ${u},
78
- deps: ${l}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[u,l]=o(c);a(c,u),s(c,l)}};function o({schema:c}){const u={},l={};for(const d in c){if(d==="__proto__")continue;const m=Array.isArray(c[d])?u:l;m[d]=c[d]}return[u,l]}function a(c,u=c.schema){const{gen:l,data:d,it:m}=c;if(Object.keys(u).length===0)return;const p=l.let("missing");for(const h in u){const b=u[h];if(b.length===0)continue;const $=(0,i.propertyInData)(l,d,h,m.opts.ownProperties);c.setParams({property:h,depsCount:b.length,deps:b.join(", ")}),m.allErrors?l.if($,()=>{for(const y of b)(0,i.checkReportMissingProp)(c,y)}):(l.if((0,t._)`${$} && (${(0,i.checkMissingProp)(c,b,p)})`),(0,i.reportMissingProp)(c,p),l.else())}}e.validatePropertyDeps=a;function s(c,u=c.schema){const{gen:l,data:d,keyword:m,it:p}=c,h=l.name("valid");for(const b in u)(0,r.alwaysValidSchema)(p,u[b])||(l.if((0,i.propertyInData)(l,d,b,p.opts.ownProperties),()=>{const $=c.subschema({keyword:m,schemaProp:b},h);c.mergeValidEvaluated($,h)},()=>l.var(h,!0)),c.ok(h))}e.validateSchemaDeps=s,e.default=n})(Wg);var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});const Xg=ce,U0=Z,Z0={message:"property name must be valid",params:({params:e})=>(0,Xg._)`{propertyName: ${e.propertyName}}`},M0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Z0,code(e){const{gen:t,schema:r,data:i,it:n}=e;if((0,U0.alwaysValidSchema)(n,r))return;const o=t.name("valid");t.forIn("key",i,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,Xg.not)(o),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(o)}};Fc.default=M0;var lo={};Object.defineProperty(lo,"__esModule",{value:!0});const po=_t(),kt=ce,F0=Rt(),mo=Z,G0={message:"must NOT have additional properties",params:({params:e})=>(0,kt._)`{additionalProperty: ${e.additionalProperty}}`},L0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:G0,code(e){const{gen:t,schema:r,parentSchema:i,data:n,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,mo.alwaysValidSchema)(a,r))return;const u=(0,po.allSchemaProperties)(i.properties),l=(0,po.allSchemaProperties)(i.patternProperties);d(),e.ok((0,kt._)`${o} === ${F0.default.errors}`);function d(){t.forIn("key",n,$=>{!u.length&&!l.length?h($):t.if(m($),()=>h($))})}function m($){let y;if(u.length>8){const g=(0,mo.schemaRefOrVal)(a,i.properties,"properties");y=(0,po.isOwnProperty)(t,g,$)}else u.length?y=(0,kt.or)(...u.map(g=>(0,kt._)`${$} === ${g}`)):y=kt.nil;return l.length&&(y=(0,kt.or)(y,...l.map(g=>(0,kt._)`${(0,po.usePattern)(e,g)}.test(${$})`))),(0,kt.not)(y)}function p($){t.code((0,kt._)`delete ${n}[${$}]`)}function h($){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p($);return}if(r===!1){e.setParams({additionalProperty:$}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,mo.alwaysValidSchema)(a,r)){const y=t.name("valid");c.removeAdditional==="failing"?(b($,y,!1),t.if((0,kt.not)(y),()=>{e.reset(),p($)})):(b($,y),s||t.if((0,kt.not)(y),()=>t.break()))}}function b($,y,g){const k={keyword:"additionalProperties",dataProp:$,dataPropType:mo.Type.Str};g===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,y)}}};lo.default=L0;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0});const V0=Hi(),Yg=_t(),Lc=Z,Qg=lo,B0={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:i,data:n,it:o}=e;o.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&Qg.default.code(new V0.KeywordCxt(o,Qg.default,"additionalProperties"));const a=(0,Yg.allSchemaProperties)(r);for(const d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=Lc.mergeEvaluated.props(t,(0,Lc.toHash)(a),o.props));const s=a.filter(d=>!(0,Lc.alwaysValidSchema)(o,r[d]));if(s.length===0)return;const c=t.name("valid");for(const d of s)u(d)?l(d):(t.if((0,Yg.propertyInData)(t,n,d,o.opts.ownProperties)),l(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Gc.default=B0;var Vc={};Object.defineProperty(Vc,"__esModule",{value:!0});const ev=_t(),fo=ce,tv=Z,nv=Z,q0={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:i,parentSchema:n,it:o}=e,{opts:a}=o,s=(0,ev.allSchemaProperties)(r),c=s.filter(b=>(0,tv.alwaysValidSchema)(o,r[b]));if(s.length===0||c.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;const u=a.strictSchema&&!a.allowMatchingProperties&&n.properties,l=t.name("valid");o.props!==!0&&!(o.props instanceof fo.Name)&&(o.props=(0,nv.evaluatedPropsToName)(t,o.props));const{props:d}=o;m();function m(){for(const b of s)u&&p(b),o.allErrors?h(b):(t.var(l,!0),h(b),t.if(l))}function p(b){for(const $ in u)new RegExp(b).test($)&&(0,tv.checkStrictMode)(o,`property ${$} matches pattern ${b} (use allowMatchingProperties)`)}function h(b){t.forIn("key",i,$=>{t.if((0,fo._)`${(0,ev.usePattern)(e,b)}.test(${$})`,()=>{const y=c.includes(b);y||e.subschema({keyword:"patternProperties",schemaProp:b,dataProp:$,dataPropType:nv.Type.Str},l),o.opts.unevaluated&&d!==!0?t.assign((0,fo._)`${d}[${$}]`,!0):!y&&!o.allErrors&&t.if((0,fo.not)(l),()=>t.break())})})}}};Vc.default=q0;var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0});const J0=Z,K0={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,J0.alwaysValidSchema)(i,r)){e.fail();return}const n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Bc.default=K0;var qc={};Object.defineProperty(qc,"__esModule",{value:!0});const H0=_t(),W0={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:H0.validateUnion,error:{message:"must match a schema in anyOf"}};qc.default=W0;var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0});const ho=ce,X0=Z,Y0={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,ho._)`{passingSchemas: ${e.passing}}`},Q0={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Y0,code(e){const{gen:t,schema:r,parentSchema:i,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&i.discriminator)return;const o=r,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(u),e.result(a,()=>e.reset(),()=>e.error(!0));function u(){o.forEach((l,d)=>{let m;(0,X0.alwaysValidSchema)(n,l)?t.var(c,!0):m=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,ho._)`${c} && ${a}`).assign(a,!1).assign(s,(0,ho._)`[${s}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,d),m&&e.mergeEvaluated(m,ho.Name)})})}}};Jc.default=Q0;var Kc={};Object.defineProperty(Kc,"__esModule",{value:!0});const eO=Z,tO={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=t.name("valid");r.forEach((o,a)=>{if((0,eO.alwaysValidSchema)(i,o))return;const s=e.subschema({keyword:"allOf",schemaProp:a},n);e.ok(n),e.mergeEvaluated(s)})}};Kc.default=tO;var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});const go=ce,rv=Z,nO={message:({params:e})=>(0,go.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,go._)`{failingKeyword: ${e.ifClause}}`},rO={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:nO,code(e){const{gen:t,parentSchema:r,it:i}=e;r.then===void 0&&r.else===void 0&&(0,rv.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const n=iv(i,"then"),o=iv(i,"else");if(!n&&!o)return;const a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),n&&o){const l=t.let("ifClause");e.setParams({ifClause:l}),t.if(s,u("then",l),u("else",l))}else n?t.if(s,u("then")):t.if((0,go.not)(s),u("else"));e.pass(a,()=>e.error(!0));function c(){const l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(l)}function u(l,d){return()=>{const m=e.subschema({keyword:l},s);t.assign(a,s),e.mergeValidEvaluated(m,a),d?t.assign(d,(0,go._)`${l}`):e.setParams({ifClause:l})}}}};function iv(e,t){const r=e.schema[t];return r!==void 0&&!(0,rv.alwaysValidSchema)(e,r)}Hc.default=rO;var Wc={};Object.defineProperty(Wc,"__esModule",{value:!0});const iO=Z,oO={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,iO.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Wc.default=oO,Object.defineProperty(Ac,"__esModule",{value:!0});const aO=Tn,sO=Uc,cO=Pn,uO=Zc,lO=Mc,dO=Wg,pO=Fc,mO=lo,fO=Gc,hO=Vc,gO=Bc,vO=qc,yO=Jc,_O=Kc,$O=Hc,bO=Wc;function kO(e=!1){const t=[gO.default,vO.default,yO.default,_O.default,$O.default,bO.default,pO.default,mO.default,dO.default,fO.default,hO.default];return e?t.push(sO.default,uO.default):t.push(aO.default,cO.default),t.push(lO.default),t}Ac.default=kO;var Xc={},Yc={};Object.defineProperty(Yc,"__esModule",{value:!0});const Ne=ce,wO={message:({schemaCode:e})=>(0,Ne.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ne._)`{format: ${e}}`},SO={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:wO,code(e,t){const{gen:r,data:i,$data:n,schema:o,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;n?m():p();function m(){const h=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),b=r.const("fDef",(0,Ne._)`${h}[${a}]`),$=r.let("fType"),y=r.let("format");r.if((0,Ne._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,()=>r.assign($,(0,Ne._)`${b}.type || "string"`).assign(y,(0,Ne._)`${b}.validate`),()=>r.assign($,(0,Ne._)`"string"`).assign(y,b)),e.fail$data((0,Ne.or)(g(),k()));function g(){return c.strictSchema===!1?Ne.nil:(0,Ne._)`${a} && !${y}`}function k(){const O=l.$async?(0,Ne._)`(${b}.async ? await ${y}(${i}) : ${y}(${i}))`:(0,Ne._)`${y}(${i})`,N=(0,Ne._)`(typeof ${y} == "function" ? ${O} : ${y}.test(${i}))`;return(0,Ne._)`${y} && ${y} !== true && ${$} === ${t} && !${N}`}}function p(){const h=d.formats[o];if(!h){g();return}if(h===!0)return;const[b,$,y]=k(h);b===t&&e.pass(O());function g(){if(c.strictSchema===!1){d.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function k(N){const L=N instanceof RegExp?(0,Ne.regexpCode)(N):c.code.formats?(0,Ne._)`${c.code.formats}${(0,Ne.getProperty)(o)}`:void 0,Y=r.scopeValue("formats",{key:o,ref:N,code:L});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,Ne._)`${Y}.validate`]:["string",N,Y]}function O(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ne._)`await ${y}(${i})`}return typeof $=="function"?(0,Ne._)`${y}(${i})`:(0,Ne._)`${y}.test(${i})`}}}};Yc.default=SO,Object.defineProperty(Xc,"__esModule",{value:!0});const IO=Yc,OO=[IO.default];Xc.default=OO;var En={};Object.defineProperty(En,"__esModule",{value:!0}),En.contentVocabulary=En.metadataVocabulary=void 0,En.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],En.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(_c,"__esModule",{value:!0});const TO=$c,PO=kc,EO=Ac,zO=Xc,ov=En,NO=[TO.default,PO.default,(0,EO.default)(),zO.default,ov.metadataVocabulary,ov.contentVocabulary];_c.default=NO;var Qc={},vo={};Object.defineProperty(vo,"__esModule",{value:!0}),vo.DiscrError=void 0;var av;(function(e){e.Tag="tag",e.Mapping="mapping"})(av||(vo.DiscrError=av={})),Object.defineProperty(Qc,"__esModule",{value:!0});const zn=ce,eu=vo,sv=Ye,xO=Yi(),jO=Z,CO={message:({params:{discrError:e,tagName:t}})=>e===eu.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,zn._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},DO={keyword:"discriminator",type:"object",schemaType:"object",error:CO,code(e){const{gen:t,data:r,schema:i,parentSchema:n,it:o}=e,{oneOf:a}=n;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const 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");const c=t.let("valid",!1),u=t.const("tag",(0,zn._)`${r}${(0,zn.getProperty)(s)}`);t.if((0,zn._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:eu.DiscrError.Tag,tag:u,tagName:s})),e.ok(c);function l(){const p=m();t.if(!1);for(const h in p)t.elseIf((0,zn._)`${u} === ${h}`),t.assign(c,d(p[h]));t.else(),e.error(!1,{discrError:eu.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(p){const h=t.name("valid"),b=e.subschema({keyword:"oneOf",schemaProp:p},h);return e.mergeEvaluated(b,zn.Name),h}function m(){var p;const h={},b=y(n);let $=!0;for(let O=0;O<a.length;O++){let N=a[O];if(N?.$ref&&!(0,jO.schemaHasRulesButRef)(N,o.self.RULES)){const Y=N.$ref;if(N=sv.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,Y),N instanceof sv.SchemaEnv&&(N=N.schema),N===void 0)throw new xO.default(o.opts.uriResolver,o.baseId,Y)}const L=(p=N?.properties)===null||p===void 0?void 0:p[s];if(typeof L!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);$=$&&(b||y(N)),g(L,O)}if(!$)throw new Error(`discriminator: "${s}" must be required`);return h;function y({required:O}){return Array.isArray(O)&&O.includes(s)}function g(O,N){if(O.const)k(O.const,N);else if(O.enum)for(const L of O.enum)k(L,N);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function k(O,N){if(typeof O!="string"||O in h)throw new Error(`discriminator: "${s}" values must be unique strings`);h[O]=N}}}};Qc.default=DO;var AO="http://json-schema.org/draft-07/schema#",RO="http://json-schema.org/draft-07/schema#",UO="Core schema meta-schema",ZO={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:[]}},MO=["object","boolean"],FO={$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:"#"}},GO={$schema:AO,$id:RO,title:UO,definitions:ZO,type:MO,properties:FO,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Kh,i=_c,n=Qc,o=GO,a=["/properties"],s="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(h,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=Hi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=ce;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=pc();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=Yi();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(nc,nc.exports);var cv=nc.exports,LO=Jh(cv),tu={exports:{}},uv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(M,X){return{validate:M,compare:X}}e.fullFormats={date:t(o,a),time:t(c(!0),u),"date-time":t(m(!0),p),"iso-time":t(c(),l),"iso-date-time":t(m(),h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:y,"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:Pe,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:k,int32:{type:"number",validate:L},int64:{type:"number",validate:Y},float:{type:"number",validate:pe},double:{type:"number",validate:pe},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"date-time":t(/^\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,p),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\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,h),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},e.formatNames=Object.keys(e.fullFormats);function r(M){return M%4===0&&(M%100!==0||M%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(M){const X=i.exec(M);if(!X)return!1;const ne=+X[1],K=+X[2],Ee=+X[3];return K>=1&&K<=12&&Ee>=1&&Ee<=(K===2&&r(ne)?29:n[K])}function a(M,X){if(M&&X)return M>X?1:M<X?-1:0}const s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(M){return function(ne){const K=s.exec(ne);if(!K)return!1;const Ee=+K[1],ot=+K[2],at=+K[3],Gt=K[4],Ot=K[5]==="-"?-1:1,A=+(K[6]||0),I=+(K[7]||0);if(A>23||I>59||M&&!Gt)return!1;if(Ee<=23&&ot<=59&&at<60)return!0;const j=ot-I*Ot,P=Ee-A*Ot-(j<0?1:0);return(P===23||P===-1)&&(j===59||j===-1)&&at<61}}function u(M,X){if(!(M&&X))return;const ne=new Date("2020-01-01T"+M).valueOf(),K=new Date("2020-01-01T"+X).valueOf();if(ne&&K)return ne-K}function l(M,X){if(!(M&&X))return;const ne=s.exec(M),K=s.exec(X);if(ne&&K)return M=ne[1]+ne[2]+ne[3],X=K[1]+K[2]+K[3],M>X?1:M<X?-1:0}const d=/t|\s/i;function m(M){const X=c(M);return function(K){const Ee=K.split(d);return Ee.length===2&&o(Ee[0])&&X(Ee[1])}}function p(M,X){if(!(M&&X))return;const ne=new Date(M).valueOf(),K=new Date(X).valueOf();if(ne&&K)return ne-K}function h(M,X){if(!(M&&X))return;const[ne,K]=M.split(d),[Ee,ot]=X.split(d),at=a(ne,Ee);if(at!==void 0)return at||u(K,ot)}const b=/\/|:/,$=/^(?:[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 y(M){return b.test(M)&&$.test(M)}const g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function k(M){return g.lastIndex=0,g.test(M)}const O=-2147483648,N=2**31-1;function L(M){return Number.isInteger(M)&&M<=N&&M>=O}function Y(M){return Number.isInteger(M)}function pe(){return!0}const Ie=/[^\\]\\Z/;function Pe(M){if(Ie.test(M))return!1;try{return new RegExp(M),!0}catch{return!1}}})(uv);var lv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=cv,r=ce,i=r.operators,n={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},o={message:({keyword:s,schemaCode:c})=>(0,r.str)`should be ${n[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>(0,r._)`{comparison: ${n[s].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:o,code(s){const{gen:c,data:u,schemaCode:l,keyword:d,it:m}=s,{opts:p,self:h}=m;if(!p.validateFormats)return;const b=new t.KeywordCxt(m,h.RULES.all.format.definition,"format");b.$data?$():y();function $(){const k=c.scopeValue("formats",{ref:h.formats,code:p.code.formats}),O=c.const("fmt",(0,r._)`${k}[${b.schemaCode}]`);s.fail$data((0,r.or)((0,r._)`typeof ${O} != "object"`,(0,r._)`${O} instanceof RegExp`,(0,r._)`typeof ${O}.compare != "function"`,g(O)))}function y(){const k=b.schema,O=h.formats[k];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${d}": format "${k}" does not define "compare" function`);const N=c.scopeValue("formats",{key:k,ref:O,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(k)}`:void 0});s.fail$data(g(N))}function g(k){return(0,r._)`${k}.compare(${u}, ${l}) ${n[d].fail} 0`}},dependencies:["format"]};const a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})(lv),(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=uv,i=lv,n=ce,o=new n.Name("fullFormats"),a=new n.Name("fastFormats"),s=(u,l={keywords:!0})=>{if(Array.isArray(l))return c(u,l,r.fullFormats,o),u;const[d,m]=l.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o],p=l.formats||r.formatNames;return c(u,p,d,m),l.keywords&&(0,i.default)(u),u};s.get=(u,l="full")=>{const m=(l==="fast"?r.fastFormats:r.fullFormats)[u];if(!m)throw new Error(`Unknown format "${u}"`);return m};function c(u,l,d,m){var p,h;(p=(h=u.opts.code).formats)!==null&&p!==void 0||(h.formats=(0,n._)`require("ajv-formats/dist/formats").${m}`);for(const b of l)u.addFormat(b,d[b])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s})(tu,tu.exports);var VO=tu.exports,BO=Jh(VO);function qO(){const e=new LO({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return BO(e),e}class JO{constructor(t){this._ajv=t??qO()}getValidator(t){const r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return i=>r(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}class KO{constructor(t){this._server=t}requestStream(t,r,i){return this._server.requestStream(t,r,i)}createMessageStream(t,r){const i=this._server.getClientCapabilities();if((t.tools||t.toolChoice)&&!i?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){const n=t.messages[t.messages.length-1],o=Array.isArray(n.content)?n.content:[n.content],a=o.some(l=>l.type==="tool_result"),s=t.messages.length>1?t.messages[t.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){const l=new Set(c.filter(m=>m.type==="tool_use").map(m=>m.id)),d=new Set(o.filter(m=>m.type==="tool_result").map(m=>m.toolUseId));if(l.size!==d.size||![...l].every(m=>d.has(m)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:t},Ys,r)}elicitInputStream(t,r){const i=this._server.getClientCapabilities(),n=t.mode??"form";switch(n){case"url":{if(!i?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!i?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}const o=n==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:o},Vi,r)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,i){return this._server.getTaskResult({taskId:t},r,i)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}}function HO(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break}}function WO(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break}}class XO extends Zw{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Gi.options.map((i,n)=>[i,n])),this.isMessageIgnored=(i,n)=>{const o=this._loggingLevels.get(n);return o?this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(o):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new JO,this.setRequestHandler(Sh,i=>this._oninitialize(i)),this.setNotificationHandler(Ih,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Nh,async(i,n)=>{const o=n.sessionId||n.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=i.params,s=Gi.safeParse(a);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new KO(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Mw(this._capabilities,t)}setRequestHandler(t,r){const n=pr(t)?.method;if(!n)throw new Error("Schema is missing a method literal");const o=Is(n);if(typeof o!="string")throw new Error("Schema method literal must be a string");if(o==="tools/call"){const s=async(c,u)=>{const l=dr(Fi,c);if(!l.success){const h=l.error instanceof Error?l.error.message:String(l.error);throw new B(H.InvalidParams,`Invalid tools/call request: ${h}`)}const{params:d}=l.data,m=await Promise.resolve(r(c,u));if(d.task){const h=dr(Zi,m);if(!h.success){const b=h.error instanceof Error?h.error.message:String(h.error);throw new B(H.InvalidParams,`Invalid task creation result: ${b}`)}return h.data}const p=dr(Xs,m);if(!p.success){const h=p.error instanceof Error?p.error.message:String(p.error);throw new B(H.InvalidParams,`Invalid tools/call result: ${h}`)}return p.data};return super.setRequestHandler(t,s)}return super.setRequestHandler(t,r)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){WO(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&HO(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){const r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:yb.includes(r)?r:vh,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"},Es)}async createMessage(t,r){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){const i=t.messages[t.messages.length-1],n=Array.isArray(i.content)?i.content:[i.content],o=n.some(u=>u.type==="tool_result"),a=t.messages.length>1?t.messages[t.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(n.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){const u=new Set(s.filter(d=>d.type==="tool_use").map(d=>d.id)),l=new Set(n.filter(d=>d.type==="tool_result").map(d=>d.toolUseId));if(u.size!==l.size||![...u].every(d=>l.has(d)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},xh,r):this.request({method:"sampling/createMessage",params:t},Ys,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");const n=t;return this.request({method:"elicitation/create",params:n},Vi,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");const n=t.mode==="form"?t:{...t,mode:"form"},o=await this.request({method:"elicitation/create",params:n},Vi,r);if(o.action==="accept"&&o.content&&n.requestedSchema)try{const s=this._jsonSchemaValidator.getValidator(n.requestedSchema)(o.content);if(!s.valid)throw new B(H.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof B?a:new B(H.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return o}}}createElicitationCompletionNotifier(t,r){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},jh,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}const dv=Symbol.for("mcp.completable");function pv(e){return!!e&&typeof e=="object"&&dv in e}function YO(e){return e[dv]?.complete}var mv;(function(e){e.Completable="McpCompletable"})(mv||(mv={}));const QO=/^[A-Za-z0-9._-]{1,128}$/;function eT(e){const t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!QO.test(e)){const r=e.split("").filter(i=>!/[A-Za-z0-9._-]/.test(i)).filter((i,n,o)=>o.indexOf(i)===n);return t.push(`Tool name contains invalid characters: ${r.map(i=>`"${i}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function tT(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(const r of t)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function fv(e){const t=eT(e);return tT(e,t.warnings),t.isValid}class nT{constructor(t){this._mcpServer=t}registerToolTask(t,r,i){const n={taskSupport:"required",...r.execution};if(n.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,n,r._meta,i)}}class rT{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new XO(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new nT(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Mt(Ws)),this.server.assertCanSetRequestHandler(Mt(Fi)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Ws,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{const i={name:t,title:r.title,description:r.description,inputSchema:(()=>{const n=mr(r.inputSchema);return n?Lh(n,{strictUnions:!0,pipeStrategy:"input"}):iT})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){const n=mr(r.outputSchema);n&&(i.outputSchema=Lh(n,{strictUnions:!0,pipeStrategy:"output"}))}return i})})),this.server.setRequestHandler(Fi,async(t,r)=>{try{const i=this._registeredTools[t.params.name];if(!i)throw new B(H.InvalidParams,`Tool ${t.params.name} not found`);if(!i.enabled)throw new B(H.InvalidParams,`Tool ${t.params.name} disabled`);const n=!!t.params.task,o=i.execution?.taskSupport,a="createTask"in i.handler;if((o==="required"||o==="optional")&&!a)throw new B(H.InternalError,`Tool ${t.params.name} has taskSupport '${o}' but was not registered with registerToolTask`);if(o==="required"&&!n)throw new B(H.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(o==="optional"&&!n&&a)return await this.handleAutomaticTaskPolling(i,t,r);const s=await this.validateToolInput(i,t.params.arguments,t.params.name),c=await this.executeToolHandler(i,s,r);return n||await this.validateToolOutput(i,c,t.params.name),c}catch(i){if(i instanceof B&&i.code===H.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,r,i){if(!t.inputSchema)return;const o=mr(t.inputSchema)??t.inputSchema,a=await ws(o,r);if(!a.success){const s="error"in a?a.error:"Unknown error",c=Ss(s);throw new B(H.InvalidParams,`Input validation error: Invalid arguments for tool ${i}: ${c}`)}return a.data}async validateToolOutput(t,r,i){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new B(H.InvalidParams,`Output validation error: Tool ${i} has an output schema but no structured content was provided`);const n=mr(t.outputSchema),o=await ws(n,r.structuredContent);if(!o.success){const a="error"in o?o.error:"Unknown error",s=Ss(a);throw new B(H.InvalidParams,`Output validation error: Invalid structured content for tool ${i}: ${s}`)}}async executeToolHandler(t,r,i){const n=t.handler;if("createTask"in n){if(!i.taskStore)throw new Error("No task store provided.");const a={...i,taskStore:i.taskStore};if(t.inputSchema){const s=n;return await Promise.resolve(s.createTask(r,a))}else{const s=n;return await Promise.resolve(s.createTask(a))}}if(t.inputSchema){const a=n;return await Promise.resolve(a(r,i))}else{const a=n;return await Promise.resolve(a(i))}}async handleAutomaticTaskPolling(t,r,i){if(!i.taskStore)throw new Error("No task store provided for task-capable tool.");const n=await this.validateToolInput(t,r.params.arguments,r.params.name),o=t.handler,a={...i,taskStore:i.taskStore},s=n?await Promise.resolve(o.createTask(n,a)):await Promise.resolve(o.createTask(a)),c=s.task.taskId;let u=s.task;const l=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(m=>setTimeout(m,l));const d=await i.taskStore.getTask(c);if(!d)throw new B(H.InternalError,`Task ${c} not found during polling`);u=d}return await i.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Mt(Qs)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Qs,async t=>{switch(t.params.ref.type){case"ref/prompt":return qk(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Jk(t),this.handleResourceCompletion(t,t.params.ref);default:throw new B(H.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){const i=this._registeredPrompts[r.name];if(!i)throw new B(H.InvalidParams,`Prompt ${r.name} not found`);if(!i.enabled)throw new B(H.InvalidParams,`Prompt ${r.name} disabled`);if(!i.argsSchema)return zr;const o=pr(i.argsSchema)?.[t.params.argument.name];if(!pv(o))return zr;const a=YO(o);if(!a)return zr;const s=await a(t.params.argument.value,t.params.context);return yv(s)}async handleResourceCompletion(t,r){const i=Object.values(this._registeredResourceTemplates).find(a=>a.resourceTemplate.uriTemplate.toString()===r.uri);if(!i){if(this._registeredResources[r.uri])return zr;throw new B(H.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}const n=i.resourceTemplate.completeCallback(t.params.argument.name);if(!n)return zr;const o=await n(t.params.argument.value,t.params.context);return yv(o)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Mt(Ms)),this.server.assertCanSetRequestHandler(Mt(Fs)),this.server.assertCanSetRequestHandler(Mt(Ls)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Ms,async(t,r)=>{const i=Object.entries(this._registeredResources).filter(([o,a])=>a.enabled).map(([o,a])=>({uri:o,name:a.name,...a.metadata})),n=[];for(const o of Object.values(this._registeredResourceTemplates)){if(!o.resourceTemplate.listCallback)continue;const a=await o.resourceTemplate.listCallback(r);for(const s of a.resources)n.push({...o.metadata,...s})}return{resources:[...i,...n]}}),this.server.setRequestHandler(Fs,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,i])=>({name:r,uriTemplate:i.resourceTemplate.uriTemplate.toString(),...i.metadata}))})),this.server.setRequestHandler(Ls,async(t,r)=>{const i=new URL(t.params.uri),n=this._registeredResources[i.toString()];if(n){if(!n.enabled)throw new B(H.InvalidParams,`Resource ${i} disabled`);return n.readCallback(i,r)}for(const o of Object.values(this._registeredResourceTemplates)){const a=o.resourceTemplate.uriTemplate.match(i.toString());if(a)return o.readCallback(i,a,r)}throw new B(H.InvalidParams,`Resource ${i} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Mt(Vs)),this.server.assertCanSetRequestHandler(Mt(Bs)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Vs,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?oT(r.argsSchema):void 0}))})),this.server.setRequestHandler(Bs,async(t,r)=>{const i=this._registeredPrompts[t.params.name];if(!i)throw new B(H.InvalidParams,`Prompt ${t.params.name} not found`);if(!i.enabled)throw new B(H.InvalidParams,`Prompt ${t.params.name} disabled`);if(i.argsSchema){const n=mr(i.argsSchema),o=await ws(n,t.params.arguments);if(!o.success){const c="error"in o?o.error:"Unknown error",u=Ss(c);throw new B(H.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}const a=o.data,s=i.callback;return await Promise.resolve(s(a,r))}else{const n=i.callback;return await Promise.resolve(n(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...i){let n;typeof i[0]=="object"&&(n=i.shift());const o=i[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);const a=this._createRegisteredResource(t,void 0,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);const a=this._createRegisteredResourceTemplate(t,void 0,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}registerResource(t,r,i,n){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);const o=this._createRegisteredResource(t,i.title,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);const o=this._createRegisteredResourceTemplate(t,i.title,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}}_createRegisteredResource(t,r,i,n,o){const a={name:t,title:r,metadata:n,readCallback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{typeof s.uri<"u"&&s.uri!==i&&(delete this._registeredResources[i],s.uri&&(this._registeredResources[s.uri]=a)),typeof s.name<"u"&&(a.name=s.name),typeof s.title<"u"&&(a.title=s.title),typeof s.metadata<"u"&&(a.metadata=s.metadata),typeof s.callback<"u"&&(a.readCallback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[i]=a,a}_createRegisteredResourceTemplate(t,r,i,n,o){const a={resourceTemplate:i,title:r,metadata:n,readCallback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=a)),typeof u.title<"u"&&(a.title=u.title),typeof u.template<"u"&&(a.resourceTemplate=u.template),typeof u.metadata<"u"&&(a.metadata=u.metadata),typeof u.callback<"u"&&(a.readCallback=u.callback),typeof u.enabled<"u"&&(a.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=a;const s=i.uriTemplate.variableNames;return Array.isArray(s)&&s.some(u=>!!i.completeCallback(u))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(t,r,i,n,o){const a={title:r,description:i,argsSchema:n===void 0?void 0:_n(n),callback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:s=>{typeof s.name<"u"&&s.name!==t&&(delete this._registeredPrompts[t],s.name&&(this._registeredPrompts[s.name]=a)),typeof s.title<"u"&&(a.title=s.title),typeof s.description<"u"&&(a.description=s.description),typeof s.argsSchema<"u"&&(a.argsSchema=_n(s.argsSchema)),typeof s.callback<"u"&&(a.callback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=a,n&&Object.values(n).some(c=>{const u=c instanceof ar?c._def?.innerType:c;return pv(u)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,r,i,n,o,a,s,c,u){fv(t);const l={title:r,description:i,inputSchema:vv(n),outputSchema:vv(o),annotations:a,execution:s,_meta:c,handler:u,enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==t&&(typeof d.name=="string"&&fv(d.name),delete this._registeredTools[t],d.name&&(this._registeredTools[d.name]=l)),typeof d.title<"u"&&(l.title=d.title),typeof d.description<"u"&&(l.description=d.description),typeof d.paramsSchema<"u"&&(l.inputSchema=_n(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=_n(d.outputSchema)),typeof d.callback<"u"&&(l.handler=d.callback),typeof d.annotations<"u"&&(l.annotations=d.annotations),typeof d._meta<"u"&&(l._meta=d._meta),typeof d.enabled<"u"&&(l.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=l,this.setToolRequestHandlers(),this.sendToolListChanged(),l}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let i,n,o,a;if(typeof r[0]=="string"&&(i=r.shift()),r.length>1){const c=r[0];if(nu(c))n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!nu(r[0])&&(a=r.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(u=>typeof u=="object"&&u!==null))throw new Error(`Tool ${t} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);a=r.shift()}}const s=r[0];return this._createRegisteredTool(t,void 0,i,n,o,a,{taskSupport:"forbidden"},void 0,s)}registerTool(t,r,i){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);const{title:n,description:o,inputSchema:a,outputSchema:s,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,n,o,a,s,c,{taskSupport:"forbidden"},u,i)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let i;typeof r[0]=="string"&&(i=r.shift());let n;r.length>1&&(n=r.shift());const o=r[0],a=this._createRegisteredPrompt(t,void 0,i,n,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}registerPrompt(t,r,i){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);const{title:n,description:o,argsSchema:a}=r,s=this._createRegisteredPrompt(t,n,o,a,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}}const iT={type:"object",properties:{}};function hv(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function gv(e){return"_def"in e||"_zod"in e||hv(e)}function nu(e){return typeof e!="object"||e===null||gv(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(hv)}function vv(e){if(e){if(nu(e))return _n(e);if(!gv(e))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return e}}function oT(e){const t=pr(e);return t?Object.entries(t).map(([r,i])=>{const n=gb(i),o=vb(i);return{name:r,description:n,required:!o}}):[]}function Mt(e){const r=pr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=Is(r);if(typeof i=="string")return i;throw new Error("Schema method literal must be a string")}function yv(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}const zr={completion:{values:[],hasMore:!1}},aT=10*1024*1024;class sT{constructor(t){this._maxBufferSize=t?.maxBufferSize??aT}append(t){if((this._buffer?.length??0)+t.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;const t=this._buffer.indexOf(`
78
+ deps: ${l}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[u,l]=o(c);a(c,u),s(c,l)}};function o({schema:c}){const u={},l={};for(const d in c){if(d==="__proto__")continue;const m=Array.isArray(c[d])?u:l;m[d]=c[d]}return[u,l]}function a(c,u=c.schema){const{gen:l,data:d,it:m}=c;if(Object.keys(u).length===0)return;const p=l.let("missing");for(const h in u){const b=u[h];if(b.length===0)continue;const $=(0,i.propertyInData)(l,d,h,m.opts.ownProperties);c.setParams({property:h,depsCount:b.length,deps:b.join(", ")}),m.allErrors?l.if($,()=>{for(const y of b)(0,i.checkReportMissingProp)(c,y)}):(l.if((0,t._)`${$} && (${(0,i.checkMissingProp)(c,b,p)})`),(0,i.reportMissingProp)(c,p),l.else())}}e.validatePropertyDeps=a;function s(c,u=c.schema){const{gen:l,data:d,keyword:m,it:p}=c,h=l.name("valid");for(const b in u)(0,r.alwaysValidSchema)(p,u[b])||(l.if((0,i.propertyInData)(l,d,b,p.opts.ownProperties),()=>{const $=c.subschema({keyword:m,schemaProp:b},h);c.mergeValidEvaluated($,h)},()=>l.var(h,!0)),c.ok(h))}e.validateSchemaDeps=s,e.default=n})(Wg);var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0});const Xg=ce,U0=Z,Z0={message:"property name must be valid",params:({params:e})=>(0,Xg._)`{propertyName: ${e.propertyName}}`},F0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Z0,code(e){const{gen:t,schema:r,data:i,it:n}=e;if((0,U0.alwaysValidSchema)(n,r))return;const o=t.name("valid");t.forIn("key",i,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,Xg.not)(o),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(o)}};Mc.default=F0;var lo={};Object.defineProperty(lo,"__esModule",{value:!0});const po=_t(),wt=ce,M0=Rt(),mo=Z,G0={message:"must NOT have additional properties",params:({params:e})=>(0,wt._)`{additionalProperty: ${e.additionalProperty}}`},L0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:G0,code(e){const{gen:t,schema:r,parentSchema:i,data:n,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,mo.alwaysValidSchema)(a,r))return;const u=(0,po.allSchemaProperties)(i.properties),l=(0,po.allSchemaProperties)(i.patternProperties);d(),e.ok((0,wt._)`${o} === ${M0.default.errors}`);function d(){t.forIn("key",n,$=>{!u.length&&!l.length?h($):t.if(m($),()=>h($))})}function m($){let y;if(u.length>8){const g=(0,mo.schemaRefOrVal)(a,i.properties,"properties");y=(0,po.isOwnProperty)(t,g,$)}else u.length?y=(0,wt.or)(...u.map(g=>(0,wt._)`${$} === ${g}`)):y=wt.nil;return l.length&&(y=(0,wt.or)(y,...l.map(g=>(0,wt._)`${(0,po.usePattern)(e,g)}.test(${$})`))),(0,wt.not)(y)}function p($){t.code((0,wt._)`delete ${n}[${$}]`)}function h($){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p($);return}if(r===!1){e.setParams({additionalProperty:$}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,mo.alwaysValidSchema)(a,r)){const y=t.name("valid");c.removeAdditional==="failing"?(b($,y,!1),t.if((0,wt.not)(y),()=>{e.reset(),p($)})):(b($,y),s||t.if((0,wt.not)(y),()=>t.break()))}}function b($,y,g){const w={keyword:"additionalProperties",dataProp:$,dataPropType:mo.Type.Str};g===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(w,y)}}};lo.default=L0;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0});const V0=Hi(),Qg=_t(),Lc=Z,Yg=lo,B0={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:i,data:n,it:o}=e;o.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&Yg.default.code(new V0.KeywordCxt(o,Yg.default,"additionalProperties"));const a=(0,Qg.allSchemaProperties)(r);for(const d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=Lc.mergeEvaluated.props(t,(0,Lc.toHash)(a),o.props));const s=a.filter(d=>!(0,Lc.alwaysValidSchema)(o,r[d]));if(s.length===0)return;const c=t.name("valid");for(const d of s)u(d)?l(d):(t.if((0,Qg.propertyInData)(t,n,d,o.opts.ownProperties)),l(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Gc.default=B0;var Vc={};Object.defineProperty(Vc,"__esModule",{value:!0});const ev=_t(),fo=ce,tv=Z,nv=Z,q0={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:i,parentSchema:n,it:o}=e,{opts:a}=o,s=(0,ev.allSchemaProperties)(r),c=s.filter(b=>(0,tv.alwaysValidSchema)(o,r[b]));if(s.length===0||c.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;const u=a.strictSchema&&!a.allowMatchingProperties&&n.properties,l=t.name("valid");o.props!==!0&&!(o.props instanceof fo.Name)&&(o.props=(0,nv.evaluatedPropsToName)(t,o.props));const{props:d}=o;m();function m(){for(const b of s)u&&p(b),o.allErrors?h(b):(t.var(l,!0),h(b),t.if(l))}function p(b){for(const $ in u)new RegExp(b).test($)&&(0,tv.checkStrictMode)(o,`property ${$} matches pattern ${b} (use allowMatchingProperties)`)}function h(b){t.forIn("key",i,$=>{t.if((0,fo._)`${(0,ev.usePattern)(e,b)}.test(${$})`,()=>{const y=c.includes(b);y||e.subschema({keyword:"patternProperties",schemaProp:b,dataProp:$,dataPropType:nv.Type.Str},l),o.opts.unevaluated&&d!==!0?t.assign((0,fo._)`${d}[${$}]`,!0):!y&&!o.allErrors&&t.if((0,fo.not)(l),()=>t.break())})})}}};Vc.default=q0;var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0});const J0=Z,K0={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,J0.alwaysValidSchema)(i,r)){e.fail();return}const n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Bc.default=K0;var qc={};Object.defineProperty(qc,"__esModule",{value:!0});const H0=_t(),W0={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:H0.validateUnion,error:{message:"must match a schema in anyOf"}};qc.default=W0;var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0});const ho=ce,X0=Z,Q0={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,ho._)`{passingSchemas: ${e.passing}}`},Y0={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Q0,code(e){const{gen:t,schema:r,parentSchema:i,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&i.discriminator)return;const o=r,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(u),e.result(a,()=>e.reset(),()=>e.error(!0));function u(){o.forEach((l,d)=>{let m;(0,X0.alwaysValidSchema)(n,l)?t.var(c,!0):m=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,ho._)`${c} && ${a}`).assign(a,!1).assign(s,(0,ho._)`[${s}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,d),m&&e.mergeEvaluated(m,ho.Name)})})}}};Jc.default=Y0;var Kc={};Object.defineProperty(Kc,"__esModule",{value:!0});const eO=Z,tO={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=t.name("valid");r.forEach((o,a)=>{if((0,eO.alwaysValidSchema)(i,o))return;const s=e.subschema({keyword:"allOf",schemaProp:a},n);e.ok(n),e.mergeEvaluated(s)})}};Kc.default=tO;var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});const go=ce,rv=Z,nO={message:({params:e})=>(0,go.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,go._)`{failingKeyword: ${e.ifClause}}`},rO={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:nO,code(e){const{gen:t,parentSchema:r,it:i}=e;r.then===void 0&&r.else===void 0&&(0,rv.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const n=iv(i,"then"),o=iv(i,"else");if(!n&&!o)return;const a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),n&&o){const l=t.let("ifClause");e.setParams({ifClause:l}),t.if(s,u("then",l),u("else",l))}else n?t.if(s,u("then")):t.if((0,go.not)(s),u("else"));e.pass(a,()=>e.error(!0));function c(){const l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(l)}function u(l,d){return()=>{const m=e.subschema({keyword:l},s);t.assign(a,s),e.mergeValidEvaluated(m,a),d?t.assign(d,(0,go._)`${l}`):e.setParams({ifClause:l})}}}};function iv(e,t){const r=e.schema[t];return r!==void 0&&!(0,rv.alwaysValidSchema)(e,r)}Hc.default=rO;var Wc={};Object.defineProperty(Wc,"__esModule",{value:!0});const iO=Z,oO={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,iO.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Wc.default=oO,Object.defineProperty(Ac,"__esModule",{value:!0});const aO=Tn,sO=Uc,cO=Pn,uO=Zc,lO=Fc,dO=Wg,pO=Mc,mO=lo,fO=Gc,hO=Vc,gO=Bc,vO=qc,yO=Jc,_O=Kc,$O=Hc,bO=Wc;function wO(e=!1){const t=[gO.default,vO.default,yO.default,_O.default,$O.default,bO.default,pO.default,mO.default,dO.default,fO.default,hO.default];return e?t.push(sO.default,uO.default):t.push(aO.default,cO.default),t.push(lO.default),t}Ac.default=wO;var Xc={},Qc={};Object.defineProperty(Qc,"__esModule",{value:!0});const xe=ce,kO={message:({schemaCode:e})=>(0,xe.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,xe._)`{format: ${e}}`},SO={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:kO,code(e,t){const{gen:r,data:i,$data:n,schema:o,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;n?m():p();function m(){const h=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),b=r.const("fDef",(0,xe._)`${h}[${a}]`),$=r.let("fType"),y=r.let("format");r.if((0,xe._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,()=>r.assign($,(0,xe._)`${b}.type || "string"`).assign(y,(0,xe._)`${b}.validate`),()=>r.assign($,(0,xe._)`"string"`).assign(y,b)),e.fail$data((0,xe.or)(g(),w()));function g(){return c.strictSchema===!1?xe.nil:(0,xe._)`${a} && !${y}`}function w(){const O=l.$async?(0,xe._)`(${b}.async ? await ${y}(${i}) : ${y}(${i}))`:(0,xe._)`${y}(${i})`,x=(0,xe._)`(typeof ${y} == "function" ? ${O} : ${y}.test(${i}))`;return(0,xe._)`${y} && ${y} !== true && ${$} === ${t} && !${x}`}}function p(){const h=d.formats[o];if(!h){g();return}if(h===!0)return;const[b,$,y]=w(h);b===t&&e.pass(O());function g(){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 w(x){const L=x instanceof RegExp?(0,xe.regexpCode)(x):c.code.formats?(0,xe._)`${c.code.formats}${(0,xe.getProperty)(o)}`:void 0,Q=r.scopeValue("formats",{key:o,ref:x,code:L});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,xe._)`${Q}.validate`]:["string",x,Q]}function O(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!l.$async)throw new Error("async format in sync schema");return(0,xe._)`await ${y}(${i})`}return typeof $=="function"?(0,xe._)`${y}(${i})`:(0,xe._)`${y}.test(${i})`}}}};Qc.default=SO,Object.defineProperty(Xc,"__esModule",{value:!0});const IO=Qc,OO=[IO.default];Xc.default=OO;var En={};Object.defineProperty(En,"__esModule",{value:!0}),En.contentVocabulary=En.metadataVocabulary=void 0,En.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],En.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(_c,"__esModule",{value:!0});const TO=$c,PO=wc,EO=Ac,zO=Xc,ov=En,xO=[TO.default,PO.default,(0,EO.default)(),zO.default,ov.metadataVocabulary,ov.contentVocabulary];_c.default=xO;var Yc={},vo={};Object.defineProperty(vo,"__esModule",{value:!0}),vo.DiscrError=void 0;var av;(function(e){e.Tag="tag",e.Mapping="mapping"})(av||(vo.DiscrError=av={})),Object.defineProperty(Yc,"__esModule",{value:!0});const zn=ce,eu=vo,sv=Qe,NO=Qi(),jO=Z,CO={message:({params:{discrError:e,tagName:t}})=>e===eu.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,zn._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},DO={keyword:"discriminator",type:"object",schemaType:"object",error:CO,code(e){const{gen:t,data:r,schema:i,parentSchema:n,it:o}=e,{oneOf:a}=n;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const 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");const c=t.let("valid",!1),u=t.const("tag",(0,zn._)`${r}${(0,zn.getProperty)(s)}`);t.if((0,zn._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:eu.DiscrError.Tag,tag:u,tagName:s})),e.ok(c);function l(){const p=m();t.if(!1);for(const h in p)t.elseIf((0,zn._)`${u} === ${h}`),t.assign(c,d(p[h]));t.else(),e.error(!1,{discrError:eu.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(p){const h=t.name("valid"),b=e.subschema({keyword:"oneOf",schemaProp:p},h);return e.mergeEvaluated(b,zn.Name),h}function m(){var p;const h={},b=y(n);let $=!0;for(let O=0;O<a.length;O++){let x=a[O];if(x?.$ref&&!(0,jO.schemaHasRulesButRef)(x,o.self.RULES)){const Q=x.$ref;if(x=sv.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,Q),x instanceof sv.SchemaEnv&&(x=x.schema),x===void 0)throw new NO.default(o.opts.uriResolver,o.baseId,Q)}const L=(p=x?.properties)===null||p===void 0?void 0:p[s];if(typeof L!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);$=$&&(b||y(x)),g(L,O)}if(!$)throw new Error(`discriminator: "${s}" must be required`);return h;function y({required:O}){return Array.isArray(O)&&O.includes(s)}function g(O,x){if(O.const)w(O.const,x);else if(O.enum)for(const L of O.enum)w(L,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function w(O,x){if(typeof O!="string"||O in h)throw new Error(`discriminator: "${s}" values must be unique strings`);h[O]=x}}}};Yc.default=DO;var AO="http://json-schema.org/draft-07/schema#",RO="http://json-schema.org/draft-07/schema#",UO="Core schema meta-schema",ZO={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:[]}},FO=["object","boolean"],MO={$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:"#"}},GO={$schema:AO,$id:RO,title:UO,definitions:ZO,type:FO,properties:MO,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Kh,i=_c,n=Yc,o=GO,a=["/properties"],s="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(h,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=Hi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=ce;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=pc();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=Qi();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(nc,nc.exports);var cv=nc.exports,LO=Jh(cv),tu={exports:{}},uv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(F,X){return{validate:F,compare:X}}e.fullFormats={date:t(o,a),time:t(c(!0),u),"date-time":t(m(!0),p),"iso-time":t(c(),l),"iso-date-time":t(m(),h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:y,"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:Pe,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:w,int32:{type:"number",validate:L},int64:{type:"number",validate:Q},float:{type:"number",validate:pe},double:{type:"number",validate:pe},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"date-time":t(/^\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,p),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\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,h),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},e.formatNames=Object.keys(e.fullFormats);function r(F){return F%4===0&&(F%100!==0||F%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(F){const X=i.exec(F);if(!X)return!1;const ne=+X[1],K=+X[2],Ee=+X[3];return K>=1&&K<=12&&Ee>=1&&Ee<=(K===2&&r(ne)?29:n[K])}function a(F,X){if(F&&X)return F>X?1:F<X?-1:0}const s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(F){return function(ne){const K=s.exec(ne);if(!K)return!1;const Ee=+K[1],ot=+K[2],at=+K[3],Gt=K[4],Ot=K[5]==="-"?-1:1,A=+(K[6]||0),I=+(K[7]||0);if(A>23||I>59||F&&!Gt)return!1;if(Ee<=23&&ot<=59&&at<60)return!0;const j=ot-I*Ot,P=Ee-A*Ot-(j<0?1:0);return(P===23||P===-1)&&(j===59||j===-1)&&at<61}}function u(F,X){if(!(F&&X))return;const ne=new Date("2020-01-01T"+F).valueOf(),K=new Date("2020-01-01T"+X).valueOf();if(ne&&K)return ne-K}function l(F,X){if(!(F&&X))return;const ne=s.exec(F),K=s.exec(X);if(ne&&K)return F=ne[1]+ne[2]+ne[3],X=K[1]+K[2]+K[3],F>X?1:F<X?-1:0}const d=/t|\s/i;function m(F){const X=c(F);return function(K){const Ee=K.split(d);return Ee.length===2&&o(Ee[0])&&X(Ee[1])}}function p(F,X){if(!(F&&X))return;const ne=new Date(F).valueOf(),K=new Date(X).valueOf();if(ne&&K)return ne-K}function h(F,X){if(!(F&&X))return;const[ne,K]=F.split(d),[Ee,ot]=X.split(d),at=a(ne,Ee);if(at!==void 0)return at||u(K,ot)}const b=/\/|:/,$=/^(?:[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 y(F){return b.test(F)&&$.test(F)}const g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function w(F){return g.lastIndex=0,g.test(F)}const O=-2147483648,x=2**31-1;function L(F){return Number.isInteger(F)&&F<=x&&F>=O}function Q(F){return Number.isInteger(F)}function pe(){return!0}const Ie=/[^\\]\\Z/;function Pe(F){if(Ie.test(F))return!1;try{return new RegExp(F),!0}catch{return!1}}})(uv);var lv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=cv,r=ce,i=r.operators,n={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},o={message:({keyword:s,schemaCode:c})=>(0,r.str)`should be ${n[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>(0,r._)`{comparison: ${n[s].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:o,code(s){const{gen:c,data:u,schemaCode:l,keyword:d,it:m}=s,{opts:p,self:h}=m;if(!p.validateFormats)return;const b=new t.KeywordCxt(m,h.RULES.all.format.definition,"format");b.$data?$():y();function $(){const w=c.scopeValue("formats",{ref:h.formats,code:p.code.formats}),O=c.const("fmt",(0,r._)`${w}[${b.schemaCode}]`);s.fail$data((0,r.or)((0,r._)`typeof ${O} != "object"`,(0,r._)`${O} instanceof RegExp`,(0,r._)`typeof ${O}.compare != "function"`,g(O)))}function y(){const w=b.schema,O=h.formats[w];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${d}": format "${w}" does not define "compare" function`);const x=c.scopeValue("formats",{key:w,ref:O,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(w)}`:void 0});s.fail$data(g(x))}function g(w){return(0,r._)`${w}.compare(${u}, ${l}) ${n[d].fail} 0`}},dependencies:["format"]};const a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})(lv),(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=uv,i=lv,n=ce,o=new n.Name("fullFormats"),a=new n.Name("fastFormats"),s=(u,l={keywords:!0})=>{if(Array.isArray(l))return c(u,l,r.fullFormats,o),u;const[d,m]=l.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o],p=l.formats||r.formatNames;return c(u,p,d,m),l.keywords&&(0,i.default)(u),u};s.get=(u,l="full")=>{const m=(l==="fast"?r.fastFormats:r.fullFormats)[u];if(!m)throw new Error(`Unknown format "${u}"`);return m};function c(u,l,d,m){var p,h;(p=(h=u.opts.code).formats)!==null&&p!==void 0||(h.formats=(0,n._)`require("ajv-formats/dist/formats").${m}`);for(const b of l)u.addFormat(b,d[b])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s})(tu,tu.exports);var VO=tu.exports,BO=Jh(VO);function qO(){const e=new LO({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return BO(e),e}class JO{constructor(t){this._ajv=t??qO()}getValidator(t){const r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return i=>r(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}class KO{constructor(t){this._server=t}requestStream(t,r,i){return this._server.requestStream(t,r,i)}createMessageStream(t,r){const i=this._server.getClientCapabilities();if((t.tools||t.toolChoice)&&!i?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){const n=t.messages[t.messages.length-1],o=Array.isArray(n.content)?n.content:[n.content],a=o.some(l=>l.type==="tool_result"),s=t.messages.length>1?t.messages[t.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){const l=new Set(c.filter(m=>m.type==="tool_use").map(m=>m.id)),d=new Set(o.filter(m=>m.type==="tool_result").map(m=>m.toolUseId));if(l.size!==d.size||![...l].every(m=>d.has(m)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:t},Qs,r)}elicitInputStream(t,r){const i=this._server.getClientCapabilities(),n=t.mode??"form";switch(n){case"url":{if(!i?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!i?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}const o=n==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:o},Vi,r)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,i){return this._server.getTaskResult({taskId:t},r,i)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}}function HO(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break}}function WO(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break}}class XO extends Zk{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Gi.options.map((i,n)=>[i,n])),this.isMessageIgnored=(i,n)=>{const o=this._loggingLevels.get(n);return o?this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(o):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new JO,this.setRequestHandler(Sh,i=>this._oninitialize(i)),this.setNotificationHandler(Ih,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(xh,async(i,n)=>{const o=n.sessionId||n.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=i.params,s=Gi.safeParse(a);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new KO(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Fk(this._capabilities,t)}setRequestHandler(t,r){const n=pr(t)?.method;if(!n)throw new Error("Schema is missing a method literal");const o=Is(n);if(typeof o!="string")throw new Error("Schema method literal must be a string");if(o==="tools/call"){const s=async(c,u)=>{const l=dr(Mi,c);if(!l.success){const h=l.error instanceof Error?l.error.message:String(l.error);throw new B(H.InvalidParams,`Invalid tools/call request: ${h}`)}const{params:d}=l.data,m=await Promise.resolve(r(c,u));if(d.task){const h=dr(Zi,m);if(!h.success){const b=h.error instanceof Error?h.error.message:String(h.error);throw new B(H.InvalidParams,`Invalid task creation result: ${b}`)}return h.data}const p=dr(Xs,m);if(!p.success){const h=p.error instanceof Error?p.error.message:String(p.error);throw new B(H.InvalidParams,`Invalid tools/call result: ${h}`)}return p.data};return super.setRequestHandler(t,s)}return super.setRequestHandler(t,r)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){WO(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&HO(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){const r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:yb.includes(r)?r:vh,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"},Es)}async createMessage(t,r){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){const i=t.messages[t.messages.length-1],n=Array.isArray(i.content)?i.content:[i.content],o=n.some(u=>u.type==="tool_result"),a=t.messages.length>1?t.messages[t.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(n.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){const u=new Set(s.filter(d=>d.type==="tool_use").map(d=>d.id)),l=new Set(n.filter(d=>d.type==="tool_result").map(d=>d.toolUseId));if(u.size!==l.size||![...u].every(d=>l.has(d)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},Nh,r):this.request({method:"sampling/createMessage",params:t},Qs,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");const n=t;return this.request({method:"elicitation/create",params:n},Vi,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");const n=t.mode==="form"?t:{...t,mode:"form"},o=await this.request({method:"elicitation/create",params:n},Vi,r);if(o.action==="accept"&&o.content&&n.requestedSchema)try{const s=this._jsonSchemaValidator.getValidator(n.requestedSchema)(o.content);if(!s.valid)throw new B(H.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof B?a:new B(H.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return o}}}createElicitationCompletionNotifier(t,r){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},jh,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}const dv=Symbol.for("mcp.completable");function pv(e){return!!e&&typeof e=="object"&&dv in e}function QO(e){return e[dv]?.complete}var mv;(function(e){e.Completable="McpCompletable"})(mv||(mv={}));const YO=/^[A-Za-z0-9._-]{1,128}$/;function eT(e){const t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!YO.test(e)){const r=e.split("").filter(i=>!/[A-Za-z0-9._-]/.test(i)).filter((i,n,o)=>o.indexOf(i)===n);return t.push(`Tool name contains invalid characters: ${r.map(i=>`"${i}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function tT(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(const r of t)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function fv(e){const t=eT(e);return tT(e,t.warnings),t.isValid}class nT{constructor(t){this._mcpServer=t}registerToolTask(t,r,i){const n={taskSupport:"required",...r.execution};if(n.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,n,r._meta,i)}}class rT{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new XO(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new nT(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Ft(Ws)),this.server.assertCanSetRequestHandler(Ft(Mi)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Ws,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{const i={name:t,title:r.title,description:r.description,inputSchema:(()=>{const n=mr(r.inputSchema);return n?Lh(n,{strictUnions:!0,pipeStrategy:"input"}):iT})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){const n=mr(r.outputSchema);n&&(i.outputSchema=Lh(n,{strictUnions:!0,pipeStrategy:"output"}))}return i})})),this.server.setRequestHandler(Mi,async(t,r)=>{try{const i=this._registeredTools[t.params.name];if(!i)throw new B(H.InvalidParams,`Tool ${t.params.name} not found`);if(!i.enabled)throw new B(H.InvalidParams,`Tool ${t.params.name} disabled`);const n=!!t.params.task,o=i.execution?.taskSupport,a="createTask"in i.handler;if((o==="required"||o==="optional")&&!a)throw new B(H.InternalError,`Tool ${t.params.name} has taskSupport '${o}' but was not registered with registerToolTask`);if(o==="required"&&!n)throw new B(H.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(o==="optional"&&!n&&a)return await this.handleAutomaticTaskPolling(i,t,r);const s=await this.validateToolInput(i,t.params.arguments,t.params.name),c=await this.executeToolHandler(i,s,r);return n||await this.validateToolOutput(i,c,t.params.name),c}catch(i){if(i instanceof B&&i.code===H.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,r,i){if(!t.inputSchema)return;const o=mr(t.inputSchema)??t.inputSchema,a=await ks(o,r);if(!a.success){const s="error"in a?a.error:"Unknown error",c=Ss(s);throw new B(H.InvalidParams,`Input validation error: Invalid arguments for tool ${i}: ${c}`)}return a.data}async validateToolOutput(t,r,i){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new B(H.InvalidParams,`Output validation error: Tool ${i} has an output schema but no structured content was provided`);const n=mr(t.outputSchema),o=await ks(n,r.structuredContent);if(!o.success){const a="error"in o?o.error:"Unknown error",s=Ss(a);throw new B(H.InvalidParams,`Output validation error: Invalid structured content for tool ${i}: ${s}`)}}async executeToolHandler(t,r,i){const n=t.handler;if("createTask"in n){if(!i.taskStore)throw new Error("No task store provided.");const a={...i,taskStore:i.taskStore};if(t.inputSchema){const s=n;return await Promise.resolve(s.createTask(r,a))}else{const s=n;return await Promise.resolve(s.createTask(a))}}if(t.inputSchema){const a=n;return await Promise.resolve(a(r,i))}else{const a=n;return await Promise.resolve(a(i))}}async handleAutomaticTaskPolling(t,r,i){if(!i.taskStore)throw new Error("No task store provided for task-capable tool.");const n=await this.validateToolInput(t,r.params.arguments,r.params.name),o=t.handler,a={...i,taskStore:i.taskStore},s=n?await Promise.resolve(o.createTask(n,a)):await Promise.resolve(o.createTask(a)),c=s.task.taskId;let u=s.task;const l=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(m=>setTimeout(m,l));const d=await i.taskStore.getTask(c);if(!d)throw new B(H.InternalError,`Task ${c} not found during polling`);u=d}return await i.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Ft(Ys)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Ys,async t=>{switch(t.params.ref.type){case"ref/prompt":return qw(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Jw(t),this.handleResourceCompletion(t,t.params.ref);default:throw new B(H.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){const i=this._registeredPrompts[r.name];if(!i)throw new B(H.InvalidParams,`Prompt ${r.name} not found`);if(!i.enabled)throw new B(H.InvalidParams,`Prompt ${r.name} disabled`);if(!i.argsSchema)return zr;const o=pr(i.argsSchema)?.[t.params.argument.name];if(!pv(o))return zr;const a=QO(o);if(!a)return zr;const s=await a(t.params.argument.value,t.params.context);return yv(s)}async handleResourceCompletion(t,r){const i=Object.values(this._registeredResourceTemplates).find(a=>a.resourceTemplate.uriTemplate.toString()===r.uri);if(!i){if(this._registeredResources[r.uri])return zr;throw new B(H.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}const n=i.resourceTemplate.completeCallback(t.params.argument.name);if(!n)return zr;const o=await n(t.params.argument.value,t.params.context);return yv(o)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Ft(Fs)),this.server.assertCanSetRequestHandler(Ft(Ms)),this.server.assertCanSetRequestHandler(Ft(Ls)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Fs,async(t,r)=>{const i=Object.entries(this._registeredResources).filter(([o,a])=>a.enabled).map(([o,a])=>({uri:o,name:a.name,...a.metadata})),n=[];for(const o of Object.values(this._registeredResourceTemplates)){if(!o.resourceTemplate.listCallback)continue;const a=await o.resourceTemplate.listCallback(r);for(const s of a.resources)n.push({...o.metadata,...s})}return{resources:[...i,...n]}}),this.server.setRequestHandler(Ms,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,i])=>({name:r,uriTemplate:i.resourceTemplate.uriTemplate.toString(),...i.metadata}))})),this.server.setRequestHandler(Ls,async(t,r)=>{const i=new URL(t.params.uri),n=this._registeredResources[i.toString()];if(n){if(!n.enabled)throw new B(H.InvalidParams,`Resource ${i} disabled`);return n.readCallback(i,r)}for(const o of Object.values(this._registeredResourceTemplates)){const a=o.resourceTemplate.uriTemplate.match(i.toString());if(a)return o.readCallback(i,a,r)}throw new B(H.InvalidParams,`Resource ${i} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Ft(Vs)),this.server.assertCanSetRequestHandler(Ft(Bs)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Vs,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?oT(r.argsSchema):void 0}))})),this.server.setRequestHandler(Bs,async(t,r)=>{const i=this._registeredPrompts[t.params.name];if(!i)throw new B(H.InvalidParams,`Prompt ${t.params.name} not found`);if(!i.enabled)throw new B(H.InvalidParams,`Prompt ${t.params.name} disabled`);if(i.argsSchema){const n=mr(i.argsSchema),o=await ks(n,t.params.arguments);if(!o.success){const c="error"in o?o.error:"Unknown error",u=Ss(c);throw new B(H.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}const a=o.data,s=i.callback;return await Promise.resolve(s(a,r))}else{const n=i.callback;return await Promise.resolve(n(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...i){let n;typeof i[0]=="object"&&(n=i.shift());const o=i[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);const a=this._createRegisteredResource(t,void 0,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);const a=this._createRegisteredResourceTemplate(t,void 0,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}registerResource(t,r,i,n){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);const o=this._createRegisteredResource(t,i.title,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);const o=this._createRegisteredResourceTemplate(t,i.title,r,i,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}}_createRegisteredResource(t,r,i,n,o){const a={name:t,title:r,metadata:n,readCallback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{typeof s.uri<"u"&&s.uri!==i&&(delete this._registeredResources[i],s.uri&&(this._registeredResources[s.uri]=a)),typeof s.name<"u"&&(a.name=s.name),typeof s.title<"u"&&(a.title=s.title),typeof s.metadata<"u"&&(a.metadata=s.metadata),typeof s.callback<"u"&&(a.readCallback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[i]=a,a}_createRegisteredResourceTemplate(t,r,i,n,o){const a={resourceTemplate:i,title:r,metadata:n,readCallback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=a)),typeof u.title<"u"&&(a.title=u.title),typeof u.template<"u"&&(a.resourceTemplate=u.template),typeof u.metadata<"u"&&(a.metadata=u.metadata),typeof u.callback<"u"&&(a.readCallback=u.callback),typeof u.enabled<"u"&&(a.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=a;const s=i.uriTemplate.variableNames;return Array.isArray(s)&&s.some(u=>!!i.completeCallback(u))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(t,r,i,n,o){const a={title:r,description:i,argsSchema:n===void 0?void 0:_n(n),callback:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:s=>{typeof s.name<"u"&&s.name!==t&&(delete this._registeredPrompts[t],s.name&&(this._registeredPrompts[s.name]=a)),typeof s.title<"u"&&(a.title=s.title),typeof s.description<"u"&&(a.description=s.description),typeof s.argsSchema<"u"&&(a.argsSchema=_n(s.argsSchema)),typeof s.callback<"u"&&(a.callback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=a,n&&Object.values(n).some(c=>{const u=c instanceof ar?c._def?.innerType:c;return pv(u)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,r,i,n,o,a,s,c,u){fv(t);const l={title:r,description:i,inputSchema:vv(n),outputSchema:vv(o),annotations:a,execution:s,_meta:c,handler:u,enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==t&&(typeof d.name=="string"&&fv(d.name),delete this._registeredTools[t],d.name&&(this._registeredTools[d.name]=l)),typeof d.title<"u"&&(l.title=d.title),typeof d.description<"u"&&(l.description=d.description),typeof d.paramsSchema<"u"&&(l.inputSchema=_n(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=_n(d.outputSchema)),typeof d.callback<"u"&&(l.handler=d.callback),typeof d.annotations<"u"&&(l.annotations=d.annotations),typeof d._meta<"u"&&(l._meta=d._meta),typeof d.enabled<"u"&&(l.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=l,this.setToolRequestHandlers(),this.sendToolListChanged(),l}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let i,n,o,a;if(typeof r[0]=="string"&&(i=r.shift()),r.length>1){const c=r[0];if(nu(c))n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!nu(r[0])&&(a=r.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(u=>typeof u=="object"&&u!==null))throw new Error(`Tool ${t} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);a=r.shift()}}const s=r[0];return this._createRegisteredTool(t,void 0,i,n,o,a,{taskSupport:"forbidden"},void 0,s)}registerTool(t,r,i){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);const{title:n,description:o,inputSchema:a,outputSchema:s,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,n,o,a,s,c,{taskSupport:"forbidden"},u,i)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let i;typeof r[0]=="string"&&(i=r.shift());let n;r.length>1&&(n=r.shift());const o=r[0],a=this._createRegisteredPrompt(t,void 0,i,n,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}registerPrompt(t,r,i){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);const{title:n,description:o,argsSchema:a}=r,s=this._createRegisteredPrompt(t,n,o,a,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}}const iT={type:"object",properties:{}};function hv(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function gv(e){return"_def"in e||"_zod"in e||hv(e)}function nu(e){return typeof e!="object"||e===null||gv(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(hv)}function vv(e){if(e){if(nu(e))return _n(e);if(!gv(e))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return e}}function oT(e){const t=pr(e);return t?Object.entries(t).map(([r,i])=>{const n=gb(i),o=vb(i);return{name:r,description:n,required:!o}}):[]}function Ft(e){const r=pr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=Is(r);if(typeof i=="string")return i;throw new Error("Schema method literal must be a string")}function yv(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}const zr={completion:{values:[],hasMore:!1}},aT=10*1024*1024;class sT{constructor(t){this._maxBufferSize=t?.maxBufferSize??aT}append(t){if((this._buffer?.length??0)+t.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;const t=this._buffer.indexOf(`
79
79
  `);if(t===-1)return null;const r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),cT(r)}clear(){this._buffer=void 0}}function cT(e){return Sb.parse(JSON.parse(e))}function uT(e){return JSON.stringify(e)+`
80
- `}class lT{constructor(t=ou.stdin,r=ou.stdout,i){this._stdin=t,this._stdout=r,this._started=!1,this._ondata=n=>{try{this._readBuffer.append(n),this.processReadBuffer()}catch(o){this.onerror?.(o),this.close().catch(()=>{})}},this._onerror=n=>{this.onerror?.(n)},this._readBuffer=new sT({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{const t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(r=>{const i=uT(t);this._stdout.write(i)?r():this._stdout.once("drain",r)})}}function Nr(e){return e==null?!1:typeof e=="string"?e.length>0:!0}function _v(e){const t=e.isPresent??Nr;if(!e.candidates.some(r=>t(r.value)))throw new Error(e.missingMessage??`Error: ${$v(e.candidates.map(r=>r.label))} must be provided.`)}function dT(e){const t=e.isPresent??Nr;_v(e);for(const r of e.candidates)if(t(r.value))return r.value;throw new Error(e.missingMessage??`Error: ${$v(e.candidates.map(r=>r.label))} must be provided.`)}function $v(e){return e.length===1?e[0]:e.length===2?`Either ${e[0]} or ${e[1]}`:`Either ${e.slice(0,-1).join(", ")}, or ${e[e.length-1]}`}function pT(e){const t=e.inlineLabel??"json",r=e.fileLabel??"jsonFile",i=e.fileDescription??"file";if(Nr(e.inlineText)&&Nr(e.filePath))throw new Error(`Provide either ${t} or ${r}, not both.`);if(Nr(e.inlineText))return{text:e.inlineText,source:"inline"};_v({candidates:[{label:t,value:e.inlineText},{label:r,value:e.filePath}],missingMessage:`Either ${t} or ${r} must be provided.`});try{return{text:Dv(e.filePath,"utf-8"),source:"file"}}catch(n){throw new Error(`Error reading ${i}: ${n.message}`,{cause:n})}}function mT(e,t){jv(xv(e),{recursive:!0}),Cv(e,t,"utf-8")}function fT(e){const t=e.jsonLabel??"JSON";try{return JSON.parse(e.jsonText)}catch(r){if(e.includePreviewInError){const i=e.previewLength??100,n=e.jsonText.slice(0,i),o=e.jsonText.length>n.length?"...":"";throw new Error(`Invalid ${t}: ${n}${o}`,{cause:r})}throw new Error(`Invalid ${t}: parse error.`,{cause:r})}}function bv(e){return{type:"text",text:e}}function on(e){return{content:[bv(e)]}}function Nn(e){return{content:[bv(e)],isError:!0}}function hT(e){if(!e.jsonText)return Nn(e.missingMessage);if(!e.outputFile)return on(e.jsonText);try{return mT(e.outputFile,e.jsonText),on(`${e.fileLabel} written to: ${e.outputFile}`)}catch(t){return Nn(`Error writing file: ${t.message}`)}}function gT(e){let t;try{t=pT({inlineText:e.json,filePath:e.jsonFile,inlineLabel:"json",fileLabel:"jsonFile",fileDescription:e.fileDescription}).text}catch(i){return Nn(i.message)}const r=e.importJson(t);return r!=="OK"?Nn(`Error: ${r}`):on(`${e.successMessage??"Imported successfully."}
80
+ `}class lT{constructor(t=ou.stdin,r=ou.stdout,i){this._stdin=t,this._stdout=r,this._started=!1,this._ondata=n=>{try{this._readBuffer.append(n),this.processReadBuffer()}catch(o){this.onerror?.(o),this.close().catch(()=>{})}},this._onerror=n=>{this.onerror?.(n)},this._readBuffer=new sT({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{const t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(r=>{const i=uT(t);this._stdout.write(i)?r():this._stdout.once("drain",r)})}}function xr(e){return e==null?!1:typeof e=="string"?e.length>0:!0}function _v(e){const t=e.isPresent??xr;if(!e.candidates.some(r=>t(r.value)))throw new Error(e.missingMessage??`Error: ${$v(e.candidates.map(r=>r.label))} must be provided.`)}function dT(e){const t=e.isPresent??xr;_v(e);for(const r of e.candidates)if(t(r.value))return r.value;throw new Error(e.missingMessage??`Error: ${$v(e.candidates.map(r=>r.label))} must be provided.`)}function $v(e){return e.length===1?e[0]:e.length===2?`Either ${e[0]} or ${e[1]}`:`Either ${e.slice(0,-1).join(", ")}, or ${e[e.length-1]}`}function pT(e){const t=e.inlineLabel??"json",r=e.fileLabel??"jsonFile",i=e.fileDescription??"file";if(xr(e.inlineText)&&xr(e.filePath))throw new Error(`Provide either ${t} or ${r}, not both.`);if(xr(e.inlineText))return{text:e.inlineText,source:"inline"};_v({candidates:[{label:t,value:e.inlineText},{label:r,value:e.filePath}],missingMessage:`Either ${t} or ${r} must be provided.`});try{return{text:Dv(e.filePath,"utf-8"),source:"file"}}catch(n){throw new Error(`Error reading ${i}: ${n.message}`,{cause:n})}}function mT(e,t){jv(Nv(e),{recursive:!0}),Cv(e,t,"utf-8")}function fT(e){const t=e.jsonLabel??"JSON";try{return JSON.parse(e.jsonText)}catch(r){if(e.includePreviewInError){const i=e.previewLength??100,n=e.jsonText.slice(0,i),o=e.jsonText.length>n.length?"...":"";throw new Error(`Invalid ${t}: ${n}${o}`,{cause:r})}throw new Error(`Invalid ${t}: parse error.`,{cause:r})}}function bv(e){return{type:"text",text:e}}function on(e){return{content:[bv(e)]}}function xn(e){return{content:[bv(e)],isError:!0}}function hT(e){if(!e.jsonText)return xn(e.missingMessage);if(!e.outputFile)return on(e.jsonText);try{return mT(e.outputFile,e.jsonText),on(`${e.fileLabel} written to: ${e.outputFile}`)}catch(t){return xn(`Error writing file: ${t.message}`)}}function gT(e){let t;try{t=pT({inlineText:e.json,filePath:e.jsonFile,inlineLabel:"json",fileLabel:"jsonFile",fileDescription:e.fileDescription}).text}catch(i){return xn(i.message)}const r=e.importJson(t);return r!=="OK"?xn(`Error: ${r}`):on(`${e.successMessage??"Imported successfully."}
81
81
 
82
- ${e.describeImported()}`)}function vT(e){return e.string().optional().describe("Optional absolute file path. When provided, the JSON is written to this file and the path is returned instead of the full JSON.")}function yT(e,t){return e.string().optional().describe(t)}function _T(e,t){return e.string().optional().describe(t)}function $T(e,t){const r=typeof e=="string"?fT({jsonText:e,jsonLabel:t}):e;if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`Invalid ${t}: expected a JSON object.`);return r}function bT(e){const t=$T(e,"Flow Graph JSON");if(Array.isArray(t._flowGraphs)){if(t._flowGraphs.length===0)throw new Error("Invalid Flow Graph JSON: '_flowGraphs' must contain at least one graph.");for(const r of t._flowGraphs)if(!r||typeof r!="object"||Array.isArray(r)||!Array.isArray(r.allBlocks))throw new Error("Invalid Flow Graph JSON: each coordinator entry must contain an 'allBlocks' array.");return{parsed:t,graphs:t._flowGraphs}}if(Array.isArray(t.allBlocks))return{parsed:t,graphs:[t]};throw new Error("Invalid Flow Graph JSON: expected coordinator JSON with '_flowGraphs' or graph JSON with 'allBlocks'.")}const kv="babylon-mcp-editor-session",kT="1.0",wT="127.0.0.1",wv="localhost",ST=3001,IT=10,OT=15e3,TT=15*6e4,yo="last-writer-wins",PT=["babylonjs.com"];function ET(e,t,r=wv){return`http://${r}:${t}/session/${e}`}function zT(){return ko.createHash("sha256").update(process.cwd()).digest("hex")}function NT(){return`${process.pid}-${ko.randomBytes(8).toString("hex")}`}class xT{constructor(t,r={}){this._server=null,this._port=0,this._keepAliveInterval=null,this._idleTimeout=null,this._sessions=new Map,this._sessionByName=new Map,this._sseClients=new Map,this._startedAt=0,this._lastActivityAt=0,this._adapter=t,this._defaultPort=r.defaultPort??ST,this._portRange=r.portRange??IT,this._host=r.host??wT,this._publicHostname=r.publicHostname??wv,this._protocolVersion=r.protocolVersion??kT,this._keepAliveIntervalMs=r.keepAliveIntervalMs??OT,this._idleTimeoutMs=r.idleTimeoutMs??TT,this._corsOrigin=r.corsOrigin,this._allowedOrigins=r.allowedOrigins?new Set(r.allowedOrigins):null,this._trustedOriginHostSuffixes=r.trustedOriginHostSuffixes??PT,this._legacyDocumentRoutes=new Set((r.legacyDocumentRoutes??[]).map(i=>i.replace(/^\//,""))),this._capabilities=["sse","document-get","document-post","session-close","session-list","diagnostics","idle-timeout",yo,...r.capabilities??[]],this._statusTitle=r.statusTitle??t.serverName,this._workspaceId=r.workspaceId??zT(),this._ownerId=r.ownerId??NT()}isRunning(){return this._server!==null&&this._server.listening}async startAsync(t=this._defaultPort){if(this.isRunning())return this._port;const r=t+this._portRange-1;return this._port=await this._tryPortRangeAsync(t,r),this._startedAt=Date.now(),this._recordActivity(),this._keepAliveInterval=setInterval(()=>{for(const i of this._sseClients.values())for(const n of i)n.write(`: ping
82
+ ${e.describeImported()}`)}function vT(e){return e.string().optional().describe("Optional absolute file path. When provided, the JSON is written to this file and the path is returned instead of the full JSON.")}function yT(e,t){return e.string().optional().describe(t)}function _T(e,t){return e.string().optional().describe(t)}function $T(e,t){const r=typeof e=="string"?fT({jsonText:e,jsonLabel:t}):e;if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`Invalid ${t}: expected a JSON object.`);return r}function bT(e){const t=$T(e,"Flow Graph JSON");if(Array.isArray(t._flowGraphs)){if(t._flowGraphs.length===0)throw new Error("Invalid Flow Graph JSON: '_flowGraphs' must contain at least one graph.");for(const r of t._flowGraphs)if(!r||typeof r!="object"||Array.isArray(r)||!Array.isArray(r.allBlocks))throw new Error("Invalid Flow Graph JSON: each coordinator entry must contain an 'allBlocks' array.");return{parsed:t,graphs:t._flowGraphs}}if(Array.isArray(t.allBlocks))return{parsed:t,graphs:[t]};throw new Error("Invalid Flow Graph JSON: expected coordinator JSON with '_flowGraphs' or graph JSON with 'allBlocks'.")}const wv="babylon-mcp-editor-session",wT="1.0",kT="127.0.0.1",kv="localhost",ST=3001,IT=10,OT=15e3,TT=15*6e4,yo="last-writer-wins",PT=["babylonjs.com"];function ET(e,t,r=kv){return`http://${r}:${t}/session/${e}`}function zT(){return wo.createHash("sha256").update(process.cwd()).digest("hex")}function xT(){return`${process.pid}-${wo.randomBytes(8).toString("hex")}`}class NT{constructor(t,r={}){this._server=null,this._port=0,this._keepAliveInterval=null,this._idleTimeout=null,this._sessions=new Map,this._sessionByName=new Map,this._sseClients=new Map,this._startedAt=0,this._lastActivityAt=0,this._adapter=t,this._defaultPort=r.defaultPort??ST,this._portRange=r.portRange??IT,this._host=r.host??kT,this._publicHostname=r.publicHostname??kv,this._protocolVersion=r.protocolVersion??wT,this._keepAliveIntervalMs=r.keepAliveIntervalMs??OT,this._idleTimeoutMs=r.idleTimeoutMs??TT,this._corsOrigin=r.corsOrigin,this._allowedOrigins=r.allowedOrigins?new Set(r.allowedOrigins):null,this._trustedOriginHostSuffixes=r.trustedOriginHostSuffixes??PT,this._legacyDocumentRoutes=new Set((r.legacyDocumentRoutes??[]).map(i=>i.replace(/^\//,""))),this._capabilities=["sse","document-get","document-post","session-close","session-list","diagnostics","idle-timeout",yo,...r.capabilities??[]],this._statusTitle=r.statusTitle??t.serverName,this._workspaceId=r.workspaceId??zT(),this._ownerId=r.ownerId??xT()}isRunning(){return this._server!==null&&this._server.listening}async startAsync(t=this._defaultPort){if(this.isRunning())return this._port;const r=t+this._portRange-1;return this._port=await this._tryPortRangeAsync(t,r),this._startedAt=Date.now(),this._recordActivity(),this._keepAliveInterval=setInterval(()=>{for(const i of this._sseClients.values())for(const n of i)n.write(`: ping
83
83
 
84
- `)},this._keepAliveIntervalMs),this._port}async stopAsync(t="Session server stopped"){this._keepAliveInterval&&(clearInterval(this._keepAliveInterval),this._keepAliveInterval=null),this._idleTimeout&&(clearTimeout(this._idleTimeout),this._idleTimeout=null);for(const r of[...this._sessions.keys()])this.closeSession(r,t);if(this._idleTimeout&&(clearTimeout(this._idleTimeout),this._idleTimeout=null),!this._server){this._port=0,this._startedAt=0,this._lastActivityAt=0;return}await new Promise((r,i)=>{this._server.close(n=>{if(this._server=null,this._port=0,this._startedAt=0,this._lastActivityAt=0,n){i(new Error(n.message));return}r()})})}createSession(t,r=this._adapter.documentKind){const i=this._getSessionKey(r,t),n=this._sessionByName.get(i);if(n){const s=this._sessions.get(n);if(s)return s}const o=Date.now(),a={id:ko.randomBytes(16).toString("hex"),kind:r,name:t,createdAt:o,updatedAt:o,revision:0};return this._sessions.set(a.id,a),this._sessionByName.set(i,a.id),this._sseClients.set(a.id,new Set),this._recordActivity(),a}getSessionIdForName(t,r=this._adapter.documentKind){return this._sessionByName.get(this._getSessionKey(r,t))}getSessionUrl(t,r=this._port){return ET(t,r,this._publicHostname)}notifySessionUpdate(t){this._sendDocumentUpdateAsync(t)}closeSession(t,r="Session closed by MCP server"){const i=this._sessions.get(t);if(!i)return!1;const n=this._sseClients.get(t);if(n){for(const o of n)o.write(`event: session-closed
84
+ `)},this._keepAliveIntervalMs),this._port}async stopAsync(t="Session server stopped"){this._keepAliveInterval&&(clearInterval(this._keepAliveInterval),this._keepAliveInterval=null),this._idleTimeout&&(clearTimeout(this._idleTimeout),this._idleTimeout=null);for(const r of[...this._sessions.keys()])this.closeSession(r,t);if(this._idleTimeout&&(clearTimeout(this._idleTimeout),this._idleTimeout=null),!this._server){this._port=0,this._startedAt=0,this._lastActivityAt=0;return}await new Promise((r,i)=>{this._server.close(n=>{if(this._server=null,this._port=0,this._startedAt=0,this._lastActivityAt=0,n){i(new Error(n.message));return}r()})})}createSession(t,r=this._adapter.documentKind){const i=this._getSessionKey(r,t),n=this._sessionByName.get(i);if(n){const s=this._sessions.get(n);if(s)return s}const o=Date.now(),a={id:wo.randomBytes(16).toString("hex"),kind:r,name:t,createdAt:o,updatedAt:o,revision:0};return this._sessions.set(a.id,a),this._sessionByName.set(i,a.id),this._sseClients.set(a.id,new Set),this._recordActivity(),a}getSessionIdForName(t,r=this._adapter.documentKind){return this._sessionByName.get(this._getSessionKey(r,t))}getSessionUrl(t,r=this._port){return ET(t,r,this._publicHostname)}notifySessionUpdate(t){this._sendDocumentUpdateAsync(t)}closeSession(t,r="Session closed by MCP server"){const i=this._sessions.get(t);if(!i)return!1;const n=this._sseClients.get(t);if(n){for(const o of n)o.write(`event: session-closed
85
85
  data: ${JSON.stringify({reason:r})}
86
86
 
87
- `),o.end();n.clear()}return this._sseClients.delete(t),this._sessions.delete(t),this._sessionByName.delete(this._getSessionKey(i.kind,i.name)),this._recordActivity(),!0}closeSessionForName(t,r=this._adapter.documentKind){const i=this.getSessionIdForName(t,r);return i?this.closeSession(i):!1}getPort(){return this._port}getHealth(){return{protocol:kv,protocolVersion:this._protocolVersion,serverName:this._adapter.serverName,port:this._port,host:this._host,publicHostname:this._publicHostname,documentKind:this._adapter.documentKind,running:this.isRunning(),activeSessionCount:this._sessions.size,capabilities:[...this._capabilities],conflictPolicy:yo,idleTimeoutMs:this._idleTimeoutMs,lastActivityAt:this._lastActivityAt,workspaceId:this._workspaceId,ownerId:this._ownerId}}getDiagnostics(){return{health:this.getHealth(),sessions:this._getSessionInfoList(),sseClientCount:this._getSseClientCount(),startedAt:this._startedAt,uptimeMs:this._startedAt?Date.now()-this._startedAt:0,keepAliveIntervalMs:this._keepAliveIntervalMs,idleTimeoutMs:this._idleTimeoutMs,lastActivityAt:this._lastActivityAt}}_recordActivity(){this._lastActivityAt=Date.now(),this._scheduleIdleTimeout()}_scheduleIdleTimeout(){if(this._idleTimeout&&(clearTimeout(this._idleTimeout),this._idleTimeout=null),this._idleTimeoutMs<=0||!this.isRunning())return;const t=Date.now()-this._lastActivityAt,r=Math.max(1,this._idleTimeoutMs-t),i=setTimeout(()=>{this._stopIfIdleAsync()},r);typeof i=="object"&&"unref"in i&&i.unref(),this._idleTimeout=i}async _stopIfIdleAsync(){if(!this.isRunning()||this._idleTimeoutMs<=0)return;if(Date.now()-this._lastActivityAt<this._idleTimeoutMs){this._scheduleIdleTimeout();return}await this.stopAsync("Session server stopped after idle timeout")}_getSessionKey(t,r){return`${t}:${r}`}async _tryPortRangeAsync(t,r){let i;for(let n=t;n<=r;n++)try{return await this._startOnPortAsync(n),n}catch(o){i=o}throw i??new Error(`Could not find an open port between ${t} and ${r}`)}async _startOnPortAsync(t){await new Promise((r,i)=>{const n=Nv.createServer((o,a)=>{this._handleRequestAsync(o,a)});n.once("error",o=>{i(new Error(o.message))}),n.listen(t,this._host,()=>{this._server=n,r()})})}_setCorsHeaders(t,r){const i=this._getAllowedCorsOrigin(t.headers.origin);i&&(r.setHeader("Access-Control-Allow-Origin",i),r.setHeader("Vary","Origin"),t.headers["access-control-request-private-network"]==="true"&&r.setHeader("Access-Control-Allow-Private-Network","true")),r.setHeader("Access-Control-Allow-Methods","GET, POST, OPTIONS"),r.setHeader("Access-Control-Allow-Headers","Content-Type"),r.setHeader("Access-Control-Expose-Headers","X-Mcp-Editor-Session-Revision")}_getAllowedCorsOrigin(t){if(this._corsOrigin)return this._corsOrigin;if(t)return this._allowedOrigins?this._allowedOrigins.has(t)?t:void 0:this._isLocalOrigin(t)||this._isTrustedProductionOrigin(t)?t:void 0}_isTrustedProductionOrigin(t){if(this._trustedOriginHostSuffixes.length===0)return!1;try{const r=new URL(t);return r.protocol!=="https:"?!1:this._trustedOriginHostSuffixes.some(i=>r.hostname===i||r.hostname.endsWith(`.${i}`))}catch{return!1}}_isLocalOrigin(t){try{const r=new URL(t);return(r.protocol==="http:"||r.protocol==="https:")&&(r.hostname==="localhost"||r.hostname==="127.0.0.1"||r.hostname==="::1")}catch{return!1}}async _handleRequestAsync(t,r){if(this._setCorsHeaders(t,r),this._recordActivity(),t.method==="OPTIONS"){r.writeHead(204),r.end();return}const n=new URL(t.url??"/",`http://${this._publicHostname}:${this._port}`).pathname;if(n==="/"&&t.method==="GET"){this._handleStatus(r);return}if(n==="/health"&&t.method==="GET"){this._writeJson(r,200,this.getHealth());return}if(n==="/sessions"&&t.method==="GET"){this._writeJson(r,200,this._getSessionInfoList());return}if(n==="/diagnostics"&&t.method==="GET"){this._writeJson(r,200,this.getDiagnostics());return}const o=n.match(/^\/session\/([^/]+)(?:\/([^/]+))?$/);if(!o){this._writeText(r,404,"Not Found");return}const a=o[1],s=o[2]??"",c=this._sessions.get(a);if(!c){this._writeJson(r,404,{error:`Session "${a}" not found`});return}if(s===""&&t.method==="GET"){this._writeJson(r,200,this._createSessionInfo(c));return}if(s==="events"&&t.method==="GET"){await this._handleSseAsync(c,r);return}if(this._isDocumentRoute(s)){if(t.method==="GET"){await this._handleGetDocumentAsync(c,r);return}if(t.method==="POST"){await this._handlePostDocumentAsync(c,t,r);return}}this._writeText(r,404,"Not Found")}_handleStatus(t){const r=[this._statusTitle,"",`Protocol: ${kv} ${this._protocolVersion}`,`Document kind: ${this._adapter.documentKind}`,""];if(this._sessions.size===0)r.push("No active sessions.");else{r.push("Active sessions:");for(const i of this._sessions.values()){const n=this._sseClients.get(i.id)?.size??0;r.push(` ${i.id} -> ${i.name} (${n} subscriber${n===1?"":"s"}, revision ${i.revision})`)}}this._writeText(t,200,r.join(`
87
+ `),o.end();n.clear()}return this._sseClients.delete(t),this._sessions.delete(t),this._sessionByName.delete(this._getSessionKey(i.kind,i.name)),this._recordActivity(),!0}closeSessionForName(t,r=this._adapter.documentKind){const i=this.getSessionIdForName(t,r);return i?this.closeSession(i):!1}getPort(){return this._port}getHealth(){return{protocol:wv,protocolVersion:this._protocolVersion,serverName:this._adapter.serverName,port:this._port,host:this._host,publicHostname:this._publicHostname,documentKind:this._adapter.documentKind,running:this.isRunning(),activeSessionCount:this._sessions.size,capabilities:[...this._capabilities],conflictPolicy:yo,idleTimeoutMs:this._idleTimeoutMs,lastActivityAt:this._lastActivityAt,workspaceId:this._workspaceId,ownerId:this._ownerId}}getDiagnostics(){return{health:this.getHealth(),sessions:this._getSessionInfoList(),sseClientCount:this._getSseClientCount(),startedAt:this._startedAt,uptimeMs:this._startedAt?Date.now()-this._startedAt:0,keepAliveIntervalMs:this._keepAliveIntervalMs,idleTimeoutMs:this._idleTimeoutMs,lastActivityAt:this._lastActivityAt}}_recordActivity(){this._lastActivityAt=Date.now(),this._scheduleIdleTimeout()}_scheduleIdleTimeout(){if(this._idleTimeout&&(clearTimeout(this._idleTimeout),this._idleTimeout=null),this._idleTimeoutMs<=0||!this.isRunning())return;const t=Date.now()-this._lastActivityAt,r=Math.max(1,this._idleTimeoutMs-t),i=setTimeout(()=>{this._stopIfIdleAsync()},r);typeof i=="object"&&"unref"in i&&i.unref(),this._idleTimeout=i}async _stopIfIdleAsync(){if(!this.isRunning()||this._idleTimeoutMs<=0)return;if(Date.now()-this._lastActivityAt<this._idleTimeoutMs){this._scheduleIdleTimeout();return}await this.stopAsync("Session server stopped after idle timeout")}_getSessionKey(t,r){return`${t}:${r}`}async _tryPortRangeAsync(t,r){let i;for(let n=t;n<=r;n++)try{return await this._startOnPortAsync(n),n}catch(o){i=o}throw i??new Error(`Could not find an open port between ${t} and ${r}`)}async _startOnPortAsync(t){await new Promise((r,i)=>{const n=xv.createServer((o,a)=>{this._handleRequestAsync(o,a)});n.once("error",o=>{i(new Error(o.message))}),n.listen(t,this._host,()=>{this._server=n,r()})})}_setCorsHeaders(t,r){const i=this._getAllowedCorsOrigin(t.headers.origin);i&&(r.setHeader("Access-Control-Allow-Origin",i),r.setHeader("Vary","Origin"),t.headers["access-control-request-private-network"]==="true"&&r.setHeader("Access-Control-Allow-Private-Network","true")),r.setHeader("Access-Control-Allow-Methods","GET, POST, OPTIONS"),r.setHeader("Access-Control-Allow-Headers","Content-Type"),r.setHeader("Access-Control-Expose-Headers","X-Mcp-Editor-Session-Revision")}_getAllowedCorsOrigin(t){if(this._corsOrigin)return this._corsOrigin;if(t)return this._allowedOrigins?this._allowedOrigins.has(t)?t:void 0:this._isLocalOrigin(t)||this._isTrustedProductionOrigin(t)?t:void 0}_isTrustedProductionOrigin(t){if(this._trustedOriginHostSuffixes.length===0)return!1;try{const r=new URL(t);return r.protocol!=="https:"?!1:this._trustedOriginHostSuffixes.some(i=>r.hostname===i||r.hostname.endsWith(`.${i}`))}catch{return!1}}_isLocalOrigin(t){try{const r=new URL(t);return(r.protocol==="http:"||r.protocol==="https:")&&(r.hostname==="localhost"||r.hostname==="127.0.0.1"||r.hostname==="::1")}catch{return!1}}async _handleRequestAsync(t,r){if(this._setCorsHeaders(t,r),this._recordActivity(),t.method==="OPTIONS"){r.writeHead(204),r.end();return}const n=new URL(t.url??"/",`http://${this._publicHostname}:${this._port}`).pathname;if(n==="/"&&t.method==="GET"){this._handleStatus(r);return}if(n==="/health"&&t.method==="GET"){this._writeJson(r,200,this.getHealth());return}if(n==="/sessions"&&t.method==="GET"){this._writeJson(r,200,this._getSessionInfoList());return}if(n==="/diagnostics"&&t.method==="GET"){this._writeJson(r,200,this.getDiagnostics());return}const o=n.match(/^\/session\/([^/]+)(?:\/([^/]+))?$/);if(!o){this._writeText(r,404,"Not Found");return}const a=o[1],s=o[2]??"",c=this._sessions.get(a);if(!c){this._writeJson(r,404,{error:`Session "${a}" not found`});return}if(s===""&&t.method==="GET"){this._writeJson(r,200,this._createSessionInfo(c));return}if(s==="events"&&t.method==="GET"){await this._handleSseAsync(c,r);return}if(this._isDocumentRoute(s)){if(t.method==="GET"){await this._handleGetDocumentAsync(c,r);return}if(t.method==="POST"){await this._handlePostDocumentAsync(c,t,r);return}}this._writeText(r,404,"Not Found")}_handleStatus(t){const r=[this._statusTitle,"",`Protocol: ${wv} ${this._protocolVersion}`,`Document kind: ${this._adapter.documentKind}`,""];if(this._sessions.size===0)r.push("No active sessions.");else{r.push("Active sessions:");for(const i of this._sessions.values()){const n=this._sseClients.get(i.id)?.size??0;r.push(` ${i.id} -> ${i.name} (${n} subscriber${n===1?"":"s"}, revision ${i.revision})`)}}this._writeText(t,200,r.join(`
88
88
  `))}async _handleSseAsync(t,r){r.statusCode=200,r.setHeader("Content-Type","text/event-stream"),r.setHeader("Cache-Control","no-cache"),r.setHeader("Connection","keep-alive"),r.flushHeaders();const i=this._sseClients.get(t.id);i.add(r),r.write(`: connected
89
89
 
90
90
  `);const n=await this._adapter.getDocument(t);n&&this._writeDocumentEvent(r,n),r.on("close",()=>{i.delete(r),this._recordActivity()})}async _handleGetDocumentAsync(t,r){const i=await this._adapter.getDocument(t);if(!i){this._writeJson(r,404,{error:`Document "${t.name}" not found`});return}r.statusCode=200,r.setHeader("Content-Type","application/json; charset=utf-8"),r.setHeader("Cache-Control","no-cache"),r.setHeader("X-Mcp-Editor-Session-Revision",t.revision.toString()),r.end(i)}async _handlePostDocumentAsync(t,r,i){const n=await this._readBodyAsync(r);try{JSON.parse(n)}catch{this._writeJson(i,400,{error:"Invalid JSON"});return}const o=await this._adapter.setDocument(t,n);if(typeof o=="string"&&o.length>0){this._writeJson(i,400,{error:o});return}const a=t.revision;this._touchSession(t),i.setHeader("X-Mcp-Editor-Session-Revision",t.revision.toString()),this._writeJson(i,200,{ok:!0,previousRevision:a,revision:t.revision,conflictPolicy:yo}),await this._sendDocumentUpdateAsync(t.id,!1)}async _sendDocumentUpdateAsync(t,r=!0){const i=this._sessions.get(t);if(!i)return;this._recordActivity(),r&&this._touchSession(i);const n=this._sseClients.get(t);if(!n||n.size===0)return;const o=await this._adapter.getDocument(i);if(o)for(const a of n)this._writeDocumentEvent(a,o)}_touchSession(t){t.updatedAt=Date.now(),t.revision++}_writeDocumentEvent(t,r){const i=JSON.stringify(JSON.parse(r));t.write(`data: ${i}
91
91
 
92
- `)}_isDocumentRoute(t){return t==="document"||this._legacyDocumentRoutes.has(t)}_createSessionInfo(t){const r=this._sseClients.get(t.id)?.size??0,i={sessionId:t.id,kind:t.kind,name:t.name,revision:t.revision,createdAt:t.createdAt,updatedAt:t.updatedAt,conflictPolicy:yo,subscriberCount:r,eventsUrl:`/session/${t.id}/events`,documentUrl:`/session/${t.id}/document`};for(const n of this._legacyDocumentRoutes)i[`${n}Url`]=`/session/${t.id}/${n}`;return i}_getSessionInfoList(){return[...this._sessions.values()].map(t=>this._createSessionInfo(t))}_getSseClientCount(){let t=0;for(const r of this._sseClients.values())t+=r.size;return t}async _readBodyAsync(t){const r=[];return await new Promise((i,n)=>{t.on("data",o=>r.push(o)),t.on("end",i),t.on("error",n)}),Buffer.concat(r).toString("utf-8")}_writeJson(t,r,i){t.statusCode=r,t.setHeader("Content-Type","application/json; charset=utf-8"),t.end(JSON.stringify(i))}_writeText(t,r,i){t.statusCode=r,t.setHeader("Content-Type","text/plain; charset=utf-8"),t.end(i)}}class jT{constructor(t,r={}){this._manager=null,this._sessionServer=null,this._adapter=t,this._options=r}isRunning(){return this._sessionServer?.isRunning()??!1}async startAsync(t,r){return this._manager=t,await this._getSessionServer().startAsync(r)}async stopAsync(){this._sessionServer&&await this._sessionServer.stopAsync()}createSession(t){return this._getSessionServer().createSession(t).id}getSessionIdForName(t){return this._sessionServer?.getSessionIdForName(t)}getSessionUrl(t,r){return this._getSessionServer().getSessionUrl(t,r)}notifySessionUpdate(t){this._sessionServer?.notifySessionUpdate(t)}closeSession(t){return this._sessionServer?.closeSession(t)??!1}closeSessionForName(t){return this._sessionServer?.closeSessionForName(t)??!1}getPort(){return this._sessionServer?.getPort()??0}getHealth(){return this._getSessionServer().getHealth()}getDiagnostics(){return this._getSessionServer().getDiagnostics()}_getSessionServer(){return this._sessionServer||(this._sessionServer=new xT({serverName:this._adapter.serverName,documentKind:this._adapter.documentKind,getDocument:t=>this._manager?this._adapter.getDocument(this._manager,t):void 0,setDocument:(t,r)=>this._manager?this._adapter.setDocument(this._manager,t,r):this._adapter.managerUnavailableMessage??"Document manager is not available"},this._options)),this._sessionServer}}const Ft={SceneReadyEvent:{className:"FlowGraphSceneReadyEventBlock",category:"Event",description:"Triggers when the scene is ready (all assets loaded). This is the most common entry point for a flow graph.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (use for initialization logic)"},{name:"done",description:"Fires when the event actually triggers (scene ready). USE THIS for event-driven logic."},{name:"error",description:"Fires on error"}],dataInputs:[],dataOutputs:[]},SceneTickEvent:{className:"FlowGraphSceneTickEventBlock",category:"Event",description:"Triggers every frame (scene render loop). Provides elapsed time and delta time.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires every frame when the tick event occurs. USE THIS for per-frame logic."},{name:"error",description:"Fires on error"}],dataInputs:[],dataOutputs:[{name:"timeSinceStart",type:"number",description:"Total time since the scene started (seconds)"},{name:"deltaTime",type:"number",description:"Time since last frame (seconds)"}]},MeshPickEvent:{className:"FlowGraphMeshPickEventBlock",category:"Event",description:"Triggers when a mesh is picked (clicked) by the user.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization). NOT on each pick."},{name:"done",description:"Fires each time the mesh is picked. USE THIS to react to clicks."},{name:"error"}],dataInputs:[{name:"asset",type:"any",description:"The target mesh to listen for picks on",isOptional:!0},{name:"pointerType",type:"any",description:"PointerEventTypes filter (default: POINTERPICK)",isOptional:!0}],dataOutputs:[{name:"pickedPoint",type:"Vector3",description:"World-space pick point"},{name:"pickOrigin",type:"Vector3",description:"Ray origin"},{name:"pointerId",type:"number",description:"Pointer identifier"},{name:"pickedMesh",type:"any",description:"The mesh that was picked"}],config:{stopPropagation:"boolean \u2014 whether to stop event propagation",targetMesh:"AbstractMesh reference \u2014 default target mesh"}},PointerOverEvent:{className:"FlowGraphPointerOverEventBlock",category:"Event",description:"Triggers when the pointer moves over a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer enters the mesh. USE THIS for hover logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"meshUnderPointer",type:"any",description:"The mesh under the pointer"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},PointerOutEvent:{className:"FlowGraphPointerOutEventBlock",category:"Event",description:"Triggers when the pointer moves off a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer leaves the mesh. USE THIS for hover-out logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"meshOutOfPointer",type:"any",description:"The mesh the pointer left"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},PointerDownEvent:{className:"FlowGraphPointerDownEventBlock",category:"Event",description:"Triggers when a pointer button is pressed down on a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer is pressed. USE THIS for press logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"pickedMesh",type:"any",description:"The mesh that was pressed"},{name:"pickedPoint",type:"any",description:"The 3D point where the press occurred"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},PointerUpEvent:{className:"FlowGraphPointerUpEventBlock",category:"Event",description:"Triggers when a pointer button is released on a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer is released. USE THIS for release logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"pickedMesh",type:"any",description:"The mesh that was released"},{name:"pickedPoint",type:"any",description:"The 3D point where the release occurred"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},PointerMoveEvent:{className:"FlowGraphPointerMoveEventBlock",category:"Event",description:"Triggers when the pointer moves over a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer moves. USE THIS for move logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"meshUnderPointer",type:"any",description:"The mesh under the pointer"},{name:"pickedPoint",type:"any",description:"The 3D point under the pointer"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},KeyDownEvent:{className:"FlowGraphKeyDownEventBlock",category:"Event",description:"Triggers when a keyboard key is pressed down. Can optionally ignore auto-repeat events.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the matching key-down event occurs. USE THIS for keyboard logic."},{name:"error"}],dataInputs:[{name:"key",type:"string",description:"KeyboardEvent.code value to match, such as KeyA or Space. Leave empty for any key.",isOptional:!0}],dataOutputs:[{name:"keyCode",type:"string",description:"KeyboardEvent.code for the pressed key"},{name:"keyValue",type:"string",description:"KeyboardEvent.key for the pressed key"},{name:"shiftKey",type:"boolean",description:"Whether Shift was held"},{name:"ctrlKey",type:"boolean",description:"Whether Ctrl was held"},{name:"altKey",type:"boolean",description:"Whether Alt/Option was held"},{name:"metaKey",type:"boolean",description:"Whether Meta/Cmd/Windows key was held"},{name:"commandOrCtrl",type:"boolean",description:"Whether the platform command modifier was held"},{name:"isRepeat",type:"boolean",description:"True when this key-down event is an auto-repeat event"}],config:{stopPropagation:"boolean \u2014 whether to stop event propagation",ignoreRepeat:"boolean \u2014 when true, ignores auto-repeat key-down events"}},KeyUpEvent:{className:"FlowGraphKeyUpEventBlock",category:"Event",description:"Triggers when a keyboard key is released.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the matching key-up event occurs. USE THIS for keyboard logic."},{name:"error"}],dataInputs:[{name:"key",type:"string",description:"KeyboardEvent.code value to match, such as KeyA or Space. Leave empty for any key.",isOptional:!0}],dataOutputs:[{name:"keyCode",type:"string",description:"KeyboardEvent.code for the released key"},{name:"keyValue",type:"string",description:"KeyboardEvent.key for the released key"},{name:"shiftKey",type:"boolean",description:"Whether Shift was held"},{name:"ctrlKey",type:"boolean",description:"Whether Ctrl was held"},{name:"altKey",type:"boolean",description:"Whether Alt/Option was held"},{name:"metaKey",type:"boolean",description:"Whether Meta/Cmd/Windows key was held"},{name:"commandOrCtrl",type:"boolean",description:"Whether the platform command modifier was held"}],config:{stopPropagation:"boolean \u2014 whether to stop event propagation"}},PhysicsCollisionEvent:{className:"FlowGraphPhysicsCollisionEventBlock",category:"Event",description:"Triggers when a physics body collides with another body.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time a collision occurs. USE THIS for collision logic."},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody to watch for collisions"}],dataOutputs:[{name:"otherBody",type:"any",description:"The other body in the collision"},{name:"point",type:"Vector3",description:"Collision contact point"},{name:"normal",type:"Vector3",description:"Collision normal"},{name:"impulse",type:"number",description:"Collision impulse magnitude"},{name:"distance",type:"number",description:"Penetration distance"}]},AudioSoundEndedEvent:{className:"FlowGraphSoundEndedEventBlock",category:"Event",description:"Triggers when a sound finishes playing.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the sound ends. USE THIS for sound-ended logic."},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound to watch"}],dataOutputs:[]},SendCustomEvent:{className:"FlowGraphSendCustomEventBlock",category:"Event",description:"Sends a custom event that can be received by ReceiveCustomEvent blocks. Execution block with signal flow.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[],dataOutputs:[],config:{eventId:"string \u2014 the custom event identifier",eventData:"Record<string, { type: RichType }> \u2014 dynamic data inputs are created from this"}},ReceiveCustomEvent:{className:"FlowGraphReceiveCustomEventBlock",category:"Event",description:"Receives a custom event sent by SendCustomEvent blocks. Creates dynamic data outputs from eventData config.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the custom event is received. USE THIS for event handling."},{name:"error"}],dataInputs:[],dataOutputs:[],config:{eventId:"string \u2014 must match the sender's eventId",eventData:"Record<string, { type: RichType }> \u2014 dynamic data outputs are created from this"}},ConsoleLog:{className:"FlowGraphConsoleLogBlock",category:"Execution",description:"Logs a message to the browser console. Supports template strings with {placeholder} syntax.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"message",type:"any",description:"The message to log"},{name:"logType",type:"any",description:'Log level: "log", "warn", or "error"',isOptional:!0}],dataOutputs:[],config:{messageTemplate:"string \u2014 template with {placeholder} names that become additional data inputs"}},SetProperty:{className:"FlowGraphSetPropertyBlock",category:"Execution",description:"Sets a property on a scene object (e.g. mesh.position, light.intensity). Generic and powerful.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"object",type:"any",description:"The target object (mesh, light, camera, etc.)"},{name:"value",type:"any",description:"The value to set"},{name:"propertyName",type:"any",description:"The property path (e.g. 'position', 'intensity')",isOptional:!0},{name:"customSetFunction",type:"any",description:"Custom setter function",isOptional:!0}],dataOutputs:[],config:{propertyName:"string \u2014 the property name to set",target:"any \u2014 default target object"}},SetVariable:{className:"FlowGraphSetVariableBlock",category:"Execution",description:"Sets a context variable that can be read by GetVariable blocks. Variables persist across executions.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"value",type:"any",description:"The value to store in the variable"}],dataOutputs:[],config:{variable:"string \u2014 the variable name to set (mutually exclusive with 'variables')",variables:"string[] \u2014 multiple variable names to set (creates one input per name)"}},Branch:{className:"FlowGraphBranchBlock",category:"ControlFlow",description:"If/else branching. Routes execution to onTrue or onFalse based on a boolean condition.",signalInputs:[{name:"in"}],signalOutputs:[{name:"onTrue",description:"Fires when condition is true"},{name:"onFalse",description:"Fires when condition is false"},{name:"error"}],dataInputs:[{name:"condition",type:"boolean",description:"The branching condition"}],dataOutputs:[]},ForLoop:{className:"FlowGraphForLoopBlock",category:"ControlFlow",description:"Executes a loop body for each index from startIndex to endIndex.",signalInputs:[{name:"in"}],signalOutputs:[{name:"executionFlow",description:"Fires for each iteration"},{name:"completed",description:"Fires when the loop finishes"},{name:"error"}],dataInputs:[{name:"startIndex",type:"any",description:"Loop start index (default 0)"},{name:"endIndex",type:"any",description:"Loop end index (exclusive)"},{name:"step",type:"number",description:"Step increment (default 1)",isOptional:!0}],dataOutputs:[{name:"index",type:"FlowGraphInteger",description:"Current loop index"}],config:{initialIndex:"number \u2014 initial index override",incrementIndexWhenLoopDone:"boolean \u2014 whether to increment the index when the loop is done"}},WhileLoop:{className:"FlowGraphWhileLoopBlock",category:"ControlFlow",description:"Executes the loop body while the condition is true.",signalInputs:[{name:"in"}],signalOutputs:[{name:"executionFlow",description:"Fires for each iteration"},{name:"completed",description:"Fires when the loop exits"},{name:"error"}],dataInputs:[{name:"condition",type:"boolean",description:"Loop condition \u2014 continues while true"}],dataOutputs:[],config:{doWhile:"boolean \u2014 if true, executes the body at least once before checking the condition"}},Sequence:{className:"FlowGraphSequenceBlock",category:"ControlFlow",description:"Executes multiple output signals in order (out_0, out_1, ...). Like a sequential pipeline.",signalInputs:[{name:"in"}],signalOutputs:[{name:"error"}],dataInputs:[],dataOutputs:[],config:{outputSignalCount:"number \u2014 how many sequential outputs to create (default 1). Creates out_0, out_1, ..."}},Switch:{className:"FlowGraphSwitchBlock",category:"ControlFlow",description:"Routes execution based on a case value. Like a switch/case statement with a default.",signalInputs:[{name:"in"}],signalOutputs:[{name:"default",description:"Fires when no case matches"},{name:"error"}],dataInputs:[{name:"case",type:"any",description:"The value to switch on"}],dataOutputs:[],config:{cases:"T[] \u2014 array of case values. Creates signal output 'out_{value}' for each case"}},MultiGate:{className:"FlowGraphMultiGateBlock",category:"ControlFlow",description:"Routes execution to one of N outputs each time it is triggered. Can be sequential, random, or looping.",signalInputs:[{name:"in"},{name:"reset",description:"Resets the gate index"}],signalOutputs:[{name:"error"}],dataInputs:[],dataOutputs:[{name:"lastIndex",type:"FlowGraphInteger",description:"Index of the last output fired"}],config:{outputSignalCount:"number \u2014 how many outputs to create (out_0, out_1, ...)",isRandom:"boolean \u2014 if true, picks outputs randomly",isLoop:"boolean \u2014 if true, loops back to the first output after the last"}},WaitAll:{className:"FlowGraphWaitAllBlock",category:"ControlFlow",description:"Waits for all N signal inputs to fire before triggering the output. Useful for synchronization.",signalInputs:[{name:"reset",description:"Resets all input states"}],signalOutputs:[{name:"out",description:"Fires when all inputs have triggered"},{name:"completed"},{name:"error"}],dataInputs:[],dataOutputs:[{name:"remainingInputs",type:"FlowGraphInteger",description:"How many inputs are still pending"}],config:{inputSignalCount:"number \u2014 how many signal inputs to create (in_0, in_1, ...)"}},SetDelay:{className:"FlowGraphSetDelayBlock",category:"ControlFlow",description:"Triggers the 'done' signal after a specified duration (in seconds). The 'out' signal fires immediately.",signalInputs:[{name:"in"},{name:"cancel",description:"Cancels the pending delay"}],signalOutputs:[{name:"out",description:"Fires immediately"},{name:"done",description:"Fires after the delay"},{name:"error"}],dataInputs:[{name:"duration",type:"number",description:"Delay duration in seconds"}],dataOutputs:[{name:"lastDelayIndex",type:"FlowGraphInteger",description:"Index of the last delay set"}]},CancelDelay:{className:"FlowGraphCancelDelayBlock",category:"ControlFlow",description:"Cancels a pending delay created by SetDelay.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"delayIndex",type:"FlowGraphInteger",description:"Index of the delay to cancel"}],dataOutputs:[]},CallCounter:{className:"FlowGraphCallCounterBlock",category:"ControlFlow",description:"Counts how many times it has been triggered. Can be reset.",signalInputs:[{name:"in"},{name:"reset",description:"Resets the counter to 0"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[],dataOutputs:[{name:"count",type:"number",description:"Current call count"}]},Debounce:{className:"FlowGraphDebounceBlock",category:"ControlFlow",description:"Only fires the output after the input has been triggered N times (debounce count). Then resets.",signalInputs:[{name:"in"},{name:"reset",description:"Resets the debounce counter"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"count",type:"number",description:"Number of triggers before firing"}],dataOutputs:[{name:"currentCount",type:"number",description:"Current trigger count"}]},Throttle:{className:"FlowGraphThrottleBlock",category:"ControlFlow",description:"Limits execution to at most once per duration period (in seconds).",signalInputs:[{name:"in"},{name:"reset",description:"Resets the throttle timer"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"duration",type:"number",description:"Minimum time between executions (seconds)"}],dataOutputs:[{name:"lastRemainingTime",type:"number",description:"Time remaining until next allowed execution"}]},DoN:{className:"FlowGraphDoNBlock",category:"ControlFlow",description:"Fires the output only the first N times it is triggered, then stops. Can be reset.",signalInputs:[{name:"in"},{name:"reset",description:"Resets the execution counter"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"maxExecutions",type:"FlowGraphInteger",description:"Maximum number of times to fire"}],dataOutputs:[{name:"executionCount",type:"FlowGraphInteger",description:"How many times it has fired"}],config:{startIndex:"FlowGraphInteger \u2014 initial count value"}},FlipFlop:{className:"FlowGraphFlipFlopBlock",category:"ControlFlow",description:"Alternates between onOn and onOff signals each time it is triggered. Like a toggle switch.",signalInputs:[{name:"in"}],signalOutputs:[{name:"onOn",description:"Fires on odd triggers"},{name:"onOff",description:"Fires on even triggers"},{name:"error"}],dataInputs:[],dataOutputs:[{name:"value",type:"boolean",description:"Current toggle state"}],config:{startValue:"boolean \u2014 initial toggle state (default false)"}},PlayAnimation:{className:"FlowGraphPlayAnimationBlock",category:"Animation",description:"Plays an animation or animation group. Provides current frame and event outputs.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out",description:"Fires immediately when play starts"},{name:"done",description:"Fires when the animation finishes"},{name:"error"},{name:"animationLoopEvent",description:"Fires each time the animation loops"},{name:"animationEndEvent",description:"Fires when the animation ends"},{name:"animationGroupLoopEvent",description:"Fires when an animation group loops"}],dataInputs:[{name:"speed",type:"number",description:"Playback speed (default 0)"},{name:"loop",type:"boolean",description:"Whether to loop (default false)"},{name:"from",type:"number",description:"Start frame (default 0)"},{name:"to",type:"number",description:"End frame (default 0 = full range)"},{name:"animationGroup",type:"any",description:"AnimationGroup to play"},{name:"animation",type:"any",description:"Animation or Animation[] to play",isOptional:!0},{name:"object",type:"any",description:"Target object for the animation",isOptional:!0}],dataOutputs:[{name:"currentFrame",type:"number",description:"Current animation frame"},{name:"currentTime",type:"number",description:"Current animation time"},{name:"currentAnimationGroup",type:"any",description:"The active animation group"}],config:{animationGroup:"AnimationGroup \u2014 default animation group"}},StopAnimation:{className:"FlowGraphStopAnimationBlock",category:"Animation",description:"Stops a playing animation group.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"done"},{name:"error"}],dataInputs:[{name:"animationGroup",type:"any",description:"The animation group to stop"},{name:"stopAtFrame",type:"number",description:"Frame to stop at (-1 = current)",isOptional:!0}],dataOutputs:[]},PauseAnimation:{className:"FlowGraphPauseAnimationBlock",category:"Animation",description:"Pauses a playing animation group.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"animationToPause",type:"any",description:"The animation group to pause"}],dataOutputs:[]},ValueInterpolation:{className:"FlowGraphInterpolationBlock",category:"Animation",description:"Creates an Animation object from keyframe values. Use with PlayAnimation to animate properties. Takes duration/value pairs for each keyframe.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"easingFunction",type:"any",description:"Optional easing function from Easing block",isOptional:!0},{name:"propertyName",type:"any",description:"Property name(s) to animate",isOptional:!0},{name:"customBuildAnimation",type:"any",description:"Custom animation builder function",isOptional:!0}],dataOutputs:[{name:"animation",type:"any",description:"The generated Animation object"}],config:{keyFramesCount:"number \u2014 number of keyframes (creates duration_N and value_N inputs for each)",duration:"number \u2014 default duration per keyframe",propertyName:"string|string[] \u2014 property path(s) to animate",animationType:"number|FlowGraphTypes \u2014 type of animated value (e.g. BABYLON.Animation.ANIMATIONTYPE_VECTOR3)"}},Easing:{className:"FlowGraphEasingBlock",category:"Animation",description:"Creates an easing function for use with ValueInterpolation. Supports all Babylon.js easing types.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"type",type:"any",description:"EasingFunctionType enum value (default 11 = BezierCurve)"},{name:"mode",type:"number",description:"Easing mode: 0=EaseIn, 1=EaseOut, 2=EaseInOut"},{name:"parameters",type:"any",description:"Easing parameters as number array (default [1,0,0,1])",isOptional:!0}],dataOutputs:[{name:"easingFunction",type:"any",description:"The easing function object"}]},BezierCurveEasing:{className:"FlowGraphBezierCurveEasing",category:"Animation",description:"Creates a bezier curve easing function with two control points.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"mode",type:"number",description:"Easing mode: 0=EaseIn, 1=EaseOut, 2=EaseInOut"},{name:"controlPoint1",type:"Vector2",description:"First control point"},{name:"controlPoint2",type:"Vector2",description:"Second control point"}],dataOutputs:[{name:"easingFunction",type:"any",description:"The bezier easing function object"}]},Constant:{className:"FlowGraphConstantBlock",category:"Data",description:"Outputs a constant value. The type is deduced from the config value. Supports numbers, strings, booleans, vectors, colors, etc.",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"output",type:"any",description:"The constant value"}],config:{value:"any \u2014 the constant value (e.g. 42, 'hello', { value: [1,2,3], className: 'Vector3' })"}},GetVariable:{className:"FlowGraphGetVariableBlock",category:"Data",description:"Reads a context variable set by SetVariable. Variables persist across executions of the graph.",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"any",description:"The variable's current value"}],config:{variable:"string \u2014 the variable name to read",initialValue:"any \u2014 default value if the variable hasn't been set"}},GetProperty:{className:"FlowGraphGetPropertyBlock",category:"Data",description:"Reads a property from a scene object (e.g. mesh.position, light.intensity).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"object",type:"any",description:"The target object"},{name:"propertyName",type:"any",description:"The property name to read",isOptional:!0},{name:"customGetFunction",type:"any",description:"Custom getter function",isOptional:!0}],dataOutputs:[{name:"value",type:"any",description:"The property value"},{name:"isValid",type:"boolean",description:"Whether the property was found"}],config:{propertyName:"string \u2014 property path to read",object:"any \u2014 default target object",resetToDefaultWhenUndefined:"boolean \u2014 reset to default when undefined"}},GetAsset:{className:"FlowGraphGetAssetBlock",category:"Data",description:"Retrieves an asset (mesh, material, texture, etc.) from the scene's asset context by type and index.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"type",type:"any",description:"FlowGraphAssetType \u2014 the kind of asset to retrieve"},{name:"index",type:"any",description:"Index of the asset in the collection",isOptional:!0}],dataOutputs:[{name:"value",type:"any",description:"The retrieved asset"}],config:{type:"FlowGraphAssetType \u2014 asset type enum",index:"number \u2014 asset index in the collection",useIndexAsUniqueId:"boolean \u2014 whether to use index as uniqueId lookup"}},Conditional:{className:"FlowGraphConditionalBlock",category:"Data",description:"Ternary operator \u2014 returns onTrue if condition is true, onFalse otherwise. Pure data block (no signals).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"condition",type:"boolean",description:"The condition to evaluate"},{name:"onTrue",type:"any",description:"Value returned when condition is true"},{name:"onFalse",type:"any",description:"Value returned when condition is false"}],dataOutputs:[{name:"output",type:"any",description:"The selected value"}]},TransformCoordinatesSystem:{className:"FlowGraphTransformCoordinatesSystemBlock",category:"Data",description:"Transforms coordinates from one coordinate system to another using two TransformNodes.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"sourceSystem",type:"any",description:"Source TransformNode"},{name:"destinationSystem",type:"any",description:"Destination TransformNode"},{name:"inputCoordinates",type:"Vector3",description:"Coordinates to transform"}],dataOutputs:[{name:"outputCoordinates",type:"Vector3",description:"Transformed coordinates"}]},JsonPointerParser:{className:"FlowGraphJsonPointerParserBlock",category:"Data",description:"Resolves a JSON pointer path to an object and property. Used internally for glTF interop.",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"},{name:"object",type:"any"},{name:"propertyName",type:"any"},{name:"setFunction",type:"any",description:"Setter function for the resolved property (used internally by interpolation/animation)"},{name:"getFunction",type:"any",description:"Getter function for the resolved property"},{name:"generateAnimationsFunction",type:"any",description:"Builds animation property info for the resolved property"}],config:{jsonPointer:"string \u2014 the JSON pointer path"}},DataSwitch:{className:"FlowGraphDataSwitchBlock",category:"Data",description:"Selects a data value based on a case. Like a data-only switch/case.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"case",type:"any",description:"The case value to match"},{name:"default",type:"any",description:"Default value if no case matches"}],dataOutputs:[{name:"value",type:"any",description:"The selected value"}],config:{cases:"number[] \u2014 case values. Creates data input 'in_{value}' for each case",treatCasesAsIntegers:"boolean \u2014 whether to treat case values as integers"}},Context:{className:"FlowGraphContextBlock",category:"Utility",description:"Provides access to the flow graph execution context (user variables, execution ID).",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"userVariables",type:"any",description:"All user variables as a dictionary"},{name:"executionId",type:"number",description:"Current execution ID"}]},IsKeyPressed:{className:"FlowGraphIsKeyPressedBlock",category:"Utility",description:"Outputs whether a keyboard key is currently held down, optionally requiring modifier keys.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"key",type:"string",description:"KeyboardEvent.code value to check, such as KeyA, Space, ShiftLeft, or ControlLeft"},{name:"withShift",type:"boolean",description:"Require Shift to also be held",isOptional:!0},{name:"withCtrl",type:"boolean",description:"Require Ctrl to also be held",isOptional:!0},{name:"withAlt",type:"boolean",description:"Require Alt/Option to also be held",isOptional:!0},{name:"withMeta",type:"boolean",description:"Require Meta/Cmd/Windows key to also be held",isOptional:!0},{name:"withCommandOrCtrl",type:"boolean",description:"Require Cmd on macOS or Ctrl on Windows/Linux",isOptional:!0}],dataOutputs:[{name:"isPressed",type:"boolean",description:"True when the requested key and modifiers are currently held"}]},ArrayIndex:{className:"FlowGraphArrayIndexBlock",category:"Utility",description:"Retrieves an element from an array by index.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"array",type:"any",description:"The source array"},{name:"index",type:"any",description:"The index to retrieve"}],dataOutputs:[{name:"value",type:"any",description:"The element at the specified index"}]},IndexOf:{className:"FlowGraphIndexOfBlock",category:"Utility",description:"Finds the index of an element in an array.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"object",type:"any",description:"The element to search for"},{name:"array",type:"any",description:"The array to search in"}],dataOutputs:[{name:"index",type:"FlowGraphInteger",description:"The index of the element (-1 if not found)"}]},CodeExecution:{className:"FlowGraphCodeExecutionBlock",category:"Utility",description:"Executes an arbitrary JavaScript function inside the flow graph \u2014 the 'escape hatch' for any logic not covered by dedicated blocks. This is a DATA block (no signal inputs/outputs); it evaluates lazily when its 'result' output is read by a downstream block. The function signature is: (value: any, context: FlowGraphContext) => any. The 'value' input can carry any data (a mesh, a number, an object with multiple fields, etc.), and 'context' is the FlowGraphContext giving access to the scene via context.assetsContext. Use the FunctionReference block to create the function from an object + method name, or provide the function via the scene's glue code / code generator. Common use cases: physics (applyImpulse, setLinearVelocity), mesh cloning (mesh.clone), reading/writing complex properties, invoking any Babylon.js API not exposed as a dedicated block.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"function",type:"any",description:"A CodeExecutionFunction: (value, context) => result. Can come from a FunctionReference block or be set in glue code. For physics impulse example: (v, ctx) => { v.mesh.physicsBody.applyImpulse(v.impulse, v.point); return true; }"},{name:"value",type:"any",description:"The input value passed as the first argument to the function. Can be any type \u2014 a mesh, a Vector3, or a composite object with multiple fields."}],dataOutputs:[{name:"result",type:"any",description:"The return value of the function"}]},FunctionReference:{className:"FlowGraphFunctionReference",category:"Utility",description:`Creates a callable function reference. Two modes of use:
92
+ `)}_isDocumentRoute(t){return t==="document"||this._legacyDocumentRoutes.has(t)}_createSessionInfo(t){const r=this._sseClients.get(t.id)?.size??0,i={sessionId:t.id,kind:t.kind,name:t.name,revision:t.revision,createdAt:t.createdAt,updatedAt:t.updatedAt,conflictPolicy:yo,subscriberCount:r,eventsUrl:`/session/${t.id}/events`,documentUrl:`/session/${t.id}/document`};for(const n of this._legacyDocumentRoutes)i[`${n}Url`]=`/session/${t.id}/${n}`;return i}_getSessionInfoList(){return[...this._sessions.values()].map(t=>this._createSessionInfo(t))}_getSseClientCount(){let t=0;for(const r of this._sseClients.values())t+=r.size;return t}async _readBodyAsync(t){const r=[];return await new Promise((i,n)=>{t.on("data",o=>r.push(o)),t.on("end",i),t.on("error",n)}),Buffer.concat(r).toString("utf-8")}_writeJson(t,r,i){t.statusCode=r,t.setHeader("Content-Type","application/json; charset=utf-8"),t.end(JSON.stringify(i))}_writeText(t,r,i){t.statusCode=r,t.setHeader("Content-Type","text/plain; charset=utf-8"),t.end(i)}}class jT{constructor(t,r={}){this._manager=null,this._sessionServer=null,this._adapter=t,this._options=r}isRunning(){return this._sessionServer?.isRunning()??!1}async startAsync(t,r){return this._manager=t,await this._getSessionServer().startAsync(r)}async stopAsync(){this._sessionServer&&await this._sessionServer.stopAsync()}createSession(t){return this._getSessionServer().createSession(t).id}getSessionIdForName(t){return this._sessionServer?.getSessionIdForName(t)}getSessionUrl(t,r){return this._getSessionServer().getSessionUrl(t,r)}notifySessionUpdate(t){this._sessionServer?.notifySessionUpdate(t)}closeSession(t){return this._sessionServer?.closeSession(t)??!1}closeSessionForName(t){return this._sessionServer?.closeSessionForName(t)??!1}getPort(){return this._sessionServer?.getPort()??0}getHealth(){return this._getSessionServer().getHealth()}getDiagnostics(){return this._getSessionServer().getDiagnostics()}_getSessionServer(){return this._sessionServer||(this._sessionServer=new NT({serverName:this._adapter.serverName,documentKind:this._adapter.documentKind,getDocument:t=>this._manager?this._adapter.getDocument(this._manager,t):void 0,setDocument:(t,r)=>this._manager?this._adapter.setDocument(this._manager,t,r):this._adapter.managerUnavailableMessage??"Document manager is not available"},this._options)),this._sessionServer}}const Mt={SceneReadyEvent:{className:"FlowGraphSceneReadyEventBlock",category:"Event",description:"Triggers when the scene is ready (all assets loaded). This is the most common entry point for a flow graph.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (use for initialization logic)"},{name:"done",description:"Fires when the event actually triggers (scene ready). USE THIS for event-driven logic."},{name:"error",description:"Fires on error"}],dataInputs:[],dataOutputs:[{name:"event",type:"string",description:"KHR_interactivity event reference for this lifecycle event (stable string ref usable with ref/extractProperty and event equality)"}]},SceneTickEvent:{className:"FlowGraphSceneTickEventBlock",category:"Event",description:"Triggers every frame (scene render loop). Provides elapsed time and delta time.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires every frame when the tick event occurs. USE THIS for per-frame logic."},{name:"error",description:"Fires on error"}],dataInputs:[],dataOutputs:[{name:"timeSinceStart",type:"number",description:"Total time since the scene started (seconds)"},{name:"deltaTime",type:"number",description:"Time since last frame (seconds)"},{name:"event",type:"string",description:"KHR_interactivity event reference for this lifecycle event (stable string ref usable with ref/extractProperty and event equality)"}]},MeshPickEvent:{className:"FlowGraphMeshPickEventBlock",category:"Event",description:"Triggers when a mesh is picked (clicked) by the user.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization). NOT on each pick."},{name:"done",description:"Fires each time the mesh is picked. USE THIS to react to clicks."},{name:"error"}],dataInputs:[{name:"asset",type:"any",description:"The target mesh to listen for picks on",isOptional:!0},{name:"pointerType",type:"any",description:"PointerEventTypes filter (default: POINTERPICK)",isOptional:!0}],dataOutputs:[{name:"pickedPoint",type:"Vector3",description:"World-space pick point"},{name:"pickOrigin",type:"Vector3",description:"Ray origin"},{name:"pointerId",type:"number",description:"Pointer identifier"},{name:"pickedMesh",type:"any",description:"The mesh that was picked"}],config:{stopPropagation:"boolean \u2014 whether to stop event propagation",targetMesh:"AbstractMesh reference \u2014 default target mesh"}},PointerOverEvent:{className:"FlowGraphPointerOverEventBlock",category:"Event",description:"Triggers when the pointer moves over a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer enters the mesh. USE THIS for hover logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"meshUnderPointer",type:"any",description:"The mesh under the pointer"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},PointerOutEvent:{className:"FlowGraphPointerOutEventBlock",category:"Event",description:"Triggers when the pointer moves off a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer leaves the mesh. USE THIS for hover-out logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"meshOutOfPointer",type:"any",description:"The mesh the pointer left"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},PointerDownEvent:{className:"FlowGraphPointerDownEventBlock",category:"Event",description:"Triggers when a pointer button is pressed down on a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer is pressed. USE THIS for press logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"pickedMesh",type:"any",description:"The mesh that was pressed"},{name:"pickedPoint",type:"any",description:"The 3D point where the press occurred"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},PointerUpEvent:{className:"FlowGraphPointerUpEventBlock",category:"Event",description:"Triggers when a pointer button is released on a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer is released. USE THIS for release logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"pickedMesh",type:"any",description:"The mesh that was released"},{name:"pickedPoint",type:"any",description:"The 3D point where the release occurred"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},PointerMoveEvent:{className:"FlowGraphPointerMoveEventBlock",category:"Event",description:"Triggers when the pointer moves over a mesh.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the pointer moves. USE THIS for move logic."},{name:"error"}],dataInputs:[{name:"targetMesh",type:"any",description:"The mesh to watch",isOptional:!0}],dataOutputs:[{name:"pointerId",type:"number"},{name:"meshUnderPointer",type:"any",description:"The mesh under the pointer"},{name:"pickedPoint",type:"any",description:"The 3D point under the pointer"}],config:{stopPropagation:"boolean",targetMesh:"AbstractMesh reference"}},KeyDownEvent:{className:"FlowGraphKeyDownEventBlock",category:"Event",description:"Triggers when a keyboard key is pressed down. Can optionally ignore auto-repeat events.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the matching key-down event occurs. USE THIS for keyboard logic."},{name:"error"}],dataInputs:[{name:"key",type:"string",description:"KeyboardEvent.code value to match, such as KeyA or Space. Leave empty for any key.",isOptional:!0}],dataOutputs:[{name:"keyCode",type:"string",description:"KeyboardEvent.code for the pressed key"},{name:"keyValue",type:"string",description:"KeyboardEvent.key for the pressed key"},{name:"shiftKey",type:"boolean",description:"Whether Shift was held"},{name:"ctrlKey",type:"boolean",description:"Whether Ctrl was held"},{name:"altKey",type:"boolean",description:"Whether Alt/Option was held"},{name:"metaKey",type:"boolean",description:"Whether Meta/Cmd/Windows key was held"},{name:"commandOrCtrl",type:"boolean",description:"Whether the platform command modifier was held"},{name:"isRepeat",type:"boolean",description:"True when this key-down event is an auto-repeat event"}],config:{stopPropagation:"boolean \u2014 whether to stop event propagation",ignoreRepeat:"boolean \u2014 when true, ignores auto-repeat key-down events"}},KeyUpEvent:{className:"FlowGraphKeyUpEventBlock",category:"Event",description:"Triggers when a keyboard key is released.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the matching key-up event occurs. USE THIS for keyboard logic."},{name:"error"}],dataInputs:[{name:"key",type:"string",description:"KeyboardEvent.code value to match, such as KeyA or Space. Leave empty for any key.",isOptional:!0}],dataOutputs:[{name:"keyCode",type:"string",description:"KeyboardEvent.code for the released key"},{name:"keyValue",type:"string",description:"KeyboardEvent.key for the released key"},{name:"shiftKey",type:"boolean",description:"Whether Shift was held"},{name:"ctrlKey",type:"boolean",description:"Whether Ctrl was held"},{name:"altKey",type:"boolean",description:"Whether Alt/Option was held"},{name:"metaKey",type:"boolean",description:"Whether Meta/Cmd/Windows key was held"},{name:"commandOrCtrl",type:"boolean",description:"Whether the platform command modifier was held"}],config:{stopPropagation:"boolean \u2014 whether to stop event propagation"}},PhysicsCollisionEvent:{className:"FlowGraphPhysicsCollisionEventBlock",category:"Event",description:"Triggers when a physics body collides with another body.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time a collision occurs. USE THIS for collision logic."},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody to watch for collisions"}],dataOutputs:[{name:"otherBody",type:"any",description:"The other body in the collision"},{name:"point",type:"Vector3",description:"Collision contact point"},{name:"normal",type:"Vector3",description:"Collision normal"},{name:"impulse",type:"number",description:"Collision impulse magnitude"},{name:"distance",type:"number",description:"Penetration distance"}]},AudioSoundEndedEvent:{className:"FlowGraphSoundEndedEventBlock",category:"Event",description:"Triggers when a sound finishes playing.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the sound ends. USE THIS for sound-ended logic."},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound to watch"}],dataOutputs:[]},SendCustomEvent:{className:"FlowGraphSendCustomEventBlock",category:"Event",description:"Sends a custom event that can be received by ReceiveCustomEvent blocks. Execution block with signal flow.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[],dataOutputs:[],config:{eventId:"string \u2014 the custom event identifier",eventData:"Record<string, { type: RichType }> \u2014 dynamic data inputs are created from this"}},ReceiveCustomEvent:{className:"FlowGraphReceiveCustomEventBlock",category:"Event",description:"Receives a custom event sent by SendCustomEvent blocks. Creates dynamic data outputs from eventData config.",signalInputs:[],signalOutputs:[{name:"out",description:"Fires once at graph startup (initialization)"},{name:"done",description:"Fires each time the custom event is received. USE THIS for event handling."},{name:"error"}],dataInputs:[],dataOutputs:[{name:"event",type:"string",description:"KHR_interactivity event reference for the received custom event (stable string ref usable with ref/extractProperty and event equality)"}],config:{eventId:"string \u2014 must match the sender's eventId",eventData:"Record<string, { type: RichType }> \u2014 dynamic data outputs are created from this"}},StopEventPropagation:{className:"FlowGraphStopEventPropagationBlock",category:"Event",description:"Stops propagation of an in-flight custom event (KHR_interactivity event/stopPropagation). Skips the remaining handler nodes of the currently-dispatching event referenced by the `event` input.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"event",type:"string",description:"Event reference (from an event block's `event` output) whose propagation should be stopped"},{name:"stopImmediate",type:"boolean",description:"Also stop remaining immediate handlers (default: false)",isOptional:!0}],dataOutputs:[]},ConsoleLog:{className:"FlowGraphConsoleLogBlock",category:"Execution",description:"Logs a message to the browser console. Supports template strings with {placeholder} syntax.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"message",type:"any",description:"The message to log"},{name:"logType",type:"any",description:'Log level: "log", "warn", or "error"',isOptional:!0}],dataOutputs:[],config:{messageTemplate:"string \u2014 template with {placeholder} names that become additional data inputs"}},SetProperty:{className:"FlowGraphSetPropertyBlock",category:"Execution",description:"Sets a property on a scene object (e.g. mesh.position, light.intensity). Generic and powerful.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"object",type:"any",description:"The target object (mesh, light, camera, etc.)"},{name:"value",type:"any",description:"The value to set"},{name:"propertyName",type:"any",description:"The property path (e.g. 'position', 'intensity')",isOptional:!0},{name:"customSetFunction",type:"any",description:"Custom setter function",isOptional:!0}],dataOutputs:[],config:{propertyName:"string \u2014 the property name to set",target:"any \u2014 default target object"}},SetVariable:{className:"FlowGraphSetVariableBlock",category:"Execution",description:"Sets a context variable that can be read by GetVariable blocks. Variables persist across executions.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"value",type:"any",description:"The value to store in the variable"}],dataOutputs:[],config:{variable:"string \u2014 the variable name to set (mutually exclusive with 'variables')",variables:"string[] \u2014 multiple variable names to set (creates one input per name)"}},Branch:{className:"FlowGraphBranchBlock",category:"ControlFlow",description:"If/else branching. Routes execution to onTrue or onFalse based on a boolean condition.",signalInputs:[{name:"in"}],signalOutputs:[{name:"onTrue",description:"Fires when condition is true"},{name:"onFalse",description:"Fires when condition is false"},{name:"error"}],dataInputs:[{name:"condition",type:"boolean",description:"The branching condition"}],dataOutputs:[]},ForLoop:{className:"FlowGraphForLoopBlock",category:"ControlFlow",description:"Executes a loop body for each index from startIndex to endIndex.",signalInputs:[{name:"in"}],signalOutputs:[{name:"executionFlow",description:"Fires for each iteration"},{name:"completed",description:"Fires when the loop finishes"},{name:"error"}],dataInputs:[{name:"startIndex",type:"any",description:"Loop start index (default 0)"},{name:"endIndex",type:"any",description:"Loop end index (exclusive)"},{name:"step",type:"number",description:"Step increment (default 1)",isOptional:!0}],dataOutputs:[{name:"index",type:"FlowGraphInteger",description:"Current loop index"}],config:{initialIndex:"number \u2014 initial index override",incrementIndexWhenLoopDone:"boolean \u2014 whether to increment the index when the loop is done"}},WhileLoop:{className:"FlowGraphWhileLoopBlock",category:"ControlFlow",description:"Executes the loop body while the condition is true.",signalInputs:[{name:"in"}],signalOutputs:[{name:"executionFlow",description:"Fires for each iteration"},{name:"completed",description:"Fires when the loop exits"},{name:"error"}],dataInputs:[{name:"condition",type:"boolean",description:"Loop condition \u2014 continues while true"}],dataOutputs:[],config:{doWhile:"boolean \u2014 if true, executes the body at least once before checking the condition"}},Sequence:{className:"FlowGraphSequenceBlock",category:"ControlFlow",description:"Executes multiple output signals in order (out_0, out_1, ...). Like a sequential pipeline.",signalInputs:[{name:"in"}],signalOutputs:[{name:"error"}],dataInputs:[],dataOutputs:[],config:{outputSignalCount:"number \u2014 how many sequential outputs to create (default 1). Creates out_0, out_1, ..."}},Switch:{className:"FlowGraphSwitchBlock",category:"ControlFlow",description:"Routes execution based on a case value. Like a switch/case statement with a default.",signalInputs:[{name:"in"}],signalOutputs:[{name:"default",description:"Fires when no case matches"},{name:"error"}],dataInputs:[{name:"case",type:"any",description:"The value to switch on"}],dataOutputs:[],config:{cases:"T[] \u2014 array of case values. Creates signal output 'out_{value}' for each case"}},MultiGate:{className:"FlowGraphMultiGateBlock",category:"ControlFlow",description:"Routes execution to one of N outputs each time it is triggered. Can be sequential, random, or looping.",signalInputs:[{name:"in"},{name:"reset",description:"Resets the gate index"}],signalOutputs:[{name:"error"}],dataInputs:[],dataOutputs:[{name:"lastIndex",type:"FlowGraphInteger",description:"Index of the last output fired"}],config:{outputSignalCount:"number \u2014 how many outputs to create (out_0, out_1, ...)",isRandom:"boolean \u2014 if true, picks outputs randomly",isLoop:"boolean \u2014 if true, loops back to the first output after the last"}},WaitAll:{className:"FlowGraphWaitAllBlock",category:"ControlFlow",description:"Waits for all N signal inputs to fire before triggering the output. Useful for synchronization.",signalInputs:[{name:"reset",description:"Resets all input states"}],signalOutputs:[{name:"out",description:"Fires when all inputs have triggered"},{name:"completed"},{name:"error"}],dataInputs:[],dataOutputs:[{name:"remainingInputs",type:"FlowGraphInteger",description:"How many inputs are still pending"}],config:{inputSignalCount:"number \u2014 how many signal inputs to create (in_0, in_1, ...)"}},SetDelay:{className:"FlowGraphSetDelayBlock",category:"ControlFlow",description:"Triggers the 'done' signal after a specified duration (in seconds). The 'out' signal fires immediately.",signalInputs:[{name:"in"},{name:"cancel",description:"Cancels the pending delay"}],signalOutputs:[{name:"out",description:"Fires immediately"},{name:"done",description:"Fires after the delay"},{name:"error"}],dataInputs:[{name:"duration",type:"number",description:"Delay duration in seconds"}],dataOutputs:[{name:"lastDelayIndex",type:"FlowGraphInteger",description:"Index of the last delay set"}]},CancelDelay:{className:"FlowGraphCancelDelayBlock",category:"ControlFlow",description:"Cancels a pending delay created by SetDelay.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"delayIndex",type:"FlowGraphInteger",description:"Index of the delay to cancel"}],dataOutputs:[]},CallCounter:{className:"FlowGraphCallCounterBlock",category:"ControlFlow",description:"Counts how many times it has been triggered. Can be reset.",signalInputs:[{name:"in"},{name:"reset",description:"Resets the counter to 0"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[],dataOutputs:[{name:"count",type:"number",description:"Current call count"}]},Debounce:{className:"FlowGraphDebounceBlock",category:"ControlFlow",description:"Only fires the output after the input has been triggered N times (debounce count). Then resets.",signalInputs:[{name:"in"},{name:"reset",description:"Resets the debounce counter"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"count",type:"number",description:"Number of triggers before firing"}],dataOutputs:[{name:"currentCount",type:"number",description:"Current trigger count"}]},Throttle:{className:"FlowGraphThrottleBlock",category:"ControlFlow",description:"Limits execution to at most once per duration period (in seconds).",signalInputs:[{name:"in"},{name:"reset",description:"Resets the throttle timer"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"duration",type:"number",description:"Minimum time between executions (seconds)"}],dataOutputs:[{name:"lastRemainingTime",type:"number",description:"Time remaining until next allowed execution"}]},DoN:{className:"FlowGraphDoNBlock",category:"ControlFlow",description:"Fires the output only the first N times it is triggered, then stops. Can be reset.",signalInputs:[{name:"in"},{name:"reset",description:"Resets the execution counter"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"maxExecutions",type:"FlowGraphInteger",description:"Maximum number of times to fire"}],dataOutputs:[{name:"executionCount",type:"FlowGraphInteger",description:"How many times it has fired"}],config:{startIndex:"FlowGraphInteger \u2014 initial count value"}},FlipFlop:{className:"FlowGraphFlipFlopBlock",category:"ControlFlow",description:"Alternates between onOn and onOff signals each time it is triggered. Like a toggle switch.",signalInputs:[{name:"in"}],signalOutputs:[{name:"onOn",description:"Fires on odd triggers"},{name:"onOff",description:"Fires on even triggers"},{name:"error"}],dataInputs:[],dataOutputs:[{name:"value",type:"boolean",description:"Current toggle state"}],config:{startValue:"boolean \u2014 initial toggle state (default false)"}},PlayAnimation:{className:"FlowGraphPlayAnimationBlock",category:"Animation",description:"Plays an animation or animation group. Provides current frame and event outputs.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out",description:"Fires immediately when play starts"},{name:"done",description:"Fires when the animation finishes"},{name:"error"},{name:"animationLoopEvent",description:"Fires each time the animation loops"},{name:"animationEndEvent",description:"Fires when the animation ends"},{name:"animationGroupLoopEvent",description:"Fires when an animation group loops"}],dataInputs:[{name:"speed",type:"number",description:"Playback speed (default 0)"},{name:"loop",type:"boolean",description:"Whether to loop (default false)"},{name:"from",type:"number",description:"Start frame (default 0)"},{name:"to",type:"number",description:"End frame (default 0 = full range)"},{name:"animationGroup",type:"any",description:"AnimationGroup to play"},{name:"animation",type:"any",description:"Animation or Animation[] to play",isOptional:!0},{name:"object",type:"any",description:"Target object for the animation",isOptional:!0}],dataOutputs:[{name:"currentFrame",type:"number",description:"Current animation frame"},{name:"currentTime",type:"number",description:"Current animation time"},{name:"currentAnimationGroup",type:"any",description:"The active animation group"}],config:{animationGroup:"AnimationGroup \u2014 default animation group"}},StopAnimation:{className:"FlowGraphStopAnimationBlock",category:"Animation",description:"Stops a playing animation group.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"done"},{name:"error"}],dataInputs:[{name:"animationGroup",type:"any",description:"The animation group to stop"},{name:"stopAtFrame",type:"number",description:"Frame to stop at (-1 = current)",isOptional:!0}],dataOutputs:[]},PauseAnimation:{className:"FlowGraphPauseAnimationBlock",category:"Animation",description:"Pauses a playing animation group.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"animationToPause",type:"any",description:"The animation group to pause"}],dataOutputs:[]},ValueInterpolation:{className:"FlowGraphInterpolationBlock",category:"Animation",description:"Creates an Animation object from keyframe values. Use with PlayAnimation to animate properties. Takes duration/value pairs for each keyframe.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"easingFunction",type:"any",description:"Optional easing function from Easing block",isOptional:!0},{name:"propertyName",type:"any",description:"Property name(s) to animate",isOptional:!0},{name:"customBuildAnimation",type:"any",description:"Custom animation builder function",isOptional:!0}],dataOutputs:[{name:"animation",type:"any",description:"The generated Animation object"}],config:{keyFramesCount:"number \u2014 number of keyframes (creates duration_N and value_N inputs for each)",duration:"number \u2014 default duration per keyframe",propertyName:"string|string[] \u2014 property path(s) to animate",animationType:"number|FlowGraphTypes \u2014 type of animated value (e.g. BABYLON.Animation.ANIMATIONTYPE_VECTOR3)"}},Easing:{className:"FlowGraphEasingBlock",category:"Animation",description:"Creates an easing function for use with ValueInterpolation. Supports all Babylon.js easing types.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"type",type:"any",description:"EasingFunctionType enum value (default 11 = BezierCurve)"},{name:"mode",type:"number",description:"Easing mode: 0=EaseIn, 1=EaseOut, 2=EaseInOut"},{name:"parameters",type:"any",description:"Easing parameters as number array (default [1,0,0,1])",isOptional:!0}],dataOutputs:[{name:"easingFunction",type:"any",description:"The easing function object"}]},BezierCurveEasing:{className:"FlowGraphBezierCurveEasing",category:"Animation",description:"Creates a bezier curve easing function with two control points.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"mode",type:"number",description:"Easing mode: 0=EaseIn, 1=EaseOut, 2=EaseInOut"},{name:"controlPoint1",type:"Vector2",description:"First control point"},{name:"controlPoint2",type:"Vector2",description:"Second control point"}],dataOutputs:[{name:"easingFunction",type:"any",description:"The bezier easing function object"}]},Constant:{className:"FlowGraphConstantBlock",category:"Data",description:"Outputs a constant value. The type is deduced from the config value. Supports numbers, strings, booleans, vectors, colors, etc.",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"output",type:"any",description:"The constant value"}],config:{value:"any \u2014 the constant value (e.g. 42, 'hello', { value: [1,2,3], className: 'Vector3' })"}},GetVariable:{className:"FlowGraphGetVariableBlock",category:"Data",description:"Reads a context variable set by SetVariable. Variables persist across executions of the graph.",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"any",description:"The variable's current value"}],config:{variable:"string \u2014 the variable name to read",initialValue:"any \u2014 default value if the variable hasn't been set"}},GetProperty:{className:"FlowGraphGetPropertyBlock",category:"Data",description:"Reads a property from a scene object (e.g. mesh.position, light.intensity).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"object",type:"any",description:"The target object"},{name:"propertyName",type:"any",description:"The property name to read",isOptional:!0},{name:"customGetFunction",type:"any",description:"Custom getter function",isOptional:!0}],dataOutputs:[{name:"value",type:"any",description:"The property value"},{name:"isValid",type:"boolean",description:"Whether the property was found"}],config:{propertyName:"string \u2014 property path to read",object:"any \u2014 default target object",resetToDefaultWhenUndefined:"boolean \u2014 reset to default when undefined"}},GetAsset:{className:"FlowGraphGetAssetBlock",category:"Data",description:"Retrieves an asset (mesh, material, texture, etc.) from the scene's asset context by type and index.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"type",type:"any",description:"FlowGraphAssetType \u2014 the kind of asset to retrieve"},{name:"index",type:"any",description:"Index of the asset in the collection",isOptional:!0}],dataOutputs:[{name:"value",type:"any",description:"The retrieved asset"}],config:{type:"FlowGraphAssetType \u2014 asset type enum",index:"number \u2014 asset index in the collection",useIndexAsUniqueId:"boolean \u2014 whether to use index as uniqueId lookup"}},Conditional:{className:"FlowGraphConditionalBlock",category:"Data",description:"Ternary operator \u2014 returns onTrue if condition is true, onFalse otherwise. Pure data block (no signals).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"condition",type:"boolean",description:"The condition to evaluate"},{name:"onTrue",type:"any",description:"Value returned when condition is true"},{name:"onFalse",type:"any",description:"Value returned when condition is false"}],dataOutputs:[{name:"output",type:"any",description:"The selected value"}]},TransformCoordinatesSystem:{className:"FlowGraphTransformCoordinatesSystemBlock",category:"Data",description:"Transforms coordinates from one coordinate system to another using two TransformNodes.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"sourceSystem",type:"any",description:"Source TransformNode"},{name:"destinationSystem",type:"any",description:"Destination TransformNode"},{name:"inputCoordinates",type:"Vector3",description:"Coordinates to transform"}],dataOutputs:[{name:"outputCoordinates",type:"Vector3",description:"Transformed coordinates"}]},JsonPointerParser:{className:"FlowGraphJsonPointerParserBlock",category:"Data",description:"Resolves a JSON pointer path to an object and property. Used internally for glTF interop.",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"},{name:"object",type:"any"},{name:"propertyName",type:"any"},{name:"setFunction",type:"any",description:"Setter function for the resolved property (used internally by interpolation/animation)"},{name:"getFunction",type:"any",description:"Getter function for the resolved property"},{name:"generateAnimationsFunction",type:"any",description:"Builds animation property info for the resolved property"}],config:{jsonPointer:"string \u2014 the JSON pointer path"}},DataSwitch:{className:"FlowGraphDataSwitchBlock",category:"Data",description:"Selects a data value based on a case. Like a data-only switch/case.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"case",type:"any",description:"The case value to match"},{name:"default",type:"any",description:"Default value if no case matches"}],dataOutputs:[{name:"value",type:"any",description:"The selected value"}],config:{cases:"number[] \u2014 case values. Creates data input 'in_{value}' for each case",treatCasesAsIntegers:"boolean \u2014 whether to treat case values as integers"}},Context:{className:"FlowGraphContextBlock",category:"Utility",description:"Provides access to the flow graph execution context (user variables, execution ID).",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"userVariables",type:"any",description:"All user variables as a dictionary"},{name:"executionId",type:"number",description:"Current execution ID"}]},IsKeyPressed:{className:"FlowGraphIsKeyPressedBlock",category:"Utility",description:"Outputs whether a keyboard key is currently held down, optionally requiring modifier keys.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"key",type:"string",description:"KeyboardEvent.code value to check, such as KeyA, Space, ShiftLeft, or ControlLeft"},{name:"withShift",type:"boolean",description:"Require Shift to also be held",isOptional:!0},{name:"withCtrl",type:"boolean",description:"Require Ctrl to also be held",isOptional:!0},{name:"withAlt",type:"boolean",description:"Require Alt/Option to also be held",isOptional:!0},{name:"withMeta",type:"boolean",description:"Require Meta/Cmd/Windows key to also be held",isOptional:!0},{name:"withCommandOrCtrl",type:"boolean",description:"Require Cmd on macOS or Ctrl on Windows/Linux",isOptional:!0}],dataOutputs:[{name:"isPressed",type:"boolean",description:"True when the requested key and modifiers are currently held"}]},ArrayIndex:{className:"FlowGraphArrayIndexBlock",category:"Utility",description:"Retrieves an element from an array by index.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"array",type:"any",description:"The source array"},{name:"index",type:"any",description:"The index to retrieve"}],dataOutputs:[{name:"value",type:"any",description:"The element at the specified index"}]},IndexOf:{className:"FlowGraphIndexOfBlock",category:"Utility",description:"Finds the index of an element in an array.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"object",type:"any",description:"The element to search for"},{name:"array",type:"any",description:"The array to search in"}],dataOutputs:[{name:"index",type:"FlowGraphInteger",description:"The index of the element (-1 if not found)"}]},CodeExecution:{className:"FlowGraphCodeExecutionBlock",category:"Utility",description:"Executes an arbitrary JavaScript function inside the flow graph \u2014 the 'escape hatch' for any logic not covered by dedicated blocks. This is a DATA block (no signal inputs/outputs); it evaluates lazily when its 'result' output is read by a downstream block. The function signature is: (value: any, context: FlowGraphContext) => any. The 'value' input can carry any data (a mesh, a number, an object with multiple fields, etc.), and 'context' is the FlowGraphContext giving access to the scene via context.assetsContext. Use the FunctionReference block to create the function from an object + method name, or provide the function via the scene's glue code / code generator. Common use cases: physics (applyImpulse, setLinearVelocity), mesh cloning (mesh.clone), reading/writing complex properties, invoking any Babylon.js API not exposed as a dedicated block.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"function",type:"any",description:"A CodeExecutionFunction: (value, context) => result. Can come from a FunctionReference block or be set in glue code. For physics impulse example: (v, ctx) => { v.mesh.physicsBody.applyImpulse(v.impulse, v.point); return true; }"},{name:"value",type:"any",description:"The input value passed as the first argument to the function. Can be any type \u2014 a mesh, a Vector3, or a composite object with multiple fields."}],dataOutputs:[{name:"result",type:"any",description:"The return value of the function"}]},FunctionReference:{className:"FlowGraphFunctionReference",category:"Utility",description:`Creates a callable function reference. Two modes of use:
93
93
  MODE A \u2014 Object method lookup: connect 'functionName' and 'object' data inputs. The block does object[functionName].bind(context) and outputs the bound function.
94
94
  MODE B \u2014 Inline code (config.code): put arbitrary JavaScript in config.code. The code generator will compile it into a real function and inject it at runtime. Leave 'functionName' and 'object' data inputs UNCONNECTED when using Mode B. The code has access to 'scene' (the Babylon.js scene) and 'BABYLON' (the namespace). The function signature is (value, fgContext) => result. Return a value if needed.
95
- Connect the 'output' to a CodeExecution block's 'function' input. This is a DATA block \u2014 it evaluates lazily when its output is read.`,signalInputs:[],signalOutputs:[],config:{code:"string \u2014 Optional. Arbitrary JavaScript code compiled into a function by the code generator. Has access to 'scene' (via closure) and any BABYLON API. Example: const ball = scene.getMeshByName('ball'); ball.physicsBody.applyImpulse(...); return 1;"},dataInputs:[{name:"functionName",type:"string",description:"Dot-separated path to the method on the object (e.g. 'physicsBody.applyImpulse', 'clone'). Leave unconnected when using config.code."},{name:"object",type:"any",description:"The object containing the function (e.g. a mesh from GetAsset). Leave unconnected when using config.code."},{name:"context",type:"any",description:"Optional 'this' context for the function call",isOptional:!0}],dataOutputs:[{name:"output",type:"any",description:"The bound function reference, ready to be called or connected to CodeExecution"}]},E:{className:"FlowGraphEBlock",category:"Math",description:"Outputs the mathematical constant e (\u2248 2.718).",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},PI:{className:"FlowGraphPIBlock",category:"Math",description:"Outputs the mathematical constant \u03C0 (\u2248 3.14159).",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},Inf:{className:"FlowGraphInfBlock",category:"Math",description:"Outputs positive infinity.",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},NaN:{className:"FlowGraphNaNBlock",category:"Math",description:"Outputs NaN (Not a Number).",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},Random:{className:"FlowGraphRandomBlock",category:"Math",description:"Outputs a random number between min and max.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"min",type:"number",description:"Minimum value (default 0)",isOptional:!0},{name:"max",type:"number",description:"Maximum value (default 1)",isOptional:!0}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}],config:{min:"number",max:"number",seed:"number \u2014 random seed for deterministic results"}},...ae("Abs","FlowGraphAbsBlock","Absolute value of the input."),...ae("Sign","FlowGraphSignBlock","Returns -1, 0, or 1 based on the sign of the input."),...ae("Trunc","FlowGraphTruncBlock","Truncates the input to an integer (removes decimal part)."),...ae("Floor","FlowGraphFloorBlock","Rounds the input down to the nearest integer."),...ae("Ceil","FlowGraphCeilBlock","Rounds the input up to the nearest integer."),...ae("Round","FlowGraphRoundBlock","Rounds the input to the nearest integer."),...ae("Fraction","FlowGraphFractBlock","Returns the fractional part of the input."),...ae("Negation","FlowGraphNegationBlock","Negates the input value."),...ae("Saturate","FlowGraphSaturateBlock","Clamps the input to the range [0, 1]."),...ae("IsNaN","FlowGraphIsNaNBlock","Returns true if the input is NaN.","boolean"),...ae("IsInfinity","FlowGraphIsInfBlock","Returns true if the input is infinite.","boolean"),...ae("DegToRad","FlowGraphDegToRadBlock","Converts degrees to radians."),...ae("RadToDeg","FlowGraphRadToDegBlock","Converts radians to degrees."),...ae("Sin","FlowGraphSinBlock","Sine of the input (in radians)."),...ae("Cos","FlowGraphCosBlock","Cosine of the input (in radians)."),...ae("Tan","FlowGraphTanBlock","Tangent of the input (in radians)."),...ae("Asin","FlowGraphASinBlock","Arcsine (inverse sine) of the input."),...ae("Acos","FlowGraphACosBlock","Arccosine (inverse cosine) of the input."),...ae("Atan","FlowGraphATanBlock","Arctangent (inverse tangent) of the input."),...ae("Sinh","FlowGraphSinhBlock","Hyperbolic sine."),...ae("Cosh","FlowGraphCoshBlock","Hyperbolic cosine."),...ae("Tanh","FlowGraphTanhBlock","Hyperbolic tangent."),...ae("Asinh","FlowGraphASinhBlock","Inverse hyperbolic sine."),...ae("Acosh","FlowGraphACoshBlock","Inverse hyperbolic cosine."),...ae("Atanh","FlowGraphATanhBlock","Inverse hyperbolic tangent."),...ae("Exponential","FlowGraphExponentialBlock","e raised to the power of the input (e^x)."),...ae("Log","FlowGraphLogBlock","Natural logarithm (base e)."),...ae("Log2","FlowGraphLog2Block","Base-2 logarithm."),...ae("Log10","FlowGraphLog10Block","Base-10 logarithm."),...ae("SquareRoot","FlowGraphSquareRootBlock","Square root of the input."),...ae("CubeRoot","FlowGraphCubeRootBlock","Cube root of the input."),...ae("BitwiseNot","FlowGraphBitwiseNotBlock","Bitwise NOT of the input.","FlowGraphInteger","FlowGraphInteger"),...ae("LeadingZeros","FlowGraphLeadingZerosBlock","Count of leading zero bits.","FlowGraphInteger","FlowGraphInteger"),...ae("TrailingZeros","FlowGraphTrailingZerosBlock","Count of trailing zero bits.","FlowGraphInteger","FlowGraphInteger"),...ae("OneBitsCounter","FlowGraphOneBitsCounterBlock","Count of set (1) bits.","FlowGraphInteger","FlowGraphInteger"),...Ce("Add","FlowGraphAddBlock","Adds two values (a + b). Works with numbers, vectors, and matrices."),...Ce("Subtract","FlowGraphSubtractBlock","Subtracts b from a (a - b)."),...Ce("Multiply","FlowGraphMultiplyBlock","Multiplies two values (a * b)."),...Ce("Divide","FlowGraphDivideBlock","Divides a by b (a / b)."),...Ce("Modulo","FlowGraphModuloBlock","Remainder of a / b."),...Ce("Min","FlowGraphMinBlock","Returns the smaller of a and b."),...Ce("Max","FlowGraphMaxBlock","Returns the larger of a and b."),...Ce("Power","FlowGraphPowerBlock","Raises a to the power of b (a^b)."),...Ce("Atan2","FlowGraphATan2Block","Two-argument arctangent atan2(a, b)."),...Ce("Equality","FlowGraphEqualityBlock","Returns true if a equals b.","boolean"),...Ce("LessThan","FlowGraphLessThanBlock","Returns true if a < b.","boolean"),...Ce("LessThanOrEqual","FlowGraphLessThanOrEqualBlock","Returns true if a <= b.","boolean"),...Ce("GreaterThan","FlowGraphGreaterThanBlock","Returns true if a > b.","boolean"),...Ce("GreaterThanOrEqual","FlowGraphGreaterThanOrEqualBlock","Returns true if a >= b.","boolean"),...Ce("BitwiseAnd","FlowGraphBitwiseAndBlock","Bitwise AND.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),...Ce("BitwiseOr","FlowGraphBitwiseOrBlock","Bitwise OR.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),...Ce("BitwiseXor","FlowGraphBitwiseXorBlock","Bitwise XOR.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),...Ce("BitwiseLeftShift","FlowGraphBitwiseLeftShiftBlock","Left bit shift.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),...Ce("BitwiseRightShift","FlowGraphBitwiseRightShiftBlock","Right bit shift.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),Clamp:{className:"FlowGraphClampBlock",category:"Math",description:"Clamps value a between b (min) and c (max).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"Value to clamp"},{name:"b",type:"any",description:"Minimum"},{name:"c",type:"any",description:"Maximum"}],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"}]},MathInterpolation:{className:"FlowGraphMathInterpolationBlock",category:"Math",description:"Linear interpolation: lerp(a, b, c) \u2014 returns a + (b - a) * c.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"Start value"},{name:"b",type:"any",description:"End value"},{name:"c",type:"any",description:"Interpolation factor (0-1)"}],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"}]},...ae("Length","FlowGraphLengthBlock","Returns the length (magnitude) of a vector.","number"),...ae("Normalize","FlowGraphNormalizeBlock","Returns a normalized (unit-length) version of the vector."),...ae("Conjugate","FlowGraphConjugateBlock","Returns the conjugate of a quaternion.","Quaternion","Quaternion"),Dot:{className:"FlowGraphDotBlock",category:"Vector",description:"Computes the dot product of two vectors.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"First vector"},{name:"b",type:"any",description:"Second vector"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},Cross:{className:"FlowGraphCrossBlock",category:"Vector",description:"Computes the cross product of two Vector3 values.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3"},{name:"b",type:"Vector3"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},Rotate2D:{className:"FlowGraphRotate2DBlock",category:"Vector",description:"Rotates a 2D vector by an angle (in radians).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector2",description:"The vector to rotate"},{name:"b",type:"number",description:"Angle in radians"}],dataOutputs:[{name:"value",type:"Vector2"},{name:"isValid",type:"boolean"}]},Rotate3D:{className:"FlowGraphRotate3DBlock",category:"Vector",description:"Rotates a 3D vector by a quaternion rotation.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3",description:"The vector to rotate"},{name:"b",type:"Quaternion",description:"The rotation quaternion"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},TransformVector:{className:"FlowGraphTransformVectorBlock",category:"Vector",description:"Transforms a vector by a matrix.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"The vector to transform"},{name:"b",type:"any",description:"The transformation matrix"}],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"}]},TransformCoordinates:{className:"FlowGraphTransformCoordinatesBlock",category:"Vector",description:"Transforms a Vector3 position by a Matrix (like Vector3.TransformCoordinates).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3",description:"The position to transform"},{name:"b",type:"Matrix",description:"The transformation matrix"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},AngleBetween:{className:"FlowGraphAngleBetweenBlock",category:"Vector",description:"Computes the angle between two quaternions.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Quaternion"},{name:"b",type:"Quaternion"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},QuaternionFromAxisAngle:{className:"FlowGraphQuaternionFromAxisAngleBlock",category:"Vector",description:"Creates a quaternion from an axis and angle.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3",description:"Rotation axis"},{name:"b",type:"number",description:"Rotation angle in radians"}],dataOutputs:[{name:"value",type:"Quaternion"},{name:"isValid",type:"boolean"}]},AxisAngleFromQuaternion:{className:"FlowGraphAxisAngleFromQuaternionBlock",category:"Vector",description:"Decomposes a quaternion into an axis and angle.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Quaternion"}],dataOutputs:[{name:"axis",type:"Vector3"},{name:"angle",type:"number"},{name:"isValid",type:"boolean"}]},QuaternionFromDirections:{className:"FlowGraphQuaternionFromDirectionsBlock",category:"Vector",description:"Creates a quaternion that rotates one direction to another.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3",description:"From direction"},{name:"b",type:"Vector3",description:"To direction"}],dataOutputs:[{name:"value",type:"Quaternion"},{name:"isValid",type:"boolean"}]},...ae("Transpose","FlowGraphTransposeBlock","Transposes a matrix.","Matrix","Matrix"),...ae("Determinant","FlowGraphDeterminantBlock","Computes the determinant of a matrix.","number","Matrix"),...ae("InvertMatrix","FlowGraphInvertMatrixBlock","Inverts a matrix.","Matrix","Matrix"),MatrixMultiplication:{className:"FlowGraphMatrixMultiplicationBlock",category:"Matrix",description:"Multiplies two matrices together.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Matrix"},{name:"b",type:"Matrix"}],dataOutputs:[{name:"value",type:"Matrix"},{name:"isValid",type:"boolean"}]},MatrixDecompose:{className:"FlowGraphMatrixDecompose",category:"Matrix",description:"Decomposes a matrix into position, rotation (quaternion), and scale.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Matrix"}],dataOutputs:[{name:"position",type:"Vector3"},{name:"rotationQuaternion",type:"Quaternion"},{name:"scaling",type:"Vector3"},{name:"isValid",type:"boolean"}]},MatrixCompose:{className:"FlowGraphMatrixCompose",category:"Matrix",description:"Composes a matrix from position, rotation (quaternion), and scale.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"position",type:"Vector3"},{name:"rotationQuaternion",type:"Quaternion"},{name:"scaling",type:"Vector3"}],dataOutputs:[{name:"value",type:"Matrix"}]},CombineVector2:{className:"FlowGraphCombineVector2Block",category:"Combine",description:"Combines two numbers into a Vector2.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input_0",type:"number",description:"X component"},{name:"input_1",type:"number",description:"Y component"}],dataOutputs:[{name:"value",type:"Vector2"},{name:"isValid",type:"boolean"}]},CombineVector3:{className:"FlowGraphCombineVector3Block",category:"Combine",description:"Combines three numbers into a Vector3.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input_0",type:"number",description:"X component"},{name:"input_1",type:"number",description:"Y component"},{name:"input_2",type:"number",description:"Z component"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},CombineVector4:{className:"FlowGraphCombineVector4Block",category:"Combine",description:"Combines four numbers into a Vector4.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input_0",type:"number",description:"X component"},{name:"input_1",type:"number",description:"Y component"},{name:"input_2",type:"number",description:"Z component"},{name:"input_3",type:"number",description:"W component"}],dataOutputs:[{name:"value",type:"Vector4"},{name:"isValid",type:"boolean"}]},CombineMatrix:{className:"FlowGraphCombineMatrixBlock",category:"Combine",description:"Combines 16 numbers into a 4x4 Matrix.",signalInputs:[],signalOutputs:[],dataInputs:Array.from({length:16},(e,t)=>({name:`input_${t}`,type:"number",description:`Matrix element [${Math.floor(t/4)}][${t%4}]`})),dataOutputs:[{name:"value",type:"Matrix"},{name:"isValid",type:"boolean"}],config:{inputIsColumnMajor:"boolean \u2014 whether inputs are in column-major order"}},CombineMatrix2D:{className:"FlowGraphCombineMatrix2DBlock",category:"Combine",description:"Combines 4 float values into a 2x2 Matrix2D.",signalInputs:[],signalOutputs:[],dataInputs:Array.from({length:4},(e,t)=>({name:`input_${t}`,type:"number",description:`Matrix element ${t}`})),dataOutputs:[{name:"value",type:"Matrix2D"},{name:"isValid",type:"boolean"}],config:{inputIsColumnMajor:"boolean \u2014 whether inputs are in column-major order"}},CombineMatrix3D:{className:"FlowGraphCombineMatrix3DBlock",category:"Combine",description:"Combines 9 float values into a 3x3 Matrix3D.",signalInputs:[],signalOutputs:[],dataInputs:Array.from({length:9},(e,t)=>({name:`input_${t}`,type:"number",description:`Matrix element [${Math.floor(t/3)}][${t%3}]`})),dataOutputs:[{name:"value",type:"Matrix3D"},{name:"isValid",type:"boolean"}],config:{inputIsColumnMajor:"boolean \u2014 whether inputs are in column-major order"}},ExtractVector2:{className:"FlowGraphExtractVector2Block",category:"Extract",description:"Extracts the X and Y components from a Vector2.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Vector2"}],dataOutputs:[{name:"output_0",type:"number",description:"X"},{name:"output_1",type:"number",description:"Y"}]},ExtractVector3:{className:"FlowGraphExtractVector3Block",category:"Extract",description:"Extracts the X, Y, and Z components from a Vector3.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Vector3"}],dataOutputs:[{name:"output_0",type:"number",description:"X"},{name:"output_1",type:"number",description:"Y"},{name:"output_2",type:"number",description:"Z"}]},ExtractVector4:{className:"FlowGraphExtractVector4Block",category:"Extract",description:"Extracts the X, Y, Z, and W components from a Vector4.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Vector4"}],dataOutputs:[{name:"output_0",type:"number",description:"X"},{name:"output_1",type:"number",description:"Y"},{name:"output_2",type:"number",description:"Z"},{name:"output_3",type:"number",description:"W"}]},ExtractMatrix:{className:"FlowGraphExtractMatrixBlock",category:"Extract",description:"Extracts all 16 elements from a 4x4 Matrix.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Matrix"}],dataOutputs:Array.from({length:16},(e,t)=>({name:`output_${t}`,type:"number",description:`Matrix element [${Math.floor(t/4)}][${t%4}]`}))},ExtractMatrix2D:{className:"FlowGraphExtractMatrix2DBlock",category:"Extract",description:"Extracts all 4 elements from a 2x2 Matrix2D.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Matrix2D"}],dataOutputs:Array.from({length:4},(e,t)=>({name:`output_${t}`,type:"number",description:`Matrix element ${t}`}))},ExtractMatrix3D:{className:"FlowGraphExtractMatrix3DBlock",category:"Extract",description:"Extracts all 9 elements from a 3x3 Matrix3D.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Matrix3D"}],dataOutputs:Array.from({length:9},(e,t)=>({name:`output_${t}`,type:"number",description:`Matrix element [${Math.floor(t/3)}][${t%3}]`}))},BooleanToFloat:{className:"FlowGraphBooleanToFloat",category:"Conversion",description:"Converts a boolean to a float (true \u2192 1.0, false \u2192 0.0).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"boolean"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},BooleanToInt:{className:"FlowGraphBooleanToInt",category:"Conversion",description:"Converts a boolean to an integer (true \u2192 1, false \u2192 0).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"boolean"}],dataOutputs:[{name:"value",type:"FlowGraphInteger"},{name:"isValid",type:"boolean"}]},FloatToBoolean:{className:"FlowGraphFloatToBoolean",category:"Conversion",description:"Converts a float to a boolean (0 \u2192 false, nonzero \u2192 true).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"number"}],dataOutputs:[{name:"value",type:"boolean"},{name:"isValid",type:"boolean"}]},IntToBoolean:{className:"FlowGraphIntToBoolean",category:"Conversion",description:"Converts an integer to a boolean (0 \u2192 false, nonzero \u2192 true).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"FlowGraphInteger"}],dataOutputs:[{name:"value",type:"boolean"},{name:"isValid",type:"boolean"}]},IntToFloat:{className:"FlowGraphIntToFloat",category:"Conversion",description:"Converts an integer to a float.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"FlowGraphInteger"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},FloatToInt:{className:"FlowGraphFloatToInt",category:"Conversion",description:"Converts a float to an integer.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"number"}],dataOutputs:[{name:"value",type:"FlowGraphInteger"},{name:"isValid",type:"boolean"}],config:{roundingMode:'"floor" | "ceil" | "round" \u2014 how to round the float value'}},PhysicsApplyForce:{className:"FlowGraphApplyForceBlock",category:"Execution",description:"Applies a force to a physics body at a given location.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody to apply force to"},{name:"force",type:"Vector3",description:"Force vector"},{name:"location",type:"Vector3",description:"World-space location to apply force at"}],dataOutputs:[]},PhysicsApplyImpulse:{className:"FlowGraphApplyImpulseBlock",category:"Execution",description:"Applies an impulse to a physics body at a given location.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody to apply impulse to"},{name:"impulse",type:"Vector3",description:"Impulse vector"},{name:"location",type:"Vector3",description:"World-space location to apply impulse at"}],dataOutputs:[]},PhysicsSetLinearVelocity:{className:"FlowGraphSetLinearVelocityBlock",category:"Execution",description:"Sets the linear velocity of a physics body.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"},{name:"velocity",type:"Vector3",description:"New linear velocity"}],dataOutputs:[]},PhysicsSetAngularVelocity:{className:"FlowGraphSetAngularVelocityBlock",category:"Execution",description:"Sets the angular velocity of a physics body.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"},{name:"velocity",type:"Vector3",description:"New angular velocity"}],dataOutputs:[]},PhysicsSetMotionType:{className:"FlowGraphSetPhysicsMotionTypeBlock",category:"Execution",description:"Sets the motion type of a physics body (Static=0, Animated=1, Dynamic=2).",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"},{name:"motionType",type:"number",description:"Motion type: Static (0), Animated (1), Dynamic (2)"}],dataOutputs:[]},PhysicsGetLinearVelocity:{className:"FlowGraphGetLinearVelocityBlock",category:"Data",description:"Gets the linear velocity of a physics body.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},PhysicsGetAngularVelocity:{className:"FlowGraphGetAngularVelocityBlock",category:"Data",description:"Gets the angular velocity of a physics body.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},PhysicsGetMassProperties:{className:"FlowGraphGetPhysicsMassPropertiesBlock",category:"Data",description:"Gets mass, center of mass, and inertia of a physics body.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"}],dataOutputs:[{name:"mass",type:"number"},{name:"centerOfMass",type:"Vector3"},{name:"inertia",type:"Vector3"}]},AudioPlaySound:{className:"FlowGraphPlaySoundBlock",category:"Execution",description:"Plays a sound with optional volume, offset, and loop control.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound to play"},{name:"volume",type:"number",description:"Playback volume (default: 1)"},{name:"startOffset",type:"number",description:"Start offset in seconds (default: 0)"},{name:"loop",type:"boolean",description:"Whether to loop (default: false)"}],dataOutputs:[]},AudioStopSound:{className:"FlowGraphStopSoundBlock",category:"Execution",description:"Stops a currently playing sound.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound to stop"}],dataOutputs:[]},AudioPauseSound:{className:"FlowGraphPauseSoundBlock",category:"Execution",description:"Pauses a currently playing sound.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound to pause"}],dataOutputs:[]},AudioSetVolume:{className:"FlowGraphSetSoundVolumeBlock",category:"Execution",description:"Sets the volume of a sound.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound"},{name:"volume",type:"number",description:"Volume level (default: 1)"}],dataOutputs:[]},AudioGetVolume:{className:"FlowGraphGetSoundVolumeBlock",category:"Data",description:"Gets the current volume of a sound.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"sound",type:"any",description:"The sound"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},AudioIsSoundPlaying:{className:"FlowGraphIsSoundPlayingBlock",category:"Data",description:"Returns whether a sound is currently playing.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"sound",type:"any",description:"The sound"}],dataOutputs:[{name:"value",type:"boolean"},{name:"isValid",type:"boolean"}]},DebugBlock:{className:"FlowGraphDebugBlock",category:"Utility",description:"Pass-through block that logs its input value for debugging. Output equals input.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"any"}],dataOutputs:[{name:"output",type:"any"}]}};function ae(e,t,r,i="any",n="any"){return{[e]:{className:t,category:"Math",description:r,signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:n,description:"Input value"}],dataOutputs:[{name:"value",type:i},{name:"isValid",type:"boolean"}]}}}function Ce(e,t,r,i="any",n="any",o="any"){return{[e]:{className:t,category:"Math",description:r,signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:n,description:"First operand"},{name:"b",type:o,description:"Second operand"}],dataOutputs:[{name:"value",type:i},{name:"isValid",type:"boolean"}]}}}function Sv(){const e=new Map;for(const[r,i]of Object.entries(Ft))e.has(i.category)||e.set(i.category,[]),e.get(i.category).push(` ${r} (${i.className}): ${i.description.split(".")[0]}`);const t=[];for(const[r,i]of e)t.push(`
95
+ Connect the 'output' to a CodeExecution block's 'function' input. This is a DATA block \u2014 it evaluates lazily when its output is read.`,signalInputs:[],signalOutputs:[],config:{code:"string \u2014 Optional. Arbitrary JavaScript code compiled into a function by the code generator. Has access to 'scene' (via closure) and any BABYLON API. Example: const ball = scene.getMeshByName('ball'); ball.physicsBody.applyImpulse(...); return 1;"},dataInputs:[{name:"functionName",type:"string",description:"Dot-separated path to the method on the object (e.g. 'physicsBody.applyImpulse', 'clone'). Leave unconnected when using config.code."},{name:"object",type:"any",description:"The object containing the function (e.g. a mesh from GetAsset). Leave unconnected when using config.code."},{name:"context",type:"any",description:"Optional 'this' context for the function call",isOptional:!0}],dataOutputs:[{name:"output",type:"any",description:"The bound function reference, ready to be called or connected to CodeExecution"}]},E:{className:"FlowGraphEBlock",category:"Math",description:"Outputs the mathematical constant e (\u2248 2.718).",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},PI:{className:"FlowGraphPIBlock",category:"Math",description:"Outputs the mathematical constant \u03C0 (\u2248 3.14159).",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},Inf:{className:"FlowGraphInfBlock",category:"Math",description:"Outputs positive infinity.",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},NaN:{className:"FlowGraphNaNBlock",category:"Math",description:"Outputs NaN (Not a Number).",signalInputs:[],signalOutputs:[],dataInputs:[],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},Random:{className:"FlowGraphRandomBlock",category:"Math",description:"Outputs a random number between min and max.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"min",type:"number",description:"Minimum value (default 0)",isOptional:!0},{name:"max",type:"number",description:"Maximum value (default 1)",isOptional:!0}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}],config:{min:"number",max:"number",seed:"number \u2014 random seed for deterministic results"}},...ae("Abs","FlowGraphAbsBlock","Absolute value of the input."),...ae("Sign","FlowGraphSignBlock","Returns -1, 0, or 1 based on the sign of the input."),...ae("Trunc","FlowGraphTruncBlock","Truncates the input to an integer (removes decimal part)."),...ae("Floor","FlowGraphFloorBlock","Rounds the input down to the nearest integer."),...ae("Ceil","FlowGraphCeilBlock","Rounds the input up to the nearest integer."),...ae("Round","FlowGraphRoundBlock","Rounds the input to the nearest integer."),...ae("Fraction","FlowGraphFractBlock","Returns the fractional part of the input."),...ae("Negation","FlowGraphNegationBlock","Negates the input value."),...ae("Saturate","FlowGraphSaturateBlock","Clamps the input to the range [0, 1]."),...ae("IsNaN","FlowGraphIsNaNBlock","Returns true if the input is NaN.","boolean"),...ae("IsInfinity","FlowGraphIsInfBlock","Returns true if the input is infinite.","boolean"),...ae("DegToRad","FlowGraphDegToRadBlock","Converts degrees to radians."),...ae("RadToDeg","FlowGraphRadToDegBlock","Converts radians to degrees."),...ae("Sin","FlowGraphSinBlock","Sine of the input (in radians)."),...ae("Cos","FlowGraphCosBlock","Cosine of the input (in radians)."),...ae("Tan","FlowGraphTanBlock","Tangent of the input (in radians)."),...ae("Asin","FlowGraphASinBlock","Arcsine (inverse sine) of the input."),...ae("Acos","FlowGraphACosBlock","Arccosine (inverse cosine) of the input."),...ae("Atan","FlowGraphATanBlock","Arctangent (inverse tangent) of the input."),...ae("Sinh","FlowGraphSinhBlock","Hyperbolic sine."),...ae("Cosh","FlowGraphCoshBlock","Hyperbolic cosine."),...ae("Tanh","FlowGraphTanhBlock","Hyperbolic tangent."),...ae("Asinh","FlowGraphASinhBlock","Inverse hyperbolic sine."),...ae("Acosh","FlowGraphACoshBlock","Inverse hyperbolic cosine."),...ae("Atanh","FlowGraphATanhBlock","Inverse hyperbolic tangent."),...ae("Exponential","FlowGraphExponentialBlock","e raised to the power of the input (e^x)."),...ae("Log","FlowGraphLogBlock","Natural logarithm (base e)."),...ae("Log2","FlowGraphLog2Block","Base-2 logarithm."),...ae("Log10","FlowGraphLog10Block","Base-10 logarithm."),...ae("SquareRoot","FlowGraphSquareRootBlock","Square root of the input."),...ae("CubeRoot","FlowGraphCubeRootBlock","Cube root of the input."),...ae("BitwiseNot","FlowGraphBitwiseNotBlock","Bitwise NOT of the input.","FlowGraphInteger","FlowGraphInteger"),...ae("LeadingZeros","FlowGraphLeadingZerosBlock","Count of leading zero bits.","FlowGraphInteger","FlowGraphInteger"),...ae("TrailingZeros","FlowGraphTrailingZerosBlock","Count of trailing zero bits.","FlowGraphInteger","FlowGraphInteger"),...ae("OneBitsCounter","FlowGraphOneBitsCounterBlock","Count of set (1) bits.","FlowGraphInteger","FlowGraphInteger"),...Ce("Add","FlowGraphAddBlock","Adds two values (a + b). Works with numbers, vectors, and matrices."),...Ce("Subtract","FlowGraphSubtractBlock","Subtracts b from a (a - b)."),...Ce("Multiply","FlowGraphMultiplyBlock","Multiplies two values (a * b)."),...Ce("Divide","FlowGraphDivideBlock","Divides a by b (a / b)."),...Ce("Modulo","FlowGraphModuloBlock","Remainder of a / b."),...Ce("Min","FlowGraphMinBlock","Returns the smaller of a and b."),...Ce("Max","FlowGraphMaxBlock","Returns the larger of a and b."),...Ce("Power","FlowGraphPowerBlock","Raises a to the power of b (a^b)."),...Ce("Atan2","FlowGraphATan2Block","Two-argument arctangent atan2(a, b)."),...Ce("Equality","FlowGraphEqualityBlock","Returns true if a equals b.","boolean"),...Ce("LessThan","FlowGraphLessThanBlock","Returns true if a < b.","boolean"),...Ce("LessThanOrEqual","FlowGraphLessThanOrEqualBlock","Returns true if a <= b.","boolean"),...Ce("GreaterThan","FlowGraphGreaterThanBlock","Returns true if a > b.","boolean"),...Ce("GreaterThanOrEqual","FlowGraphGreaterThanOrEqualBlock","Returns true if a >= b.","boolean"),...Ce("BitwiseAnd","FlowGraphBitwiseAndBlock","Bitwise AND.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),...Ce("BitwiseOr","FlowGraphBitwiseOrBlock","Bitwise OR.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),...Ce("BitwiseXor","FlowGraphBitwiseXorBlock","Bitwise XOR.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),...Ce("BitwiseLeftShift","FlowGraphBitwiseLeftShiftBlock","Left bit shift.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),...Ce("BitwiseRightShift","FlowGraphBitwiseRightShiftBlock","Right bit shift.","FlowGraphInteger","FlowGraphInteger","FlowGraphInteger"),Clamp:{className:"FlowGraphClampBlock",category:"Math",description:"Clamps value a between b (min) and c (max).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"Value to clamp"},{name:"b",type:"any",description:"Minimum"},{name:"c",type:"any",description:"Maximum"}],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"}]},MathInterpolation:{className:"FlowGraphMathInterpolationBlock",category:"Math",description:"Linear interpolation: lerp(a, b, c) \u2014 returns a + (b - a) * c.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"Start value"},{name:"b",type:"any",description:"End value"},{name:"c",type:"any",description:"Interpolation factor (0-1)"}],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"}]},SmoothStep:{className:"FlowGraphSmoothStepBlock",category:"Math",description:"Smooth Hermite interpolation coefficient: for edges a and b and value c, returns t*t*(3-2t) with t = saturate((c - min(a, b)) / |b - a|).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"Lower edge"},{name:"b",type:"any",description:"Upper edge"},{name:"c",type:"any",description:"Value to interpolate"}],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"}]},...ae("Length","FlowGraphLengthBlock","Returns the length (magnitude) of a vector.","number"),...ae("Normalize","FlowGraphNormalizeBlock","Returns a normalized (unit-length) version of the vector."),...ae("Conjugate","FlowGraphConjugateBlock","Returns the conjugate of a quaternion.","Quaternion","Quaternion"),Dot:{className:"FlowGraphDotBlock",category:"Vector",description:"Computes the dot product of two vectors.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"First vector"},{name:"b",type:"any",description:"Second vector"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},Cross:{className:"FlowGraphCrossBlock",category:"Vector",description:"Computes the cross product of two Vector3 values.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3"},{name:"b",type:"Vector3"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},Rotate2D:{className:"FlowGraphRotate2DBlock",category:"Vector",description:"Rotates a 2D vector by an angle (in radians).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector2",description:"The vector to rotate"},{name:"b",type:"number",description:"Angle in radians"}],dataOutputs:[{name:"value",type:"Vector2"},{name:"isValid",type:"boolean"}]},Rotate3D:{className:"FlowGraphRotate3DBlock",category:"Vector",description:"Rotates a 3D vector by a quaternion rotation.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3",description:"The vector to rotate"},{name:"b",type:"Quaternion",description:"The rotation quaternion"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},TransformVector:{className:"FlowGraphTransformVectorBlock",category:"Vector",description:"Transforms a vector by a matrix.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"The vector to transform"},{name:"b",type:"any",description:"The transformation matrix"}],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"}]},TransformCoordinates:{className:"FlowGraphTransformCoordinatesBlock",category:"Vector",description:"Transforms a Vector3 position by a Matrix (like Vector3.TransformCoordinates).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3",description:"The position to transform"},{name:"b",type:"Matrix",description:"The transformation matrix"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},AngleBetween:{className:"FlowGraphAngleBetweenBlock",category:"Vector",description:"Computes the angle between two quaternions.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Quaternion"},{name:"b",type:"Quaternion"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},QuaternionFromAxisAngle:{className:"FlowGraphQuaternionFromAxisAngleBlock",category:"Vector",description:"Creates a quaternion from an axis and angle.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3",description:"Rotation axis"},{name:"b",type:"number",description:"Rotation angle in radians"}],dataOutputs:[{name:"value",type:"Quaternion"},{name:"isValid",type:"boolean"}]},AxisAngleFromQuaternion:{className:"FlowGraphAxisAngleFromQuaternionBlock",category:"Vector",description:"Decomposes a quaternion into an axis and angle.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Quaternion"}],dataOutputs:[{name:"axis",type:"Vector3"},{name:"angle",type:"number"},{name:"isValid",type:"boolean"}]},QuaternionFromDirections:{className:"FlowGraphQuaternionFromDirectionsBlock",category:"Vector",description:"Creates a quaternion that rotates one direction to another.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3",description:"From direction"},{name:"b",type:"Vector3",description:"To direction"}],dataOutputs:[{name:"value",type:"Quaternion"},{name:"isValid",type:"boolean"}]},QuaternionFromUpForward:{className:"FlowGraphQuaternionFromUpForwardBlock",category:"Vector",description:"Creates a rotation quaternion from the specified up and forward directions.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Vector3",description:"Up direction"},{name:"b",type:"Vector3",description:"Forward direction"}],dataOutputs:[{name:"value",type:"Quaternion"},{name:"isValid",type:"boolean"}]},QuaternionFromAngles:{className:"FlowGraphQuaternionFromAnglesBlock",category:"Vector",description:"Creates a rotation quaternion from three Tait\u2013Bryan intrinsic Euler angles (a=x, b=y, c=z, in radians) applied in the configured order.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"number",description:"Rotation around X, in radians"},{name:"b",type:"number",description:"Rotation around Y, in radians"},{name:"c",type:"number",description:"Rotation around Z, in radians"}],dataOutputs:[{name:"value",type:"Quaternion"},{name:"isValid",type:"boolean"}],config:{order:"string \u2014 intrinsic rotation order, one of xyz/xzy/yxz/yzx/zxy/zyx (default yxz)"}},VectorSlerp:{className:"FlowGraphVectorSlerpBlock",category:"Vector",description:"Spherical linear interpolation between two vectors (float2/float3). c is the interpolation coefficient.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"any",description:"First vector"},{name:"b",type:"any",description:"Second vector"},{name:"c",type:"number",description:"Interpolation coefficient"}],dataOutputs:[{name:"value",type:"any"},{name:"isValid",type:"boolean"}]},MathSlerp:{className:"FlowGraphMathSlerpBlock",category:"Vector",description:"Spherical linear interpolation between two quaternions. c is the interpolation coefficient.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Quaternion",description:"First quaternion"},{name:"b",type:"Quaternion",description:"Second quaternion"},{name:"c",type:"number",description:"Interpolation coefficient"}],dataOutputs:[{name:"value",type:"Quaternion"},{name:"isValid",type:"boolean"}]},...ae("Transpose","FlowGraphTransposeBlock","Transposes a matrix.","Matrix","Matrix"),...ae("Determinant","FlowGraphDeterminantBlock","Computes the determinant of a matrix.","number","Matrix"),...ae("InvertMatrix","FlowGraphInvertMatrixBlock","Inverts a matrix.","Matrix","Matrix"),MatrixMultiplication:{className:"FlowGraphMatrixMultiplicationBlock",category:"Matrix",description:"Multiplies two matrices together.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"Matrix"},{name:"b",type:"Matrix"}],dataOutputs:[{name:"value",type:"Matrix"},{name:"isValid",type:"boolean"}]},MatrixDecompose:{className:"FlowGraphMatrixDecompose",category:"Matrix",description:"Decomposes a matrix into position, rotation (quaternion), and scale.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Matrix"}],dataOutputs:[{name:"position",type:"Vector3"},{name:"rotationQuaternion",type:"Quaternion"},{name:"scaling",type:"Vector3"},{name:"isValid",type:"boolean"}]},MatrixCompose:{className:"FlowGraphMatrixCompose",category:"Matrix",description:"Composes a matrix from position, rotation (quaternion), and scale.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"position",type:"Vector3"},{name:"rotationQuaternion",type:"Quaternion"},{name:"scaling",type:"Vector3"}],dataOutputs:[{name:"value",type:"Matrix"}]},CombineVector2:{className:"FlowGraphCombineVector2Block",category:"Combine",description:"Combines two numbers into a Vector2.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input_0",type:"number",description:"X component"},{name:"input_1",type:"number",description:"Y component"}],dataOutputs:[{name:"value",type:"Vector2"},{name:"isValid",type:"boolean"}]},CombineVector3:{className:"FlowGraphCombineVector3Block",category:"Combine",description:"Combines three numbers into a Vector3.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input_0",type:"number",description:"X component"},{name:"input_1",type:"number",description:"Y component"},{name:"input_2",type:"number",description:"Z component"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},CombineVector4:{className:"FlowGraphCombineVector4Block",category:"Combine",description:"Combines four numbers into a Vector4.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input_0",type:"number",description:"X component"},{name:"input_1",type:"number",description:"Y component"},{name:"input_2",type:"number",description:"Z component"},{name:"input_3",type:"number",description:"W component"}],dataOutputs:[{name:"value",type:"Vector4"},{name:"isValid",type:"boolean"}]},CombineMatrix:{className:"FlowGraphCombineMatrixBlock",category:"Combine",description:"Combines 16 numbers into a 4x4 Matrix.",signalInputs:[],signalOutputs:[],dataInputs:Array.from({length:16},(e,t)=>({name:`input_${t}`,type:"number",description:`Matrix element [${Math.floor(t/4)}][${t%4}]`})),dataOutputs:[{name:"value",type:"Matrix"},{name:"isValid",type:"boolean"}]},CombineMatrix2D:{className:"FlowGraphCombineMatrix2DBlock",category:"Combine",description:"Combines 4 float values into a 2x2 Matrix2D.",signalInputs:[],signalOutputs:[],dataInputs:Array.from({length:4},(e,t)=>({name:`input_${t}`,type:"number",description:`Matrix element ${t}`})),dataOutputs:[{name:"value",type:"Matrix2D"},{name:"isValid",type:"boolean"}]},CombineMatrix3D:{className:"FlowGraphCombineMatrix3DBlock",category:"Combine",description:"Combines 9 float values into a 3x3 Matrix3D.",signalInputs:[],signalOutputs:[],dataInputs:Array.from({length:9},(e,t)=>({name:`input_${t}`,type:"number",description:`Matrix element [${Math.floor(t/3)}][${t%3}]`})),dataOutputs:[{name:"value",type:"Matrix3D"},{name:"isValid",type:"boolean"}]},ExtractVector2:{className:"FlowGraphExtractVector2Block",category:"Extract",description:"Extracts the X and Y components from a Vector2.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Vector2"}],dataOutputs:[{name:"output_0",type:"number",description:"X"},{name:"output_1",type:"number",description:"Y"}]},ExtractVector3:{className:"FlowGraphExtractVector3Block",category:"Extract",description:"Extracts the X, Y, and Z components from a Vector3.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Vector3"}],dataOutputs:[{name:"output_0",type:"number",description:"X"},{name:"output_1",type:"number",description:"Y"},{name:"output_2",type:"number",description:"Z"}]},ExtractVector4:{className:"FlowGraphExtractVector4Block",category:"Extract",description:"Extracts the X, Y, Z, and W components from a Vector4.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Vector4"}],dataOutputs:[{name:"output_0",type:"number",description:"X"},{name:"output_1",type:"number",description:"Y"},{name:"output_2",type:"number",description:"Z"},{name:"output_3",type:"number",description:"W"}]},ExtractMatrix:{className:"FlowGraphExtractMatrixBlock",category:"Extract",description:"Extracts all 16 elements from a 4x4 Matrix.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Matrix"}],dataOutputs:Array.from({length:16},(e,t)=>({name:`output_${t}`,type:"number",description:`Matrix element [${Math.floor(t/4)}][${t%4}]`}))},ExtractMatrix2D:{className:"FlowGraphExtractMatrix2DBlock",category:"Extract",description:"Extracts all 4 elements from a 2x2 Matrix2D.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Matrix2D"}],dataOutputs:Array.from({length:4},(e,t)=>({name:`output_${t}`,type:"number",description:`Matrix element ${t}`}))},ExtractMatrix3D:{className:"FlowGraphExtractMatrix3DBlock",category:"Extract",description:"Extracts all 9 elements from a 3x3 Matrix3D.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"Matrix3D"}],dataOutputs:Array.from({length:9},(e,t)=>({name:`output_${t}`,type:"number",description:`Matrix element [${Math.floor(t/3)}][${t%3}]`}))},BooleanToFloat:{className:"FlowGraphBooleanToFloat",category:"Conversion",description:"Converts a boolean to a float (true \u2192 1.0, false \u2192 0.0).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"boolean"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},BooleanToInt:{className:"FlowGraphBooleanToInt",category:"Conversion",description:"Converts a boolean to an integer (true \u2192 1, false \u2192 0).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"boolean"}],dataOutputs:[{name:"value",type:"FlowGraphInteger"},{name:"isValid",type:"boolean"}]},FloatToBoolean:{className:"FlowGraphFloatToBoolean",category:"Conversion",description:"Converts a float to a boolean (0 \u2192 false, nonzero \u2192 true).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"number"}],dataOutputs:[{name:"value",type:"boolean"},{name:"isValid",type:"boolean"}]},IntToBoolean:{className:"FlowGraphIntToBoolean",category:"Conversion",description:"Converts an integer to a boolean (0 \u2192 false, nonzero \u2192 true).",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"FlowGraphInteger"}],dataOutputs:[{name:"value",type:"boolean"},{name:"isValid",type:"boolean"}]},IntToFloat:{className:"FlowGraphIntToFloat",category:"Conversion",description:"Converts an integer to a float.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"FlowGraphInteger"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},FloatToInt:{className:"FlowGraphFloatToInt",category:"Conversion",description:"Converts a float to an integer.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:"number"}],dataOutputs:[{name:"value",type:"FlowGraphInteger"},{name:"isValid",type:"boolean"}],config:{roundingMode:'"floor" | "ceil" | "round" \u2014 how to round the float value'}},PhysicsApplyForce:{className:"FlowGraphApplyForceBlock",category:"Execution",description:"Applies a force to a physics body at a given location.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody to apply force to"},{name:"force",type:"Vector3",description:"Force vector"},{name:"location",type:"Vector3",description:"World-space location to apply force at"}],dataOutputs:[]},PhysicsApplyImpulse:{className:"FlowGraphApplyImpulseBlock",category:"Execution",description:"Applies an impulse to a physics body at a given location.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody to apply impulse to"},{name:"impulse",type:"Vector3",description:"Impulse vector"},{name:"location",type:"Vector3",description:"World-space location to apply impulse at"}],dataOutputs:[]},PhysicsSetLinearVelocity:{className:"FlowGraphSetLinearVelocityBlock",category:"Execution",description:"Sets the linear velocity of a physics body.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"},{name:"velocity",type:"Vector3",description:"New linear velocity"}],dataOutputs:[]},PhysicsSetAngularVelocity:{className:"FlowGraphSetAngularVelocityBlock",category:"Execution",description:"Sets the angular velocity of a physics body.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"},{name:"velocity",type:"Vector3",description:"New angular velocity"}],dataOutputs:[]},PhysicsSetMotionType:{className:"FlowGraphSetPhysicsMotionTypeBlock",category:"Execution",description:"Sets the motion type of a physics body (Static=0, Animated=1, Dynamic=2).",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"},{name:"motionType",type:"number",description:"Motion type: Static (0), Animated (1), Dynamic (2)"}],dataOutputs:[]},PhysicsGetLinearVelocity:{className:"FlowGraphGetLinearVelocityBlock",category:"Data",description:"Gets the linear velocity of a physics body.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},PhysicsGetAngularVelocity:{className:"FlowGraphGetAngularVelocityBlock",category:"Data",description:"Gets the angular velocity of a physics body.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"}],dataOutputs:[{name:"value",type:"Vector3"},{name:"isValid",type:"boolean"}]},PhysicsGetMassProperties:{className:"FlowGraphGetPhysicsMassPropertiesBlock",category:"Data",description:"Gets mass, center of mass, and inertia of a physics body.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"body",type:"any",description:"The PhysicsBody"}],dataOutputs:[{name:"mass",type:"number"},{name:"centerOfMass",type:"Vector3"},{name:"inertia",type:"Vector3"}]},AudioPlaySound:{className:"FlowGraphPlaySoundBlock",category:"Execution",description:"Plays a sound with optional volume, offset, and loop control.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound to play"},{name:"volume",type:"number",description:"Playback volume (default: 1)"},{name:"startOffset",type:"number",description:"Start offset in seconds (default: 0)"},{name:"loop",type:"boolean",description:"Whether to loop (default: false)"}],dataOutputs:[]},AudioStopSound:{className:"FlowGraphStopSoundBlock",category:"Execution",description:"Stops a currently playing sound.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound to stop"}],dataOutputs:[]},AudioPauseSound:{className:"FlowGraphPauseSoundBlock",category:"Execution",description:"Pauses a currently playing sound.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound to pause"}],dataOutputs:[]},AudioSetVolume:{className:"FlowGraphSetSoundVolumeBlock",category:"Execution",description:"Sets the volume of a sound.",signalInputs:[{name:"in"}],signalOutputs:[{name:"out"},{name:"error"}],dataInputs:[{name:"sound",type:"any",description:"The sound"},{name:"volume",type:"number",description:"Volume level (default: 1)"}],dataOutputs:[]},AudioGetVolume:{className:"FlowGraphGetSoundVolumeBlock",category:"Data",description:"Gets the current volume of a sound.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"sound",type:"any",description:"The sound"}],dataOutputs:[{name:"value",type:"number"},{name:"isValid",type:"boolean"}]},AudioIsSoundPlaying:{className:"FlowGraphIsSoundPlayingBlock",category:"Data",description:"Returns whether a sound is currently playing.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"sound",type:"any",description:"The sound"}],dataOutputs:[{name:"value",type:"boolean"},{name:"isValid",type:"boolean"}]},DebugBlock:{className:"FlowGraphDebugBlock",category:"Utility",description:"Pass-through block that logs its input value for debugging. Output equals input.",signalInputs:[],signalOutputs:[],dataInputs:[{name:"input",type:"any"}],dataOutputs:[{name:"output",type:"any"}]}};function ae(e,t,r,i="any",n="any"){return{[e]:{className:t,category:"Math",description:r,signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:n,description:"Input value"}],dataOutputs:[{name:"value",type:i},{name:"isValid",type:"boolean"}]}}}function Ce(e,t,r,i="any",n="any",o="any"){return{[e]:{className:t,category:"Math",description:r,signalInputs:[],signalOutputs:[],dataInputs:[{name:"a",type:n,description:"First operand"},{name:"b",type:o,description:"Second operand"}],dataOutputs:[{name:"value",type:i},{name:"isValid",type:"boolean"}]}}}function Sv(){const e=new Map;for(const[r,i]of Object.entries(Mt))e.has(i.category)||e.set(i.category,[]),e.get(i.category).push(` ${r} (${i.className}): ${i.description.split(".")[0]}`);const t=[];for(const[r,i]of e)t.push(`
96
96
  ## ${r}
97
97
  `),t.push(...i);return t.join(`
98
- `)}function CT(e){if(Ft[e])return Ft[e];for(const t of Object.values(Ft))if(t.className===e)return t}const DT={any:void 0,string:"",number:0,boolean:!1,FlowGraphInteger:{value:0,className:"FlowGraphInteger"},Vector2:{value:[0,0],className:"Vector2"},Vector3:{value:[0,0,0],className:"Vector3"},Vector4:{value:[0,0,0,0],className:"Vector4"},Quaternion:{value:[0,0,0,1],className:"Quaternion"},Matrix:{value:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],className:"Matrix"},Color3:{value:[0,0,0],className:"Color3"},Color4:{value:[0,0,0,0],className:"Color4"},Matrix2D:{value:[1,0,0,1],className:"FlowGraphMatrix2D"},Matrix3D:{value:[1,0,0,0,1,0,0,0,1],className:"FlowGraphMatrix3D"}};function Iv(e){return DT[e]??void 0}const Ov={targetMesh:"asset",target:"object"};function Tv(e,t){if(e)for(const r of t){if(Object.prototype.hasOwnProperty.call(e,r.name)&&e[r.name]!==void 0){r.defaultValue=e[r.name];continue}for(const i of Object.keys(Ov))if(Ov[i]===r.name&&Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==void 0){r.defaultValue=e[i];break}}}let Pv=0;function It(){return Pv++,`fg-${Pv.toString(16).padStart(8,"0")}`}class AT{_graphs=new Map;createGraph(t){const r={name:t,blocks:[],contexts:[{uniqueId:It(),_userVariables:{},_connectionValues:{}}],nextBlockId:1};return this._graphs.set(t,r),r}getGraph(t){return this._graphs.get(t)}listGraphs(){return Array.from(this._graphs.keys())}deleteGraph(t){return this._graphs.delete(t)}clearAll(){this._graphs.clear()}addBlock(t,r,i,n){const o=this._graphs.get(t);if(!o)return`Graph "${t}" not found. Create it first with create_graph.`;const a=this._resolveBlockType(r);if(!a)return`Unknown block type "${r}". Use list_block_types to see available blocks.`;const s=o.nextBlockId++,c=i??`${r}_${s}`,u=It(),l=a.signalInputs.map(g=>({uniqueId:It(),name:g.name,_connectionType:0,connectedPointIds:[]})),d=a.signalOutputs.map(g=>({uniqueId:It(),name:g.name,_connectionType:1,connectedPointIds:[]}));if(n){const g=n.outputSignalCount??n.outputCount;if(typeof g=="number"&&g>0)for(let k=0;k<g;k++){const O=`out_${k}`;d.find(N=>N.name===O)||d.push({uniqueId:It(),name:O,_connectionType:1,connectedPointIds:[]})}if(Array.isArray(n.cases))for(let k=0;k<n.cases.length;k++){const O=`case_${k}`;d.find(N=>N.name===O)||d.push({uniqueId:It(),name:O,_connectionType:1,connectedPointIds:[]})}if(typeof n.inputSignalCount=="number"&&n.inputSignalCount>0)for(let k=0;k<n.inputSignalCount;k++){const O=`in_${k}`;l.find(N=>N.name===O)||l.push({uniqueId:It(),name:O,_connectionType:0,connectedPointIds:[]})}}const m=a.dataInputs.map(g=>({uniqueId:It(),name:g.name,_connectionType:0,connectedPointIds:[],className:"FlowGraphDataConnection",richType:{typeName:g.type,defaultValue:Iv(g.type)},optional:g.isOptional??!1})),p=a.dataOutputs.map(g=>({uniqueId:It(),name:g.name,_connectionType:1,connectedPointIds:[],className:"FlowGraphDataConnection",richType:{typeName:g.type,defaultValue:Iv(g.type)}}));Tv(n,m),this._normalizeConfigAliases(n,a);const h=[];if(n&&a.config){const g=new Set(Object.keys(a.config));for(const k of Object.keys(n))if(!g.has(k)){const O=` Known keys: ${[...g].join(", ")}`;h.push(`Unknown config key "${k}" for ${a.className}.${O}`)}}const b={className:a.className,config:n??{},uniqueId:u,dataInputs:m,dataOutputs:p,signalInputs:l,signalOutputs:d,metadata:{displayName:c}},$={id:s,serialized:b,typeInfo:a,displayName:c};o.blocks.push($);const y={id:s,name:c,uniqueId:u};return h.length>0&&(y.warnings=h),y}removeBlock(t,r){const i=this._graphs.get(t);if(!i)return`Graph "${t}" not found.`;const n=i.blocks.findIndex(s=>s.id===r);if(n===-1)return`Block ${r} not found.`;const o=i.blocks[n],a=new Set;for(const s of[...o.serialized.dataInputs,...o.serialized.dataOutputs,...o.serialized.signalInputs,...o.serialized.signalOutputs])a.add(s.uniqueId);for(const s of i.blocks)if(s.id!==r)for(const c of[...s.serialized.dataInputs,...s.serialized.dataOutputs,...s.serialized.signalInputs,...s.serialized.signalOutputs])c.connectedPointIds=c.connectedPointIds.filter(u=>!a.has(u));return i.blocks.splice(n,1),"OK"}setBlockConfig(t,r,i){const n=this._graphs.get(t);if(!n)return`Graph "${t}" not found.`;const o=n.blocks.find(a=>a.id===r);if(!o)return`Block ${r} not found.`;this._normalizeConfigAliases(i,o.typeInfo);for(const a of Object.keys(i))a==="__proto__"||a==="constructor"||a==="prototype"||(o.serialized.config[a]=i[a]);return Tv(o.serialized.config,o.serialized.dataInputs),"OK"}connectData(t,r,i,n,o){const a=this._graphs.get(t);if(!a)return`Graph "${t}" not found.`;const s=a.blocks.find(d=>d.id===r);if(!s)return`Source block ${r} not found.`;const c=a.blocks.find(d=>d.id===n);if(!c)return`Target block ${n} not found.`;const u=s.serialized.dataOutputs.find(d=>d.name===i);if(!u){const m={value:["output"],output:["value"]}[i],p=m?s.serialized.dataOutputs.find(b=>m.includes(b.name)):void 0;if(p){const b=c.serialized.dataInputs.find($=>$.name===o);if(!b){const $=c.serialized.dataInputs.map(y=>y.name).join(", ");return`Input "${o}" not found on block ${n} (${c.displayName}). Available inputs: ${$}`}return b.connectedPointIds.includes(p.uniqueId)||b.connectedPointIds.push(p.uniqueId),"OK"}const h=s.serialized.dataOutputs.map(b=>b.name).join(", ");return`Output "${i}" not found on block ${r} (${s.displayName}). Available outputs: ${h}`}const l=c.serialized.dataInputs.find(d=>d.name===o);if(!l){const m={value:["input"],input:["value"]}[o],p=m?c.serialized.dataInputs.find(b=>m.includes(b.name)):void 0;if(p)return p.connectedPointIds.includes(u.uniqueId)||p.connectedPointIds.push(u.uniqueId),"OK";const h=c.serialized.dataInputs.map(b=>b.name).join(", ");return`Input "${o}" not found on block ${n} (${c.displayName}). Available inputs: ${h}`}return l.connectedPointIds.includes(u.uniqueId)||l.connectedPointIds.push(u.uniqueId),"OK"}connectSignal(t,r,i,n,o){const a=this._graphs.get(t);if(!a)return`Graph "${t}" not found.`;const s=a.blocks.find(m=>m.id===r);if(!s)return`Source block ${r} not found.`;const c=a.blocks.find(m=>m.id===n);if(!c)return`Target block ${n} not found.`;let u=i;i==="out"&&s.typeInfo.category==="Event"&&s.serialized.signalOutputs.some(p=>p.name==="done")&&(u="done");const l=s.serialized.signalOutputs.find(m=>m.name===u);if(!l){const m=s.serialized.signalOutputs.map(p=>p.name).join(", ");return`Signal output "${i}" not found on block ${r} (${s.displayName}). Available: ${m}`}const d=c.serialized.signalInputs.find(m=>m.name===o);if(!d){const m=c.serialized.signalInputs.map(p=>p.name).join(", ");return`Signal input "${o}" not found on block ${n} (${c.displayName}). Available: ${m}`}return l.connectedPointIds.includes(d.uniqueId)||l.connectedPointIds.push(d.uniqueId),"OK"}disconnectData(t,r,i){const n=this._graphs.get(t);if(!n)return`Graph "${t}" not found.`;const o=n.blocks.find(s=>s.id===r);if(!o)return`Block ${r} not found.`;const a=o.serialized.dataInputs.find(s=>s.name===i);return a?(a.connectedPointIds=[],"OK"):`Data input "${i}" not found on block ${r}.`}disconnectSignal(t,r,i){const n=this._graphs.get(t);if(!n)return`Graph "${t}" not found.`;const o=n.blocks.find(s=>s.id===r);if(!o)return`Block ${r} not found.`;const a=o.serialized.signalOutputs.find(s=>s.name===i);return a?(a.connectedPointIds=[],"OK"):`Signal output "${i}" not found on block ${r}.`}setVariable(t,r,i){const n=this._graphs.get(t);return n?(n.contexts.length===0&&n.contexts.push({uniqueId:It(),_userVariables:{},_connectionValues:{}}),n.contexts[0]._userVariables[r]=i,"OK"):`Graph "${t}" not found.`}describeGraph(t){const r=this._graphs.get(t);if(!r)return`Graph "${t}" not found.`;if(r.blocks.length===0)return`Graph "${t}" is empty. Add blocks with add_block.`;const i=[`# Flow Graph: ${t}`,`Blocks: ${r.blocks.length}`,""],n=new Map;for(const o of r.blocks){const a=o.typeInfo.category;n.has(a)||n.set(a,[]),n.get(a).push(o)}for(const[o,a]of n){i.push(`## ${o}`);for(const s of a){i.push(` [${s.id}] ${s.displayName} (${s.serialized.className})`);for(const c of s.serialized.dataInputs)if(c.connectedPointIds.length>0){const u=this._findConnectionSource(r,c.connectedPointIds[0]);i.push(` \u2190 ${c.name}: connected from ${u}`)}for(const c of s.serialized.signalOutputs)if(c.connectedPointIds.length>0){const u=this._findSignalTarget(r,c.connectedPointIds[0]);i.push(` \u2192 ${c.name}: connected to ${u}`)}}i.push("")}if(r.contexts.length>0&&Object.keys(r.contexts[0]._userVariables).length>0){i.push("## Context Variables");for(const[o,a]of Object.entries(r.contexts[0]._userVariables))i.push(` ${o} = ${JSON.stringify(a)}`)}return i.join(`
98
+ `)}function CT(e){if(Mt[e])return Mt[e];for(const t of Object.values(Mt))if(t.className===e)return t}const DT={any:void 0,string:"",number:0,boolean:!1,FlowGraphInteger:{value:0,className:"FlowGraphInteger"},Vector2:{value:[0,0],className:"Vector2"},Vector3:{value:[0,0,0],className:"Vector3"},Vector4:{value:[0,0,0,0],className:"Vector4"},Quaternion:{value:[0,0,0,1],className:"Quaternion"},Matrix:{value:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],className:"Matrix"},Color3:{value:[0,0,0],className:"Color3"},Color4:{value:[0,0,0,0],className:"Color4"},Matrix2D:{value:[1,0,0,1],className:"FlowGraphMatrix2D"},Matrix3D:{value:[1,0,0,0,1,0,0,0,1],className:"FlowGraphMatrix3D"}};function Iv(e){return DT[e]??void 0}const Ov={targetMesh:"asset",target:"object"};function Tv(e,t){if(e)for(const r of t){if(Object.prototype.hasOwnProperty.call(e,r.name)&&e[r.name]!==void 0){r.defaultValue=e[r.name];continue}for(const i of Object.keys(Ov))if(Ov[i]===r.name&&Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==void 0){r.defaultValue=e[i];break}}}let Pv=0;function It(){return Pv++,`fg-${Pv.toString(16).padStart(8,"0")}`}class AT{_graphs=new Map;createGraph(t){const r={name:t,blocks:[],contexts:[{uniqueId:It(),_userVariables:{},_connectionValues:{}}],nextBlockId:1};return this._graphs.set(t,r),r}getGraph(t){return this._graphs.get(t)}listGraphs(){return Array.from(this._graphs.keys())}deleteGraph(t){return this._graphs.delete(t)}clearAll(){this._graphs.clear()}addBlock(t,r,i,n){const o=this._graphs.get(t);if(!o)return`Graph "${t}" not found. Create it first with create_graph.`;const a=this._resolveBlockType(r);if(!a)return`Unknown block type "${r}". Use list_block_types to see available blocks.`;const s=o.nextBlockId++,c=i??`${r}_${s}`,u=It(),l=a.signalInputs.map(g=>({uniqueId:It(),name:g.name,_connectionType:0,connectedPointIds:[]})),d=a.signalOutputs.map(g=>({uniqueId:It(),name:g.name,_connectionType:1,connectedPointIds:[]}));if(n){const g=n.outputSignalCount??n.outputCount;if(typeof g=="number"&&g>0)for(let w=0;w<g;w++){const O=`out_${w}`;d.find(x=>x.name===O)||d.push({uniqueId:It(),name:O,_connectionType:1,connectedPointIds:[]})}if(Array.isArray(n.cases))for(let w=0;w<n.cases.length;w++){const O=`case_${w}`;d.find(x=>x.name===O)||d.push({uniqueId:It(),name:O,_connectionType:1,connectedPointIds:[]})}if(typeof n.inputSignalCount=="number"&&n.inputSignalCount>0)for(let w=0;w<n.inputSignalCount;w++){const O=`in_${w}`;l.find(x=>x.name===O)||l.push({uniqueId:It(),name:O,_connectionType:0,connectedPointIds:[]})}}const m=a.dataInputs.map(g=>({uniqueId:It(),name:g.name,_connectionType:0,connectedPointIds:[],className:"FlowGraphDataConnection",richType:{typeName:g.type,defaultValue:Iv(g.type)},optional:g.isOptional??!1})),p=a.dataOutputs.map(g=>({uniqueId:It(),name:g.name,_connectionType:1,connectedPointIds:[],className:"FlowGraphDataConnection",richType:{typeName:g.type,defaultValue:Iv(g.type)}}));Tv(n,m),this._normalizeConfigAliases(n,a);const h=[];if(n&&a.config){const g=new Set(Object.keys(a.config));for(const w of Object.keys(n))if(!g.has(w)){const O=` Known keys: ${[...g].join(", ")}`;h.push(`Unknown config key "${w}" for ${a.className}.${O}`)}}const b={className:a.className,config:n??{},uniqueId:u,dataInputs:m,dataOutputs:p,signalInputs:l,signalOutputs:d,metadata:{displayName:c}},$={id:s,serialized:b,typeInfo:a,displayName:c};o.blocks.push($);const y={id:s,name:c,uniqueId:u};return h.length>0&&(y.warnings=h),y}removeBlock(t,r){const i=this._graphs.get(t);if(!i)return`Graph "${t}" not found.`;const n=i.blocks.findIndex(s=>s.id===r);if(n===-1)return`Block ${r} not found.`;const o=i.blocks[n],a=new Set;for(const s of[...o.serialized.dataInputs,...o.serialized.dataOutputs,...o.serialized.signalInputs,...o.serialized.signalOutputs])a.add(s.uniqueId);for(const s of i.blocks)if(s.id!==r)for(const c of[...s.serialized.dataInputs,...s.serialized.dataOutputs,...s.serialized.signalInputs,...s.serialized.signalOutputs])c.connectedPointIds=c.connectedPointIds.filter(u=>!a.has(u));return i.blocks.splice(n,1),"OK"}setBlockConfig(t,r,i){const n=this._graphs.get(t);if(!n)return`Graph "${t}" not found.`;const o=n.blocks.find(a=>a.id===r);if(!o)return`Block ${r} not found.`;this._normalizeConfigAliases(i,o.typeInfo);for(const a of Object.keys(i))a==="__proto__"||a==="constructor"||a==="prototype"||(o.serialized.config[a]=i[a]);return Tv(o.serialized.config,o.serialized.dataInputs),"OK"}connectData(t,r,i,n,o){const a=this._graphs.get(t);if(!a)return`Graph "${t}" not found.`;const s=a.blocks.find(d=>d.id===r);if(!s)return`Source block ${r} not found.`;const c=a.blocks.find(d=>d.id===n);if(!c)return`Target block ${n} not found.`;const u=s.serialized.dataOutputs.find(d=>d.name===i);if(!u){const m={value:["output"],output:["value"]}[i],p=m?s.serialized.dataOutputs.find(b=>m.includes(b.name)):void 0;if(p){const b=c.serialized.dataInputs.find($=>$.name===o);if(!b){const $=c.serialized.dataInputs.map(y=>y.name).join(", ");return`Input "${o}" not found on block ${n} (${c.displayName}). Available inputs: ${$}`}return b.connectedPointIds.includes(p.uniqueId)||b.connectedPointIds.push(p.uniqueId),"OK"}const h=s.serialized.dataOutputs.map(b=>b.name).join(", ");return`Output "${i}" not found on block ${r} (${s.displayName}). Available outputs: ${h}`}const l=c.serialized.dataInputs.find(d=>d.name===o);if(!l){const m={value:["input"],input:["value"]}[o],p=m?c.serialized.dataInputs.find(b=>m.includes(b.name)):void 0;if(p)return p.connectedPointIds.includes(u.uniqueId)||p.connectedPointIds.push(u.uniqueId),"OK";const h=c.serialized.dataInputs.map(b=>b.name).join(", ");return`Input "${o}" not found on block ${n} (${c.displayName}). Available inputs: ${h}`}return l.connectedPointIds.includes(u.uniqueId)||l.connectedPointIds.push(u.uniqueId),"OK"}connectSignal(t,r,i,n,o){const a=this._graphs.get(t);if(!a)return`Graph "${t}" not found.`;const s=a.blocks.find(m=>m.id===r);if(!s)return`Source block ${r} not found.`;const c=a.blocks.find(m=>m.id===n);if(!c)return`Target block ${n} not found.`;let u=i;i==="out"&&s.typeInfo.category==="Event"&&s.serialized.signalOutputs.some(p=>p.name==="done")&&(u="done");const l=s.serialized.signalOutputs.find(m=>m.name===u);if(!l){const m=s.serialized.signalOutputs.map(p=>p.name).join(", ");return`Signal output "${i}" not found on block ${r} (${s.displayName}). Available: ${m}`}const d=c.serialized.signalInputs.find(m=>m.name===o);if(!d){const m=c.serialized.signalInputs.map(p=>p.name).join(", ");return`Signal input "${o}" not found on block ${n} (${c.displayName}). Available: ${m}`}return l.connectedPointIds.includes(d.uniqueId)||l.connectedPointIds.push(d.uniqueId),"OK"}disconnectData(t,r,i){const n=this._graphs.get(t);if(!n)return`Graph "${t}" not found.`;const o=n.blocks.find(s=>s.id===r);if(!o)return`Block ${r} not found.`;const a=o.serialized.dataInputs.find(s=>s.name===i);return a?(a.connectedPointIds=[],"OK"):`Data input "${i}" not found on block ${r}.`}disconnectSignal(t,r,i){const n=this._graphs.get(t);if(!n)return`Graph "${t}" not found.`;const o=n.blocks.find(s=>s.id===r);if(!o)return`Block ${r} not found.`;const a=o.serialized.signalOutputs.find(s=>s.name===i);return a?(a.connectedPointIds=[],"OK"):`Signal output "${i}" not found on block ${r}.`}setVariable(t,r,i){const n=this._graphs.get(t);return n?(n.contexts.length===0&&n.contexts.push({uniqueId:It(),_userVariables:{},_connectionValues:{}}),n.contexts[0]._userVariables[r]=i,"OK"):`Graph "${t}" not found.`}describeGraph(t){const r=this._graphs.get(t);if(!r)return`Graph "${t}" not found.`;if(r.blocks.length===0)return`Graph "${t}" is empty. Add blocks with add_block.`;const i=[`# Flow Graph: ${t}`,`Blocks: ${r.blocks.length}`,""],n=new Map;for(const o of r.blocks){const a=o.typeInfo.category;n.has(a)||n.set(a,[]),n.get(a).push(o)}for(const[o,a]of n){i.push(`## ${o}`);for(const s of a){i.push(` [${s.id}] ${s.displayName} (${s.serialized.className})`);for(const c of s.serialized.dataInputs)if(c.connectedPointIds.length>0){const u=this._findConnectionSource(r,c.connectedPointIds[0]);i.push(` \u2190 ${c.name}: connected from ${u}`)}for(const c of s.serialized.signalOutputs)if(c.connectedPointIds.length>0){const u=this._findSignalTarget(r,c.connectedPointIds[0]);i.push(` \u2192 ${c.name}: connected to ${u}`)}}i.push("")}if(r.contexts.length>0&&Object.keys(r.contexts[0]._userVariables).length>0){i.push("## Context Variables");for(const[o,a]of Object.entries(r.contexts[0]._userVariables))i.push(` ${o} = ${JSON.stringify(a)}`)}return i.join(`
99
99
  `)}describeBlock(t,r){const i=this._graphs.get(t);if(!i)return`Graph "${t}" not found.`;const n=i.blocks.find(a=>a.id===r);if(!n)return`Block ${r} not found.`;const o=[`## [${n.id}] ${n.displayName}`,`Class: ${n.serialized.className}`,`Category: ${n.typeInfo.category}`,`Description: ${n.typeInfo.description}`,`Config: ${JSON.stringify(n.serialized.config)}`];if(n.serialized.signalInputs.length>0){o.push(`
100
100
  ### Signal Inputs:`);for(const a of n.serialized.signalInputs)o.push(` \u2022 ${a.name} (id: ${a.uniqueId})`)}if(n.serialized.signalOutputs.length>0){o.push(`
101
101
  ### Signal Outputs:`);for(const a of n.serialized.signalOutputs){const s=a.connectedPointIds.length>0?`\u2192 ${this._findSignalTarget(i,a.connectedPointIds[0])}`:"(not connected)";o.push(` \u2022 ${a.name} ${s}`)}}if(n.serialized.dataInputs.length>0){o.push(`
102
102
  ### Data Inputs:`);for(const a of n.serialized.dataInputs){const s=a.connectedPointIds.length>0?`\u2190 ${this._findConnectionSource(i,a.connectedPointIds[0])}`:"(not connected)",c=a.richType?.typeName??"any",u=a.optional?" (optional)":"";o.push(` \u2022 ${a.name}: ${c}${u} ${s}`)}}if(n.serialized.dataOutputs.length>0){o.push(`
103
103
  ### Data Outputs:`);for(const a of n.serialized.dataOutputs){const s=a.richType?.typeName??"any";o.push(` \u2022 ${a.name}: ${s} (id: ${a.uniqueId})`)}}return o.join(`
104
- `)}validateGraph(t){const r=this._graphs.get(t);if(!r)return[`ERROR: Graph "${t}" not found.`];const i=[];if(r.blocks.length===0)return i.push("WARNING: Graph is empty."),i;const n=r.blocks.filter(a=>a.typeInfo.category==="Event");n.length===0&&i.push("WARNING: No event blocks found. The graph needs at least one event block (e.g. SceneReadyEvent) to start execution.");for(const a of r.blocks){for(const s of a.serialized.dataInputs)if(!s.optional&&s.connectedPointIds.length===0){const c=Object.keys(a.serialized.config);s.defaultValue!==void 0||c.some(l=>l.toLowerCase()===s.name.toLowerCase()||l.toLowerCase().includes(s.name.toLowerCase()))||i.push(`WARNING: [${a.id}] ${a.displayName} \u2014 data input "${s.name}" is not connected and has no config default.`)}a.typeInfo.category!=="Event"&&a.serialized.signalInputs.length>0&&!a.serialized.signalInputs.some(c=>{for(const u of r.blocks)for(const l of u.serialized.signalOutputs)if(l.connectedPointIds.includes(c.uniqueId))return!0;return!1})&&a.typeInfo.signalInputs.length>0&&a.typeInfo.signalOutputs.length>0&&i.push(`WARNING: [${a.id}] ${a.displayName} \u2014 execution block has no incoming signal connection. It may never execute.`)}for(const a of r.blocks)for(const s of a.serialized.signalOutputs)for(const c of s.connectedPointIds)r.blocks.some(l=>l.serialized.signalInputs.some(d=>d.uniqueId===c))||i.push(`ERROR: [${a.id}] ${a.displayName} \u2014 signal output "${s.name}" references missing target ${c}.`);for(const a of r.blocks)for(const s of a.serialized.dataInputs)for(const c of s.connectedPointIds)r.blocks.some(l=>l.serialized.dataOutputs.some(d=>d.uniqueId===c))||i.push(`ERROR: [${a.id}] ${a.displayName} \u2014 data input "${s.name}" references missing source ${c}.`);const o=new Set(["FlowGraphMeshPickEventBlock","FlowGraphPointerOverEventBlock","FlowGraphPointerOutEventBlock"]);for(const a of r.blocks)if(o.has(a.serialized.className)){const s=a.serialized.config,c=s&&"targetMesh"in s,u=a.serialized.dataInputs.find(d=>d.name==="asset"||d.name==="targetMesh"),l=u&&u.connectedPointIds.length>0;!c&&!l&&i.push(`WARNING: [${a.id}] ${a.displayName} \u2014 no target mesh configured. Set config.targetMesh (e.g. { type: "Mesh", name: "myMesh" }) or connect the "asset" data input. Without a target, events will silently never fire.`)}for(const a of n){const s=a.serialized.signalOutputs.find(u=>u.name==="out"),c=a.serialized.signalOutputs.find(u=>u.name==="done");if(s&&c){const u=s.connectedPointIds.length>0,l=c.connectedPointIds.length>0;u&&!l&&a.serialized.className!=="FlowGraphSceneReadyEventBlock"&&i.push(`WARNING: [${a.id}] ${a.displayName} \u2014 signal "out" is connected but "done" is not. "out" fires once at startup; "done" fires each time the event occurs (e.g. each click). Did you mean to connect "done" instead?`)}}return i.length===0&&i.push("OK: No issues found."),i}exportJSON(t){const r=this._graphs.get(t);if(!r)return null;const n={_flowGraphs:[{allBlocks:r.blocks.map(o=>o.serialized),executionContexts:r.contexts}],dispatchEventsSynchronously:!1};return JSON.stringify(n,null,2)}exportGraphJSON(t){const r=this._graphs.get(t);if(!r)return null;const i={allBlocks:r.blocks.map(n=>n.serialized),executionContexts:r.contexts};return JSON.stringify(i,null,2)}importJSON(t,r){try{const n=bT(r).graphs[0],o={name:t,blocks:[],contexts:n.executionContexts??[],nextBlockId:1};for(const a of n.allBlocks){const s=this._resolveBlockType(a.className),c=o.nextBlockId++,u=s??this._makeUnknownTypeInfo(a);a.config&&this._normalizeConfigAliases(a.config,u);const l={id:c,serialized:a,typeInfo:u,displayName:a.metadata?.displayName??a.className};o.blocks.push(l)}return this._graphs.set(t,o),"OK"}catch(i){return`Failed to parse JSON: ${i instanceof Error?i.message:String(i)}`}}_normalizeConfigAliases(t,r){const i={variableName:"variable",variableNames:"variables",varName:"variable",eventName:"eventId"};if(t&&r.config){const n=new Set(Object.keys(r.config)),o=[];for(const a of Object.keys(t))if(!n.has(a)){const s=i[a];if(s&&n.has(s))o.push([a,s]);else{const c=[...n].find(u=>u.toLowerCase()===a.toLowerCase());c&&o.push([a,c])}}for(const[a,s]of o)t[s]=t[a],delete t[a]}}_resolveBlockType(t){if(Ft[t])return Ft[t];for(const r of Object.values(Ft))if(r.className===t)return r}_makeUnknownTypeInfo(t){return{className:t.className,category:"Utility",description:`Unknown block type: ${t.className}`,signalInputs:t.signalInputs?.map(r=>({name:r.name}))??[],signalOutputs:t.signalOutputs?.map(r=>({name:r.name}))??[],dataInputs:t.dataInputs?.map(r=>({name:r.name,type:r.richType?.typeName??"any"}))??[],dataOutputs:t.dataOutputs?.map(r=>({name:r.name,type:r.richType?.typeName??"any"}))??[]}}_findConnectionSource(t,r){for(const i of t.blocks)for(const n of i.serialized.dataOutputs)if(n.uniqueId===r)return`[${i.id}] ${i.displayName}.${n.name}`;return`(unknown: ${r})`}_findSignalTarget(t,r){for(const i of t.blocks)for(const n of i.serialized.signalInputs)if(n.uniqueId===r)return`[${i.id}] ${i.displayName}.${n.name}`;return`(unknown: ${r})`}}const _e=new AT,Be=new jT({serverName:"Flow Graph MCP Session Server",documentKind:"flow-graph",managerUnavailableMessage:"Flow graph manager is not available",getDocument:(e,t)=>e.exportJSON(t.name)??void 0,setDocument:(e,t,r)=>{const i=e.importJSON(t.name,r);return i&&i!=="OK"?i:void 0}},{defaultPort:3001,statusTitle:"Flow Graph MCP Session Server"});function ft(e){const t=Be.getSessionIdForName(e);t&&Be.notifySessionUpdate(t)}function RT(e,t){const r=_e.importJSON(e,t);return r==="OK"&&ft(e),r}const le=new rT({name:"babylonjs-flow-graph",version:"1.0.0"},{instructions:["You build Babylon.js Flow Graphs (visual scripting). Workflow: create_graph \u2192 add event blocks (entry points) \u2192 add action/logic blocks \u2192 connect signals (execution flow) and data (typed values) \u2192 validate_graph \u2192 export_graph_json.","Signal connections drive execution order; data connections carry values. Every graph needs at least one event block as an entry point.","For MeshPickEvent, targetMesh config is required or clicks silently never fire. Use the 'done' signal output (not 'out') for per-event firing.","To act on a mesh that is NOT the one clicked (e.g. click sphere \u2192 move box), give GetProperty/SetProperty their own mesh source (GetAsset or GetVariable) connected to the object input \u2014 do NOT use pickedMesh, and prefer an explicit connection over a config-only default.","Output JSON can be consumed by the Scene MCP via attach_flow_graph."].join(" ")});le.registerResource("block-catalog","flow-graph://block-catalog",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:`# Flow Graph Block Catalog
104
+ `)}validateGraph(t){const r=this._graphs.get(t);if(!r)return[`ERROR: Graph "${t}" not found.`];const i=[];if(r.blocks.length===0)return i.push("WARNING: Graph is empty."),i;const n=r.blocks.filter(a=>a.typeInfo.category==="Event");n.length===0&&i.push("WARNING: No event blocks found. The graph needs at least one event block (e.g. SceneReadyEvent) to start execution.");for(const a of r.blocks){for(const s of a.serialized.dataInputs)if(!s.optional&&s.connectedPointIds.length===0){const c=Object.keys(a.serialized.config);s.defaultValue!==void 0||c.some(l=>l.toLowerCase()===s.name.toLowerCase()||l.toLowerCase().includes(s.name.toLowerCase()))||i.push(`WARNING: [${a.id}] ${a.displayName} \u2014 data input "${s.name}" is not connected and has no config default.`)}a.typeInfo.category!=="Event"&&a.serialized.signalInputs.length>0&&!a.serialized.signalInputs.some(c=>{for(const u of r.blocks)for(const l of u.serialized.signalOutputs)if(l.connectedPointIds.includes(c.uniqueId))return!0;return!1})&&a.typeInfo.signalInputs.length>0&&a.typeInfo.signalOutputs.length>0&&i.push(`WARNING: [${a.id}] ${a.displayName} \u2014 execution block has no incoming signal connection. It may never execute.`)}for(const a of r.blocks)for(const s of a.serialized.signalOutputs)for(const c of s.connectedPointIds)r.blocks.some(l=>l.serialized.signalInputs.some(d=>d.uniqueId===c))||i.push(`ERROR: [${a.id}] ${a.displayName} \u2014 signal output "${s.name}" references missing target ${c}.`);for(const a of r.blocks)for(const s of a.serialized.dataInputs)for(const c of s.connectedPointIds)r.blocks.some(l=>l.serialized.dataOutputs.some(d=>d.uniqueId===c))||i.push(`ERROR: [${a.id}] ${a.displayName} \u2014 data input "${s.name}" references missing source ${c}.`);const o=new Set(["FlowGraphMeshPickEventBlock","FlowGraphPointerOverEventBlock","FlowGraphPointerOutEventBlock"]);for(const a of r.blocks)if(o.has(a.serialized.className)){const s=a.serialized.config,c=s&&"targetMesh"in s,u=a.serialized.dataInputs.find(d=>d.name==="asset"||d.name==="targetMesh"),l=u&&u.connectedPointIds.length>0;!c&&!l&&i.push(`WARNING: [${a.id}] ${a.displayName} \u2014 no target mesh configured. Set config.targetMesh (e.g. { type: "Mesh", name: "myMesh" }) or connect the "asset" data input. Without a target, events will silently never fire.`)}for(const a of n){const s=a.serialized.signalOutputs.find(u=>u.name==="out"),c=a.serialized.signalOutputs.find(u=>u.name==="done");if(s&&c){const u=s.connectedPointIds.length>0,l=c.connectedPointIds.length>0;u&&!l&&a.serialized.className!=="FlowGraphSceneReadyEventBlock"&&i.push(`WARNING: [${a.id}] ${a.displayName} \u2014 signal "out" is connected but "done" is not. "out" fires once at startup; "done" fires each time the event occurs (e.g. each click). Did you mean to connect "done" instead?`)}}return i.length===0&&i.push("OK: No issues found."),i}exportJSON(t){const r=this._graphs.get(t);if(!r)return null;const n={_flowGraphs:[{allBlocks:r.blocks.map(o=>o.serialized),executionContexts:r.contexts}],dispatchEventsSynchronously:!1};return JSON.stringify(n,null,2)}exportGraphJSON(t){const r=this._graphs.get(t);if(!r)return null;const i={allBlocks:r.blocks.map(n=>n.serialized),executionContexts:r.contexts};return JSON.stringify(i,null,2)}importJSON(t,r){try{const n=bT(r).graphs[0],o={name:t,blocks:[],contexts:n.executionContexts??[],nextBlockId:1};for(const a of n.allBlocks){const s=this._resolveBlockType(a.className),c=o.nextBlockId++,u=s??this._makeUnknownTypeInfo(a);a.config&&this._normalizeConfigAliases(a.config,u);const l={id:c,serialized:a,typeInfo:u,displayName:a.metadata?.displayName??a.className};o.blocks.push(l)}return this._graphs.set(t,o),"OK"}catch(i){return`Failed to parse JSON: ${i instanceof Error?i.message:String(i)}`}}_normalizeConfigAliases(t,r){const i={variableName:"variable",variableNames:"variables",varName:"variable",eventName:"eventId"};if(t&&r.config){const n=new Set(Object.keys(r.config)),o=[];for(const a of Object.keys(t))if(!n.has(a)){const s=i[a];if(s&&n.has(s))o.push([a,s]);else{const c=[...n].find(u=>u.toLowerCase()===a.toLowerCase());c&&o.push([a,c])}}for(const[a,s]of o)t[s]=t[a],delete t[a]}}_resolveBlockType(t){if(Mt[t])return Mt[t];for(const r of Object.values(Mt))if(r.className===t)return r}_makeUnknownTypeInfo(t){return{className:t.className,category:"Utility",description:`Unknown block type: ${t.className}`,signalInputs:t.signalInputs?.map(r=>({name:r.name}))??[],signalOutputs:t.signalOutputs?.map(r=>({name:r.name}))??[],dataInputs:t.dataInputs?.map(r=>({name:r.name,type:r.richType?.typeName??"any"}))??[],dataOutputs:t.dataOutputs?.map(r=>({name:r.name,type:r.richType?.typeName??"any"}))??[]}}_findConnectionSource(t,r){for(const i of t.blocks)for(const n of i.serialized.dataOutputs)if(n.uniqueId===r)return`[${i.id}] ${i.displayName}.${n.name}`;return`(unknown: ${r})`}_findSignalTarget(t,r){for(const i of t.blocks)for(const n of i.serialized.signalInputs)if(n.uniqueId===r)return`[${i.id}] ${i.displayName}.${n.name}`;return`(unknown: ${r})`}}const _e=new AT,Be=new jT({serverName:"Flow Graph MCP Session Server",documentKind:"flow-graph",managerUnavailableMessage:"Flow graph manager is not available",getDocument:(e,t)=>e.exportJSON(t.name)??void 0,setDocument:(e,t,r)=>{const i=e.importJSON(t.name,r);return i&&i!=="OK"?i:void 0}},{defaultPort:3001,statusTitle:"Flow Graph MCP Session Server"});function ft(e){const t=Be.getSessionIdForName(e);t&&Be.notifySessionUpdate(t)}function RT(e,t){const r=_e.importJSON(e,t);return r==="OK"&&ft(e),r}const le=new rT({name:"babylonjs-flow-graph",version:"1.0.0"},{instructions:["You build Babylon.js Flow Graphs (visual scripting). Workflow: create_graph \u2192 add event blocks (entry points) \u2192 add action/logic blocks \u2192 connect signals (execution flow) and data (typed values) \u2192 validate_graph \u2192 export_graph_json.","Signal connections drive execution order; data connections carry values. Every graph needs at least one event block as an entry point.","For MeshPickEvent, targetMesh config is required or clicks silently never fire. Use the 'done' signal output (not 'out') for per-event firing.","To act on a mesh that is NOT the one clicked (e.g. click sphere \u2192 move box), give GetProperty/SetProperty their own mesh source (GetAsset or GetVariable) connected to the object input \u2014 do NOT use pickedMesh, and prefer an explicit connection over a config-only default.","Output JSON can be consumed by the Scene MCP via attach_flow_graph."].join(" ")});le.registerResource("block-catalog","flow-graph://block-catalog",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:`# Flow Graph Block Catalog
105
105
  ${Sv()}`}]})),le.registerResource("rich-types","flow-graph://rich-types",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:["# Flow Graph Rich Types Reference","","These are the data types used in Flow Graph data connections:","","| Type | Default Value | Description |","|------|---------------|-------------|","| `any` | undefined | Generic type, accepts any value |",'| `string` | "" | Text string |',"| `number` | 0 | Floating-point number |","| `boolean` | false | True/false |","| `FlowGraphInteger` | 0 | Integer value |","| `Vector2` | (0, 0) | 2D vector |","| `Vector3` | (0, 0, 0) | 3D vector |","| `Vector4` | (0, 0, 0, 0) | 4D vector |","| `Quaternion` | (0, 0, 0, 1) | Rotation quaternion |","| `Matrix` | Identity 4x4 | 4x4 transformation matrix |","| `Color3` | (0, 0, 0) | RGB color |","| `Color4` | (0, 0, 0, 0) | RGBA color |","","## Serialized Value Formats","","When providing values in config, use these JSON formats:","- **number**: `42`, `3.14`","- **boolean**: `true`, `false`",'- **string**: `"hello"`','- **Vector3**: `{ "value": [1, 2, 3], "className": "Vector3" }`','- **Color3**: `{ "value": [1, 0, 0], "className": "Color3" }`','- **Quaternion**: `{ "value": [0, 0, 0, 1], "className": "Quaternion" }`','- **Matrix**: `{ "value": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1], "className": "Matrix" }`','- **Mesh reference**: `{ "name": "myMesh", "className": "Mesh", "id": "mesh-id" }`',"","## Connection Types","","Flow Graphs have two types of connections:","1. **Signal connections** \u2014 control execution flow (like wires in a circuit). Signal outputs connect to signal inputs.","2. **Data connections** \u2014 carry typed values between blocks. Data inputs connect FROM data outputs."].join(`
106
106
  `)}]})),le.registerResource("concepts","flow-graph://concepts",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:["# Flow Graph Concepts","","## What is a Flow Graph?","A Flow Graph is a visual scripting system in Babylon.js that defines scene interactions","using an action-block-based graph. It uses an event-driven execution model where:","","1. **Event blocks** (e.g. SceneReady, MeshPick, SceneTick) serve as entry points","2. **Execution blocks** process logic when triggered by signals (Branch, ForLoop, SetProperty, etc.)","3. **Data blocks** provide values (constants, variables, math operations) that feed into execution blocks","","## Signal Flow vs Data Flow","- **Signal flow** (execution): Event \u2192 Execution Block \u2192 Execution Block \u2192 ..."," - Connected via `connect_signal`: source signal output \u2192 target signal input"," - Controls WHEN blocks execute","- **Data flow** (values): Data Block output \u2192 Execution Block input"," - Connected via `connect_data`: source data output \u2192 target data input"," - Controls WHAT values blocks use","","## Common Patterns","","### On scene ready, log a message:","SceneReadyEvent.out \u2192 ConsoleLog.in, with message data input","(SceneReadyEvent.out fires once at startup \u2014 correct for initialization.)","","### On click, toggle visibility:","MeshPickEvent.done \u2192 Branch.in \u26A0 Use 'done', NOT 'out'! 'out' fires once at startup.","GetProperty(visible).value \u2192 Branch.condition","Branch.onTrue \u2192 SetProperty(visible=false).in","Branch.onFalse \u2192 SetProperty(visible=true).in","config.targetMesh must be set: { type: 'Mesh', name: 'myMeshName' }","","### Animate on click:","MeshPickEvent.done \u2192 PlayAnimation.in \u26A0 Use 'done', NOT 'out'!","ValueInterpolation.animation \u2192 PlayAnimation.animation","","### Act on a mesh that is NOT the one clicked (e.g. click sphere \u2192 move box):","The picked mesh and the mesh you modify are different, so do NOT use pickedMesh for the object.","Give GetProperty/SetProperty their own mesh source:"," \u2022 GetAsset (type: 'Mesh') \u2192 outputs the target mesh \u2014 connect its .value to the object input, OR"," \u2022 GetVariable holding a mesh reference \u2192 connect its .value to the object input.","MeshPickEvent(targetMesh: sphere).done \u2192 SetProperty.in \u26A0 Use 'done'!","GetAsset(Mesh: 'box').value \u2192 GetProperty.object AND \u2192 SetProperty.object","GetProperty('position').value \u2192 Add.a; Constant(Vector3 0,0.1,0).output \u2192 Add.b; Add.value \u2192 SetProperty.value","SetProperty config: { propertyName: 'position' }","","## \u26A0 Binding an object/mesh: connection vs config default","GetProperty.object, SetProperty.object and MeshPickEvent.asset can be bound two ways:"," 1. Explicit data CONNECTION (preferred, visible in the editor): connect_data a mesh"," source (pickedMesh / GetAsset.value / GetVariable.value) into the object/asset input."," 2. Config DEFAULT (hidden inline value, no wire shown): set config.object / config.target"," (GetProperty/SetProperty) or config.targetMesh (MeshPickEvent) to a mesh reference"," { name: 'myMesh', className: 'Mesh' }. Use this only when a wire is unnecessary.","Prefer an explicit connection whenever the mesh comes from elsewhere or must be visible/editable.","MeshPickEvent uniquely maps config.targetMesh \u2192 its 'asset' input; SetProperty maps config.target \u2192 'object'.","","## \u26A0 Event Block Signal Gotcha","Event blocks have TWO signal outputs with very different meanings:"," \u2022 'out' \u2014 fires ONCE at graph startup (initialization). Use for setup logic."," \u2022 'done' \u2014 fires EACH TIME the event occurs (click, tick, etc). Use for reactions.","For MeshPickEvent, PointerOverEvent, PointerOutEvent, SceneTickEvent:"," \u2192 Always connect 'done' (not 'out') to your reaction logic.","For SceneReadyEvent: 'out' is correct (scene ready fires once).","","## Context Variables","Variables persist across graph executions and can be shared between blocks:","- SetVariable stores a value","- GetVariable retrieves a value","- Use set_variable tool to initialize values before export"].join(`
107
107
  `)}]})),le.registerPrompt("create-click-handler",{description:"Create a flow graph that responds to mesh clicks"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a flow graph that responds when a mesh is clicked. Steps:","1. create_graph with name 'ClickHandler'","2. Add MeshPickEvent block with config: { targetMesh: { type: 'Mesh', name: 'TARGET_MESH_NAME' } }"," \u26A0 targetMesh is REQUIRED \u2014 without it, click events silently never fire.","3. Add ConsoleLog block to log the picked point","4. Connect MeshPickEvent.done \u2192 ConsoleLog.in \u26A0 Use 'done', NOT 'out'!"," ('out' fires once at startup; 'done' fires on each click)","5. Connect data: connect_data MeshPickEvent.pickedPoint \u2192 ConsoleLog.message","6. validate_graph, then export_graph_json"].join(`
@@ -114,7 +114,7 @@ ${Sv()}`}]})),le.registerResource("rich-types","flow-graph://rich-types",{},asyn
114
114
 
115
115
  MCP Session URL: ${i}`}]}}),le.registerTool("delete_graph",{description:"Delete a flow graph from memory.",inputSchema:{name:_().describe("Name of the flow graph to delete")}},async({name:e})=>{const t=_e.deleteGraph(e);return t&&Be.closeSessionForName(e),{content:[{type:"text",text:t?`Deleted "${e}".`:`Graph "${e}" not found.`}]}}),le.registerTool("clear_all",{description:"Remove all flow graphs from memory, resetting the server to a clean state."},async()=>{const e=_e.listGraphs();_e.clearAll();for(const t of e)Be.closeSessionForName(t);return{content:[{type:"text",text:e.length>0?`Cleared ${e.length} flow graph(s): ${e.join(", ")}`:"Nothing to clear \u2014 memory was already empty."}]}}),le.registerTool("list_graphs",{description:"List all flow graphs currently in memory."},async()=>{const e=_e.listGraphs();return{content:[{type:"text",text:e.length>0?`Flow graphs in memory:
116
116
  ${e.map(t=>` \u2022 ${t}`).join(`
117
- `)}`:"No flow graphs in memory."}]}}),le.registerTool("get_session_url",{description:"Get or create a live-session URL for a flow graph. The URL can be pasted into the Flow Graph Editor MCP session panel.",inputSchema:{graphName:_().describe("Name of the flow graph")}},async({graphName:e})=>{if(!_e.listGraphs().includes(e))return Nn(`Graph "${e}" not found.`);const r=await Be.startAsync(_e),i=Be.createSession(e),n=Be.getSessionUrl(i,r);return on(`MCP Session URL: ${n}`)}),le.registerTool("start_session",{description:"Start a live editor session for a flow graph and return its URL.",inputSchema:{graphName:_().describe("Name of the flow graph")}},async({graphName:e})=>{if(!_e.listGraphs().includes(e))return Nn(`Graph "${e}" not found.`);const r=await Be.startAsync(_e),i=Be.createSession(e),n=Be.getSessionUrl(i,r);return on(`Started Flow Graph editor session for "${e}".
117
+ `)}`:"No flow graphs in memory."}]}}),le.registerTool("get_session_url",{description:"Get or create a live-session URL for a flow graph. The URL can be pasted into the Flow Graph Editor MCP session panel.",inputSchema:{graphName:_().describe("Name of the flow graph")}},async({graphName:e})=>{if(!_e.listGraphs().includes(e))return xn(`Graph "${e}" not found.`);const r=await Be.startAsync(_e),i=Be.createSession(e),n=Be.getSessionUrl(i,r);return on(`MCP Session URL: ${n}`)}),le.registerTool("start_session",{description:"Start a live editor session for a flow graph and return its URL.",inputSchema:{graphName:_().describe("Name of the flow graph")}},async({graphName:e})=>{if(!_e.listGraphs().includes(e))return xn(`Graph "${e}" not found.`);const r=await Be.startAsync(_e),i=Be.createSession(e),n=Be.getSessionUrl(i,r);return on(`Started Flow Graph editor session for "${e}".
118
118
 
119
119
  MCP Session URL: ${n}`)}),le.registerTool("close_session",{description:"Close the live editor session for a flow graph without stopping the MCP server.",inputSchema:{graphName:_().describe("Name of the flow graph")}},async({graphName:e})=>{const t=Be.closeSessionForName(e);return on(t?`Closed MCP session for "${e}".`:`No active MCP session found for "${e}".`)}),le.registerTool("stop_session_server",{description:"Stop the local Flow Graph MCP HTTP/SSE session server and close all active sessions."},async()=>(await Be.stopAsync(),on("Flow Graph MCP session server stopped."))),le.registerTool("add_block",{description:"Add a new block to a flow graph. Returns the block's id for use in connect_signal/connect_data.",inputSchema:{graphName:_().describe("Name of the flow graph to add the block to"),blockType:_().describe("The block type from the registry (e.g. 'SceneReadyEvent', 'Branch', 'ConsoleLog', 'Add', 'SetProperty'). Use list_block_types to see all available types."),name:_().optional().describe("Human-friendly name for this block instance (e.g. 'checkCondition', 'logResult')"),config:he(_(),fe()).optional().describe(`Block-specific configuration. Examples:
120
120
  - Constant: { value: 42 } or { value: { "value": [1,2,3], "className": "Vector3" } }
@@ -142,7 +142,7 @@ TIP: Rich-type values like Mesh references use { type: 'Mesh', name: 'meshName'
142
142
  - number: 42
143
143
  - string: "hello"
144
144
  - boolean: true
145
- - Vector3: { "value": [1, 2, 3], "className": "Vector3" }`)}},async({graphName:e,variableName:t,value:r})=>{const i=_e.setVariable(e,t,r);return i==="OK"&&ft(e),{content:[{type:"text",text:i==="OK"?`Set variable "${t}" = ${JSON.stringify(r)}`:`Error: ${i}`}],isError:i!=="OK"}}),le.registerTool("describe_graph",{description:"Get a human-readable description of a flow graph, including all blocks, their connections, and context variables.",inputSchema:{graphName:_().describe("Name of the flow graph to describe")}},async({graphName:e})=>({content:[{type:"text",text:_e.describeGraph(e)}]})),le.registerTool("describe_block",{description:"Get detailed information about a specific block instance, including all its connections and configuration.",inputSchema:{graphName:_().describe("Name of the flow graph"),blockId:ee().describe("The block id to describe")}},async({graphName:e,blockId:t})=>({content:[{type:"text",text:_e.describeBlock(e,t)}]})),le.registerTool("list_block_types",{description:"List all available Flow Graph block types, grouped by category. Use this to discover which blocks you can add.",inputSchema:{category:_().optional().describe("Optionally filter by category (Event, Execution, ControlFlow, Animation, Data, Math, Vector, Matrix, Combine, Extract, Conversion, Utility)")}},async({category:e})=>{if(e){const t=Object.entries(Ft).filter(([,r])=>r.category.toLowerCase()===e.toLowerCase()).map(([r,i])=>` ${r} (${i.className}): ${i.description.split(".")[0]}`).join(`
145
+ - Vector3: { "value": [1, 2, 3], "className": "Vector3" }`)}},async({graphName:e,variableName:t,value:r})=>{const i=_e.setVariable(e,t,r);return i==="OK"&&ft(e),{content:[{type:"text",text:i==="OK"?`Set variable "${t}" = ${JSON.stringify(r)}`:`Error: ${i}`}],isError:i!=="OK"}}),le.registerTool("describe_graph",{description:"Get a human-readable description of a flow graph, including all blocks, their connections, and context variables.",inputSchema:{graphName:_().describe("Name of the flow graph to describe")}},async({graphName:e})=>({content:[{type:"text",text:_e.describeGraph(e)}]})),le.registerTool("describe_block",{description:"Get detailed information about a specific block instance, including all its connections and configuration.",inputSchema:{graphName:_().describe("Name of the flow graph"),blockId:ee().describe("The block id to describe")}},async({graphName:e,blockId:t})=>({content:[{type:"text",text:_e.describeBlock(e,t)}]})),le.registerTool("list_block_types",{description:"List all available Flow Graph block types, grouped by category. Use this to discover which blocks you can add.",inputSchema:{category:_().optional().describe("Optionally filter by category (Event, Execution, ControlFlow, Animation, Data, Math, Vector, Matrix, Combine, Extract, Conversion, Utility)")}},async({category:e})=>{if(e){const t=Object.entries(Mt).filter(([,r])=>r.category.toLowerCase()===e.toLowerCase()).map(([r,i])=>` ${r} (${i.className}): ${i.description.split(".")[0]}`).join(`
146
146
  `);return{content:[{type:"text",text:t.length>0?`## ${e} Blocks
147
147
  ${t}`:`No blocks found in category "${e}".`}]}}return{content:[{type:"text",text:Sv()}]}}),le.registerTool("get_block_type_info",{description:"Get detailed info about a specific block type \u2014 its signal/data connections, config options, and description.",inputSchema:{blockType:_().describe("The block type name (e.g. 'Branch', 'SetProperty', 'FlowGraphBranchBlock')")}},async({blockType:e})=>{const t=CT(e);if(!t)return{content:[{type:"text",text:`Block type "${e}" not found. Use list_block_types to see available types.`}],isError:!0};const r=[];r.push(`## ${e} (${t.className})`),r.push(`Category: ${t.category}`),r.push(`Description: ${t.description}`),r.push(`
148
148
  ### Signal Inputs:`),t.signalInputs.length===0&&r.push(" (none \u2014 this is a data-only block)");for(const i of t.signalInputs)r.push(` \u2022 ${i.name}${i.description?` \u2014 ${i.description}`:""}`);r.push(`
@@ -151,7 +151,7 @@ ${t}`:`No blocks found in category "${e}".`}]}}return{content:[{type:"text",text
151
151
  ### Data Outputs:`),t.dataOutputs.length===0&&r.push(" (none)");for(const i of t.dataOutputs)r.push(` \u2022 ${i.name}: ${i.type}${i.description?` \u2014 ${i.description}`:""}`);if(t.config){r.push(`
152
152
  ### Configuration (config object):`);for(const[i,n]of Object.entries(t.config))r.push(` \u2022 ${i}: ${n}`)}return{content:[{type:"text",text:r.join(`
153
153
  `)}]}}),le.registerTool("validate_graph",{description:"Run validation checks on a flow graph. Reports missing connections, unreachable blocks, and broken references.",inputSchema:{graphName:_().describe("Name of the flow graph to validate")}},async({graphName:e})=>{const t=_e.validateGraph(e);return{content:[{type:"text",text:t.join(`
154
- `)}],isError:t.some(r=>r.startsWith("ERROR"))}}),le.registerTool("export_graph_json",{description:"Export the flow graph as Babylon.js-compatible JSON at the coordinator level. This JSON can be loaded via FlowGraphCoordinator.parse() at runtime. When outputFile is provided, the JSON is written to disk and only the file path is returned (avoids large JSON payloads in the conversation context).",inputSchema:{graphName:_().describe("Name of the flow graph to export"),graphOnly:ze().default(!1).describe("If true, exports only the graph-level JSON (without the coordinator wrapper). Useful for embedding in glTF or other formats."),outputFile:vT(ks)}},async({graphName:e,graphOnly:t,outputFile:r})=>hT({jsonText:t?_e.exportGraphJSON(e):_e.exportJSON(e),outputFile:r,missingMessage:`Graph "${e}" not found.`,fileLabel:"Flow Graph JSON"})),le.registerTool("import_graph_json",{description:"Import an existing Flow Graph JSON into memory for editing. Accepts either coordinator-level or graph-level JSON. Provide either the inline json string OR a jsonFile path (not both).",inputSchema:{graphName:_().describe("Name to give the imported flow graph"),json:yT(ks,"The Flow Graph JSON string to import"),jsonFile:_T(ks,"Absolute path to a file containing the Flow Graph JSON to import (alternative to inline json)")}},async({graphName:e,json:t,jsonFile:r})=>gT({json:t,jsonFile:r,fileDescription:"Flow Graph JSON file",importJson:i=>RT(e,i),describeImported:()=>_e.describeGraph(e)})),le.registerTool("add_blocks_batch",{description:"Add multiple blocks at once. More efficient than calling add_block repeatedly. Returns all created block ids.",inputSchema:{graphName:_().describe("Name of the flow graph"),blocks:ie(U({blockType:_().optional().describe("Block type name from the registry"),type:_().optional().describe("Alias for blockType"),name:_().optional().describe("Instance name for the block"),config:he(_(),fe()).optional().describe("Block configuration")})).describe("Array of blocks to add")}},async({graphName:e,blocks:t})=>{const r=[];let i=!1;for(const n of t){const o=n.blockType??n.type;if(!o){r.push("Error: block definition missing blockType (or type alias)");continue}const a=_e.addBlock(e,o,n.name,n.config);typeof a=="string"?r.push(`Error adding ${o}: ${a}`):(i=!0,r.push(`[${a.id}] ${a.name} (${o})`))}return i&&ft(e),{content:[{type:"text",text:`Added blocks:
154
+ `)}],isError:t.some(r=>r.startsWith("ERROR"))}}),le.registerTool("export_graph_json",{description:"Export the flow graph as Babylon.js-compatible JSON at the coordinator level. This JSON can be loaded via FlowGraphCoordinator.parse() at runtime. When outputFile is provided, the JSON is written to disk and only the file path is returned (avoids large JSON payloads in the conversation context).",inputSchema:{graphName:_().describe("Name of the flow graph to export"),graphOnly:ze().default(!1).describe("If true, exports only the graph-level JSON (without the coordinator wrapper). Useful for embedding in glTF or other formats."),outputFile:vT(ws)}},async({graphName:e,graphOnly:t,outputFile:r})=>hT({jsonText:t?_e.exportGraphJSON(e):_e.exportJSON(e),outputFile:r,missingMessage:`Graph "${e}" not found.`,fileLabel:"Flow Graph JSON"})),le.registerTool("import_graph_json",{description:"Import an existing Flow Graph JSON into memory for editing. Accepts either coordinator-level or graph-level JSON. Provide either the inline json string OR a jsonFile path (not both).",inputSchema:{graphName:_().describe("Name to give the imported flow graph"),json:yT(ws,"The Flow Graph JSON string to import"),jsonFile:_T(ws,"Absolute path to a file containing the Flow Graph JSON to import (alternative to inline json)")}},async({graphName:e,json:t,jsonFile:r})=>gT({json:t,jsonFile:r,fileDescription:"Flow Graph JSON file",importJson:i=>RT(e,i),describeImported:()=>_e.describeGraph(e)})),le.registerTool("add_blocks_batch",{description:"Add multiple blocks at once. More efficient than calling add_block repeatedly. Returns all created block ids.",inputSchema:{graphName:_().describe("Name of the flow graph"),blocks:ie(U({blockType:_().optional().describe("Block type name from the registry"),type:_().optional().describe("Alias for blockType"),name:_().optional().describe("Instance name for the block"),config:he(_(),fe()).optional().describe("Block configuration")})).describe("Array of blocks to add")}},async({graphName:e,blocks:t})=>{const r=[];let i=!1;for(const n of t){const o=n.blockType??n.type;if(!o){r.push("Error: block definition missing blockType (or type alias)");continue}const a=_e.addBlock(e,o,n.name,n.config);typeof a=="string"?r.push(`Error adding ${o}: ${a}`):(i=!0,r.push(`[${a.id}] ${a.name} (${o})`))}return i&&ft(e),{content:[{type:"text",text:`Added blocks:
155
155
  ${r.join(`
156
156
  `)}`}]}}),le.registerTool("connect_signals_batch",{description:"Connect multiple signal pairs at once.",inputSchema:{graphName:_().optional().describe("Name of the flow graph"),name:_().optional().describe("Alias for graphName"),connections:ie(U({sourceBlockId:ee(),signalOutputName:_().optional().describe("Signal output name on source block"),signalOut:_().optional().describe("Alias for signalOutputName"),outputName:_().optional().describe("Alias for signalOutputName"),targetBlockId:ee(),signalInputName:_().optional().describe("Signal input name on target block (default: 'in')"),signalIn:_().optional().describe("Alias for signalInputName"),inName:_().optional().describe("Alias for signalInputName"),inputName:_().optional().describe("Alias for signalInputName"),graphName:_().optional().describe("Ignored here \u2014 use top-level graphName")})).describe("Array of signal connections to make")}},async({graphName:e,name:t,connections:r})=>{let i;try{i=dT({candidates:[{label:"'graphName'",value:e},{label:"'name'",value:t}]})}catch(a){return{content:[{type:"text",text:a.message}],isError:!0}}const n=[];let o=!1;for(const a of r){const s=a.signalOutputName??a.signalOut??a.outputName??"out",c=a.signalInputName??a.signalIn??a.inName??a.inputName??"in",u=_e.connectSignal(i,a.sourceBlockId,s,a.targetBlockId,c);u==="OK"&&(o=!0),n.push(u==="OK"?`[${a.sourceBlockId}].${s} \u2192 [${a.targetBlockId}].${c}`:`Error: ${u}`)}return o&&ft(i),{content:[{type:"text",text:`Signal connections:
157
157
  ${n.join(`