@babylonjs/mcp-servers 9.26.1 → 9.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,42 +1,42 @@
1
1
  #!/usr/bin/env node
2
- import Ll from"node:process";import*as sa from"node:crypto";import*as L$ from"node:http";import{dirname as F$}from"node:path";import{mkdirSync as V$,writeFileSync as G$,readFileSync as q$}from"node:fs";function J$(e){return e}function K$(e){return e}function ca(){return e=>e}function H$(e){}function W$(e){throw new Error("Unexpected value in exhaustive check")}function X$(e){}function ua(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 N(e,t="|"){return e.map(r=>F(r)).join(t)}function ri(e,t){return typeof t=="bigint"?t.toString():t}function Yn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function la(e){return e==null}function ii(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function da(e,t){const r=e/t,i=Math.round(r),n=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}const Fl=Symbol("evaluating");function Vl(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Fl)return i===void 0&&(i=Fl,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Y$(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Re(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function zt(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function Q$(e){return zt(e._zod.def)}function e_(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function t_(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 n_(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 yt(e){return JSON.stringify(e)}function Gl(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const fa="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Sn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const ql=Yn(()=>{if(Qe.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Rt(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 Qn(e){return Rt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function r_(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const i_=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}`)}},oi=new Set(["string","number","symbol"]),Jl=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Zt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ee(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function E(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 o_(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 F(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Kl(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const Hl={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]},Wl={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Xl(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=zt(e._zod.def,{get shape(){const a={};for(const s of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(r.shape,s))throw new Error(`Unrecognized key: "${String(s)}"`);t[s]&&Re(a,s,r.shape[s])}return Re(this,"shape",a),a},checks:[]});return Ee(e,o)}function Yl(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=zt(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const s of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(r.shape,s))throw new Error(`Unrecognized key: "${String(s)}"`);t[s]&&delete a[s]}return Re(this,"shape",a),a},checks:[]});return Ee(e,o)}function Ql(e,t){if(!Rt(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 of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=zt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Re(this,"shape",o),o}});return Ee(e,n)}function ed(e,t){if(!Rt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=zt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Re(this,"shape",i),i}});return Ee(e,r)}function td(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=zt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Re(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ee(e,r)}function ma(e,t,r,i="partial"){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${i}() cannot be used on object schemas containing refinements`);const s=zt(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(r)for(const l of Reflect.ownKeys(r)){if(!Object.prototype.hasOwnProperty.call(c,l))throw new Error(`Unrecognized key: "${String(l)}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(const l of Reflect.ownKeys(c))u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Re(this,"shape",u),u},checks:[]});return Ee(t,s)}function nd(e,t,r){const i=zt(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const a of Reflect.ownKeys(r)){if(!Object.prototype.hasOwnProperty.call(o,a))throw new Error(`Unrecognized key: "${String(a)}"`);r[a]&&(o[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a of Reflect.ownKeys(n))o[a]=new e({type:"nonoptional",innerType:n[a]});return Re(this,"shape",o),o}});return Ee(t,i)}function an(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 rd(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 vt(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function In(e){return typeof e=="string"?e:e?.message}function pa(e,t,r){var i;for(let n=t;n<e.length;n++)(i=e[n]).schema??(i.schema=r)}function $t(e,t,r){var i;const n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?(i=e).schema??(i.schema=e.inst):e.schema=e.inst);const o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:In(e.inst?._zod.def?.error?.(e))??In(o?.(e))??In(t?.error?.(e))??In(r.customError?.(e))??In(r.localeError?.(e))??"Invalid input",{inst:s,schema:c,continue:u,input:l,...d}=e;return d.path??(d.path=[]),d.message=a,t?.reportInput&&(d.input=l),d}function ai(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}const a_=/[\uD800-\uDBFF]/;function er(e){const t=e.length;if(!a_.test(e))return t;let r=t;for(let i=0;i<t-1;i++)(e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320&&(r--,i++);return r}function si(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function V(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 On(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function s_(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function id(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 od(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function c_(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return id(t+r)}function u_(e){return od(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function l_(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 d_(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class f_{constructor(...t){}}function ad(e,t){for(const r in t){const i=Object.getOwnPropertyDescriptor(t,r);i.get?Object.defineProperty(e,r,{...i,enumerable:!1}):m_(e,r,i.value)}}function Jt(e,t,r,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:r}),r}function ha(e,t,r){return Jt(e,t,r,!1)}function m_(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:Jt(this,t,r.bind(this))},set(i){Jt(this,t,i)}})}function p_(e,t){const r=Object.getPrototypeOf(e);return t in r?void 0:r}let ga,Kt=!1;const h_={configurable:!0,get(){Kt=!0}};function de(e,t,r){const i=Object.getPrototypeOf(e._zod);if(t in i&&ga!==e._zod){ga=void 0;return}ga=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,h_);const n=Kt;Kt=!1;try{const o=r(this);return Kt?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o}),Kt=Kt||n,o}catch(o){throw delete this[t],Kt=Kt||n,o}},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})}function ya(e,t,r,i){const n=p_(e,t);n&&Object.defineProperty(n,t,{configurable:!0,get(){const o={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,o),o.value=r(this),Object.defineProperty(this,t,o),o.value},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:o})}})}const va="~constantCatch";function $a(e){const t=()=>e;return t[va]=!0,t}var sd=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:Wl,CONSTANT_CATCH:va,Class:f_,NUMBER_FORMAT_RANGES:Hl,aborted:an,allowsEval:ql,assert:X$,assertEqual:J$,assertIs:H$,assertNever:W$,assertNotEqual:K$,assignProp:Re,attachSchema:pa,base64ToUint8Array:id,base64urlToUint8Array:c_,cached:Yn,captureStackTrace:fa,cleanEnum:s_,cleanRegex:ii,clone:Ee,cloneDef:Q$,codePointLength:er,constantCatch:$a,createTransparentProxy:o_,defineLazy:Vl,defineLazyInternal:de,esc:yt,escapeRegex:Zt,explicitlyAborted:rd,extend:Ql,finalizeIssue:$t,floatSafeRemainder:da,getElementAtPath:e_,getEnumValues:ua,getLengthableOrigin:si,getParsedType:i_,getSizableOrigin:ai,hexToUint8Array:l_,hide:ha,installLazyProp:ya,isObject:Sn,isPlainObject:Rt,issue:On,joinValues:N,jsonStringifyReplacer:ri,members:ad,merge:td,mergeDefs:zt,normalizeParams:E,nullish:la,numKeys:r_,objectClone:Y$,omit:Yl,optionalKeys:Kl,own:Jt,parsedType:V,partial:ma,pick:Xl,prefixIssues:vt,primitiveTypes:Jl,promiseAllObject:t_,propertyKeyTypes:oi,randomString:n_,required:nd,safeExtend:ed,shallowClone:Qn,slugify:Gl,stringifyPrimitive:F,toZod:ca,uint8ArrayToBase64:od,uint8ArrayToBase64url:u_,uint8ArrayToHex:d_,unwrapMessage:In}),cd;const ud=Object.freeze({status:"aborted"}),_a={value:void 0,enumerable:!1};let ld="captureStackTrace"in Error?Error:null;function g_(e){const t=ld;if(t){const r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return ld=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function w(e,t,r,i){const n={};function o(m){this.def=m,this.constr=d,this.traits=new Set}o.prototype=n;const a=r,s=a&&new WeakSet;function c(m,f){if(!m._zod){_a.value=new o(f);try{Object.defineProperty(m,"_zod",_a)}finally{_a.value=void 0}}if(m._zod.traits.has(e))return;if(m._zod.traits.add(e),t(m,f),s){const y=Object.getPrototypeOf(m),h=m._zod.constr.prototype;let $=y;for(;$&&$!==h;)$=Object.getPrototypeOf($);const g=$??y;s.has(g)||(s.add(g),ad(g,a))}const p=d.prototype;for(const y in p)Object.prototype.hasOwnProperty.call(p,y)&&(y in m||(m[y]=p[y].bind(m)))}const u=i?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:e});function d(m){const f=i?.Parent?g_(l):this;c(f,m);const p=f._zod.deferred;if(p){for(const h of p)h();f._zod.deferred=void 0}const y=globalThis.__zod_globalConfig?.postProcessor;return y&&y(f),f}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:m=>i?.Parent&&m instanceof i.Parent?!0:m?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}const dd=Symbol("zod_brand");class Mt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ci extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(cd=globalThis).__zod_globalConfig??(cd.__zod_globalConfig={});const Qe=globalThis.__zod_globalConfig;function Ve(e){return e&&Object.assign(Qe,e),Qe}function y_(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,ri,2)),e.message}function v_(e){this._zod.message=e}const $_={get:y_,set:v_,enumerable:!0,configurable:!0},ba={value:void 0,enumerable:!1},ka={value:void 0,enumerable:!1},fd=new WeakSet([Object.prototype,Error.prototype]),md=(e,t)=>{e.name="$ZodError",ba.value=e._zod,Object.defineProperty(e,"_zod",ba),ka.value=t,Object.defineProperty(e,"issues",ka),ba.value=void 0,ka.value=void 0,Object.defineProperty(e,"message",$_);const r=Object.getPrototypeOf(e);fd.has(r)||(fd.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){const i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}}))},wa=w("$ZodError",md),lt=w("$ZodError",md,void 0,{Parent:Error});function __(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function Sa(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?__(r,n.path[0],()=>[]).push(t(n)):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Ia(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],d=u===s.length-1;if(l==="_errors"){d&&c._errors.push(t(a)),u++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const m=c[l];d&&m._errors.push(t(a)),c=m,u++}}}};return i(e),r}function pd(e,t=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var a;for(const s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{const c=[...o,...s.path];if(c.length===0){r.errors.push(t(s));continue}let u=r,l=0;for(;l<c.length;){const d=c[l],m=l===c.length-1;typeof d=="string"?(u.properties??(u.properties={}),Object.prototype.hasOwnProperty.call(u.properties,d)||Object.defineProperty(u.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),u=u.properties[d]):(u.items??(u.items=[]),(a=u.items)[d]??(a[d]={errors:[]}),u=u.items[d]),m&&u.errors.push(t(s)),l++}}};return i(e),r}function hd(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 gd(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 ${hd(i.path)}`);return t.join(`
3
- `)}function ui(e,t){return{callee:t?.callee??e,Err:t?.Err}}const tr=e=>{const t=(r,i,n,o)=>{const a=n?{...n,async:!1}:{async:!1},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new Mt;if(s.issues.length){const c=new(o?.Err??e)(s.issues.map(u=>$t(u,a,Ve())));throw fa(c,o?.callee??t),c}return s.value};return t},li=tr(lt),nr=e=>{const t=async(r,i,n,o)=>{const a=n?{...n,async:!0}:{async:!0};let s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){const c=new(o?.Err??e)(s.issues.map(u=>$t(u,a,Ve())));throw fa(c,o?.callee??t),c}return s.value};return t},di=nr(lt),rr=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 Mt;return o.issues.length?{success:!1,error:new(e??wa)(o.issues.map(a=>$t(a,n,Ve())))}:{success:!0,data:o.value}},fi=rr(lt),ir=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=>$t(a,n,Ve())))}:{success:!0,data:o.value}},mi=ir(lt),b_=Symbol.for("zod.compile.invalid"),k_=Symbol.for("zod.compile.fallback"),yd=((e,t,r)=>{const i=e._zod.bag.validator;return i!==void 0&&i(t)!==b_?!0:w_(e,t,r)});function w_(e,t,r){const i=r?{...r,async:!1}:{async:!1},n=e._zod.bag.fallbackRun;let o;if(n?(i[k_]=!0,o=n({value:t,issues:[]},i)):o=e._zod.run({value:t,issues:[]},i),o instanceof Promise)throw new Mt;return o.issues.length===0}const vd=async(e,t,r)=>{const i=r?{...r,async:!0}:{async:!0};let n=e._zod.run({value:t,issues:[]},i);return n instanceof Promise&&(n=await n),n.issues.length===0},Oa=e=>{const t=tr(e),r=(i,n,o,a)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return t(i,n,s,ui(r,a))};return r},S_=Oa(lt),za=e=>{const t=tr(e),r=(i,n,o,a)=>t(i,n,o,ui(r,a));return r},I_=za(lt),xa=e=>{const t=nr(e),r=async(i,n,o,a)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return await t(i,n,s,ui(r,a))};return r},O_=xa(lt),Ta=e=>{const t=nr(e),r=async(i,n,o,a)=>await t(i,n,o,ui(r,a));return r},z_=Ta(lt),Pa=e=>(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return rr(e)(t,r,n)},x_=Pa(lt),Na=e=>(t,r,i)=>rr(e)(t,r,i),T_=Na(lt),Ea=e=>async(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return ir(e)(t,r,n)},P_=Ea(lt),Da=e=>async(t,r,i)=>ir(e)(t,r,i),N_=Da(lt),$d=/^[cC][0-9a-z]{6,}$/,_d=/^[0-9a-z]+$/,bd=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,kd=/^[0-9a-vA-V]{20}$/,wd=/^[A-Za-z0-9]{27}$/,Sd=/^[a-zA-Z0-9_-]{21}$/;function Id(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const Od=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,E_=/^[-+]?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)?)??$/,zd=/^([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})$/,zn=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)$/,D_=zn(4),j_=zn(6),C_=zn(7),xd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,A_=/^[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])?)*$/,U_=/^(([^<>()\[\]\\.,;:\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,}))$/,Td=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,R_=Td,Z_=/^[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])?)*$/,M_="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Pd(){return new RegExp(M_,"u")}const Nd=/^(?:(?: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])$/,Ed=/^(([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}|:))$/,Dd=e=>{const t=Zt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},jd=/^((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])$/,Cd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ad=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ja=/^[A-Za-z0-9_-]*$/,Ud=/^(?=.{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])?)*\.?$/,Rd=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Ca=/^https?$/,Zd=/^\+[1-9]\d{6,14}$/,Aa=/^\d(?:[ -]?\d){11,18}$/,Md="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function B_(e){return new RegExp(`^${e}$`)}const Bd=B_(Md);function Ua(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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ld(e){return new RegExp(`^${Ua(e)}$`)}function Fd(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${Ua({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,i=e.local?`${r}|${Ua({precision:e.precision})}`:r;return new RegExp(`^${Md}T(?:${i})$`)}const Vd=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Gd=/^-?\d+n?$/,Ra=/^-?\d+$/,or=/^-?\d+(?:\.\d+)?$/,qd=/^(?:true|false)$/i,Jd=/^null$/i,Kd=/^undefined$/i,Hd=/^[^A-Z]*$/,Wd=/^[^a-z]*$/,Xd=/^[0-9a-fA-F]*$/;function ar(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function sr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const L_=/^[0-9a-fA-F]{32}$/,F_=ar(22,"=="),V_=sr(22),G_=/^[0-9a-fA-F]{40}$/,q_=ar(27,"="),J_=sr(27),K_=/^[0-9a-fA-F]{64}$/,H_=ar(43,"="),W_=sr(43),X_=/^[0-9a-fA-F]{96}$/,Y_=ar(64,""),Q_=sr(64),eb=/^[0-9a-fA-F]{128}$/,tb=ar(86,"=="),nb=sr(86);var Za=Object.freeze({__proto__:null,base64:Ad,base64url:ja,bigint:Gd,boolean:qd,browserEmail:Z_,cidrv4:jd,cidrv6:Cd,creditCard:Aa,cuid:$d,cuid2:_d,date:Bd,datetime:Fd,domain:Rd,duration:Od,e164:Zd,email:xd,emoji:Pd,extendedDuration:E_,guid:zd,hex:Xd,hostname:Ud,html5Email:A_,httpProtocol:Ca,idnEmail:R_,integer:Ra,ipv4:Nd,ipv6:Ed,ksuid:wd,lowercase:Hd,mac:Dd,md5_base64:F_,md5_base64url:V_,md5_hex:L_,nanoid:Sd,nanoidOfLength:Id,null:Jd,number:or,rfc5322Email:U_,sha1_base64:q_,sha1_base64url:J_,sha1_hex:G_,sha256_base64:H_,sha256_base64url:W_,sha256_hex:K_,sha384_base64:Y_,sha384_base64url:Q_,sha384_hex:X_,sha512_base64:tb,sha512_base64url:nb,sha512_hex:eb,string:Vd,time:Ld,ulid:bd,undefined:Kd,unicodeEmail:Td,uppercase:Wd,uuid:zn,uuid4:D_,uuid6:j_,uuid7:C_,xid:kd});const De=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Ma=e=>{const t=e.value;return!la(t)&&t.size!==void 0},Ba=e=>{const t=e.value;return!la(t)&&t.length!==void 0},pi={number:"number",bigint:"bigint",object:"date"},La=w("$ZodCheckLessThan",(e,t)=>{De.init(e,t);const r=pi[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:pi[typeof i.value]??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})}}),Fa=w("$ZodCheckGreaterThan",(e,t)=>{De.init(e,t);const r=pi[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:pi[typeof i.value]??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})}}),Yd=w("$ZodCheckMultipleOf",(e,t)=>{De.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"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):da(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})}}),Qd=w("$ZodCheckNumberFormat",(e,t)=>{De.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Hl[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=Ra)}),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})}}),ef=w("$ZodCheckBigIntFormat",(e,t)=>{De.init(e,t);const[r,i]=Wl[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})}}),tf=w("$ZodCheckMaxSize",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Ma),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:ai(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),nf=w("$ZodCheckMinSize",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Ma),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:ai(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),rf=w("$ZodCheckSizeEquals",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Ma),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:ai(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})}}),of=w("$ZodCheckMaxLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Ba),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,o=n.length;if((typeof n=="string"&&o>t.maximum?er(n):o)<=t.maximum)return;const s=si(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),af=w("$ZodCheckMinLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Ba),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,o=n.length;if((typeof n=="string"&&o>=t.minimum&&o<t.minimum*2?er(n):o)>=t.minimum)return;const s=si(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),sf=w("$ZodCheckLengthEquals",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Ba),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,a=typeof n=="string"&&o>=t.length&&o<=t.length*2?er(n):o;if(a===t.length)return;const s=si(n),c=a>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),cr=w("$ZodCheckStringFormat",(e,t)=>{var r,i;De.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=()=>{})}),cf=w("$ZodCheckRegex",(e,t)=>{cr.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})}}),uf=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Hd),cr.init(e,t)}),lf=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Wd),cr.init(e,t)}),df=w("$ZodCheckIncludes",(e,t)=>{De.init(e,t);const r=Zt(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})}}),ff=w("$ZodCheckStartsWith",(e,t)=>{De.init(e,t);const r=new RegExp(`^${Zt(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})}}),mf=w("$ZodCheckEndsWith",(e,t)=>{De.init(e,t);const r=new RegExp(`.*${Zt(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 pf(e,t,r){e.issues.length&&t.issues.push(...vt(r,e.issues))}const Va=w("$ZodCheckProperty",(e,t)=>{De.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=>pf(n,r,t.property));pf(i,r,t.property)}}),hf=w("$ZodCheckMimeType",(e,t)=>{De.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})}}),gf=w("$ZodCheckOverwrite",(e,t)=>{De.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Ga{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}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 ql from"node:process";import*as la from"node:crypto";import*as W$ from"node:http";import{dirname as Y$}from"node:path";import{mkdirSync as X$,writeFileSync as Q$,readFileSync as e_}from"node:fs";function t_(e){return e}function n_(e){return e}function da(){return e=>e}function r_(e){}function i_(e){throw new Error("Unexpected value in exhaustive check")}function o_(e){}function fa(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 N(e,t="|"){return e.map(r=>F(r)).join(t)}function si(e,t){return typeof t=="bigint"?t.toString():t}function rr(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ma(e){return e==null}function ci(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function pa(e,t){const r=e/t,i=Math.round(r),n=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}const Jl=Symbol("evaluating");function Kl(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Jl)return i===void 0&&(i=Jl,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function a_(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ze(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Et(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function s_(e){return Et(e._zod.def)}function c_(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function u_(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 l_(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 bt(e){return JSON.stringify(e)}function Hl(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ha="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Pn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Wl=rr(()=>{if(nt.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ft(e){if(Pn(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Pn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function ir(e){return Ft(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function d_(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const f_=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}`)}},ui=new Set(["string","number","symbol"]),Yl=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Vt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ee(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function E(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 m_(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 F(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Xl(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const Ql={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]},ed={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function td(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=Et(e._zod.def,{get shape(){const a={};for(const s of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(r.shape,s))throw new Error(`Unrecognized key: "${String(s)}"`);t[s]&&Ze(a,s,r.shape[s])}return Ze(this,"shape",a),a},checks:[]});return Ee(e,o)}function nd(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=Et(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const s of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(r.shape,s))throw new Error(`Unrecognized key: "${String(s)}"`);t[s]&&delete a[s]}return Ze(this,"shape",a),a},checks:[]});return Ee(e,o)}function rd(e,t){if(!Ft(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 of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=Et(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Ze(this,"shape",o),o}});return Ee(e,n)}function id(e,t){if(!Ft(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Et(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Ze(this,"shape",i),i}});return Ee(e,r)}function od(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=Et(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Ze(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ee(e,r)}function ga(e,t,r,i="partial"){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${i}() cannot be used on object schemas containing refinements`);const s=Et(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(r)for(const l of Reflect.ownKeys(r)){if(!Object.prototype.hasOwnProperty.call(c,l))throw new Error(`Unrecognized key: "${String(l)}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(const l of Reflect.ownKeys(c))u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Ze(this,"shape",u),u},checks:[]});return Ee(t,s)}function ad(e,t,r){const i=Et(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const a of Reflect.ownKeys(r)){if(!Object.prototype.hasOwnProperty.call(o,a))throw new Error(`Unrecognized key: "${String(a)}"`);r[a]&&(o[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a of Reflect.ownKeys(n))o[a]=new e({type:"nonoptional",innerType:n[a]});return Ze(this,"shape",o),o}});return Ee(t,i)}function dn(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 sd(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 kt(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function zn(e){return typeof e=="string"?e:e?.message}function ya(e,t,r){var i;for(let n=t;n<e.length;n++)(i=e[n]).schema??(i.schema=r)}function St(e,t,r){var i;const n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?(i=e).schema??(i.schema=e.inst):e.schema=e.inst);const o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:zn(e.inst?._zod.def?.error?.(e))??zn(o?.(e))??zn(t?.error?.(e))??zn(r.customError?.(e))??zn(r.localeError?.(e))??"Invalid input",{inst:s,schema:c,continue:u,input:l,...d}=e;return d.path??(d.path=[]),d.message=a,t?.reportInput&&(d.input=l),d}function li(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}const p_=/[\uD800-\uDBFF]/;function or(e){const t=e.length;if(!p_.test(e))return t;let r=t;for(let i=0;i<t-1;i++)(e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320&&(r--,i++);return r}function di(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function V(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 Nn(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function h_(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function cd(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 ud(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function g_(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return cd(t+r)}function y_(e){return ud(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function v_(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 $_(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class __{constructor(...t){}}function ld(e,t){for(const r in t){const i=Object.getOwnPropertyDescriptor(t,r);i.get?Object.defineProperty(e,r,{...i,enumerable:!1}):b_(e,r,i.value)}}function Xt(e,t,r,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:r}),r}function va(e,t,r){return Xt(e,t,r,!1)}function b_(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:Xt(this,t,r.bind(this))},set(i){Xt(this,t,i)}})}function k_(e,t){const r=Object.getPrototypeOf(e);return t in r?void 0:r}let $a,Qt=!1;const S_={configurable:!0,get(){Qt=!0}};function fe(e,t,r){const i=Object.getPrototypeOf(e._zod);if(t in i&&$a!==e._zod){$a=void 0;return}$a=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,S_);const n=Qt;Qt=!1;try{const o=r(this);return Qt?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o}),Qt=Qt||n,o}catch(o){throw delete this[t],Qt=Qt||n,o}},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})}function _a(e,t,r,i){const n=k_(e,t);n&&Object.defineProperty(n,t,{configurable:!0,get(){const o={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,o),o.value=r(this),Object.defineProperty(this,t,o),o.value},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:o})}})}const ba="~constantCatch";function ka(e){const t=()=>e;return t[ba]=!0,t}var dd=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:ed,CONSTANT_CATCH:ba,Class:__,NUMBER_FORMAT_RANGES:Ql,aborted:dn,allowsEval:Wl,assert:o_,assertEqual:t_,assertIs:r_,assertNever:i_,assertNotEqual:n_,assignProp:Ze,attachSchema:ya,base64ToUint8Array:cd,base64urlToUint8Array:g_,cached:rr,captureStackTrace:ha,cleanEnum:h_,cleanRegex:ci,clone:Ee,cloneDef:s_,codePointLength:or,constantCatch:ka,createTransparentProxy:m_,defineLazy:Kl,defineLazyInternal:fe,esc:bt,escapeRegex:Vt,explicitlyAborted:sd,extend:rd,finalizeIssue:St,floatSafeRemainder:pa,getElementAtPath:c_,getEnumValues:fa,getLengthableOrigin:di,getParsedType:f_,getSizableOrigin:li,hexToUint8Array:v_,hide:va,installLazyProp:_a,isObject:Pn,isPlainObject:Ft,issue:Nn,joinValues:N,jsonStringifyReplacer:si,members:ld,merge:od,mergeDefs:Et,normalizeParams:E,nullish:ma,numKeys:d_,objectClone:a_,omit:nd,optionalKeys:Xl,own:Xt,parsedType:V,partial:ga,pick:td,prefixIssues:kt,primitiveTypes:Yl,promiseAllObject:u_,propertyKeyTypes:ui,randomString:l_,required:ad,safeExtend:id,shallowClone:ir,slugify:Hl,stringifyPrimitive:F,toZod:da,uint8ArrayToBase64:ud,uint8ArrayToBase64url:y_,uint8ArrayToHex:$_,unwrapMessage:zn}),fd;const md=Object.freeze({status:"aborted"}),Sa={value:void 0,enumerable:!1};let pd="captureStackTrace"in Error?Error:null;function w_(e){const t=pd;if(t){const r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return pd=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function S(e,t,r,i){const n={};function o(m){this.def=m,this.constr=d,this.traits=new Set}o.prototype=n;const a=r,s=a&&new WeakSet;function c(m,f){if(!m._zod){Sa.value=new o(f);try{Object.defineProperty(m,"_zod",Sa)}finally{Sa.value=void 0}}if(m._zod.traits.has(e))return;if(m._zod.traits.add(e),t(m,f),s){const y=Object.getPrototypeOf(m),h=m._zod.constr.prototype;let $=y;for(;$&&$!==h;)$=Object.getPrototypeOf($);const g=$??y;s.has(g)||(s.add(g),ld(g,a))}const p=d.prototype;for(const y in p)Object.prototype.hasOwnProperty.call(p,y)&&(y in m||(m[y]=p[y].bind(m)))}const u=i?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:e});function d(m){const f=i?.Parent?w_(l):this;c(f,m);const p=f._zod.deferred;if(p){for(const h of p)h();f._zod.deferred=void 0}const y=globalThis.__zod_globalConfig?.postProcessor;return y&&y(f),f}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:m=>i?.Parent&&m instanceof i.Parent?!0:m?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}const hd=Symbol("zod_brand");class Gt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class fi extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(fd=globalThis).__zod_globalConfig??(fd.__zod_globalConfig={});const nt=globalThis.__zod_globalConfig;function Je(e){return e&&Object.assign(nt,e),nt}function I_(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,si,2)),e.message}function O_(e){this._zod.message=e}const T_={get:I_,set:O_,enumerable:!0,configurable:!0},wa={value:void 0,enumerable:!1},Ia={value:void 0,enumerable:!1},gd=new WeakSet([Object.prototype,Error.prototype]),yd=(e,t)=>{e.name="$ZodError",wa.value=e._zod,Object.defineProperty(e,"_zod",wa),Ia.value=t,Object.defineProperty(e,"issues",Ia),wa.value=void 0,Ia.value=void 0,Object.defineProperty(e,"message",T_);const r=Object.getPrototypeOf(e);gd.has(r)||(gd.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){const i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}}))},Oa=S("$ZodError",yd),mt=S("$ZodError",yd,void 0,{Parent:Error});function x_(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function Ta(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?x_(r,n.path[0],()=>[]).push(t(n)):i.push(t(n));return{formErrors:i,fieldErrors:r}}function xa(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],d=u===s.length-1;if(l==="_errors"){d&&c._errors.push(t(a)),u++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const m=c[l];d&&m._errors.push(t(a)),c=m,u++}}}};return i(e),r}function vd(e,t=r=>r.message){const r={errors:[]},i=(n,o=[])=>{var a;for(const s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{const c=[...o,...s.path];if(c.length===0){r.errors.push(t(s));continue}let u=r,l=0;for(;l<c.length;){const d=c[l],m=l===c.length-1;typeof d=="string"?(u.properties??(u.properties={}),Object.prototype.hasOwnProperty.call(u.properties,d)||Object.defineProperty(u.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),u=u.properties[d]):(u.items??(u.items=[]),(a=u.items)[d]??(a[d]={errors:[]}),u=u.items[d]),m&&u.errors.push(t(s)),l++}}};return i(e),r}function $d(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 _d(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 ${$d(i.path)}`);return t.join(`
3
+ `)}function mi(e,t){return{callee:t?.callee??e,Err:t?.Err}}const ar=e=>{const t=(r,i,n,o)=>{const a=n?{...n,async:!1}:{async:!1},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new Gt;if(s.issues.length){const c=new(o?.Err??e)(s.issues.map(u=>St(u,a,Je())));throw ha(c,o?.callee??t),c}return s.value};return t},pi=ar(mt),sr=e=>{const t=async(r,i,n,o)=>{const a=n?{...n,async:!0}:{async:!0};let s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){const c=new(o?.Err??e)(s.issues.map(u=>St(u,a,Je())));throw ha(c,o?.callee??t),c}return s.value};return t},hi=sr(mt),cr=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 Gt;return o.issues.length?{success:!1,error:new(e??Oa)(o.issues.map(a=>St(a,n,Je())))}:{success:!0,data:o.value}},gi=cr(mt),ur=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=>St(a,n,Je())))}:{success:!0,data:o.value}},yi=ur(mt),P_=Symbol.for("zod.compile.invalid"),z_=Symbol.for("zod.compile.fallback"),bd=((e,t,r)=>{const i=e._zod.bag.validator;return i!==void 0&&i(t)!==P_?!0:N_(e,t,r)});function N_(e,t,r){const i=r?{...r,async:!1}:{async:!1},n=e._zod.bag.fallbackRun;let o;if(n?(i[z_]=!0,o=n({value:t,issues:[]},i)):o=e._zod.run({value:t,issues:[]},i),o instanceof Promise)throw new Gt;return o.issues.length===0}const kd=async(e,t,r)=>{const i=r?{...r,async:!0}:{async:!0};let n=e._zod.run({value:t,issues:[]},i);return n instanceof Promise&&(n=await n),n.issues.length===0},Pa=e=>{const t=ar(e),r=(i,n,o,a)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return t(i,n,s,mi(r,a))};return r},E_=Pa(mt),za=e=>{const t=ar(e),r=(i,n,o,a)=>t(i,n,o,mi(r,a));return r},C_=za(mt),Na=e=>{const t=sr(e),r=async(i,n,o,a)=>{const s=o?{...o,direction:"backward"}:{direction:"backward"};return await t(i,n,s,mi(r,a))};return r},D_=Na(mt),Ea=e=>{const t=sr(e),r=async(i,n,o,a)=>await t(i,n,o,mi(r,a));return r},j_=Ea(mt),Ca=e=>(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return cr(e)(t,r,n)},A_=Ca(mt),Da=e=>(t,r,i)=>cr(e)(t,r,i),U_=Da(mt),ja=e=>async(t,r,i)=>{const n=i?{...i,direction:"backward"}:{direction:"backward"};return ur(e)(t,r,n)},R_=ja(mt),Aa=e=>async(t,r,i)=>ur(e)(t,r,i),B_=Aa(mt),Sd=/^[cC][0-9a-z]{6,}$/,wd=/^[0-9a-z]+$/,Id=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Od=/^[0-9a-vA-V]{20}$/,Td=/^[A-Za-z0-9]{27}$/,xd=/^[a-zA-Z0-9_-]{21}$/;function Pd(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const zd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,M_=/^[-+]?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)?)??$/,Nd=/^([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})$/,En=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)$/,Z_=En(4),L_=En(6),F_=En(7),Ed=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,V_=/^[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])?)*$/,G_=/^(([^<>()\[\]\\.,;:\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,}))$/,Cd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,q_=Cd,J_=/^[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])?)*$/,K_="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Dd(){return new RegExp(K_,"u")}const jd=/^(?:(?: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])$/,Ad=/^(([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}|:))$/,Ud=e=>{const t=Vt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Rd=/^((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])$/,Bd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Md=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ua=/^[A-Za-z0-9_-]*$/,Zd=/^(?=.{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])?)*\.?$/,Ld=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Ra=/^https?$/,Fd=/^\+[1-9]\d{6,14}$/,Ba=/^\d(?:[ -]?\d){11,18}$/,Vd="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function H_(e){return new RegExp(`^${e}$`)}const Gd=H_(Vd);function Ma(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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function qd(e){return new RegExp(`^${Ma(e)}$`)}function Jd(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${Ma({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,i=e.local?`${r}|${Ma({precision:e.precision})}`:r;return new RegExp(`^${Vd}T(?:${i})$`)}const Kd=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Hd=/^-?\d+n?$/,Za=/^-?\d+$/,lr=/^-?\d+(?:\.\d+)?$/,Wd=/^(?:true|false)$/i,Yd=/^null$/i,Xd=/^undefined$/i,Qd=/^[^A-Z]*$/,ef=/^[^a-z]*$/,tf=/^[0-9a-fA-F]*$/;function dr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function fr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const W_=/^[0-9a-fA-F]{32}$/,Y_=dr(22,"=="),X_=fr(22),Q_=/^[0-9a-fA-F]{40}$/,eb=dr(27,"="),tb=fr(27),nb=/^[0-9a-fA-F]{64}$/,rb=dr(43,"="),ib=fr(43),ob=/^[0-9a-fA-F]{96}$/,ab=dr(64,""),sb=fr(64),cb=/^[0-9a-fA-F]{128}$/,ub=dr(86,"=="),lb=fr(86);var La=Object.freeze({__proto__:null,base64:Md,base64url:Ua,bigint:Hd,boolean:Wd,browserEmail:J_,cidrv4:Rd,cidrv6:Bd,creditCard:Ba,cuid:Sd,cuid2:wd,date:Gd,datetime:Jd,domain:Ld,duration:zd,e164:Fd,email:Ed,emoji:Dd,extendedDuration:M_,guid:Nd,hex:tf,hostname:Zd,html5Email:V_,httpProtocol:Ra,idnEmail:q_,integer:Za,ipv4:jd,ipv6:Ad,ksuid:Td,lowercase:Qd,mac:Ud,md5_base64:Y_,md5_base64url:X_,md5_hex:W_,nanoid:xd,nanoidOfLength:Pd,null:Yd,number:lr,rfc5322Email:G_,sha1_base64:eb,sha1_base64url:tb,sha1_hex:Q_,sha256_base64:rb,sha256_base64url:ib,sha256_hex:nb,sha384_base64:ab,sha384_base64url:sb,sha384_hex:ob,sha512_base64:ub,sha512_base64url:lb,sha512_hex:cb,string:Kd,time:qd,ulid:Id,undefined:Xd,unicodeEmail:Cd,uppercase:ef,uuid:En,uuid4:Z_,uuid6:L_,uuid7:F_,xid:Od});const De=S("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Fa=e=>{const t=e.value;return!ma(t)&&t.size!==void 0},Va=e=>{const t=e.value;return!ma(t)&&t.length!==void 0},vi={number:"number",bigint:"bigint",object:"date"},Ga=S("$ZodCheckLessThan",(e,t)=>{De.init(e,t);const r=vi[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:vi[typeof i.value]??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})}}),qa=S("$ZodCheckGreaterThan",(e,t)=>{De.init(e,t);const r=vi[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:vi[typeof i.value]??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})}}),nf=S("$ZodCheckMultipleOf",(e,t)=>{De.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"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):pa(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})}}),rf=S("$ZodCheckNumberFormat",(e,t)=>{De.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Ql[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=Za)}),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})}}),of=S("$ZodCheckBigIntFormat",(e,t)=>{De.init(e,t);const[r,i]=ed[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})}}),af=S("$ZodCheckMaxSize",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Fa),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:li(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),sf=S("$ZodCheckMinSize",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Fa),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:li(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),cf=S("$ZodCheckSizeEquals",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Fa),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:li(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})}}),uf=S("$ZodCheckMaxLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Va),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,o=n.length;if((typeof n=="string"&&o>t.maximum?or(n):o)<=t.maximum)return;const s=di(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),lf=S("$ZodCheckMinLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Va),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,o=n.length;if((typeof n=="string"&&o>=t.minimum&&o<t.minimum*2?or(n):o)>=t.minimum)return;const s=di(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),df=S("$ZodCheckLengthEquals",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=Va),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,a=typeof n=="string"&&o>=t.length&&o<=t.length*2?or(n):o;if(a===t.length)return;const s=di(n),c=a>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),mr=S("$ZodCheckStringFormat",(e,t)=>{var r,i;De.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=()=>{})}),ff=S("$ZodCheckRegex",(e,t)=>{mr.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})}}),mf=S("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qd),mr.init(e,t)}),pf=S("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ef),mr.init(e,t)}),hf=S("$ZodCheckIncludes",(e,t)=>{De.init(e,t);const r=Vt(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})}}),gf=S("$ZodCheckStartsWith",(e,t)=>{De.init(e,t);const r=new RegExp(`^${Vt(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})}}),yf=S("$ZodCheckEndsWith",(e,t)=>{De.init(e,t);const r=new RegExp(`.*${Vt(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 vf(e,t,r){e.issues.length&&t.issues.push(...kt(r,e.issues))}const Ja=S("$ZodCheckProperty",(e,t)=>{De.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=>vf(n,r,t.property));vf(i,r,t.property)}}),$f=S("$ZodCheckMimeType",(e,t)=>{De.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})}}),_f=S("$ZodCheckOverwrite",(e,t)=>{De.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Ka{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}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?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
5
5
  ${r.join(`
6
6
  `)}
7
- };`)(...Object.values(this.closed))}}const yf={major:4,minor:5,patch:4},ne=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=yf;const i=e._zod.def.checks,n=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(const o of n)for(const a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,c,u)=>{if(s.memo)return s;let l=an(s),d;for(const m of c){if(m._zod.def.when){if(rd(s)||!m._zod.def.when(s))continue}else if(l)continue;const f=s.issues.length,p=m._zod.check(s);if(p instanceof Promise&&u?.async===!1)throw new Mt;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,s.issues.length!==f&&(pa(s.issues,f,e),l||(l=an(s,f)))});else{if(s.issues.length===f)continue;pa(s.issues,f,e),l||(l=an(s,f))}}return d?d.then(()=>s):s},a=(s,c,u)=>{if(an(s))return s.aborted=!0,s;const l=o(c,n,u);if(l instanceof Promise){if(u.async===!1)throw new Mt;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>a(d,s,c)):a(l,s,c)}const u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new Mt;return u.then(l=>o(l,n,c))}return o(u,n,c)}}},{get"~standard"(){return ha(this,"~standard",qa(this))},set"~standard"(e){Jt(this,"~standard",e)}}),vf=e=>e.success?{value:e.data}:{issues:e.error?.issues};function qa(e){return{validate:t=>{try{return vf(fi(e,t))}catch{return mi(e,t).then(vf)}},vendor:"zod",version:1}}const ur=w("$ZodString",(e,t)=>{ne.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vd(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}}),we=w("$ZodStringFormat",(e,t)=>{cr.init(e,t),ur.init(e,t)}),$f=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=zd),we.init(e,t)}),_f=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=zn(i))}else t.pattern??(t.pattern=zn());we.init(e,t)}),bf=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=xd),we.init(e,t)}),Ja=1,Ka=2;function Ha(e,t){if(!t.normalize&&t.protocol?.source===Ca.source&&!/^https?:\/\//i.test(e))return Ja;try{return new URL(e)}catch{return Ka}}const rb=/[\t\n\r]/g;function Wa(e){return e.replace(rb,"")}function Xa(e,t){return t.lastIndex=0,t.test(e.hostname)}function Ya(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const kf=w("$ZodURL",(e,t)=>{we.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),n=Ha(i,t);if(n===Ja){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(n===Ka){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}t.hostname&&!Xa(n,t.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&&!Ya(n,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?n.href:Wa(i);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),wf=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Pd()),we.init(e,t)}),Sf=w("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?Sd:Id(t.length)),we.init(e,t)}),If=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=$d),we.init(e,t)}),Of=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=_d),we.init(e,t)}),zf=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=bd),we.init(e,t)}),xf=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=kd),we.init(e,t)}),Tf=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=wd),we.init(e,t)}),Pf=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Fd(t)),we.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(r=>{r._zod.bag.laxFormat=!0}))}),Nf=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Bd),we.init(e,t)}),Ef=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ld(t)),we.init(e,t)}),Df=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Od),we.init(e,t)}),jf=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Nd),we.init(e,t),e._zod.bag.format="ipv4"}),ib=/^[0-9a-fA-F:.]+$/;function hi(e){if(!ib.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}const Cf=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ed),we.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{hi(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),Af=w("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Dd(t.delimiter)),we.init(e,t),e._zod.bag.format="mac"}),Uf=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=jd),we.init(e,t)});function Qa(e){const t=e.split("/");if(t.length!==2)return!1;const[r,i]=t;if(!i)return!1;const n=Number(i);return`${n}`!==i||n<0||n>128?!1:hi(r)}const Rf=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Cd),we.init(e,t),e._zod.check=r=>{Qa(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function gi(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Zf=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ad),we.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{gi(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function es(e){if(!ja.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return gi(r)}const Mf=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ja),we.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{es(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Bf=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Zd),we.init(e,t)}),ob=/[- ]/g;function ab(e){let t=e.length,r=1,i=0;for(;t;){const n=+e[--t];r^=1,i+=r?[0,2,4,6,8,1,3,5,7,9][n]:n}return i%10===0}function ts(e){return Aa.test(e)?ab(e.replace(ob,"")):!1}const Lf=w("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Aa),we.init(e,t),e._zod.check=r=>{ts(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function ns(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 Ff=w("$ZodJWT",(e,t)=>{we.init(e,t),e._zod.check=r=>{ns(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Vf=w("$ZodCustomStringFormat",(e,t)=>{we.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})}}),rs=w("$ZodNumber",(e,t)=>{ne.init(e,t),e._zod.pattern=e._zod.bag.pattern??or,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:String(n):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Gf=w("$ZodNumberFormat",(e,t)=>{Qd.init(e,t),rs.init(e,t)}),is=w("$ZodBoolean",(e,t)=>{ne.init(e,t),e._zod.pattern=qd,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}}),os=w("$ZodBigInt",(e,t)=>{ne.init(e,t),e._zod.pattern=Gd,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}}),qf=w("$ZodBigIntFormat",(e,t)=>{ef.init(e,t),os.init(e,t)}),Jf=w("$ZodSymbol",(e,t)=>{ne.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}}),Kf=w("$ZodUndefined",(e,t)=>{ne.init(e,t),e._zod.pattern=Kd,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}}),Hf=w("$ZodNull",(e,t)=>{ne.init(e,t),e._zod.pattern=Jd,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}}),Wf=w("$ZodAny",(e,t)=>{ne.init(e,t),e._zod.parse=r=>r}),Xf=w("$ZodUnknown",(e,t)=>{ne.init(e,t),e._zod.parse=r=>r}),Yf=w("$ZodNever",(e,t)=>{ne.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Qf=w("$ZodVoid",(e,t)=>{ne.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}}),em=w("$ZodDate",(e,t)=>{ne.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 tm(e,t,r){e.issues.length&&t.issues.push(...vt(r,e.issues)),t.value[r]=e.value}const nm=w("$ZodArray",(e,t)=>{ne.init(e,t);const r=Qe.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=r?r.alloc(e,i,Array(o.length),n):Array(o.length);const a=[];for(let s=0;s<o.length;s++){const c=o[s],u=t.element._zod.run({value:c,issues:[]},n);u instanceof Promise?a.push(u.then(l=>tm(l,i,s))):tm(u,i,s)}return a.length?Promise.all(a).then(()=>i):i}});function yi(e,t,r,i,n,o){const a=r in i,s=o==="optional";if(!(!a&&s&&n==="optional")){if(e.issues.length){if(n!==void 0&&s&&!a)return;t.issues.push(...vt(r,e.issues))}if(!a&&n===void 0){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}}const sb=[];function rm(e){const t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),i=r.length?r:sb,n=i.length?[...t,...i]:t;for(const a of n)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);const o=Kl(e.shape);return{...e,allKeys:n,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function im(e,t,r,i,n,o){const a=[],s=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optin,d=c.optout;for(const m in t){if(s.has(m))continue;if(m==="__proto__"){u==="never"&&a.push(m);continue}if(u==="never"){a.push(m);continue}const f=c.run({value:t[m],issues:[]},i);f instanceof Promise?e.push(f.then(p=>yi(p,r,m,t,l,d))):yi(f,r,m,t,l,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then(()=>r):r}const as=new WeakMap,ss=w("$ZodObject",(e,t)=>{if(ne.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;as.set(t,c),Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),as.set(t,u),u}})}const i=Yn(()=>rm(t));de(e,"propValues",c=>{const u=c.def.shape,l={};for(const d in u){const m=u[d]._zod;if(m.values){Object.prototype.hasOwnProperty.call(l,d)||Re(l,d,new Set);for(const f of m.values)l[d].add(f);m.optin!==void 0&&l[d].add(void 0)}}return l});const n=Sn,o=t.catchall;let a;const s=Qe.memoizer;s?.attach(e),e._zod.parse=(c,u)=>{a??(a=i.value);const l=c.value;if(!n(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value=s?s.alloc(e,c,{},u):{};const d=[],m=a.shape;for(const f of a.allKeys){if(f==="__proto__")continue;const p=m[f],y=p._zod.optin,h=p._zod.optout,$=p._zod.run({value:l[f],issues:[]},u);$ instanceof Promise?d.push($.then(g=>yi(g,c,f,l,y,h))):yi($,c,f,l,y,h)}return o?im(d,l,c,u,i.value,e):d.length?Promise.all(d).then(()=>c):c}}),om=w("$ZodObjectJIT",(e,t)=>{ss.init(e,t);const r=e._zod.parse,i=Yn(()=>rm(t)),n=Qe.memoizer,o=f=>{const p=i.value,y=p.symbolKeys,h=new Ga(["payload","ctx"],{shape:f,inst:e,memo:n,syms:y}),$=T=>`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`,g=(T,C)=>`
8
- for (let i = 0; i < ${T}.issues.length; i++) {
9
- const iss = ${T}.issues[i];
10
- iss.path = iss.path ? [${C}, ...iss.path] : [${C}];
7
+ };`)(...Object.values(this.closed))}}const bf={major:4,minor:5,patch:4},ne=S("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=bf;const i=e._zod.def.checks,n=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(const o of n)for(const a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,c,u)=>{if(s.memo)return s;let l=dn(s),d;for(const m of c){if(m._zod.def.when){if(sd(s)||!m._zod.def.when(s))continue}else if(l)continue;const f=s.issues.length,p=m._zod.check(s);if(p instanceof Promise&&u?.async===!1)throw new Gt;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,s.issues.length!==f&&(ya(s.issues,f,e),l||(l=dn(s,f)))});else{if(s.issues.length===f)continue;ya(s.issues,f,e),l||(l=dn(s,f))}}return d?d.then(()=>s):s},a=(s,c,u)=>{if(dn(s))return s.aborted=!0,s;const l=o(c,n,u);if(l instanceof Promise){if(u.async===!1)throw new Gt;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>a(d,s,c)):a(l,s,c)}const u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new Gt;return u.then(l=>o(l,n,c))}return o(u,n,c)}}},{get"~standard"(){return va(this,"~standard",Ha(this))},set"~standard"(e){Xt(this,"~standard",e)}}),kf=e=>e.success?{value:e.data}:{issues:e.error?.issues};function Ha(e){return{validate:t=>{try{return kf(gi(e,t))}catch{return yi(e,t).then(kf)}},vendor:"zod",version:1}}const pr=S("$ZodString",(e,t)=>{ne.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Kd(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}}),we=S("$ZodStringFormat",(e,t)=>{mr.init(e,t),pr.init(e,t)}),Sf=S("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Nd),we.init(e,t)}),wf=S("$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=En(i))}else t.pattern??(t.pattern=En());we.init(e,t)}),If=S("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ed),we.init(e,t)}),Wa=1,Ya=2;function Xa(e,t){if(!t.normalize&&t.protocol?.source===Ra.source&&!/^https?:\/\//i.test(e))return Wa;try{return new URL(e)}catch{return Ya}}const db=/[\t\n\r]/g;function Qa(e){return e.replace(db,"")}function es(e,t){return t.lastIndex=0,t.test(e.hostname)}function ts(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const Of=S("$ZodURL",(e,t)=>{we.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),n=Xa(i,t);if(n===Wa){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(n===Ya){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}t.hostname&&!es(n,t.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&&!ts(n,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?n.href:Qa(i);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Tf=S("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Dd()),we.init(e,t)}),xf=S("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?xd:Pd(t.length)),we.init(e,t)}),Pf=S("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Sd),we.init(e,t)}),zf=S("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=wd),we.init(e,t)}),Nf=S("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Id),we.init(e,t)}),Ef=S("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Od),we.init(e,t)}),Cf=S("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Td),we.init(e,t)}),Df=S("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Jd(t)),we.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(r=>{r._zod.bag.laxFormat=!0}))}),jf=S("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Gd),we.init(e,t)}),Af=S("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=qd(t)),we.init(e,t)}),Uf=S("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=zd),we.init(e,t)}),Rf=S("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=jd),we.init(e,t),e._zod.bag.format="ipv4"}),fb=/^[0-9a-fA-F:.]+$/;function $i(e){if(!fb.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}const Bf=S("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ad),we.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{$i(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),Mf=S("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ud(t.delimiter)),we.init(e,t),e._zod.bag.format="mac"}),Zf=S("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Rd),we.init(e,t)});function ns(e){const t=e.split("/");if(t.length!==2)return!1;const[r,i]=t;if(!i)return!1;const n=Number(i);return`${n}`!==i||n<0||n>128?!1:$i(r)}const Lf=S("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Bd),we.init(e,t),e._zod.check=r=>{ns(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function _i(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ff=S("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Md),we.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{_i(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function rs(e){if(!Ua.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return _i(r)}const Vf=S("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ua),we.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{rs(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Gf=S("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Fd),we.init(e,t)}),mb=/[- ]/g;function pb(e){let t=e.length,r=1,i=0;for(;t;){const n=+e[--t];r^=1,i+=r?[0,2,4,6,8,1,3,5,7,9][n]:n}return i%10===0}function is(e){return Ba.test(e)?pb(e.replace(mb,"")):!1}const qf=S("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Ba),we.init(e,t),e._zod.check=r=>{is(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function os(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 Jf=S("$ZodJWT",(e,t)=>{we.init(e,t),e._zod.check=r=>{os(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Kf=S("$ZodCustomStringFormat",(e,t)=>{we.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})}}),as=S("$ZodNumber",(e,t)=>{ne.init(e,t),e._zod.pattern=e._zod.bag.pattern??lr,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:String(n):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Hf=S("$ZodNumberFormat",(e,t)=>{rf.init(e,t),as.init(e,t)}),ss=S("$ZodBoolean",(e,t)=>{ne.init(e,t),e._zod.pattern=Wd,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}}),cs=S("$ZodBigInt",(e,t)=>{ne.init(e,t),e._zod.pattern=Hd,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}}),Wf=S("$ZodBigIntFormat",(e,t)=>{of.init(e,t),cs.init(e,t)}),Yf=S("$ZodSymbol",(e,t)=>{ne.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}}),Xf=S("$ZodUndefined",(e,t)=>{ne.init(e,t),e._zod.pattern=Xd,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}}),Qf=S("$ZodNull",(e,t)=>{ne.init(e,t),e._zod.pattern=Yd,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}}),em=S("$ZodAny",(e,t)=>{ne.init(e,t),e._zod.parse=r=>r}),tm=S("$ZodUnknown",(e,t)=>{ne.init(e,t),e._zod.parse=r=>r}),nm=S("$ZodNever",(e,t)=>{ne.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),rm=S("$ZodVoid",(e,t)=>{ne.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}}),im=S("$ZodDate",(e,t)=>{ne.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 om(e,t,r){e.issues.length&&t.issues.push(...kt(r,e.issues)),t.value[r]=e.value}const am=S("$ZodArray",(e,t)=>{ne.init(e,t);const r=nt.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=r?r.alloc(e,i,Array(o.length),n):Array(o.length);const a=[];for(let s=0;s<o.length;s++){const c=o[s],u=t.element._zod.run({value:c,issues:[]},n);u instanceof Promise?a.push(u.then(l=>om(l,i,s))):om(u,i,s)}return a.length?Promise.all(a).then(()=>i):i}});function bi(e,t,r,i,n,o){const a=r in i,s=o==="optional";if(!(!a&&s&&n==="optional")){if(e.issues.length){if(n!==void 0&&s&&!a)return;t.issues.push(...kt(r,e.issues))}if(!a&&n===void 0){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}}const hb=[];function sm(e){const t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),i=r.length?r:hb,n=i.length?[...t,...i]:t;for(const a of n)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);const o=Xl(e.shape);return{...e,allKeys:n,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function cm(e,t,r,i,n,o){const a=[],s=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optin,d=c.optout;for(const m in t){if(s.has(m))continue;if(m==="__proto__"){u==="never"&&a.push(m);continue}if(u==="never"){a.push(m);continue}const f=c.run({value:t[m],issues:[]},i);f instanceof Promise?e.push(f.then(p=>bi(p,r,m,t,l,d))):bi(f,r,m,t,l,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then(()=>r):r}const us=new WeakMap,ls=S("$ZodObject",(e,t)=>{if(ne.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;us.set(t,c),Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),us.set(t,u),u}})}const i=rr(()=>sm(t));fe(e,"propValues",c=>{const u=c.def.shape,l={};for(const d in u){const m=u[d]._zod;if(m.values){Object.prototype.hasOwnProperty.call(l,d)||Ze(l,d,new Set);for(const f of m.values)l[d].add(f);m.optin!==void 0&&l[d].add(void 0)}}return l});const n=Pn,o=t.catchall;let a;const s=nt.memoizer;s?.attach(e),e._zod.parse=(c,u)=>{a??(a=i.value);const l=c.value;if(!n(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value=s?s.alloc(e,c,{},u):{};const d=[],m=a.shape;for(const f of a.allKeys){if(f==="__proto__")continue;const p=m[f],y=p._zod.optin,h=p._zod.optout,$=p._zod.run({value:l[f],issues:[]},u);$ instanceof Promise?d.push($.then(g=>bi(g,c,f,l,y,h))):bi($,c,f,l,y,h)}return o?cm(d,l,c,u,i.value,e):d.length?Promise.all(d).then(()=>c):c}}),um=S("$ZodObjectJIT",(e,t)=>{ls.init(e,t);const r=e._zod.parse,i=rr(()=>sm(t)),n=nt.memoizer,o=f=>{const p=i.value,y=p.symbolKeys,h=new Ka(["payload","ctx"],{shape:f,inst:e,memo:n,syms:y}),$=P=>`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`,g=(P,j)=>`
8
+ for (let i = 0; i < ${P}.issues.length; i++) {
9
+ const iss = ${P}.issues[i];
10
+ iss.path = iss.path ? [${j}, ...iss.path] : [${j}];
11
11
  payload.issues.push(iss);
12
- }`;h.write("const input = payload.value;");const _=Object.create(null);let I=0;for(const T of p.allKeys)_[T]=`key_${I++}`;h.write(n?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const T of p.allKeys){if(T==="__proto__")continue;const C=_[T],M=typeof T=="symbol"?`syms[${y.indexOf(T)}]`:yt(T),ue=`${M} in input`,fe=f[T],Ne=fe?._zod?.optin,L=Ne!==void 0,Q=fe?._zod?.optout==="optional";if(h.write(`const ${C} = ${$(M)};`),L&&Q){const Y=Ne==="optional"?`${C}_present`:`${C}.value !== undefined || ${C}_present`;h.write(`
13
- const ${C}_present = ${ue};
14
- if (!${C}.issues.length || ${C}_present) {
15
- if (${C}.issues.length) {${g(C,M)}
12
+ }`;h.write("const input = payload.value;");const _=Object.create(null);let I=0;for(const P of p.allKeys)_[P]=`key_${I++}`;h.write(n?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const P of p.allKeys){if(P==="__proto__")continue;const j=_[P],M=typeof P=="symbol"?`syms[${y.indexOf(P)}]`:bt(P),le=`${M} in input`,pe=f[P],Ne=pe?._zod?.optin,L=Ne!==void 0,Q=pe?._zod?.optout==="optional";if(h.write(`const ${j} = ${$(M)};`),L&&Q){const X=Ne==="optional"?`${j}_present`:`${j}.value !== undefined || ${j}_present`;h.write(`
13
+ const ${j}_present = ${le};
14
+ if (!${j}.issues.length || ${j}_present) {
15
+ if (${j}.issues.length) {${g(j,M)}
16
16
  }
17
17
 
18
- if (${Y}) {
19
- newResult[${M}] = ${C}.value;
18
+ if (${X}) {
19
+ newResult[${M}] = ${j}.value;
20
20
  }
21
21
  }
22
22
 
23
23
  `)}else L?h.write(`
24
- if (${C}.issues.length) {${g(C,M)}
24
+ if (${j}.issues.length) {${g(j,M)}
25
25
  }
26
26
 
27
- if (${C}.value === undefined) {
28
- if (${ue}) {
27
+ if (${j}.value === undefined) {
28
+ if (${le}) {
29
29
  newResult[${M}] = undefined;
30
30
  }
31
31
  } else {
32
- newResult[${M}] = ${C}.value;
32
+ newResult[${M}] = ${j}.value;
33
33
  }
34
34
 
35
35
  `):h.write(`
36
- const ${C}_present = ${ue};
37
- if (${C}.issues.length) {${g(C,M)}
36
+ const ${j}_present = ${le};
37
+ if (${j}.issues.length) {${g(j,M)}
38
38
  }
39
- if (!${C}_present && !${C}.issues.length) {
39
+ if (!${j}_present && !${j}.issues.length) {
40
40
  payload.issues.push({
41
41
  code: "invalid_type",
42
42
  expected: "nonoptional",
@@ -45,96 +45,96 @@ ${r.join(`
45
45
  });
46
46
  }
47
47
 
48
- if (${C}_present) {
49
- newResult[${M}] = ${C}.value;
48
+ if (${j}_present) {
49
+ newResult[${M}] = ${j}.value;
50
50
  }
51
51
 
52
- `)}return h.write("payload.value = newResult;"),h.write("return payload;"),h.compile()};let a;const s=Sn,c=!Qe.jitless,l=c&&ql.value,d=t.catchall;let m;e._zod.parse=(f,p)=>{m??(m=i.value);const y=f.value;return s(y)?c&&l&&p?.async===!1&&p.jitless!==!0?(a||(a=o(t.shape)),f=a(f,p),d?im([],y,f,p,m,e):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),f)}});function am(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=>!an(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=>$t(a,i,Ve())))}),t)}const vi=w("$ZodUnion",(e,t)=>{ne.init(e,t),de(e,"optin",i=>i.def.options.some(n=>n._zod.optin==="defaulted")?"defaulted":i.def.options.some(n=>n._zod.optin!==void 0)?"optional":void 0),de(e,"optout",i=>i.def.options.some(n=>n._zod.optout==="optional")?"optional":void 0),de(e,"values",i=>{if(i.def.options.every(n=>n._zod.values))return new Set(i.def.options.flatMap(n=>Array.from(n._zod.values)))}),de(e,"pattern",i=>{if(i.def.options.every(n=>n._zod.pattern)){const n=i.def.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>ii(o.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=>am(s,i,e,n)):am(a,i,e,n)}});function sm(e,t,r,i){const n=[];for(let o=0;o<e.length;o++)e[o].issues.length===0&&n.push(o);return n.length===1?(t.value=e[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=>$t(a,i,Ve())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:n}),t)}const cm=w("$ZodXor",(e,t)=>{vi.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=>sm(s,i,e,n)):sm(a,i,e,n)}});function um(e,t){const r=e._zod;let i=r.bag.optionsMap;if(!i){i=new Map;const{options:n,discriminator:o}=r.def;for(const a of n)for(const s of a._zod.propValues?.[o]??[])i.has(s)||i.set(s,a);r.bag.optionsMap=i}return i.get(t)}const lm=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,vi.init(e,t);const r=e._zod.parse;de(e,"propValues",n=>{const o={};for(const a of n.def.options){const s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${n.def.options.indexOf(a)}"`);for(const[c,u]of Object.entries(s)){Object.prototype.hasOwnProperty.call(o,c)||Re(o,c,new Set);for(const l of u)o[c].add(l)}}return o}),t.options.forEach((n,o)=>{const a=as.get(n._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${o}"`)});const i=Yn(()=>{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)}}),dm=w("$ZodIntersection",(e,t)=>{ne.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])=>fm(r,c,u)):fm(r,o,a)}});function lr(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(Rt(e)&&Rt(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};Object.prototype.hasOwnProperty.call(n,"__proto__")&&delete n.__proto__;for(const o of i){if(o==="__proto__")continue;const a=lr(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=lr(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 fm(e,t,r){const i=new Map;let n;const o=new Map,a=(u,l)=>{let d;if(u.code==="unrecognized_keys"&&!u.path?.length)n??(n=u),d=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){const m=String(u.path[0]);o.has(m)||o.set(m,u),d=[m]}else return!1;for(const m of d)i.has(m)||i.set(m,{}),i.get(m)[l]=!0;return!0};for(const u of t.issues)a(u,"l")||e.issues.push(u);for(const u of r.issues)a(u,"r")||e.issues.push(u);const s=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(s.length){const u=n?s.filter(l=>n.keys.includes(l)):[];u.length&&e.issues.push({...n,keys:u});for(const l of s)!u.includes(l)&&o.has(l)&&e.issues.push(o.get(l))}const c=lr(t.value,r.value);if(!c.valid){if(an(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}const cs=w("$ZodTuple",(e,t)=>{ne.init(e,t);const r=t.items,i=Qe.memoizer;i?.attach(e),e._zod.parse=(n,o)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=i?i.alloc(e,n,[],o):[];const s=[],c=mm(r,"optin"),u=mm(r,"optout");if(!t.rest){if(a.length<c)return n.issues.push({code:"too_small",minimum:c,inclusive:!0,input:a,inst:e,origin:"array"}),n;a.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}const l=new Array(r.length);for(let d=0;d<r.length;d++){const m=r[d]._zod.run({value:a[d],issues:[]},o);m instanceof Promise?s.push(m.then(f=>{l[d]=f})):l[d]=m}if(t.rest){let d=r.length-1;const m=a.slice(r.length);for(const f of m){d++;const p=t.rest._zod.run({value:f,issues:[]},o);p instanceof Promise?s.push(p.then(y=>pm(y,n,d))):pm(p,n,d)}}return s.length?Promise.all(s).then(()=>hm(l,n,r,a,u)):hm(l,n,r,a,u)}});function mm(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function pm(e,t,r){e.issues.length&&t.issues.push(...vt(r,e.issues)),t.value[r]=e.value}function hm(e,t,r,i,n){for(let o=0;o<r.length;o++){const a=e[o],s=o<i.length;if(!s&&o>=n&&r[o]._zod.optin==="optional"){t.value.length=o;break}if(a.issues.length){if(!s&&o>=n){t.value.length=o;break}t.issues.push(...vt(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 gm=w("$ZodRecord",(e,t)=>{ne.init(e,t);const r=Qe.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{const o=i.value;if(!Rt(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;const a=[],s=t.keyType._zod.values;if(s&&!t.partial){i.value=r?r.alloc(e,i,{},n):{};const c=new Set;for(const l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;const d=t.keyType._zod.run({value:l,issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>$t(p,n,Ve())),input:l,path:[l],inst:e});continue}const m=d.value;if(m==="__proto__")continue;const f=t.valueType._zod.run({value:o[l],issues:[]},n);f instanceof Promise?a.push(f.then(p=>{p.issues.length&&i.issues.push(...vt(l,p.issues)),i.value[m]=p.value})):(f.issues.length&&i.issues.push(...vt(l,f.issues)),i.value[m]=f.value)}let u;for(const l in o)if(!c.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;i.value[l]=o[l]}else u=u??[],u.push(l);u&&u.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}else{i.value=r?r.alloc(e,i,{},n):{};let c;for(const u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let l=t.keyType._zod.run({value:u,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&or.test(u)&&l.issues.length){const p=t.keyType._zod.run({value:Number(u),issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(l=p)}if(l.issues.length){t.mode==="loose"?i.value[u]=o[u]:s?(c=c??[],c.push(u)):i.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>$t(p,n,Ve())),input:u,path:[u],inst:e});continue}const m=l.value;if(m==="__proto__")continue;const f=t.valueType._zod.run({value:o[u],issues:[]},n);f instanceof Promise?a.push(f.then(p=>{p.issues.length&&i.issues.push(...vt(u,p.issues)),i.value[m]=p.value})):(f.issues.length&&i.issues.push(...vt(u,f.issues)),i.value[m]=f.value)}c&&c.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),ym=w("$ZodMap",(e,t)=>{ne.init(e,t);const r=Qe.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{const o=i.value;if(!(o instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),i;const a=[];i.value=r?r.alloc(e,i,new Map,n):new Map;for(const[s,c]of o){const u=t.keyType._zod.run({value:s,issues:[]},n),l=t.valueType._zod.run({value:c,issues:[]},n);u instanceof Promise||l instanceof Promise?a.push(Promise.all([u,l]).then(([d,m])=>{vm(d,m,i,s,o,e,n)})):vm(u,l,i,s,o,e,n)}return a.length?Promise.all(a).then(()=>i):i}});function vm(e,t,r,i,n,o,a){e.issues.length&&(oi.has(typeof i)?r.issues.push(...vt(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(s=>$t(s,a,Ve()))})),t.issues.length&&(oi.has(typeof i)?r.issues.push(...vt(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(s=>$t(s,a,Ve()))})),r.value.set(e.value,t.value)}const $m=w("$ZodSet",(e,t)=>{ne.init(e,t);const r=Qe.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{const o=i.value;if(!(o instanceof Set))return i.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),i;const a=[];i.value=r?r.alloc(e,i,new Set,n):new Set;for(const s of o){const c=t.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise?a.push(c.then(u=>_m(u,i))):_m(c,i)}return a.length?Promise.all(a).then(()=>i):i}});function _m(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const bm=w("$ZodEnum",(e,t)=>{ne.init(e,t);const r=ua(t.entries),i=new Set(r);e._zod.values=i;const n=r.filter(o=>oi.has(typeof o));e._zod.pattern=new RegExp(n.length?`^(${n.map(o=>Zt(o.toString())).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(o,a)=>{const s=o.value;return i.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),km=w("$ZodLiteral",(e,t)=>{ne.init(e,t);const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(t.values.length?`^(${t.values.map(i=>typeof i=="string"?Zt(i):i?Zt(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$"),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}}),wm=w("$ZodFile",(e,t)=>{ne.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}}),Sm=w("$ZodTransform",(e,t)=>{ne.init(e,t),e._zod.optin="optional",Qe.memoizer?.guard(e),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new ci(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));if(n instanceof Promise)throw new Mt;return r.value=n,r}});function Im(e,t){return e.value=t.issues.length?void 0:t.value,e}const us=w("$ZodOptional",(e,t)=>{ne.init(e,t),de(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",de(e,"values",r=>{const i=r.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),de(e,"pattern",r=>{const i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${ii(i.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;const n=t.innerType._zod.run({value:r.value,issues:[]},i);return n instanceof Promise?n.then(o=>Im(r,o)):Im(r,n)}return t.innerType._zod.run(r,i)}}),Om=w("$ZodExactOptional",(e,t)=>{us.init(e,t),de(e,"values",r=>r.def.innerType._zod.values),de(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),zm=w("$ZodNullable",(e,t)=>{ne.init(e,t),de(e,"optin",r=>r.def.innerType._zod.optin),de(e,"optout",r=>r.def.innerType._zod.optout),de(e,"pattern",r=>{const i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${ii(i.source)}|null)$`):void 0}),de(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),xm=w("$ZodDefault",(e,t)=>{ne.init(e,t),e._zod.optin="defaulted",de(e,"values",r=>r.def.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=>Tm(o,t)):Tm(n,t)}});function Tm(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Pm=w("$ZodPrefault",(e,t)=>{ne.init(e,t),e._zod.optin="defaulted",de(e,"values",r=>r.def.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))}),Nm=w("$ZodNonOptional",(e,t)=>{ne.init(e,t),de(e,"values",r=>{const i=r.def.innerType._zod.values;return i?new Set([...i].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Em(o,e)):Em(n,e)}});function Em(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 Dm=w("$ZodSuccess",(e,t)=>{ne.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new ci("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)}});function jm(e,t,r,i){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(n=>$t(n,i,Ve()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Cm=w("$ZodCatch",(e,t)=>{ne.init(e,t),de(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),de(e,"optout",r=>r.def.innerType._zod.optout),de(e,"values",r=>r.def.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({value:r.value,issues:[]},i);return n instanceof Promise?n.then(o=>jm(r,o,t,i)):jm(r,n,t,i)}}),Am=w("$ZodNaN",(e,t)=>{ne.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)}),ls=w("$ZodPipe",(e,t)=>{ne.init(e,t),de(e,"values",r=>r.def.in._zod.values),de(e,"optin",r=>r.def.in._zod.optin),de(e,"optout",r=>r.def.out._zod.optout),de(e,"propValues",r=>r.def.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=>$i(a,t.in,i)):$i(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>$i(o,t.out,i)):$i(n,t.out,i)}});function $i(e,t,r){return e.issues.some(i=>i.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const ds=w("$ZodCodec",(e,t)=>{ne.init(e,t),de(e,"values",r=>r.def.in._zod.values),de(e,"optin",r=>r.def.in._zod.optin),de(e,"optout",r=>r.def.out._zod.optout),de(e,"propValues",r=>r.def.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=>_i(a,t,i)):_i(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>_i(a,t,i)):_i(o,t,i)}}});function _i(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=>bi(e,o,t.out,r)):bi(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>bi(e,o,t.in,r)):bi(e,n,t.in,r)}}function bi(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const Um=w("$ZodPreprocess",(e,t)=>{ls.init(e,t)}),Rm=w("$ZodReadonly",(e,t)=>{ne.init(e,t),de(e,"propValues",r=>r.def.innerType._zod.propValues),de(e,"values",r=>r.def.innerType._zod.values),de(e,"optin",r=>r.def.innerType?._zod?.optin),de(e,"optout",r=>r.def.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(Zm):Zm(n)}});function Zm(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Mm=w("$ZodTemplateLiteral",(e,t)=>{ne.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||Jl.has(typeof i))r.push(Zt(`${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)}),Bm=w("$ZodFunction",(e,t)=>(ne.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...i){const n=e._def.input?li(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?li(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){const n=e._def.input?await di(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await di(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},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 cs({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)),Lm=w("$ZodPromise",(e,t)=>{ne.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),fs=w("$ZodLazy",(e,t)=>{ne.init(e,t),Vl(e._zod,"innerType",()=>{const r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),de(e,"pattern",r=>r.innerType?._zod?.pattern),de(e,"propValues",r=>r.innerType?._zod?.propValues),de(e,"optin",r=>r.innerType?._zod?.optin??void 0),de(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Fm=w("$ZodCustom",(e,t)=>{De.init(e,t),ne.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=>Vm(o,r,i,e));Vm(n,r,i,e)}});function Vm(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(On(n))}}class Gm extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const ms="~memo",qm=[];function ps(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const Jm=new WeakMap;function hs(e,t){const r=Jm.get(e);if(r!==void 0)return r;if(t.has(e))return!0;t.add(e);let i=!1;const n=s=>{!i&&s?._zod&&hs(s,t)&&(i=!0)},o=e._zod.def;switch(o.type){case"object":{for(const s of Reflect.ownKeys(o.shape))n(o.shape[s]);n(o.catchall);break}case"array":n(o.element);break;case"tuple":for(const s of o.items)n(s);n(o.rest);break;case"record":case"map":n(o.keyType),n(o.valueType);break;case"set":n(o.valueType);break;case"union":for(const s of o.options)n(s);break;case"intersection":n(o.left),n(o.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":n(o.innerType);break;case"pipe":n(o.in),n(o.out);break;case"function":n(o.input),n(o.output);break;case"lazy":n(e._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const s in o){const c=Object.getOwnPropertyDescriptor(o,s);if(!c||c.get)continue;const u=c.value;if(!(!u||typeof u!="object")){if(u._zod)n(u);else if(Array.isArray(u))for(const l of u)n(l)}}}return t.delete(e),Jm.set(e,i),i}function Km(e){return hs(e,new Set)}function cb(e,t){let r=e.buckets.get(t);return r||(r=new Map,e.buckets.set(t,r)),r}let ki;const wi=[],ub={alloc(e,t,r){const i=ki;if(!i)return r;ki=void 0;const n={value:r,issues:null};return i.set(t.value,n),wi.push(n),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const r=e._zod.parse,i=(n,o)=>{if(o.direction!=="backward"&&ys(o,n.value))throw new Gm;return r(n,o)};e._zod.parse=i,e._zod.run===r&&(e._zod.run=i)})},attach(e){var t;let r,i,n;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const o=e._zod.parse,a=(s,c)=>{if(r===void 0&&(r=hs(e,new Set),!r))return e._zod.parse=o,e._zod.run===a&&(e._zod.run=o),o(s,c);const u=s.value;if(u===null||typeof u!="object")return o(s,c);let l=c[ms];l||(l={buckets:new Map,backEdges:void 0},c[ms]=l);let d;i===c?d=n:(d=cb(l,e),i=c,n=d);const m=d.get(u);if(m)return s.value=m.value,m.issues?m.issues.length&&s.issues.push(...ps(m.issues)):(s.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(m.value)),s;ki=d;const f=wi.length,p=o(s,c);ki=void 0;const y=wi.length>f?wi.pop():void 0;return p instanceof Promise?p.then(h=>(y&&(y.issues=h.issues.length?ps(h.issues):qm),h)):(y&&(y.issues=p.issues.length?ps(p.issues):qm),p)};e._zod.parse=a,e._zod.run===o&&(e._zod.run=a)})}};function gs(){return ub}function ys(e,t){const r=e[ms]?.backEdges;return r!==void 0&&t!==null&&typeof t=="object"&&r.has(t)}const lb=()=>{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"},map:{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",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",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=V(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 ${F(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: ${N(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":""}: ${N(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 db(){return{localeError:lb()}}const fb=()=>{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"},map:{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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(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 ${F(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${N(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":""}: ${N(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 mb(){return{localeError:fb()}}function Hm(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 pb=()=>{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"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function 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",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",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=V(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 ${F(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 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=Hm(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=Hm(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"}: ${N(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 hb(){return{localeError:pb()}}const gb=()=>{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"},map:{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",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",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=V(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 ${F(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 ${N(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":""}: ${N(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 yb(){return{localeError:gb()}}const vb=()=>{const e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(n){return e[n]??null}const r={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return n.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${F(n.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${N(n.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${o}${n.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${o}${n.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${o}${n.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${o}${n.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${o.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${n.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${n.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function $b(){return{localeError:vb()}}const _b=()=>{const e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function 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",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(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 ${F(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${N(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":""}: ${N(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 bb(){return{localeError:_b()}}const kb=()=>{const e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(n){return e[n]??null}const r={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},i={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a,c=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(l=>s.endsWith(l))?"\u06CC\u06D5":"\u06D5",u=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${o} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${u?"":c}`}case"invalid_value":return n.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${F(n.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${N(n.values,"|")}`;case"too_big":{const o=t(n.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{const o=t(n.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${o.prefix}"`:o.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${o.suffix}"`:o.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${o.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:o.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${o.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${r[o.format]??n.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${n.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${N(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${n.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function wb(){return{localeError:kb()}}const Sb=()=>{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"},map:{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",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",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=V(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 ${F(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${N(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: ${N(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 Ib(){return{localeError:Sb()}}const Ob=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function 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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",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=V(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 ${F(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${N(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"}: ${N(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 zb(){return{localeError:Ob()}}const xb=()=>{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"},map:{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",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",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=V(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 ${F(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${N(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"}: ${N(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 Tb(){return{localeError:xb()}}const Pb=()=>{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",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",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=V(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 ${F(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 ${N(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"}: ${N(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 Nb(){return{localeError:Pb()}}const Eb=()=>{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(o){return e[o]??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",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function n(o,a){return o==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):i[o]??o}return o=>{switch(o.code){case"invalid_type":{const a=n(o.expected),s=V(o.input),c=n(s,o.input);return`Invalid input: expected ${a}, received ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${F(o.values[0])}`:`Invalid option: expected one of ${N(o.values,"|")}`;case"too_big":{const a=o.exact?"exactly ":o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${a}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${a}${o.maximum.toString()}`}case"too_small":{const a=o.exact?"exactly ":o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${a}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${a}${o.minimum.toString()}`}case"invalid_format":{const a=o;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${N(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:o.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function Wm(){return{localeError:Eb()}}const Db=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function 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",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",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=V(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 ${F(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${N(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":""}: ${N(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 jb(){return{localeError:Db()}}const Cb=()=>{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",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",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=V(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 ${F(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${N(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":""}: ${N(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 Ab(){return{localeError:Cb()}}const Ub=()=>{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"},map:{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",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",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=V(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 ${F(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 ${N(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: ${N(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 Rb(){return{localeError:Ub()}}const Zb=()=>{const e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function 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",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(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 ${F(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${N(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"}: ${N(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 Mb(){return{localeError:Zb()}}const Bb=()=>{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:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instance de ${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 : ${F(n.values[0])} attendu`:`Option invalide : une valeur parmi ${N(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 de caract\xE8res invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${o.pattern}`:`${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":""} : ${N(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 Lb(){return{localeError:Bb()}}const Fb=()=>{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"},map:{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",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",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=V(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 ${F(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${N(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":""} : ${N(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 Vb(){return{localeError:Fb()}}const Gb=()=>{const e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(n){return e[n]??null}const r={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return n.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${F(n.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${N(n.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${n.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${n.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${o}${n.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${o}${n.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${o.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${n.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${n.keys.length>1?"\u0A93":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function qb(){return{localeError:Gb()}}const Jb=()=>{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"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{const l=u.expected,d=c[l??""]??i(l),m=V(u.input),f=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 ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}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 ${F(u.values[0])}`;const l=u.values.map(f=>F(f));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 p=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 ${p}`}if(u.origin==="array"||u.origin==="set"){const p=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",y=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} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}const m=u.inclusive?"<=":"<",f=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${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 p=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 ${p}`}if(u.origin==="array"||u.origin==="set"){const p=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){const h=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`}const y=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} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}const m=u.inclusive?">=":">",f=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${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,p=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${p}`}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"}: ${N(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 Kb(){return{localeError:Jb()}}const Hb=()=>{const e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(n){return e[n]??null}const r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${F(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${o}${n.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} ${o}${n.maximum} \u0939\u094B`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} \u092E\u0947\u0902 ${o}${n.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} ${o}${n.minimum} \u0939\u094B`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${o.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${o.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${n.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${n.keys.length>1?"\u092F\u093E\u0901":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${n.origin} \u092E\u0947\u0902`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Wb(){return{localeError:Hb()}}const Xb=()=>{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",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",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=V(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 ${F(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${N(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"}: ${N(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 Yb(){return{localeError:Xb()}}const Qb=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function 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",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",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=V(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 ${F(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${N(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":""}: ${N(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 ek(){return{localeError:Qb()}}function Xm(e,t,r){return Math.abs(e)===1?t:r}function xn(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 tk=()=>{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"},map:{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",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",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=V(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 ${F(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 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=Xm(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 ${xn(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 ${xn(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=Xm(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 ${xn(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 ${xn(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":""}. ${N(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${xn(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 ${xn(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function nk(){return{localeError:tk()}}const rk=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function 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",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(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 ${F(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${N(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":""}: ${N(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 ik(){return{localeError:rk()}}const ok=()=>{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"},map:{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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",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=V(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 ${F(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${N(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"}: ${N(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 ak(){return{localeError:ok()}}const sk=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function 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",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",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=V(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 ${F(n.values[0])}`:`Opzione non valida: atteso uno tra ${N(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"}: ${N(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 ck(){return{localeError:sk()}}const uk=()=>{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"},map:{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",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",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=V(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: ${F(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${N(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":""}: ${N(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 lk(){return{localeError:uk()}}const dk=()=>{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"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function 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",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",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=V(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 ${F(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 ${N(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"}: ${N(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 fk(){return{localeError:dk()}}const mk=()=>{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"},map:{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",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",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=V(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 ${F(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 ${N(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 ${N(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 Ym(){return{localeError:mk()}}function pk(){return Ym()}const hk=()=>{const e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(n){return e[n]??null}const r={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${F(n.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${n.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${n.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${o.prefix}"`:o.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${o.suffix}"`:o.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${o.includes}"`:o.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${o.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${n.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${n.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function gk(){return{localeError:hk()}}const yk=()=>{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"},map:{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",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",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=V(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 ${F(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${N(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: ${N(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 vk(){return{localeError:yk()}}const dr=e=>e.charAt(0).toUpperCase()+e.slice(1);function Qm(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 $k=()=>{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",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",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=V(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 ${F(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${N(n.values,"|")} pasirinkim\u0173`;case"too_big":{const o=i[n.origin]??n.origin,a=t(n.origin,Qm(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${dr(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`${dr(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,Qm(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${dr(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`${dr(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"}: ${N(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`${dr(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function _k(){return{localeError:$k()}}const bk=()=>{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"},map:{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",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",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=V(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 ${F(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 ${N(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"}: ${N(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 kk(){return{localeError:bk()}}const wk=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function 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",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",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=V(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 ${F(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${N(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: ${N(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 Sk(){return{localeError:wk()}}const Ik=()=>{const e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(n){return e[n]??null}const r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${F(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} \u092E\u093E ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} ${o}${n.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} \u092E\u093E ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} ${o}${n.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${o.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${n.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${n.keys.length>1?"\u0939\u0930\u0942":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${n.origin} \u092E\u093E`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Ok(){return{localeError:Ik()}}const zk=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function 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",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",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=V(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 ${F(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${N(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":""}: ${N(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 xk(){return{localeError:zk()}}const Tk=()=>{const e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function 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-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventa instanceof ${n.expected}, fekk ${s}`:`Ugyldig input: forventa ${o}, fekk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventa ${F(n.values[0])}`:`Ugyldig val: forventa eitt av ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventa ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${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): forventa ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${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 slutte med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${N(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 Pk(){return{localeError:Tk()}}const Nk=()=>{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"},map:{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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",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=V(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 ${F(n.values[0])}`:`Ugyldig valg: forventet en av ${N(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"}: ${N(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 Ek(){return{localeError:Nk()}}const Dk=()=>{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"},map:{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",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",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=V(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 ${F(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${N(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":""}: ${N(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 jk(){return{localeError:Dk()}}const Ck=()=>{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"},map:{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",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",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=V(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 ${F(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${N(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"}: ${N(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 Ak(){return{localeError:Ck()}}const Uk=()=>{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"},map:{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",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",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=V(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 ${F(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${N(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":""}: ${N(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 Rk(){return{localeError:Uk()}}const Zk=()=>{const e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}const r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){const c=n[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{const s=o(a.expected,"indefinite"),c=V(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${F(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${N(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Demasiado grande: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",c=t(a.origin);return c?`Demasiado pequeno: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Demasiado pequeno: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{const s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${N(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function Mk(){return{localeError:Zk()}}const Bk=()=>{const e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}const r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){const c=n[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{const s=o(a.expected,"indefinite"),c=V(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${F(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${N(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Grande demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Grande demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",c=t(a.origin);return c?`Pequeno demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Pequeno demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{const s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${N(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function Lk(){return{localeError:Bk()}}const Fk=()=>{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",credit_card:"num\u0103r de card de credit",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=V(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 ${F(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${N(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: ${N(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 Vk(){return{localeError:Fk()}}function ep(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 Gk=()=>{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"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function 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",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",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=V(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 ${F(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 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=ep(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=ep(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":""}: ${N(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 qk(){return{localeError:Gk()}}const Jk=()=>{const e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(n){return e[n]??null}const r={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${n.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${o}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${F(n.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${o}${n.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${o}${n.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${o.includes}"`:o.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${N(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\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 Kk(){return{localeError:Jk()}}const Hk=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function 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",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",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=V(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 ${F(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${N(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"}: ${N(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 Wk(){return{localeError:Hk()}}const Xk=()=>{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"},map:{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-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",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=V(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 ${F(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${N(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"}: ${N(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 Yk(){return{localeError:Xk()}}const Qk=()=>{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"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function 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",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",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=V(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 ${F(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 ${N(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":""}: ${N(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 ew(){return{localeError:Qk()}}const tw=()=>{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"},map:{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",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",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=V(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 ${F(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 ${N(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: ${N(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 nw(){return{localeError:tw()}}const rw=()=>{const e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(n){return e[n]??null}const r={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",jwt:"JWT",template_literal:"\u015Fablon"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${o} \xFDerine ${s} alyndy`}case"invalid_value":return n.values.length===1?`N\xE4dogry baha: ${F(n.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${o} ${n.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`N\xE4dogry setir: "${o.prefix}" bilen ba\u015Flamaly`:o.format==="ends_with"?`N\xE4dogry setir: "${o.suffix}" bilen gutarmaly`:o.format==="includes"?`N\xE4dogry setir: "${o.includes}" saklamaly`:o.format==="regex"?`N\xE4dogry setir: ${o.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xE4dogry san: ${n.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${n.keys.length>1?"lar":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${n.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function iw(){return{localeError:rw()}}const ow=()=>{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"},map:{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",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",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=V(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 ${F(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${N(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":""}: ${N(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 aw(){return{localeError:ow()}}const sw=()=>{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"},map:{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",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",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=V(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 ${F(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 ${N(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":""}: ${N(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 tp(){return{localeError:sw()}}function cw(){return tp()}const uw=()=>{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"},map:{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",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",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=V(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: ${F(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${N(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":""}: ${N(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 lw(){return{localeError:uw()}}const dw=()=>{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",credit_card:"kredit karta raqami",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=V(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 ${F(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${N(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":""}: ${N(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 fw(){return{localeError:dw()}}const mw=()=>{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"},map:{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",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",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=V(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 ${F(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 ${N(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: ${N(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 pw(){return{localeError:mw()}}const hw=()=>{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"},map:{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",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",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=V(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 ${F(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${N(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): ${N(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 gw(){return{localeError:hw()}}const yw=()=>{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"},map:{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",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",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=V(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 ${F(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${N(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${N(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 vw(){return{localeError:yw()}}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"},map:{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",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",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=V(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 ${F(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${N(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: ${N(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:$w()}}var np=Object.freeze({__proto__:null,ar:db,az:mb,be:hb,bg:yb,bn:$b,ca:bb,ckb:wb,cs:Ib,da:zb,de:Tb,el:Nb,en:Wm,eo:jb,es:Ab,fa:Rb,fi:Mb,fr:Lb,frCA:Vb,gu:qb,he:Kb,hi:Wb,hr:Yb,hu:ek,hy:nk,id:ik,is:ak,it:ck,ja:lk,ka:fk,kh:pk,km:Ym,kn:gk,ko:vk,lt:_k,mk:kk,ms:Sk,ne:Ok,nl:xk,nn:Pk,no:Ek,ota:jk,pl:Rk,ps:Ak,pt:Mk,ptBR:Lk,ro:Vk,ru:qk,sk:Kk,sl:Wk,sv:Yk,ta:ew,th:nw,tk:iw,tr:aw,ua:cw,uk:tp,ur:lw,uz:fw,vi:pw,yo:_w,zhCN:gw,zhTW:vw}),rp;const ip=Symbol("ZodOutput"),op=Symbol("ZodInput");class ap{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 vs(){return new ap}(rp=globalThis).__zod_globalRegistry??(rp.__zod_globalRegistry=vs());const _t=globalThis.__zod_globalRegistry,dt=Symbol.for("zod.compile.invalid"),sp=Symbol.for("zod.compile.fallback");class Ht extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}}class pe extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}}function bw(e,t){try{return Si(e,{assertOnly:!0})}catch{return t}}function cp(e,t){try{const r=Si(e),i=Ee(e),n=e._zod.run,o=n.__originalRun??n,a=(s,c)=>{if(c?.async||c?.direction==="backward"||c?.skipChecks||c?.[sp]||c&&ys(c,s.value))return o(s,c);const u=r(s.value);return u!==dt?(s.value=u,s):(c&&(c[sp]=!0),o(s,c))};return a.__originalRun=o,i._zod.bag.fallbackRun=o,i._zod.bag.validator=bw(e,r),i._zod.run=a,n.__originalRun||kw(i,e,r),i}catch(r){if(t?.strict)throw r;return e}}function kw(e,t,r){const i=e,n=t;if(typeof n.safeParse=="function"){const o=n.safeParse;i.safeParse=(a,s)=>{const c=r(a);return c!==dt?{success:!0,data:c}:o(a,s)}}if(typeof n.parse=="function"){const o=n.parse;i.parse=(a,s)=>{const c=r(a);return c!==dt?c:o(a,s)}}}function Si(e,t){let r=!0;try{r=Km(e)}catch{}if(r)throw new pe("a schema whose subtree contains a reference cycle");const i={constants:new Map,constantCounter:0,varCounter:0},n=new Ga(["input"]),o=je(n,i,e,"input",!t?.assertOnly);n.write(o===null?"return true;":`return ${o};`);const a=["INVALID",...i.constants.keys()],s=[dt,...i.constants.values()],c=n.content.join(`
52
+ `)}return h.write("payload.value = newResult;"),h.write("return payload;"),h.compile()};let a;const s=Pn,c=!nt.jitless,l=c&&Wl.value,d=t.catchall;let m;e._zod.parse=(f,p)=>{m??(m=i.value);const y=f.value;return s(y)?c&&l&&p?.async===!1&&p.jitless!==!0?(a||(a=o(t.shape)),f=a(f,p),d?cm([],y,f,p,m,e):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),f)}});function lm(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=>!dn(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=>St(a,i,Je())))}),t)}const ki=S("$ZodUnion",(e,t)=>{ne.init(e,t),fe(e,"optin",i=>i.def.options.some(n=>n._zod.optin==="defaulted")?"defaulted":i.def.options.some(n=>n._zod.optin!==void 0)?"optional":void 0),fe(e,"optout",i=>i.def.options.some(n=>n._zod.optout==="optional")?"optional":void 0),fe(e,"values",i=>{if(i.def.options.every(n=>n._zod.values))return new Set(i.def.options.flatMap(n=>Array.from(n._zod.values)))}),fe(e,"pattern",i=>{if(i.def.options.every(n=>n._zod.pattern)){const n=i.def.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>ci(o.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=>lm(s,i,e,n)):lm(a,i,e,n)}});function dm(e,t,r,i){const n=[];for(let o=0;o<e.length;o++)e[o].issues.length===0&&n.push(o);return n.length===1?(t.value=e[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=>St(a,i,Je())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:n}),t)}const fm=S("$ZodXor",(e,t)=>{ki.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=>dm(s,i,e,n)):dm(a,i,e,n)}});function mm(e,t){const r=e._zod;let i=r.bag.optionsMap;if(!i){i=new Map;const{options:n,discriminator:o}=r.def;for(const a of n)for(const s of a._zod.propValues?.[o]??[])i.has(s)||i.set(s,a);r.bag.optionsMap=i}return i.get(t)}const pm=S("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ki.init(e,t);const r=e._zod.parse;fe(e,"propValues",n=>{const o={};for(const a of n.def.options){const s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${n.def.options.indexOf(a)}"`);for(const[c,u]of Object.entries(s)){Object.prototype.hasOwnProperty.call(o,c)||Ze(o,c,new Set);for(const l of u)o[c].add(l)}}return o}),t.options.forEach((n,o)=>{const a=us.get(n._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${o}"`)});const i=rr(()=>{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(!Pn(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)}}),hm=S("$ZodIntersection",(e,t)=>{ne.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])=>gm(r,c,u)):gm(r,o,a)}});function hr(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(Ft(e)&&Ft(t)){const r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};Object.prototype.hasOwnProperty.call(n,"__proto__")&&delete n.__proto__;for(const o of i){if(o==="__proto__")continue;const a=hr(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=hr(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 gm(e,t,r){const i=new Map;let n;const o=new Map,a=(u,l)=>{let d;if(u.code==="unrecognized_keys"&&!u.path?.length)n??(n=u),d=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){const m=String(u.path[0]);o.has(m)||o.set(m,u),d=[m]}else return!1;for(const m of d)i.has(m)||i.set(m,{}),i.get(m)[l]=!0;return!0};for(const u of t.issues)a(u,"l")||e.issues.push(u);for(const u of r.issues)a(u,"r")||e.issues.push(u);const s=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(s.length){const u=n?s.filter(l=>n.keys.includes(l)):[];u.length&&e.issues.push({...n,keys:u});for(const l of s)!u.includes(l)&&o.has(l)&&e.issues.push(o.get(l))}const c=hr(t.value,r.value);if(!c.valid){if(dn(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}const ds=S("$ZodTuple",(e,t)=>{ne.init(e,t);const r=t.items,i=nt.memoizer;i?.attach(e),e._zod.parse=(n,o)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=i?i.alloc(e,n,[],o):[];const s=[],c=ym(r,"optin"),u=ym(r,"optout");if(!t.rest){if(a.length<c)return n.issues.push({code:"too_small",minimum:c,inclusive:!0,input:a,inst:e,origin:"array"}),n;a.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}const l=new Array(r.length);for(let d=0;d<r.length;d++){const m=r[d]._zod.run({value:a[d],issues:[]},o);m instanceof Promise?s.push(m.then(f=>{l[d]=f})):l[d]=m}if(t.rest){let d=r.length-1;const m=a.slice(r.length);for(const f of m){d++;const p=t.rest._zod.run({value:f,issues:[]},o);p instanceof Promise?s.push(p.then(y=>vm(y,n,d))):vm(p,n,d)}}return s.length?Promise.all(s).then(()=>$m(l,n,r,a,u)):$m(l,n,r,a,u)}});function ym(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function vm(e,t,r){e.issues.length&&t.issues.push(...kt(r,e.issues)),t.value[r]=e.value}function $m(e,t,r,i,n){for(let o=0;o<r.length;o++){const a=e[o],s=o<i.length;if(!s&&o>=n&&r[o]._zod.optin==="optional"){t.value.length=o;break}if(a.issues.length){if(!s&&o>=n){t.value.length=o;break}t.issues.push(...kt(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 _m=S("$ZodRecord",(e,t)=>{ne.init(e,t);const r=nt.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{const o=i.value;if(!Ft(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;const a=[],s=t.keyType._zod.values;if(s&&!t.partial){i.value=r?r.alloc(e,i,{},n):{};const c=new Set;for(const l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;const d=t.keyType._zod.run({value:l,issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>St(p,n,Je())),input:l,path:[l],inst:e});continue}const m=d.value;if(m==="__proto__")continue;const f=t.valueType._zod.run({value:o[l],issues:[]},n);f instanceof Promise?a.push(f.then(p=>{p.issues.length&&i.issues.push(...kt(l,p.issues)),i.value[m]=p.value})):(f.issues.length&&i.issues.push(...kt(l,f.issues)),i.value[m]=f.value)}let u;for(const l in o)if(!c.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;i.value[l]=o[l]}else u=u??[],u.push(l);u&&u.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}else{i.value=r?r.alloc(e,i,{},n):{};let c;for(const u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let l=t.keyType._zod.run({value:u,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&lr.test(u)&&l.issues.length){const p=t.keyType._zod.run({value:Number(u),issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(l=p)}if(l.issues.length){t.mode==="loose"?i.value[u]=o[u]:s?(c=c??[],c.push(u)):i.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>St(p,n,Je())),input:u,path:[u],inst:e});continue}const m=l.value;if(m==="__proto__")continue;const f=t.valueType._zod.run({value:o[u],issues:[]},n);f instanceof Promise?a.push(f.then(p=>{p.issues.length&&i.issues.push(...kt(u,p.issues)),i.value[m]=p.value})):(f.issues.length&&i.issues.push(...kt(u,f.issues)),i.value[m]=f.value)}c&&c.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),bm=S("$ZodMap",(e,t)=>{ne.init(e,t);const r=nt.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{const o=i.value;if(!(o instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),i;const a=[];i.value=r?r.alloc(e,i,new Map,n):new Map;for(const[s,c]of o){const u=t.keyType._zod.run({value:s,issues:[]},n),l=t.valueType._zod.run({value:c,issues:[]},n);u instanceof Promise||l instanceof Promise?a.push(Promise.all([u,l]).then(([d,m])=>{km(d,m,i,s,o,e,n)})):km(u,l,i,s,o,e,n)}return a.length?Promise.all(a).then(()=>i):i}});function km(e,t,r,i,n,o,a){e.issues.length&&(ui.has(typeof i)?r.issues.push(...kt(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(s=>St(s,a,Je()))})),t.issues.length&&(ui.has(typeof i)?r.issues.push(...kt(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(s=>St(s,a,Je()))})),r.value.set(e.value,t.value)}const Sm=S("$ZodSet",(e,t)=>{ne.init(e,t);const r=nt.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{const o=i.value;if(!(o instanceof Set))return i.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),i;const a=[];i.value=r?r.alloc(e,i,new Set,n):new Set;for(const s of o){const c=t.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise?a.push(c.then(u=>wm(u,i))):wm(c,i)}return a.length?Promise.all(a).then(()=>i):i}});function wm(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Im=S("$ZodEnum",(e,t)=>{ne.init(e,t);const r=fa(t.entries),i=new Set(r);e._zod.values=i;const n=r.filter(o=>ui.has(typeof o));e._zod.pattern=new RegExp(n.length?`^(${n.map(o=>Vt(o.toString())).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(o,a)=>{const s=o.value;return i.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),Om=S("$ZodLiteral",(e,t)=>{ne.init(e,t);const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(t.values.length?`^(${t.values.map(i=>typeof i=="string"?Vt(i):i?Vt(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$"),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}}),Tm=S("$ZodFile",(e,t)=>{ne.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}}),xm=S("$ZodTransform",(e,t)=>{ne.init(e,t),e._zod.optin="optional",nt.memoizer?.guard(e),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new fi(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));if(n instanceof Promise)throw new Gt;return r.value=n,r}});function Pm(e,t){return e.value=t.issues.length?void 0:t.value,e}const fs=S("$ZodOptional",(e,t)=>{ne.init(e,t),fe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",fe(e,"values",r=>{const i=r.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),fe(e,"pattern",r=>{const i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${ci(i.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;const n=t.innerType._zod.run({value:r.value,issues:[]},i);return n instanceof Promise?n.then(o=>Pm(r,o)):Pm(r,n)}return t.innerType._zod.run(r,i)}}),zm=S("$ZodExactOptional",(e,t)=>{fs.init(e,t),fe(e,"values",r=>r.def.innerType._zod.values),fe(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Nm=S("$ZodNullable",(e,t)=>{ne.init(e,t),fe(e,"optin",r=>r.def.innerType._zod.optin),fe(e,"optout",r=>r.def.innerType._zod.optout),fe(e,"pattern",r=>{const i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${ci(i.source)}|null)$`):void 0}),fe(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Em=S("$ZodDefault",(e,t)=>{ne.init(e,t),e._zod.optin="defaulted",fe(e,"values",r=>r.def.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=>Cm(o,t)):Cm(n,t)}});function Cm(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Dm=S("$ZodPrefault",(e,t)=>{ne.init(e,t),e._zod.optin="defaulted",fe(e,"values",r=>r.def.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))}),jm=S("$ZodNonOptional",(e,t)=>{ne.init(e,t),fe(e,"values",r=>{const i=r.def.innerType._zod.values;return i?new Set([...i].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,i)=>{const n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Am(o,e)):Am(n,e)}});function Am(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 Um=S("$ZodSuccess",(e,t)=>{ne.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new fi("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)}});function Rm(e,t,r,i){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(n=>St(n,i,Je()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Bm=S("$ZodCatch",(e,t)=>{ne.init(e,t),fe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),fe(e,"optout",r=>r.def.innerType._zod.optout),fe(e,"values",r=>r.def.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({value:r.value,issues:[]},i);return n instanceof Promise?n.then(o=>Rm(r,o,t,i)):Rm(r,n,t,i)}}),Mm=S("$ZodNaN",(e,t)=>{ne.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)}),ms=S("$ZodPipe",(e,t)=>{ne.init(e,t),fe(e,"values",r=>r.def.in._zod.values),fe(e,"optin",r=>r.def.in._zod.optin),fe(e,"optout",r=>r.def.out._zod.optout),fe(e,"propValues",r=>r.def.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=>Si(a,t.in,i)):Si(o,t.in,i)}const n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Si(o,t.out,i)):Si(n,t.out,i)}});function Si(e,t,r){return e.issues.some(i=>i.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const ps=S("$ZodCodec",(e,t)=>{ne.init(e,t),fe(e,"values",r=>r.def.in._zod.values),fe(e,"optin",r=>r.def.in._zod.optin),fe(e,"optout",r=>r.def.out._zod.optout),fe(e,"propValues",r=>r.def.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=>wi(a,t,i)):wi(o,t,i)}else{const o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>wi(a,t,i)):wi(o,t,i)}}});function wi(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=>Ii(e,o,t.out,r)):Ii(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>Ii(e,o,t.in,r)):Ii(e,n,t.in,r)}}function Ii(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}const Zm=S("$ZodPreprocess",(e,t)=>{ms.init(e,t)}),Lm=S("$ZodReadonly",(e,t)=>{ne.init(e,t),fe(e,"propValues",r=>r.def.innerType._zod.propValues),fe(e,"values",r=>r.def.innerType._zod.values),fe(e,"optin",r=>r.def.innerType?._zod?.optin),fe(e,"optout",r=>r.def.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(Fm):Fm(n)}});function Fm(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Vm=S("$ZodTemplateLiteral",(e,t)=>{ne.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||Yl.has(typeof i))r.push(Vt(`${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)}),Gm=S("$ZodFunction",(e,t)=>(ne.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...i){const n=e._def.input?pi(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?pi(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){const n=e._def.input?await hi(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await hi(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},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 ds({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)),qm=S("$ZodPromise",(e,t)=>{ne.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),hs=S("$ZodLazy",(e,t)=>{ne.init(e,t),Kl(e._zod,"innerType",()=>{const r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),fe(e,"pattern",r=>r.innerType?._zod?.pattern),fe(e,"propValues",r=>r.innerType?._zod?.propValues),fe(e,"optin",r=>r.innerType?._zod?.optin??void 0),fe(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Jm=S("$ZodCustom",(e,t)=>{De.init(e,t),ne.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=>Km(o,r,i,e));Km(n,r,i,e)}});function Km(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(Nn(n))}}class Hm extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const gs="~memo",Wm=[];function ys(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const Ym=new WeakMap;function vs(e,t){const r=Ym.get(e);if(r!==void 0)return r;if(t.has(e))return!0;t.add(e);let i=!1;const n=s=>{!i&&s?._zod&&vs(s,t)&&(i=!0)},o=e._zod.def;switch(o.type){case"object":{for(const s of Reflect.ownKeys(o.shape))n(o.shape[s]);n(o.catchall);break}case"array":n(o.element);break;case"tuple":for(const s of o.items)n(s);n(o.rest);break;case"record":case"map":n(o.keyType),n(o.valueType);break;case"set":n(o.valueType);break;case"union":for(const s of o.options)n(s);break;case"intersection":n(o.left),n(o.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":n(o.innerType);break;case"pipe":n(o.in),n(o.out);break;case"function":n(o.input),n(o.output);break;case"lazy":n(e._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const s in o){const c=Object.getOwnPropertyDescriptor(o,s);if(!c||c.get)continue;const u=c.value;if(!(!u||typeof u!="object")){if(u._zod)n(u);else if(Array.isArray(u))for(const l of u)n(l)}}}return t.delete(e),Ym.set(e,i),i}function Xm(e){return vs(e,new Set)}function gb(e,t){let r=e.buckets.get(t);return r||(r=new Map,e.buckets.set(t,r)),r}let Oi;const Ti=[],yb={alloc(e,t,r){const i=Oi;if(!i)return r;Oi=void 0;const n={value:r,issues:null};return i.set(t.value,n),Ti.push(n),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const r=e._zod.parse,i=(n,o)=>{if(o.direction!=="backward"&&_s(o,n.value))throw new Hm;return r(n,o)};e._zod.parse=i,e._zod.run===r&&(e._zod.run=i)})},attach(e){var t;let r,i,n;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const o=e._zod.parse,a=(s,c)=>{if(r===void 0&&(r=vs(e,new Set),!r))return e._zod.parse=o,e._zod.run===a&&(e._zod.run=o),o(s,c);const u=s.value;if(u===null||typeof u!="object")return o(s,c);let l=c[gs];l||(l={buckets:new Map,backEdges:void 0},c[gs]=l);let d;i===c?d=n:(d=gb(l,e),i=c,n=d);const m=d.get(u);if(m)return s.value=m.value,m.issues?m.issues.length&&s.issues.push(...ys(m.issues)):(s.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(m.value)),s;Oi=d;const f=Ti.length,p=o(s,c);Oi=void 0;const y=Ti.length>f?Ti.pop():void 0;return p instanceof Promise?p.then(h=>(y&&(y.issues=h.issues.length?ys(h.issues):Wm),h)):(y&&(y.issues=p.issues.length?ys(p.issues):Wm),p)};e._zod.parse=a,e._zod.run===o&&(e._zod.run=a)})}};function $s(){return yb}function _s(e,t){const r=e[gs]?.backEdges;return r!==void 0&&t!==null&&typeof t=="object"&&r.has(t)}const vb=()=>{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"},map:{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",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",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=V(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 ${F(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: ${N(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":""}: ${N(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 $b(){return{localeError:vb()}}const _b=()=>{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"},map:{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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(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 ${F(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${N(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":""}: ${N(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 bb(){return{localeError:_b()}}function Qm(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 kb=()=>{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"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function 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",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",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=V(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 ${F(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 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=Qm(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=Qm(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"}: ${N(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 Sb(){return{localeError:kb()}}const wb=()=>{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"},map:{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",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",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=V(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 ${F(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 ${N(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":""}: ${N(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 Ib(){return{localeError:wb()}}const Ob=()=>{const e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(n){return e[n]??null}const r={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return n.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${F(n.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${N(n.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${o}${n.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${o}${n.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${o}${n.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${o}${n.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${o.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${n.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${n.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function Tb(){return{localeError:Ob()}}const xb=()=>{const e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function 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",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(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 ${F(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${N(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":""}: ${N(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 Pb(){return{localeError:xb()}}const zb=()=>{const e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(n){return e[n]??null}const r={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},i={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a,c=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(l=>s.endsWith(l))?"\u06CC\u06D5":"\u06D5",u=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${o} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${u?"":c}`}case"invalid_value":return n.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${F(n.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${N(n.values,"|")}`;case"too_big":{const o=t(n.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{const o=t(n.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${o.prefix}"`:o.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${o.suffix}"`:o.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${o.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:o.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${o.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${r[o.format]??n.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${n.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${N(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${n.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function Nb(){return{localeError:zb()}}const Eb=()=>{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"},map:{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",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",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=V(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 ${F(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${N(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: ${N(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 Cb(){return{localeError:Eb()}}const Db=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function 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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",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=V(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 ${F(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${N(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"}: ${N(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 jb(){return{localeError:Db()}}const Ab=()=>{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"},map:{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",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",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=V(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 ${F(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${N(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"}: ${N(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 Ub(){return{localeError:Ab()}}const Rb=()=>{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",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",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=V(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 ${F(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 ${N(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"}: ${N(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 Bb(){return{localeError:Rb()}}const Mb=()=>{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(o){return e[o]??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",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function n(o,a){return o==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):i[o]??o}return o=>{switch(o.code){case"invalid_type":{const a=n(o.expected),s=V(o.input),c=n(s,o.input);return`Invalid input: expected ${a}, received ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${F(o.values[0])}`:`Invalid option: expected one of ${N(o.values,"|")}`;case"too_big":{const a=o.exact?"exactly ":o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${a}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${a}${o.maximum.toString()}`}case"too_small":{const a=o.exact?"exactly ":o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${a}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${a}${o.minimum.toString()}`}case"invalid_format":{const a=o;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${N(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:o.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function ep(){return{localeError:Mb()}}const Zb=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function 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",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",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=V(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 ${F(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${N(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":""}: ${N(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 Lb(){return{localeError:Zb()}}const Fb=()=>{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",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",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=V(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 ${F(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${N(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":""}: ${N(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 Vb(){return{localeError:Fb()}}const Gb=()=>{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"},map:{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",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",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=V(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 ${F(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 ${N(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: ${N(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 qb(){return{localeError:Gb()}}const Jb=()=>{const e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function 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",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(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 ${F(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${N(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"}: ${N(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 Kb(){return{localeError:Jb()}}const Hb=()=>{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:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instance de ${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 : ${F(n.values[0])} attendu`:`Option invalide : une valeur parmi ${N(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 de caract\xE8res invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${o.pattern}`:`${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":""} : ${N(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 Wb(){return{localeError:Hb()}}const Yb=()=>{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"},map:{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",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",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=V(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 ${F(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${N(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":""} : ${N(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 Xb(){return{localeError:Yb()}}const Qb=()=>{const e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(n){return e[n]??null}const r={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return n.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${F(n.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${N(n.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${n.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${n.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${o}${n.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${o}${n.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${o.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${n.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${n.keys.length>1?"\u0A93":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function ek(){return{localeError:Qb()}}const tk=()=>{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"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{const l=u.expected,d=c[l??""]??i(l),m=V(u.input),f=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 ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}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 ${F(u.values[0])}`;const l=u.values.map(f=>F(f));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 p=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 ${p}`}if(u.origin==="array"||u.origin==="set"){const p=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",y=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} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}const m=u.inclusive?"<=":"<",f=o(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${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 p=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 ${p}`}if(u.origin==="array"||u.origin==="set"){const p=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){const h=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`}const y=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} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}const m=u.inclusive?">=":">",f=o(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${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,p=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${p}`}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"}: ${N(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 nk(){return{localeError:tk()}}const rk=()=>{const e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(n){return e[n]??null}const r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${F(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${o}${n.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} ${o}${n.maximum} \u0939\u094B`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} \u092E\u0947\u0902 ${o}${n.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} ${o}${n.minimum} \u0939\u094B`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${o.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${o.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${n.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${n.keys.length>1?"\u092F\u093E\u0901":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${n.origin} \u092E\u0947\u0902`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function ik(){return{localeError:rk()}}const ok=()=>{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",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",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=V(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 ${F(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${N(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"}: ${N(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 ak(){return{localeError:ok()}}const sk=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function 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",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",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=V(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 ${F(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${N(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":""}: ${N(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 ck(){return{localeError:sk()}}function tp(e,t,r){return Math.abs(e)===1?t:r}function Cn(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 uk=()=>{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"},map:{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",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",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=V(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 ${F(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 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=tp(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 ${Cn(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 ${Cn(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=tp(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 ${Cn(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 ${Cn(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":""}. ${N(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Cn(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 ${Cn(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function lk(){return{localeError:uk()}}const dk=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function 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",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(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 ${F(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${N(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":""}: ${N(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 fk(){return{localeError:dk()}}const mk=()=>{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"},map:{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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",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=V(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 ${F(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${N(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"}: ${N(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 pk(){return{localeError:mk()}}const hk=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function 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",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",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=V(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 ${F(n.values[0])}`:`Opzione non valida: atteso uno tra ${N(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"}: ${N(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 gk(){return{localeError:hk()}}const yk=()=>{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"},map:{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",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",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=V(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: ${F(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${N(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":""}: ${N(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 vk(){return{localeError:yk()}}const $k=()=>{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"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function 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",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",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=V(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 ${F(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 ${N(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"}: ${N(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 _k(){return{localeError:$k()}}const bk=()=>{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"},map:{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",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",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=V(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 ${F(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 ${N(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 ${N(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 np(){return{localeError:bk()}}function kk(){return np()}const Sk=()=>{const e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(n){return e[n]??null}const r={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${F(n.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${n.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${n.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${o.prefix}"`:o.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${o.suffix}"`:o.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${o.includes}"`:o.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${o.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${n.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${n.keys.length>1?"s":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${n.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function wk(){return{localeError:Sk()}}const Ik=()=>{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"},map:{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",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",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=V(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 ${F(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${N(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: ${N(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 Ok(){return{localeError:Ik()}}const gr=e=>e.charAt(0).toUpperCase()+e.slice(1);function rp(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 Tk=()=>{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",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",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=V(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 ${F(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${N(n.values,"|")} pasirinkim\u0173`;case"too_big":{const o=i[n.origin]??n.origin,a=t(n.origin,rp(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${gr(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`${gr(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,rp(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${gr(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`${gr(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"}: ${N(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`${gr(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function xk(){return{localeError:Tk()}}const Pk=()=>{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"},map:{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",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",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=V(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 ${F(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 ${N(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"}: ${N(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 zk(){return{localeError:Pk()}}const Nk=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function 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",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",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=V(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 ${F(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${N(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: ${N(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 Ek(){return{localeError:Nk()}}const Ck=()=>{const e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(n){return e[n]??null}const r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${F(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} \u092E\u093E ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} ${o}${n.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} \u092E\u093E ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} ${o}${n.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{const o=n;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${o.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${n.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${n.keys.length>1?"\u0939\u0930\u0942":""}: ${N(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${n.origin} \u092E\u093E`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Dk(){return{localeError:Ck()}}const jk=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function 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",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",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=V(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 ${F(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${N(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":""}: ${N(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 Ak(){return{localeError:jk()}}const Uk=()=>{const e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function 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-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventa instanceof ${n.expected}, fekk ${s}`:`Ugyldig input: forventa ${o}, fekk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventa ${F(n.values[0])}`:`Ugyldig val: forventa eitt av ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventa ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${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): forventa ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${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 slutte med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${N(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 Rk(){return{localeError:Uk()}}const Bk=()=>{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"},map:{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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",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=V(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 ${F(n.values[0])}`:`Ugyldig valg: forventet en av ${N(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"}: ${N(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 Mk(){return{localeError:Bk()}}const Zk=()=>{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"},map:{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",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",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=V(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 ${F(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${N(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":""}: ${N(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 Lk(){return{localeError:Zk()}}const Fk=()=>{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"},map:{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",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",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=V(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 ${F(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${N(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"}: ${N(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 Vk(){return{localeError:Fk()}}const Gk=()=>{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"},map:{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",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",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=V(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 ${F(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${N(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":""}: ${N(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 qk(){return{localeError:Gk()}}const Jk=()=>{const e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}const r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){const c=n[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{const s=o(a.expected,"indefinite"),c=V(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${F(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${N(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Demasiado grande: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",c=t(a.origin);return c?`Demasiado pequeno: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Demasiado pequeno: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{const s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${N(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function Kk(){return{localeError:Jk()}}const Hk=()=>{const e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}const r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){const c=n[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{const s=o(a.expected,"indefinite"),c=V(a.input),u=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${u}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${F(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${N(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Grande demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Grande demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",c=t(a.origin);return c?`Pequeno demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Pequeno demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{const s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${N(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function Wk(){return{localeError:Hk()}}const Yk=()=>{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",credit_card:"num\u0103r de card de credit",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=V(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 ${F(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${N(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: ${N(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 Xk(){return{localeError:Yk()}}function ip(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 Qk=()=>{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"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function 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",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",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=V(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 ${F(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 ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=ip(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=ip(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":""}: ${N(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 eS(){return{localeError:Qk()}}const tS=()=>{const e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(n){return e[n]??null}const r={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${n.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${o}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${F(n.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${o}${n.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${o}${n.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${o.includes}"`:o.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${N(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\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 nS(){return{localeError:tS()}}const rS=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function 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",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",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=V(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 ${F(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${N(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"}: ${N(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 iS(){return{localeError:rS()}}const oS=()=>{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"},map:{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-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",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=V(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 ${F(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${N(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"}: ${N(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 aS(){return{localeError:oS()}}const sS=()=>{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"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function 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",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",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=V(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 ${F(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 ${N(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":""}: ${N(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 cS(){return{localeError:sS()}}const uS=()=>{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"},map:{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",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",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=V(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 ${F(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 ${N(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: ${N(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 lS(){return{localeError:uS()}}const dS=()=>{const e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(n){return e[n]??null}const r={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",jwt:"JWT",template_literal:"\u015Fablon"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const o=i[n.expected]??n.expected,a=V(n.input),s=i[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${o} \xFDerine ${s} alyndy`}case"invalid_value":return n.values.length===1?`N\xE4dogry baha: ${F(n.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${N(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${o} ${n.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`N\xE4dogry setir: "${o.prefix}" bilen ba\u015Flamaly`:o.format==="ends_with"?`N\xE4dogry setir: "${o.suffix}" bilen gutarmaly`:o.format==="includes"?`N\xE4dogry setir: "${o.includes}" saklamaly`:o.format==="regex"?`N\xE4dogry setir: ${o.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xE4dogry san: ${n.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${n.keys.length>1?"lar":""}: ${N(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${n.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function fS(){return{localeError:dS()}}const mS=()=>{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"},map:{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",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",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=V(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 ${F(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${N(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":""}: ${N(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 pS(){return{localeError:mS()}}const hS=()=>{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"},map:{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",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",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=V(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 ${F(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 ${N(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":""}: ${N(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 op(){return{localeError:hS()}}function gS(){return op()}const yS=()=>{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"},map:{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",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",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=V(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: ${F(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${N(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":""}: ${N(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 vS(){return{localeError:yS()}}const $S=()=>{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",credit_card:"kredit karta raqami",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=V(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 ${F(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${N(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":""}: ${N(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 _S(){return{localeError:$S()}}const bS=()=>{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"},map:{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",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",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=V(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 ${F(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 ${N(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: ${N(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 kS(){return{localeError:bS()}}const SS=()=>{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"},map:{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",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",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=V(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 ${F(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${N(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): ${N(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 wS(){return{localeError:SS()}}const IS=()=>{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"},map:{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",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",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=V(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 ${F(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${N(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${N(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 OS(){return{localeError:IS()}}const TS=()=>{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"},map:{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",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",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=V(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 ${F(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${N(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: ${N(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 xS(){return{localeError:TS()}}var ap=Object.freeze({__proto__:null,ar:$b,az:bb,be:Sb,bg:Ib,bn:Tb,ca:Pb,ckb:Nb,cs:Cb,da:jb,de:Ub,el:Bb,en:ep,eo:Lb,es:Vb,fa:qb,fi:Kb,fr:Wb,frCA:Xb,gu:ek,he:nk,hi:ik,hr:ak,hu:ck,hy:lk,id:fk,is:pk,it:gk,ja:vk,ka:_k,kh:kk,km:np,kn:wk,ko:Ok,lt:xk,mk:zk,ms:Ek,ne:Dk,nl:Ak,nn:Rk,no:Mk,ota:Lk,pl:qk,ps:Vk,pt:Kk,ptBR:Wk,ro:Xk,ru:eS,sk:nS,sl:iS,sv:aS,ta:cS,th:lS,tk:fS,tr:pS,ua:gS,uk:op,ur:vS,uz:_S,vi:kS,yo:xS,zhCN:wS,zhTW:OS}),sp;const cp=Symbol("ZodOutput"),up=Symbol("ZodInput");class lp{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 bs(){return new lp}(sp=globalThis).__zod_globalRegistry??(sp.__zod_globalRegistry=bs());const wt=globalThis.__zod_globalRegistry,pt=Symbol.for("zod.compile.invalid"),dp=Symbol.for("zod.compile.fallback");class en extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}}class ge extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}}function PS(e,t){try{return xi(e,{assertOnly:!0})}catch{return t}}function fp(e,t){try{const r=xi(e),i=Ee(e),n=e._zod.run,o=n.__originalRun??n,a=(s,c)=>{if(c?.async||c?.direction==="backward"||c?.skipChecks||c?.[dp]||c&&_s(c,s.value))return o(s,c);const u=r(s.value);return u!==pt?(s.value=u,s):(c&&(c[dp]=!0),o(s,c))};return a.__originalRun=o,i._zod.bag.fallbackRun=o,i._zod.bag.validator=PS(e,r),i._zod.run=a,n.__originalRun||zS(i,e,r),i}catch(r){if(t?.strict)throw r;return e}}function zS(e,t,r){const i=e,n=t;if(typeof n.safeParse=="function"){const o=n.safeParse;i.safeParse=(a,s)=>{const c=r(a);return c!==pt?{success:!0,data:c}:o(a,s)}}if(typeof n.parse=="function"){const o=n.parse;i.parse=(a,s)=>{const c=r(a);return c!==pt?c:o(a,s)}}}function xi(e,t){let r=!0;try{r=Xm(e)}catch{}if(r)throw new ge("a schema whose subtree contains a reference cycle");const i={constants:new Map,constantCounter:0,varCounter:0},n=new Ka(["input"]),o=je(n,i,e,"input",!t?.assertOnly);n.write(o===null?"return true;":`return ${o};`);const a=["INVALID",...i.constants.keys()],s=[pt,...i.constants.values()],c=n.content.join(`
53
53
  `),u=t?.debug?a.length>0?`// Constants: ${a.join(", ")}
54
54
  ${c}`:c:"",l=Function,d=`return (input) => {
55
55
  ${c}
56
- }`;let m;try{m=new l(...a,d)(...s)}catch(f){throw new pe(`this schema (generated code failed to evaluate: ${f.message})`)}return t?.debug&&(m.code=u),m}function X(e,t){for(const[i,n]of e.constants)if(n===t)return i;const r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function te(e){return`v${e.varCounter++}`}function ww(e,t){const r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return dt;const i=r;return i.issues.length===0?i.value:dt}function et(e,t,r,i,n=!0){const o=e.content.length,a=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return je(e,t,r,i,n)}catch(u){if(!(u instanceof pe)||!u.islandable)throw u;if(e.content.length=o,t.constants.size>a){const l=Array.from(t.constants.keys()).slice(a);for(const d of l)t.constants.delete(d)}return t.constantCounter=s,t.varCounter=c,Sw(e,t,r,i)}}function Sw(e,t,r,i){const n=X(t,r),o=X(t,ww),a=te(t);return e.write(`const ${a} = ${o}(${n}, ${i});`),e.write(`if (${a} === INVALID) return INVALID;`),a}const Iw=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function Ow(e,t,r,i){const n=r._zod.def.checks;if(!n||n.length===0)return i;let o=i;for(const a of n){const s=a._zod.def;if(s.when&&!Iw.has(s.check))throw new pe('check with a custom "when" condition');switch(s.check){case"greater_than":zw(e,t,s,o);break;case"less_than":xw(e,t,s,o);break;case"multiple_of":Tw(e,t,s,o);break;case"number_format":lp(e,s,o);break;case"min_length":{const c=sn(s.minimum,"min_length"),u=$s(e,t,o,`${o}.length >= ${c} && ${o}.length < ${s.minimum*2}`);e.write(`if (${u} < ${c}) return INVALID;`);break}case"max_length":{const c=sn(s.maximum,"max_length"),u=$s(e,t,o,`${o}.length > ${c}`);e.write(`if (${u} > ${c}) return INVALID;`);break}case"length_equals":{const c=sn(s.length,"length_equals"),u=$s(e,t,o,`${o}.length >= ${c} && ${o}.length <= ${s.length*2}`);e.write(`if (${u} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${o}.size < ${sn(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${o}.size > ${sn(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${o}.size !== ${sn(s.size,"size_equals")}) return INVALID;`);break;case"string_format":o=dp(e,t,s,o);break;case"custom":o=jw(e,t,a,o);break;case"bigint_format":Pw(e,s,o);break;case"mime_type":Nw(e,t,s,o);break;case"property":Ew(e,t,s,o);break;case"overwrite":{const c=te(t);Dw(e,t,a,o,c),o=c;break}default:throw new pe(`check type ${s.check}`)}}return o}function $s(e,t,r,i){const n=X(t,er),o=te(t);return e.write(`const ${o} = typeof ${r} === "string" && ${i} ? ${n}(${r}) : ${r}.length;`),o}function sn(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new pe(`${t} bound of type ${typeof e}`);return`${e}`}function up(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new pe("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new pe("comparison check with Invalid Date bound");return X(e,t)}throw new pe(`comparison check bound of type ${typeof t}`)}function zw(e,t,r,i){const n=r.inclusive?"<":"<=";e.write(`if (${i} ${n} ${up(t,r.value)}) return INVALID;`)}function xw(e,t,r,i){const n=r.inclusive?">":">=";e.write(`if (${i} ${n} ${up(t,r.value)}) return INVALID;`)}function Tw(e,t,r,i){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new pe("multiple_of check with a zero divisor");e.write(`if (${i} % ${r.value}n !== 0n) return INVALID;`)}else{const n=X(t,da);e.write(`if (${n}(${i}, ${sn(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function lp(e,t,r){const i=t.format;switch(i){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new pe(`number format ${i}`)}}function Pw(e,t,r){const i=t.format;if(i)switch(i){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new pe(`bigint format ${i}`)}}function Nw(e,t,r,i){const n=r.mime;if(n&&n.length>0){const o=X(t,new Set(n));e.write(`if (!${o}.has(${i}.type)) return INVALID;`)}}function Ew(e,t,r,i){const n=`${i}[${JSON.stringify(r.property)}]`;je(e,t,r.schema,n)}function Dw(e,t,r,i,n){const o=r._zod.def.tx;if(!o)throw new pe("overwrite check without a transform function");if(ln(o))throw new Ht("z.compile: async overwrite transforms are not supported");const a=X(t,o);e.write(`const ${n} = ${a}(${i});`)}function _s(){throw new Mt}function bs(e){this.issues.push(e)}function jw(e,t,r,i){const n=r._zod.def;if(n.fn){if(ln(n.fn))throw new Ht("z.compile: async .refine() predicates are not supported");const o=X(t,n.fn),a=X(t,_s),s=te(t);return e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),i}if(r._zod.check){if(ln(r._zod.check))throw new Ht("z.compile: async .superRefine() / check functions are not supported");const o=r._zod.check,s=X(t,u=>{const l={value:u,issues:[],addIssue:bs};return o(l)instanceof Promise&&_s(),l.issues.length===0?l.value:dt}),c=te(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new pe("custom check without a predicate or check function")}const Cw=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function dp(e,t,r,i){const n=r.format;if(n==="base64"){const c=X(t,gi);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(n==="base64url"){const c=X(t,es);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(n==="jwt"){const c=X(t,ns),u=X(t,r.alg??null);return e.write(`if (!${c}(${i}, ${u})) return INVALID;`),i}if(n==="ipv6"){const c=X(t,hi);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(n==="cidrv6"){const c=X(t,Qa);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(n==="credit_card"){const c=X(t,ts);return e.write(`if (!${c}(${i})) return INVALID;`),i}const o=r;if(n==="url"||n==="httpurl"||o.normalize||o.hostname!==void 0||o.protocol!==void 0){const c=X(t,Ha),u=X(t,r),l=te(t),d=te(t);if(e.write(`const ${l} = ${i}.trim();`),e.write(`const ${d} = ${c}(${l}, ${u});`),e.write(`if (typeof ${d} === "number") return INVALID;`),o.hostname!==void 0){const p=X(t,Xa);e.write(`if (!${p}(${d}, ${u}.hostname)) return INVALID;`)}if(o.protocol!==void 0){const p=X(t,Ya);e.write(`if (!${p}(${d}, ${u}.protocol)) return INVALID;`)}const m=te(t),f=o.normalize?`${d}.href`:`${X(t,Wa)}(${l})`;return e.write(`const ${m} = ${f};`),m}const a=r.fn;if(a){if(ln(a))throw new pe(`async string format ${n}`);const c=X(t,a);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(Cw.has(n)&&r.pattern){const c=X(t,r.pattern);return e.write(`${c}.lastIndex = 0;`),e.write(`if (!${c}.test(${i})) return INVALID;`),i}const s=r.format;switch(s){case"regex":throw new pe("regex format without a pattern");case"lowercase":e.write(`if (${i} !== ${i}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${i} !== ${i}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${i}.includes(${yt(r.includes)})) return INVALID;`);break;case"starts_with":{const c=r.prefix;e.write(`if (${i}.slice(0, ${c.length}) !== ${yt(c)}) return INVALID;`);break}case"ends_with":{const c=r.suffix;e.write(`if (${i}.slice(-${c.length}) !== ${yt(c)}) return INVALID;`);break}default:throw new pe(`string format ${s}`)}return i}function je(e,t,r,i,n=!0){const o=r._zod.def,a=o.type;if(o.coerce)throw new pe(`coercion (z.coerce.${a}())`);const s=n||!!o.checks?.length;let c;switch(a){case"string":c=Aw(e,t,r,i);break;case"number":c=Uw(e,r,i);break;case"boolean":c=Rw(e,i);break;case"bigint":c=Zw(e,r,i);break;case"symbol":c=Mw(e,i);break;case"undefined":c=Bw(e,i);break;case"null":c=Lw(e,i);break;case"any":case"unknown":c=i;break;case"never":e.write("return INVALID;"),c=i;break;case"void":c=Fw(e,i);break;case"nan":c=Vw(e,i);break;case"date":c=Gw(e,i);break;case"object":c=qw(e,t,r,i,s);break;case"optional":c=Jw(e,t,r,i,s);break;case"nullable":c=Ww(e,t,r,i,s);break;case"array":c=Xw(e,t,r,i,s);break;case"literal":c=Yw(e,t,r,i);break;case"enum":c=Qw(e,t,r,i);break;case"readonly":{const u=fp(e,t,r,i),l=te(t);e.write(`const ${l} = Object.freeze(${u});`),c=l;break}case"success":fp(e,t,r,i),c="true";break;case"default":case"prefault":c=eS(e,t,r,i);break;case"nonoptional":c=tS(e,t,r,i);break;case"tuple":c=nS(e,t,r,i);break;case"union":c=rS(e,t,r,i);break;case"intersection":c=aS(e,t,r,i);break;case"record":c=sS(e,t,r,i);break;case"map":c=uS(e,t,r,i);break;case"set":c=lS(e,t,r,i);break;case"file":c=dS(e,i);break;case"template_literal":c=fS(e,t,r,i);break;case"lazy":c=mS(e,t,r,i);break;case"pipe":c=pS(e,t,r,i);break;case"custom":c=hS(e,t,r,i);break;case"transform":c=vS(e,t,r,i);break;case"catch":c=yS(e,t,r,i);break;default:throw new pe(`schema type ${a}`)}return c===null?null:Ow(e,t,r,c)}function Aw(e,t,r,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);const n=r._zod.def;return n.format===void 0?i:dp(e,t,n,i)}function Uw(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);const i=t._zod.def;return i.check==="number_format"&&i.format&&lp(e,{format:i.format},r),r}function Rw(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function Zw(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);const i=t._zod.def;if(i.format)switch(i.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function Mw(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function Bw(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function Lw(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function Fw(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function Vw(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function Gw(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function qw(e,t,r,i,n=!0){const o=r._zod.def;e.write(`if (typeof ${i} !== "object" || ${i} === null || Array.isArray(${i})) return INVALID;`);const a=o.shape,s=Object.keys(a),c=Object.getOwnPropertySymbols(a),u=c.length?[...s,...c]:s,l=g=>typeof g=="symbol"?X(t,g):yt(g),d=g=>typeof g=="symbol"?`[${l(g)}]`:yt(g),m=a;if(s.includes("__proto__"))throw new pe('object shape key "__proto__"');const f=new Map;for(const g of u){const _=m[g],I=l(g),T=te(t);if(e.write(`const ${T} = ${i}[${I}];`),_._zod.optin!==void 0){const C=te(t);e.write(`let ${C} = (() => {`),e.indented(M=>{const ue=et(M,t,_,T);M.write(`return ${ue};`)}),e.write("})();"),_._zod.optout==="optional"?(e.write(`if (${C} === INVALID) {`),e.indented(M=>{M.write(`if (${I} in ${i}) return INVALID;`),M.write(`${C} = undefined;`)}),e.write("}")):e.write(`if (${C} === INVALID) return INVALID;`),f.set(g,C)}else{Hw(_)&&e.write(`if (!(${I} in ${i})) return INVALID;`);const C=et(e,t,_,T,n);C!==null&&f.set(g,C)}}const p=o.catchall;let y="none";if(p){const g=p._zod.def.type;if(g==="never"){const _=s.map(I=>`k !== ${yt(I)}`).join(" && ")||"true";e.write(`for (const k in ${i}) {`),e.indented(I=>{I.write(`if (${_}) return INVALID;`)}),e.write("}")}else(g==="unknown"||g==="any")&&!p._zod.def.checks?.length?y="passthrough":y="schema"}const h=te(t),$=u.some(g=>un(m[g])||ks(m[g]));if(!n){if(y==="schema"){const g=s.length>0?X(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(_=>{_.write('if (k === "__proto__") continue;'),g&&_.write(`if (${g}.has(k)) continue;`);const I=te(t);_.write(`const ${I} = ${i}[k];`),et(_,t,p,I,!1)}),e.write("}")}return null}if($){e.write(`const ${h} = {};`);for(const g of u){const _=l(g),I=f.get(g);ks(m[g])?e.write(`if (${_} in ${i}) ${h}[${_}] = ${I};`):un(m[g])?e.write(`if (${I} !== undefined || ${_} in ${i}) ${h}[${_}] = ${I};`):e.write(`${h}[${_}] = ${I};`)}}else{const g=u.map(_=>`${d(_)}: ${f.get(_)}`).join(", ");e.write(`const ${h} = { ${g} };`)}if(y!=="none"){const g=s.length>0?X(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(_=>{if(_.write('if (k === "__proto__") continue;'),g&&_.write(`if (${g}.has(k)) continue;`),y==="passthrough")_.write(`${h}[k] = ${i}[k];`);else{const I=te(t);_.write(`const ${I} = ${i}[k];`);const T=et(_,t,p,I);_.write(`${h}[k] = ${T};`)}}),e.write("}")}return h}function Jw(e,t,r,i,n=!0){const o=r._zod.def;if(Kw(r))return je(e,t,o.innerType,i,n);if(o.innerType._zod.optin==="defaulted"){const s=te(t),c=te(t);return e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(u=>{u.write(`const ${c} = (() => {`),u.indented(l=>{const d=je(l,t,o.innerType,i);l.write(`return ${d};`)}),u.write("})();"),u.write(`if (${c} !== INVALID) ${s} = ${c};`)}),e.write("} else {"),e.indented(u=>{const l=je(u,t,o.innerType,i);u.write(`${s} = ${l};`)}),e.write("}"),s}const a=n?te(t):null;return a&&e.write(`let ${a};`),e.write(`if (${i} !== undefined) {`),e.indented(s=>{const c=je(s,t,o.innerType,i,n);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function Kw(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function Hw(e){return e._zod.optin===void 0&&cn(e)}function cn(e){if(e._zod.def.coerce)return!0;const t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?cn(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?cn(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(cn):!0;case"intersection":return!t.left||!t.right?!0:cn(t.left)&&cn(t.right);case"pipe":return t.in?cn(t.in):!0;default:return!0}}function ks(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function un(e){const t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?un(t.innerType):!0;case"union":return t.options?t.options.some(un):!0;case"intersection":return!t.left||!t.right||un(t.left)||un(t.right);case"pipe":return t.out?un(t.out):!0;default:return!0}}function Ww(e,t,r,i,n=!0){const o=r._zod.def,a=n?te(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${i} !== null) {`),e.indented(s=>{const c=je(s,t,o.innerType,i,n);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function Xw(e,t,r,i,n=!0){const o=r._zod.def;e.write(`if (!Array.isArray(${i})) return INVALID;`);const a=n?te(t):null,s=te(t),c=te(t);return a&&e.write(`const ${a} = new Array(${i}.length);`),e.write(`for (let ${s} = 0; ${s} < ${i}.length; ${s}++) {`),e.indented(u=>{u.write(`const ${c} = ${i}[${s}];`);const l=et(u,t,o.element,c,n);a&&l!==null&&u.write(`${a}[${s}] = ${l};`)}),e.write("}"),a}function Yw(e,t,r,i){const o=r._zod.def.values;if(o.length!==1){const s=X(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}const a=o[0];if(typeof a=="number"&&Number.isNaN(a)){const s=X(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}if(typeof a=="string")e.write(`if (${i} !== ${yt(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${i} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${i} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${i} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${i} !== ${a}n) return INVALID;`);else throw new pe(`literal type ${typeof a}`);return i}function Qw(e,t,r,i){const n=r._zod.values;if(!n)throw new pe("enum schema without enumerated values");const o=X(t,n);return e.write(`if (!${o}.has(${i})) return INVALID;`),i}function fp(e,t,r,i){const n=r._zod.def;return je(e,t,n.innerType,i)}function eS(e,t,r,i){const n=r._zod.def,a=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!a)return je(e,t,n.innerType,i);const c=X(t,a),u=te(t);return e.write(`let ${u} = ${i};`),e.write(`if (${i} === undefined) ${u} = ${c}();`),je(e,t,n.innerType,u)}const s=te(t);if(a){const c=X(t,a),u=X(t,Qn);e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(l=>{l.write(`${s} = ${u}(${c}());`)}),e.write("} else {"),e.indented(l=>{const d=je(l,t,n.innerType,i);l.write(`${s} = ${d} === undefined ? ${u}(${c}()) : ${d};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${i} !== undefined) {`),e.indented(c=>{const u=je(c,t,n.innerType,i);c.write(`${s} = ${u};`)}),e.write("}");return s}function tS(e,t,r,i){const n=r._zod.def,o=je(e,t,n.innerType,i),a=te(t);return e.write(`const ${a} = ${o};`),e.write(`if (${a} === undefined) return INVALID;`),a}function nS(e,t,r,i){const n=r._zod.def,o=n.items,a=n.rest;e.write(`if (!Array.isArray(${i})) return INVALID;`);const s=mp(o,"optin"),c=mp(o,"optout");a?e.write(`if (${i}.length < ${s}) return INVALID;`):e.write(`if (${i}.length < ${s} || ${i}.length > ${o.length}) return INVALID;`);const u=te(t);e.write(`const ${u} = [];`);for(let l=0;l<o.length;l++){const d=o[l];if(l>=c)e.write(`if (${u}.length === ${l}) {`),e.indented(m=>{m.write(`if (${l} < ${i}.length) {`),m.indented(f=>{const p=te(t);f.write(`const ${p} = ${i}[${l}];`);const y=et(f,t,d,p);f.write(`${u}[${l}] = ${y};`)}),m.write("} else {"),m.indented(f=>{if(ks(d)){f.write(`${u}.length = ${l};`);return}const p=te(t),y=te(t);f.write(`const ${p} = undefined;`),f.write(`const ${y} = (() => {`),f.indented(h=>{const $=et(h,t,d,p);h.write(`return ${$};`)}),f.write("})();"),f.write(`if (${y} === INVALID || ${y} === undefined) ${u}.length = ${l};`),f.write(`else ${u}[${l}] = ${y};`)}),m.write("}")}),e.write("}");else{const m=te(t);e.write(`const ${m} = ${i}[${l}];`);const f=et(e,t,d,m);e.write(`${u}[${l}] = ${f};`)}}if(a){const l=te(t),d=te(t);e.write(`for (let ${l} = ${o.length}; ${l} < ${i}.length; ${l}++) {`),e.indented(m=>{m.write(`const ${d} = ${i}[${l}];`);const f=et(m,t,a,d);m.write(`${u}[${l}] = ${f};`)}),e.write("}")}return u}function mp(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function rS(e,t,r,i){const n=r._zod.def,o=n.options;if(n.discriminator)return iS(e,t,n,i);if(n.inclusive===!1)throw new pe("exclusive unions (z.xor)");if(o.length===0)return e.write("return INVALID;"),i;if(o.length===1)return je(e,t,o[0],i);if(o.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){const c=new Set(o.flatMap(l=>l._zod.def.values)),u=X(t,c);return e.write(`if (!${u}.has(${i})) return INVALID;`),i}const s=te(t);e.write(`let ${s};`);for(let c=0;c<o.length;c++){const u=o[c];c===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(l=>{const d=je(l,t,u,i);l.write(`return ${d};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function iS(e,t,r,i){if(r.unionFallback)throw new pe("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),i;const n=te(t),o=te(t);e.write(`const ${n} = ${i}?.[${yt(r.discriminator)}];`),e.write(`let ${o};`);let a=!0;const s=new Set;for(const c of r.options){const u=c._zod.propValues?.[r.discriminator];if(!u||u.size===0)throw new pe("discriminated union option without static discriminator values");for(const m of u){if(s.has(m))throw new pe(`duplicate discriminator value ${String(m)}`);s.add(m)}const l=Array.from(u,m=>oS(t,n,m)),d=a?"if":"else if";e.write(`${d} (${l.join(" || ")}) {`),e.indented(m=>{const f=je(m,t,c,i);m.write(`${o} = ${f};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),o}function oS(e,t,r){if(typeof r=="string")return`${t} === ${yt(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){const i=X(e,r);return`${t} === ${i}`}throw new pe(`literal discriminator value ${String(r)}`)}function aS(e,t,r,i){const n=r._zod.def,o=et(e,t,n.left,i),a=et(e,t,n.right,i),s=X(t,lr),c=te(t);return e.write(`const ${c} = ${s}(${o}, ${a});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function sS(e,t,r,i){const n=r._zod.def,o=X(t,Rt);e.write(`if (!${o}(${i})) return INVALID;`);const a=te(t),s=te(t),c=te(t);e.write(`const ${a} = {};`);const u=n,l=u.partial?void 0:n.keyType._zod.values;if(l){const p=[];for(const h of l){if(!(typeof h=="string"||typeof h=="number"||typeof h=="symbol"))throw new pe(`record key value ${String(h)}`);const $=typeof h=="number"?h.toString():h;if($==="__proto__")throw new pe('record key "__proto__"');p.push($);const g=X(t,h),_=je(e,t,n.keyType,g),I=te(t);e.write(`const ${I} = ${i}[${cS(t,$)}];`);const T=et(e,t,n.valueType,I);e.write(`${a}[${_}] = ${T};`)}const y=X(t,new Set(p));return e.write(`for (const ${s} in ${i}) {`),e.indented(h=>{h.write(`if (${y}.has(${s})) continue;`),u.mode==="loose"?h.write(`if (${s} !== "__proto__") ${a}[${s}] = ${i}[${s}];`):h.write("return INVALID;")}),e.write("}"),a}const d=n.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){const p=n.mode==="loose",y=X(t,Si(n.keyType)),h=X(t,or),$=X(t,Object.prototype.propertyIsEnumerable),g=te(t);return e.write(`for (const ${s} of Reflect.ownKeys(${i})) {`),e.indented(_=>{_.write(`if (${s} === "__proto__") continue;`),_.write(`if (!${$}.call(${i}, ${s})) continue;`),_.write(`let ${g} = ${y}(${s});`),_.write(`if (${g} === INVALID && typeof ${s} === "string" && ${h}.test(${s})) ${g} = ${y}(Number(${s}));`),p?_.write(`if (${g} === INVALID) { ${a}[${s}] = ${i}[${s}]; continue; }`):_.write(`if (${g} === INVALID) return INVALID;`),_.write(`if (${g} === "__proto__") continue;`);const I=te(t);_.write(`const ${I} = ${i}[${s}];`);const T=et(_,t,n.valueType,I);_.write(`${a}[${g}] = ${T};`)}),e.write("}"),a}const f=X(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${i})) {`),e.indented(p=>{p.write(`if (${s} === "__proto__") continue;`),p.write(`if (!${f}.call(${i}, ${s})) continue;`),p.write(`if (typeof ${s} !== "string") return INVALID;`),p.write(`const ${c} = ${i}[${s}];`);const y=et(p,t,n.valueType,c);p.write(`${a}[${s}] = ${y};`)}),e.write("}"),a}function cS(e,t){return typeof t=="string"?yt(t):X(e,t)}function uS(e,t,r,i){const n=r._zod.def;e.write(`if (!(${i} instanceof Map)) return INVALID;`);const o=te(t),a=te(t),s=te(t);return e.write(`const ${o} = new Map();`),e.write(`for (const [${a}, ${s}] of ${i}) {`),e.indented(c=>{const u=je(c,t,n.keyType,a),l=je(c,t,n.valueType,s);c.write(`${o}.set(${u}, ${l});`)}),e.write("}"),o}function lS(e,t,r,i){const n=r._zod.def;e.write(`if (!(${i} instanceof Set)) return INVALID;`);const o=te(t),a=te(t);return e.write(`const ${o} = new Set();`),e.write(`for (const ${a} of ${i}) {`),e.indented(s=>{const c=je(s,t,n.valueType,a);s.write(`${o}.add(${c});`)}),e.write("}"),o}function dS(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function fS(e,t,r,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);const n=r._zod.pattern;if(n){const o=X(t,n);e.write(`${o}.lastIndex = 0;`),e.write(`if (!${o}.test(${i})) return INVALID;`)}return i}function mS(e,t,r,i){const n=r._zod.def,o=X(t,n.getter),a=X(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(c=>{c.write(`const inner = ${o}();`),c.write(`${a}.parser = function(input) {`),c.indented(u=>{u.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),u.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");const s=te(t);return e.write(`const ${s} = ${a}.parser(${i});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function pS(e,t,r,i){const n=r._zod.def,o=je(e,t,n.in,i);if(n.transform){if(ln(n.transform))throw new Ht("z.compile: async transforms in pipes are not supported");const a=n.transform,c=X(t,l=>{const d={value:l,issues:[],addIssue:bs},m=a(l,d);return m instanceof Promise?dt:d.issues.length===0?m:dt}),u=te(t);return e.write(`const ${u} = ${c}(${o});`),e.write(`if (${u} === INVALID) return INVALID;`),je(e,t,n.out,u)}else return je(e,t,n.out,o)}function ln(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function hS(e,t,r,i){const n=r._zod.def;if(n.fn){if(ln(n.fn))throw new Ht("z.compile: async custom predicates are not supported");const o=X(t,n.fn),a=X(t,_s),s=te(t);e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new pe("custom schema without a predicate function");return i}function gS(e,t,r){const i=e._zod.run({value:r,issues:[]},{});if(i&&typeof i.then=="function")return dt;const n=i;return n.issues.length===0?n.value:t()}function yS(e,t,r,i){const n=r._zod.def;if(!n.catchValue[va])throw new pe("catch with a callback (only a constant catch value compiles)",!1);const o=te(t);e.write(`let ${o} = (() => {`),e.indented(u=>{const l=et(u,t,n.innerType,i);u.write(`return ${l};`)}),e.write("})();");const a=X(t,n.innerType),s=X(t,n.catchValue),c=X(t,gS);return e.write(`if (${o} === INVALID) {`),e.indented(u=>{u.write(`${o} = ${c}(${a}, ${s}, ${i});`),u.write(`if (${o} === INVALID) return INVALID;`)}),e.write("}"),o}function vS(e,t,r,i){const n=r._zod.def;if(n.transform){if(ln(n.transform))throw new Ht("z.compile: async transforms are not supported");const o=n.transform,s=X(t,u=>{const l={value:u,issues:[],addIssue:bs},d=o(u,l);return d instanceof Promise?dt:l.issues.length===0?d:dt}),c=te(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return i}function pp(e,t){return new e({type:"string",...E(t)})}function hp(e,t){return new e({type:"string",coerce:!0,...E(t)})}function ws(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function Ss(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function Is(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function Os(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function zs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function xs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function Ii(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function Ts(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function Ps(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function Ns(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function Es(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function Ds(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function js(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function Cs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function As(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function Us(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function gp(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...E(t)})}function Rs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function Zs(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function Ms(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function Bs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function Ls(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}function yp(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...E(t)})}function Fs(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}const vp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Vs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function Gs(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function qs(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function Js(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function $p(e,t){return new e({type:"number",checks:[],...E(t)})}function _p(e,t){return new e({type:"number",coerce:!0,checks:[],...E(t)})}function bp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function kp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...E(t)})}function wp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...E(t)})}function Sp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...E(t)})}function Ip(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...E(t)})}function Op(e,t){return new e({type:"boolean",...E(t)})}function zp(e,t){return new e({type:"boolean",coerce:!0,...E(t)})}function xp(e,t){return new e({type:"bigint",...E(t)})}function Tp(e,t){return new e({type:"bigint",coerce:!0,...E(t)})}function Pp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(t)})}function Np(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(t)})}function Ep(e,t){return new e({type:"symbol",...E(t)})}function Dp(e,t){return new e({type:"undefined",...E(t)})}function jp(e,t){return new e({type:"null",...E(t)})}function Cp(e){return new e({type:"any"})}function Ap(e){return new e({type:"unknown"})}function Up(e,t){return new e({type:"never",...E(t)})}function Rp(e,t){return new e({type:"void",...E(t)})}function Zp(e,t){return new e({type:"date",...E(t)})}function Mp(e,t){return new e({type:"date",coerce:!0,...E(t)})}function Bp(e,t){return new e({type:"nan",...E(t)})}function Wt(e,t){return new La({check:"less_than",...E(t),value:e,inclusive:!1})}function bt(e,t){return new La({check:"less_than",...E(t),value:e,inclusive:!0})}function Xt(e,t){return new Fa({check:"greater_than",...E(t),value:e,inclusive:!1})}function kt(e,t){return new Fa({check:"greater_than",...E(t),value:e,inclusive:!0})}function Ks(e){return Xt(0,e)}function Hs(e){return Wt(0,e)}function Ws(e){return bt(0,e)}function Xs(e){return kt(0,e)}function Tn(e,t){return new Yd({check:"multiple_of",...E(t),value:e})}function Pn(e,t){return new tf({check:"max_size",...E(t),maximum:e})}function Yt(e,t){return new nf({check:"min_size",...E(t),minimum:e})}function fr(e,t){return new rf({check:"size_equals",...E(t),size:e})}function mr(e,t){return new of({check:"max_length",...E(t),maximum:e})}function dn(e,t){return new af({check:"min_length",...E(t),minimum:e})}function pr(e,t){return new sf({check:"length_equals",...E(t),length:e})}function Oi(e,t){return new cf({check:"string_format",format:"regex",...E(t),pattern:e})}function zi(e){return new uf({check:"string_format",format:"lowercase",...E(e)})}function xi(e){return new lf({check:"string_format",format:"uppercase",...E(e)})}function Ti(e,t){return new df({check:"string_format",format:"includes",...E(t),includes:e})}function Pi(e,t){return new ff({check:"string_format",format:"starts_with",...E(t),prefix:e})}function Ni(e,t){return new mf({check:"string_format",format:"ends_with",...E(t),suffix:e})}function Ys(e,t,r){return new Va({check:"property",property:e,schema:t,...E(r)})}function Qs(e){return Object.entries(e).map(([t,r])=>new Va({check:"property",property:t,schema:r}))}function Ei(e,t){return new hf({check:"mime_type",mime:e,...E(t)})}function Bt(e){return new gf({check:"overwrite",tx:e})}function Di(e){return Bt(t=>t.normalize(e))}function ji(){return Bt(e=>e.trim())}function Ci(){return Bt(e=>e.toLowerCase())}function Ai(){return Bt(e=>e.toUpperCase())}function Ui(){return Bt(e=>Gl(e))}function Lp(e,t,r){return new e({type:"array",element:t,...E(r)})}function $S(e,t,r){return new e({type:"union",options:t,...E(r)})}function _S(e,t,r){return new e({type:"union",options:t,inclusive:!1,...E(r)})}function bS(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...E(i)})}function kS(e,t,r){return new e({type:"intersection",left:t,right:r})}function wS(e,t,r,i){const n=r instanceof ne,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...E(o)})}function SS(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...E(i)})}function IS(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...E(i)})}function OS(e,t,r){return new e({type:"set",valueType:t,...E(r)})}function zS(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...E(r)})}function xS(e,t,r){return new e({type:"enum",entries:t,...E(r)})}function TS(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...E(r)})}function Fp(e,t){return new e({type:"file",...E(t)})}function PS(e,t){return new e({type:"transform",transform:t})}function NS(e,t){return new e({type:"optional",innerType:t})}function ES(e,t){return new e({type:"nullable",innerType:t})}function DS(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Qn(r)}})}function jS(e,t,r){return new e({type:"nonoptional",innerType:t,...E(r)})}function CS(e,t){return new e({type:"success",innerType:t})}function AS(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:$a(r)})}function US(e,t,r){return new e({type:"pipe",in:t,out:r})}function RS(e,t){return new e({type:"readonly",innerType:t})}function ZS(e,t,r){return new e({type:"template_literal",parts:t,...E(r)})}function MS(e,t){return new e({type:"lazy",getter:t})}function BS(e,t){return new e({type:"promise",innerType:t})}function Vp(e,t,r){const i=E(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Gp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...E(r)})}function qp(e,t){const r=Jp(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(On(n,i.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=i.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(On(o))}},e(i.value,i)),t);return r}function Jp(e,t){const r=new De({check:"custom",...E(t)});return r._zod.check=e,r}function Kp(e){const t=new De({check:"describe"});return t._zod.onattach=[r=>{const i=_t.get(r)??{};_t.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function Hp(e){const t=new De({check:"meta"});return t._zod.onattach=[r=>{const i=_t.get(r)??{};_t.add(r,{...i,...e})}],t._zod.check=()=>{},t}function Wp(e,t){const r=E(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(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));const o=new Set(i),a=new Set(n),s=e.Codec??ds,c=e.Boolean??is,u=e.String??ur,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:((f,p)=>{let y=f;return r.case!=="sensitive"&&(y=y.toLowerCase()),o.has(y)?!0:a.has(y)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:p.value,inst:m,continue:!1}),{})}),reverseTransform:((f,p)=>f===!0?i[0]||"true":n[0]||"false"),error:r.error});return m._zod.bag.truthy=i,m._zod.bag.falsy=n,m._zod.bag.case=r.case??"insensitive",m}function hr(e,t,r,i={}){const n=E(i),o={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 gr(e,...t){for(const r of t)for(const i of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,i)&&Re(e,i,r[i]);return e}function Nn(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??_t,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Be(e,t,r,i,n){const o=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:i.path,message:n}):t.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(n);return Object.assign(r,o),!0}function Se(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),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;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,f=t.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,m,l)}const d=e._zod.parent;d&&(a.ref||(a.ref=d),Se(d,t,l),t.seen.get(d).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&gr(a.schema,c),t.io==="input"&&tt(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 Xp(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function En(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;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??(p=>p);if(d)return{ref:m(d)};const f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${m("__shared")}#/${s}/${Xp(f)}`}}const c="#",u=`${c}/${s}/`;if(a[1]===r&&!a[1].schema.id)return{ref:c};const l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+Xp(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>
56
+ }`;let m;try{m=new l(...a,d)(...s)}catch(f){throw new ge(`this schema (generated code failed to evaluate: ${f.message})`)}return t?.debug&&(m.code=u),m}function Y(e,t){for(const[i,n]of e.constants)if(n===t)return i;const r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function te(e){return`v${e.varCounter++}`}function NS(e,t){const r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return pt;const i=r;return i.issues.length===0?i.value:pt}function rt(e,t,r,i,n=!0){const o=e.content.length,a=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return je(e,t,r,i,n)}catch(u){if(!(u instanceof ge)||!u.islandable)throw u;if(e.content.length=o,t.constants.size>a){const l=Array.from(t.constants.keys()).slice(a);for(const d of l)t.constants.delete(d)}return t.constantCounter=s,t.varCounter=c,ES(e,t,r,i)}}function ES(e,t,r,i){const n=Y(t,r),o=Y(t,NS),a=te(t);return e.write(`const ${a} = ${o}(${n}, ${i});`),e.write(`if (${a} === INVALID) return INVALID;`),a}const CS=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function DS(e,t,r,i){const n=r._zod.def.checks;if(!n||n.length===0)return i;let o=i;for(const a of n){const s=a._zod.def;if(s.when&&!CS.has(s.check))throw new ge('check with a custom "when" condition');switch(s.check){case"greater_than":jS(e,t,s,o);break;case"less_than":AS(e,t,s,o);break;case"multiple_of":US(e,t,s,o);break;case"number_format":pp(e,s,o);break;case"min_length":{const c=fn(s.minimum,"min_length"),u=ks(e,t,o,`${o}.length >= ${c} && ${o}.length < ${s.minimum*2}`);e.write(`if (${u} < ${c}) return INVALID;`);break}case"max_length":{const c=fn(s.maximum,"max_length"),u=ks(e,t,o,`${o}.length > ${c}`);e.write(`if (${u} > ${c}) return INVALID;`);break}case"length_equals":{const c=fn(s.length,"length_equals"),u=ks(e,t,o,`${o}.length >= ${c} && ${o}.length <= ${s.length*2}`);e.write(`if (${u} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${o}.size < ${fn(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${o}.size > ${fn(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${o}.size !== ${fn(s.size,"size_equals")}) return INVALID;`);break;case"string_format":o=hp(e,t,s,o);break;case"custom":o=LS(e,t,a,o);break;case"bigint_format":RS(e,s,o);break;case"mime_type":BS(e,t,s,o);break;case"property":MS(e,t,s,o);break;case"overwrite":{const c=te(t);ZS(e,t,a,o,c),o=c;break}default:throw new ge(`check type ${s.check}`)}}return o}function ks(e,t,r,i){const n=Y(t,or),o=te(t);return e.write(`const ${o} = typeof ${r} === "string" && ${i} ? ${n}(${r}) : ${r}.length;`),o}function fn(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new ge(`${t} bound of type ${typeof e}`);return`${e}`}function mp(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new ge("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new ge("comparison check with Invalid Date bound");return Y(e,t)}throw new ge(`comparison check bound of type ${typeof t}`)}function jS(e,t,r,i){const n=r.inclusive?"<":"<=";e.write(`if (${i} ${n} ${mp(t,r.value)}) return INVALID;`)}function AS(e,t,r,i){const n=r.inclusive?">":">=";e.write(`if (${i} ${n} ${mp(t,r.value)}) return INVALID;`)}function US(e,t,r,i){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new ge("multiple_of check with a zero divisor");e.write(`if (${i} % ${r.value}n !== 0n) return INVALID;`)}else{const n=Y(t,pa);e.write(`if (${n}(${i}, ${fn(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function pp(e,t,r){const i=t.format;switch(i){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new ge(`number format ${i}`)}}function RS(e,t,r){const i=t.format;if(i)switch(i){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new ge(`bigint format ${i}`)}}function BS(e,t,r,i){const n=r.mime;if(n&&n.length>0){const o=Y(t,new Set(n));e.write(`if (!${o}.has(${i}.type)) return INVALID;`)}}function MS(e,t,r,i){const n=`${i}[${JSON.stringify(r.property)}]`;je(e,t,r.schema,n)}function ZS(e,t,r,i,n){const o=r._zod.def.tx;if(!o)throw new ge("overwrite check without a transform function");if(hn(o))throw new en("z.compile: async overwrite transforms are not supported");const a=Y(t,o);e.write(`const ${n} = ${a}(${i});`)}function Ss(){throw new Gt}function ws(e){this.issues.push(e)}function LS(e,t,r,i){const n=r._zod.def;if(n.fn){if(hn(n.fn))throw new en("z.compile: async .refine() predicates are not supported");const o=Y(t,n.fn),a=Y(t,Ss),s=te(t);return e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),i}if(r._zod.check){if(hn(r._zod.check))throw new en("z.compile: async .superRefine() / check functions are not supported");const o=r._zod.check,s=Y(t,u=>{const l={value:u,issues:[],addIssue:ws};return o(l)instanceof Promise&&Ss(),l.issues.length===0?l.value:pt}),c=te(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new ge("custom check without a predicate or check function")}const FS=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function hp(e,t,r,i){const n=r.format;if(n==="base64"){const c=Y(t,_i);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(n==="base64url"){const c=Y(t,rs);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(n==="jwt"){const c=Y(t,os),u=Y(t,r.alg??null);return e.write(`if (!${c}(${i}, ${u})) return INVALID;`),i}if(n==="ipv6"){const c=Y(t,$i);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(n==="cidrv6"){const c=Y(t,ns);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(n==="credit_card"){const c=Y(t,is);return e.write(`if (!${c}(${i})) return INVALID;`),i}const o=r;if(n==="url"||n==="httpurl"||o.normalize||o.hostname!==void 0||o.protocol!==void 0){const c=Y(t,Xa),u=Y(t,r),l=te(t),d=te(t);if(e.write(`const ${l} = ${i}.trim();`),e.write(`const ${d} = ${c}(${l}, ${u});`),e.write(`if (typeof ${d} === "number") return INVALID;`),o.hostname!==void 0){const p=Y(t,es);e.write(`if (!${p}(${d}, ${u}.hostname)) return INVALID;`)}if(o.protocol!==void 0){const p=Y(t,ts);e.write(`if (!${p}(${d}, ${u}.protocol)) return INVALID;`)}const m=te(t),f=o.normalize?`${d}.href`:`${Y(t,Qa)}(${l})`;return e.write(`const ${m} = ${f};`),m}const a=r.fn;if(a){if(hn(a))throw new ge(`async string format ${n}`);const c=Y(t,a);return e.write(`if (!${c}(${i})) return INVALID;`),i}if(FS.has(n)&&r.pattern){const c=Y(t,r.pattern);return e.write(`${c}.lastIndex = 0;`),e.write(`if (!${c}.test(${i})) return INVALID;`),i}const s=r.format;switch(s){case"regex":throw new ge("regex format without a pattern");case"lowercase":e.write(`if (${i} !== ${i}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${i} !== ${i}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${i}.includes(${bt(r.includes)})) return INVALID;`);break;case"starts_with":{const c=r.prefix;e.write(`if (${i}.slice(0, ${c.length}) !== ${bt(c)}) return INVALID;`);break}case"ends_with":{const c=r.suffix;e.write(`if (${i}.slice(-${c.length}) !== ${bt(c)}) return INVALID;`);break}default:throw new ge(`string format ${s}`)}return i}function je(e,t,r,i,n=!0){const o=r._zod.def,a=o.type;if(o.coerce)throw new ge(`coercion (z.coerce.${a}())`);const s=n||!!o.checks?.length;let c;switch(a){case"string":c=VS(e,t,r,i);break;case"number":c=GS(e,r,i);break;case"boolean":c=qS(e,i);break;case"bigint":c=JS(e,r,i);break;case"symbol":c=KS(e,i);break;case"undefined":c=HS(e,i);break;case"null":c=WS(e,i);break;case"any":case"unknown":c=i;break;case"never":e.write("return INVALID;"),c=i;break;case"void":c=YS(e,i);break;case"nan":c=XS(e,i);break;case"date":c=QS(e,i);break;case"object":c=ew(e,t,r,i,s);break;case"optional":c=tw(e,t,r,i,s);break;case"nullable":c=iw(e,t,r,i,s);break;case"array":c=ow(e,t,r,i,s);break;case"literal":c=aw(e,t,r,i);break;case"enum":c=sw(e,t,r,i);break;case"readonly":{const u=gp(e,t,r,i),l=te(t);e.write(`const ${l} = Object.freeze(${u});`),c=l;break}case"success":gp(e,t,r,i),c="true";break;case"default":case"prefault":c=cw(e,t,r,i);break;case"nonoptional":c=uw(e,t,r,i);break;case"tuple":c=lw(e,t,r,i);break;case"union":c=dw(e,t,r,i);break;case"intersection":c=pw(e,t,r,i);break;case"record":c=hw(e,t,r,i);break;case"map":c=yw(e,t,r,i);break;case"set":c=vw(e,t,r,i);break;case"file":c=$w(e,i);break;case"template_literal":c=_w(e,t,r,i);break;case"lazy":c=bw(e,t,r,i);break;case"pipe":c=kw(e,t,r,i);break;case"custom":c=Sw(e,t,r,i);break;case"transform":c=Ow(e,t,r,i);break;case"catch":c=Iw(e,t,r,i);break;default:throw new ge(`schema type ${a}`)}return c===null?null:DS(e,t,r,c)}function VS(e,t,r,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);const n=r._zod.def;return n.format===void 0?i:hp(e,t,n,i)}function GS(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);const i=t._zod.def;return i.check==="number_format"&&i.format&&pp(e,{format:i.format},r),r}function qS(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function JS(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);const i=t._zod.def;if(i.format)switch(i.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function KS(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function HS(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function WS(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function YS(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function XS(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function QS(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function ew(e,t,r,i,n=!0){const o=r._zod.def;e.write(`if (typeof ${i} !== "object" || ${i} === null || Array.isArray(${i})) return INVALID;`);const a=o.shape,s=Object.keys(a),c=Object.getOwnPropertySymbols(a),u=c.length?[...s,...c]:s,l=g=>typeof g=="symbol"?Y(t,g):bt(g),d=g=>typeof g=="symbol"?`[${l(g)}]`:bt(g),m=a;if(s.includes("__proto__"))throw new ge('object shape key "__proto__"');const f=new Map;for(const g of u){const _=m[g],I=l(g),P=te(t);if(e.write(`const ${P} = ${i}[${I}];`),_._zod.optin!==void 0){const j=te(t);e.write(`let ${j} = (() => {`),e.indented(M=>{const le=rt(M,t,_,P);M.write(`return ${le};`)}),e.write("})();"),_._zod.optout==="optional"?(e.write(`if (${j} === INVALID) {`),e.indented(M=>{M.write(`if (${I} in ${i}) return INVALID;`),M.write(`${j} = undefined;`)}),e.write("}")):e.write(`if (${j} === INVALID) return INVALID;`),f.set(g,j)}else{rw(_)&&e.write(`if (!(${I} in ${i})) return INVALID;`);const j=rt(e,t,_,P,n);j!==null&&f.set(g,j)}}const p=o.catchall;let y="none";if(p){const g=p._zod.def.type;if(g==="never"){const _=s.map(I=>`k !== ${bt(I)}`).join(" && ")||"true";e.write(`for (const k in ${i}) {`),e.indented(I=>{I.write(`if (${_}) return INVALID;`)}),e.write("}")}else(g==="unknown"||g==="any")&&!p._zod.def.checks?.length?y="passthrough":y="schema"}const h=te(t),$=u.some(g=>pn(m[g])||Is(m[g]));if(!n){if(y==="schema"){const g=s.length>0?Y(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(_=>{_.write('if (k === "__proto__") continue;'),g&&_.write(`if (${g}.has(k)) continue;`);const I=te(t);_.write(`const ${I} = ${i}[k];`),rt(_,t,p,I,!1)}),e.write("}")}return null}if($){e.write(`const ${h} = {};`);for(const g of u){const _=l(g),I=f.get(g);Is(m[g])?e.write(`if (${_} in ${i}) ${h}[${_}] = ${I};`):pn(m[g])?e.write(`if (${I} !== undefined || ${_} in ${i}) ${h}[${_}] = ${I};`):e.write(`${h}[${_}] = ${I};`)}}else{const g=u.map(_=>`${d(_)}: ${f.get(_)}`).join(", ");e.write(`const ${h} = { ${g} };`)}if(y!=="none"){const g=s.length>0?Y(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(_=>{if(_.write('if (k === "__proto__") continue;'),g&&_.write(`if (${g}.has(k)) continue;`),y==="passthrough")_.write(`${h}[k] = ${i}[k];`);else{const I=te(t);_.write(`const ${I} = ${i}[k];`);const P=rt(_,t,p,I);_.write(`${h}[k] = ${P};`)}}),e.write("}")}return h}function tw(e,t,r,i,n=!0){const o=r._zod.def;if(nw(r))return je(e,t,o.innerType,i,n);if(o.innerType._zod.optin==="defaulted"){const s=te(t),c=te(t);return e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(u=>{u.write(`const ${c} = (() => {`),u.indented(l=>{const d=je(l,t,o.innerType,i);l.write(`return ${d};`)}),u.write("})();"),u.write(`if (${c} !== INVALID) ${s} = ${c};`)}),e.write("} else {"),e.indented(u=>{const l=je(u,t,o.innerType,i);u.write(`${s} = ${l};`)}),e.write("}"),s}const a=n?te(t):null;return a&&e.write(`let ${a};`),e.write(`if (${i} !== undefined) {`),e.indented(s=>{const c=je(s,t,o.innerType,i,n);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function nw(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function rw(e){return e._zod.optin===void 0&&mn(e)}function mn(e){if(e._zod.def.coerce)return!0;const t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?mn(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?mn(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(mn):!0;case"intersection":return!t.left||!t.right?!0:mn(t.left)&&mn(t.right);case"pipe":return t.in?mn(t.in):!0;default:return!0}}function Is(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function pn(e){const t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?pn(t.innerType):!0;case"union":return t.options?t.options.some(pn):!0;case"intersection":return!t.left||!t.right||pn(t.left)||pn(t.right);case"pipe":return t.out?pn(t.out):!0;default:return!0}}function iw(e,t,r,i,n=!0){const o=r._zod.def,a=n?te(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${i} !== null) {`),e.indented(s=>{const c=je(s,t,o.innerType,i,n);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function ow(e,t,r,i,n=!0){const o=r._zod.def;e.write(`if (!Array.isArray(${i})) return INVALID;`);const a=n?te(t):null,s=te(t),c=te(t);return a&&e.write(`const ${a} = new Array(${i}.length);`),e.write(`for (let ${s} = 0; ${s} < ${i}.length; ${s}++) {`),e.indented(u=>{u.write(`const ${c} = ${i}[${s}];`);const l=rt(u,t,o.element,c,n);a&&l!==null&&u.write(`${a}[${s}] = ${l};`)}),e.write("}"),a}function aw(e,t,r,i){const o=r._zod.def.values;if(o.length!==1){const s=Y(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}const a=o[0];if(typeof a=="number"&&Number.isNaN(a)){const s=Y(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}if(typeof a=="string")e.write(`if (${i} !== ${bt(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${i} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${i} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${i} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${i} !== ${a}n) return INVALID;`);else throw new ge(`literal type ${typeof a}`);return i}function sw(e,t,r,i){const n=r._zod.values;if(!n)throw new ge("enum schema without enumerated values");const o=Y(t,n);return e.write(`if (!${o}.has(${i})) return INVALID;`),i}function gp(e,t,r,i){const n=r._zod.def;return je(e,t,n.innerType,i)}function cw(e,t,r,i){const n=r._zod.def,a=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!a)return je(e,t,n.innerType,i);const c=Y(t,a),u=te(t);return e.write(`let ${u} = ${i};`),e.write(`if (${i} === undefined) ${u} = ${c}();`),je(e,t,n.innerType,u)}const s=te(t);if(a){const c=Y(t,a),u=Y(t,ir);e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(l=>{l.write(`${s} = ${u}(${c}());`)}),e.write("} else {"),e.indented(l=>{const d=je(l,t,n.innerType,i);l.write(`${s} = ${d} === undefined ? ${u}(${c}()) : ${d};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${i} !== undefined) {`),e.indented(c=>{const u=je(c,t,n.innerType,i);c.write(`${s} = ${u};`)}),e.write("}");return s}function uw(e,t,r,i){const n=r._zod.def,o=je(e,t,n.innerType,i),a=te(t);return e.write(`const ${a} = ${o};`),e.write(`if (${a} === undefined) return INVALID;`),a}function lw(e,t,r,i){const n=r._zod.def,o=n.items,a=n.rest;e.write(`if (!Array.isArray(${i})) return INVALID;`);const s=yp(o,"optin"),c=yp(o,"optout");a?e.write(`if (${i}.length < ${s}) return INVALID;`):e.write(`if (${i}.length < ${s} || ${i}.length > ${o.length}) return INVALID;`);const u=te(t);e.write(`const ${u} = [];`);for(let l=0;l<o.length;l++){const d=o[l];if(l>=c)e.write(`if (${u}.length === ${l}) {`),e.indented(m=>{m.write(`if (${l} < ${i}.length) {`),m.indented(f=>{const p=te(t);f.write(`const ${p} = ${i}[${l}];`);const y=rt(f,t,d,p);f.write(`${u}[${l}] = ${y};`)}),m.write("} else {"),m.indented(f=>{if(Is(d)){f.write(`${u}.length = ${l};`);return}const p=te(t),y=te(t);f.write(`const ${p} = undefined;`),f.write(`const ${y} = (() => {`),f.indented(h=>{const $=rt(h,t,d,p);h.write(`return ${$};`)}),f.write("})();"),f.write(`if (${y} === INVALID || ${y} === undefined) ${u}.length = ${l};`),f.write(`else ${u}[${l}] = ${y};`)}),m.write("}")}),e.write("}");else{const m=te(t);e.write(`const ${m} = ${i}[${l}];`);const f=rt(e,t,d,m);e.write(`${u}[${l}] = ${f};`)}}if(a){const l=te(t),d=te(t);e.write(`for (let ${l} = ${o.length}; ${l} < ${i}.length; ${l}++) {`),e.indented(m=>{m.write(`const ${d} = ${i}[${l}];`);const f=rt(m,t,a,d);m.write(`${u}[${l}] = ${f};`)}),e.write("}")}return u}function yp(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function dw(e,t,r,i){const n=r._zod.def,o=n.options;if(n.discriminator)return fw(e,t,n,i);if(n.inclusive===!1)throw new ge("exclusive unions (z.xor)");if(o.length===0)return e.write("return INVALID;"),i;if(o.length===1)return je(e,t,o[0],i);if(o.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){const c=new Set(o.flatMap(l=>l._zod.def.values)),u=Y(t,c);return e.write(`if (!${u}.has(${i})) return INVALID;`),i}const s=te(t);e.write(`let ${s};`);for(let c=0;c<o.length;c++){const u=o[c];c===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(l=>{const d=je(l,t,u,i);l.write(`return ${d};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function fw(e,t,r,i){if(r.unionFallback)throw new ge("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),i;const n=te(t),o=te(t);e.write(`const ${n} = ${i}?.[${bt(r.discriminator)}];`),e.write(`let ${o};`);let a=!0;const s=new Set;for(const c of r.options){const u=c._zod.propValues?.[r.discriminator];if(!u||u.size===0)throw new ge("discriminated union option without static discriminator values");for(const m of u){if(s.has(m))throw new ge(`duplicate discriminator value ${String(m)}`);s.add(m)}const l=Array.from(u,m=>mw(t,n,m)),d=a?"if":"else if";e.write(`${d} (${l.join(" || ")}) {`),e.indented(m=>{const f=je(m,t,c,i);m.write(`${o} = ${f};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),o}function mw(e,t,r){if(typeof r=="string")return`${t} === ${bt(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){const i=Y(e,r);return`${t} === ${i}`}throw new ge(`literal discriminator value ${String(r)}`)}function pw(e,t,r,i){const n=r._zod.def,o=rt(e,t,n.left,i),a=rt(e,t,n.right,i),s=Y(t,hr),c=te(t);return e.write(`const ${c} = ${s}(${o}, ${a});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function hw(e,t,r,i){const n=r._zod.def,o=Y(t,Ft);e.write(`if (!${o}(${i})) return INVALID;`);const a=te(t),s=te(t),c=te(t);e.write(`const ${a} = {};`);const u=n,l=u.partial?void 0:n.keyType._zod.values;if(l){const p=[];for(const h of l){if(!(typeof h=="string"||typeof h=="number"||typeof h=="symbol"))throw new ge(`record key value ${String(h)}`);const $=typeof h=="number"?h.toString():h;if($==="__proto__")throw new ge('record key "__proto__"');p.push($);const g=Y(t,h),_=je(e,t,n.keyType,g),I=te(t);e.write(`const ${I} = ${i}[${gw(t,$)}];`);const P=rt(e,t,n.valueType,I);e.write(`${a}[${_}] = ${P};`)}const y=Y(t,new Set(p));return e.write(`for (const ${s} in ${i}) {`),e.indented(h=>{h.write(`if (${y}.has(${s})) continue;`),u.mode==="loose"?h.write(`if (${s} !== "__proto__") ${a}[${s}] = ${i}[${s}];`):h.write("return INVALID;")}),e.write("}"),a}const d=n.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){const p=n.mode==="loose",y=Y(t,xi(n.keyType)),h=Y(t,lr),$=Y(t,Object.prototype.propertyIsEnumerable),g=te(t);return e.write(`for (const ${s} of Reflect.ownKeys(${i})) {`),e.indented(_=>{_.write(`if (${s} === "__proto__") continue;`),_.write(`if (!${$}.call(${i}, ${s})) continue;`),_.write(`let ${g} = ${y}(${s});`),_.write(`if (${g} === INVALID && typeof ${s} === "string" && ${h}.test(${s})) ${g} = ${y}(Number(${s}));`),p?_.write(`if (${g} === INVALID) { ${a}[${s}] = ${i}[${s}]; continue; }`):_.write(`if (${g} === INVALID) return INVALID;`),_.write(`if (${g} === "__proto__") continue;`);const I=te(t);_.write(`const ${I} = ${i}[${s}];`);const P=rt(_,t,n.valueType,I);_.write(`${a}[${g}] = ${P};`)}),e.write("}"),a}const f=Y(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${i})) {`),e.indented(p=>{p.write(`if (${s} === "__proto__") continue;`),p.write(`if (!${f}.call(${i}, ${s})) continue;`),p.write(`if (typeof ${s} !== "string") return INVALID;`),p.write(`const ${c} = ${i}[${s}];`);const y=rt(p,t,n.valueType,c);p.write(`${a}[${s}] = ${y};`)}),e.write("}"),a}function gw(e,t){return typeof t=="string"?bt(t):Y(e,t)}function yw(e,t,r,i){const n=r._zod.def;e.write(`if (!(${i} instanceof Map)) return INVALID;`);const o=te(t),a=te(t),s=te(t);return e.write(`const ${o} = new Map();`),e.write(`for (const [${a}, ${s}] of ${i}) {`),e.indented(c=>{const u=je(c,t,n.keyType,a),l=je(c,t,n.valueType,s);c.write(`${o}.set(${u}, ${l});`)}),e.write("}"),o}function vw(e,t,r,i){const n=r._zod.def;e.write(`if (!(${i} instanceof Set)) return INVALID;`);const o=te(t),a=te(t);return e.write(`const ${o} = new Set();`),e.write(`for (const ${a} of ${i}) {`),e.indented(s=>{const c=je(s,t,n.valueType,a);s.write(`${o}.add(${c});`)}),e.write("}"),o}function $w(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function _w(e,t,r,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);const n=r._zod.pattern;if(n){const o=Y(t,n);e.write(`${o}.lastIndex = 0;`),e.write(`if (!${o}.test(${i})) return INVALID;`)}return i}function bw(e,t,r,i){const n=r._zod.def,o=Y(t,n.getter),a=Y(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(c=>{c.write(`const inner = ${o}();`),c.write(`${a}.parser = function(input) {`),c.indented(u=>{u.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),u.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");const s=te(t);return e.write(`const ${s} = ${a}.parser(${i});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function kw(e,t,r,i){const n=r._zod.def,o=je(e,t,n.in,i);if(n.transform){if(hn(n.transform))throw new en("z.compile: async transforms in pipes are not supported");const a=n.transform,c=Y(t,l=>{const d={value:l,issues:[],addIssue:ws},m=a(l,d);return m instanceof Promise?pt:d.issues.length===0?m:pt}),u=te(t);return e.write(`const ${u} = ${c}(${o});`),e.write(`if (${u} === INVALID) return INVALID;`),je(e,t,n.out,u)}else return je(e,t,n.out,o)}function hn(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function Sw(e,t,r,i){const n=r._zod.def;if(n.fn){if(hn(n.fn))throw new en("z.compile: async custom predicates are not supported");const o=Y(t,n.fn),a=Y(t,Ss),s=te(t);e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new ge("custom schema without a predicate function");return i}function ww(e,t,r){const i=e._zod.run({value:r,issues:[]},{});if(i&&typeof i.then=="function")return pt;const n=i;return n.issues.length===0?n.value:t()}function Iw(e,t,r,i){const n=r._zod.def;if(!n.catchValue[ba])throw new ge("catch with a callback (only a constant catch value compiles)",!1);const o=te(t);e.write(`let ${o} = (() => {`),e.indented(u=>{const l=rt(u,t,n.innerType,i);u.write(`return ${l};`)}),e.write("})();");const a=Y(t,n.innerType),s=Y(t,n.catchValue),c=Y(t,ww);return e.write(`if (${o} === INVALID) {`),e.indented(u=>{u.write(`${o} = ${c}(${a}, ${s}, ${i});`),u.write(`if (${o} === INVALID) return INVALID;`)}),e.write("}"),o}function Ow(e,t,r,i){const n=r._zod.def;if(n.transform){if(hn(n.transform))throw new en("z.compile: async transforms are not supported");const o=n.transform,s=Y(t,u=>{const l={value:u,issues:[],addIssue:ws},d=o(u,l);return d instanceof Promise?pt:l.issues.length===0?d:pt}),c=te(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return i}function vp(e,t){return new e({type:"string",...E(t)})}function $p(e,t){return new e({type:"string",coerce:!0,...E(t)})}function Os(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function Ts(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function xs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function Ps(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function zs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function Ns(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function Pi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function Es(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function Cs(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function Ds(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function js(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function As(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function Us(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function Rs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function Bs(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function Ms(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function _p(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...E(t)})}function Zs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function Ls(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function Fs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function Vs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function Gs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}function bp(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...E(t)})}function qs(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}const kp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Js(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function Ks(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function Hs(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function Ws(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function Sp(e,t){return new e({type:"number",checks:[],...E(t)})}function wp(e,t){return new e({type:"number",coerce:!0,checks:[],...E(t)})}function Ip(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function Op(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...E(t)})}function Tp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...E(t)})}function xp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...E(t)})}function Pp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...E(t)})}function zp(e,t){return new e({type:"boolean",...E(t)})}function Np(e,t){return new e({type:"boolean",coerce:!0,...E(t)})}function Ep(e,t){return new e({type:"bigint",...E(t)})}function Cp(e,t){return new e({type:"bigint",coerce:!0,...E(t)})}function Dp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(t)})}function jp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(t)})}function Ap(e,t){return new e({type:"symbol",...E(t)})}function Up(e,t){return new e({type:"undefined",...E(t)})}function Rp(e,t){return new e({type:"null",...E(t)})}function Bp(e){return new e({type:"any"})}function Mp(e){return new e({type:"unknown"})}function Zp(e,t){return new e({type:"never",...E(t)})}function Lp(e,t){return new e({type:"void",...E(t)})}function Fp(e,t){return new e({type:"date",...E(t)})}function Vp(e,t){return new e({type:"date",coerce:!0,...E(t)})}function Gp(e,t){return new e({type:"nan",...E(t)})}function tn(e,t){return new Ga({check:"less_than",...E(t),value:e,inclusive:!1})}function It(e,t){return new Ga({check:"less_than",...E(t),value:e,inclusive:!0})}function nn(e,t){return new qa({check:"greater_than",...E(t),value:e,inclusive:!1})}function Ot(e,t){return new qa({check:"greater_than",...E(t),value:e,inclusive:!0})}function Ys(e){return nn(0,e)}function Xs(e){return tn(0,e)}function Qs(e){return It(0,e)}function ec(e){return Ot(0,e)}function Dn(e,t){return new nf({check:"multiple_of",...E(t),value:e})}function jn(e,t){return new af({check:"max_size",...E(t),maximum:e})}function rn(e,t){return new sf({check:"min_size",...E(t),minimum:e})}function yr(e,t){return new cf({check:"size_equals",...E(t),size:e})}function vr(e,t){return new uf({check:"max_length",...E(t),maximum:e})}function gn(e,t){return new lf({check:"min_length",...E(t),minimum:e})}function $r(e,t){return new df({check:"length_equals",...E(t),length:e})}function zi(e,t){return new ff({check:"string_format",format:"regex",...E(t),pattern:e})}function Ni(e){return new mf({check:"string_format",format:"lowercase",...E(e)})}function Ei(e){return new pf({check:"string_format",format:"uppercase",...E(e)})}function Ci(e,t){return new hf({check:"string_format",format:"includes",...E(t),includes:e})}function Di(e,t){return new gf({check:"string_format",format:"starts_with",...E(t),prefix:e})}function ji(e,t){return new yf({check:"string_format",format:"ends_with",...E(t),suffix:e})}function tc(e,t,r){return new Ja({check:"property",property:e,schema:t,...E(r)})}function nc(e){return Object.entries(e).map(([t,r])=>new Ja({check:"property",property:t,schema:r}))}function Ai(e,t){return new $f({check:"mime_type",mime:e,...E(t)})}function qt(e){return new _f({check:"overwrite",tx:e})}function Ui(e){return qt(t=>t.normalize(e))}function Ri(){return qt(e=>e.trim())}function Bi(){return qt(e=>e.toLowerCase())}function Mi(){return qt(e=>e.toUpperCase())}function Zi(){return qt(e=>Hl(e))}function qp(e,t,r){return new e({type:"array",element:t,...E(r)})}function Tw(e,t,r){return new e({type:"union",options:t,...E(r)})}function xw(e,t,r){return new e({type:"union",options:t,inclusive:!1,...E(r)})}function Pw(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...E(i)})}function zw(e,t,r){return new e({type:"intersection",left:t,right:r})}function Nw(e,t,r,i){const n=r instanceof ne,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...E(o)})}function Ew(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...E(i)})}function Cw(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...E(i)})}function Dw(e,t,r){return new e({type:"set",valueType:t,...E(r)})}function jw(e,t,r){const i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...E(r)})}function Aw(e,t,r){return new e({type:"enum",entries:t,...E(r)})}function Uw(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...E(r)})}function Jp(e,t){return new e({type:"file",...E(t)})}function Rw(e,t){return new e({type:"transform",transform:t})}function Bw(e,t){return new e({type:"optional",innerType:t})}function Mw(e,t){return new e({type:"nullable",innerType:t})}function Zw(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():ir(r)}})}function Lw(e,t,r){return new e({type:"nonoptional",innerType:t,...E(r)})}function Fw(e,t){return new e({type:"success",innerType:t})}function Vw(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:ka(r)})}function Gw(e,t,r){return new e({type:"pipe",in:t,out:r})}function qw(e,t){return new e({type:"readonly",innerType:t})}function Jw(e,t,r){return new e({type:"template_literal",parts:t,...E(r)})}function Kw(e,t){return new e({type:"lazy",getter:t})}function Hw(e,t){return new e({type:"promise",innerType:t})}function Kp(e,t,r){const i=E(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Hp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...E(r)})}function Wp(e,t){const r=Yp(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(Nn(n,i.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=i.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(Nn(o))}},e(i.value,i)),t);return r}function Yp(e,t){const r=new De({check:"custom",...E(t)});return r._zod.check=e,r}function Xp(e){const t=new De({check:"describe"});return t._zod.onattach=[r=>{const i=wt.get(r)??{};wt.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function Qp(e){const t=new De({check:"meta"});return t._zod.onattach=[r=>{const i=wt.get(r)??{};wt.add(r,{...i,...e})}],t._zod.check=()=>{},t}function eh(e,t){const r=E(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(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));const o=new Set(i),a=new Set(n),s=e.Codec??ps,c=e.Boolean??ss,u=e.String??pr,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:((f,p)=>{let y=f;return r.case!=="sensitive"&&(y=y.toLowerCase()),o.has(y)?!0:a.has(y)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:p.value,inst:m,continue:!1}),{})}),reverseTransform:((f,p)=>f===!0?i[0]||"true":n[0]||"false"),error:r.error});return m._zod.bag.truthy=i,m._zod.bag.falsy=n,m._zod.bag.case=r.case??"insensitive",m}function _r(e,t,r,i={}){const n=E(i),o={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 br(e,...t){for(const r of t)for(const i of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,i)&&Ze(e,i,r[i]);return e}function An(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??wt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Ve(e,t,r,i,n){const o=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:i.path,message:n}):t.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(n);return Object.assign(r,o),!0}function Ie(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),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;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,f=t.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,m,l)}const d=e._zod.parent;d&&(a.ref||(a.ref=d),Ie(d,t,l),t.seen.get(d).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&br(a.schema,c),t.io==="input"&&it(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 th(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Un(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;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??(p=>p);if(d)return{ref:m(d)};const f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${m("__shared")}#/${s}/${th(f)}`}}const c="#",u=`${c}/${s}/`;if(a[1]===r&&!a[1].schema.id)return{ref:c};const l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+th(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>
57
57
 
58
- 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}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Yp(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const r=[];for(const i of t){if(!i||typeof i!="object")return;Yp(i);const n=Object.keys(i);if(n.length!==1||n[0]!=="type")return;const o=i.type;for(const a of Array.isArray(o)?o:[o]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}const Qp=new Set(["type","properties","required","additionalProperties"]),eh=["oneOf","anyOf"];function th(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function ec(e){const t=[];for(const o of e){if(typeof o!="object"||o.type!=="object")return null;for(const a in o)if(!Qp.has(a))return null;t.push(o)}const r={},i=new Set;for(const o of t){for(const a in o.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;const s=[];for(const u of t){const l=u.properties?.[a]??th(u);l!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(l))||s.push(l))}const c=s.length===1?s[0]:ec(s)??{allOf:s};Re(r,a,c)}for(const a of o.required??[])i.add(a)}const n={type:"object",properties:r};if(i.size&&(n.required=[...i]),t.every(o=>o.additionalProperties===!1))n.additionalProperties=!1;else{const o=[];for(const a of t){const s=th(a);s&&!o.some(c=>JSON.stringify(c)===JSON.stringify(s))&&o.push(s)}o.length===1?n.additionalProperties=o[0]:o.length>1&&(n.additionalProperties={allOf:o})}return n}function LS(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const n of Qp)if(n in e)return;const r=t.filter(n=>eh.some(o=>Array.isArray(n[o])));let i=null;if(!r.length)i=ec(t);else{const n=r[0],o=eh.find(c=>Array.isArray(n[c]));if(Object.keys(n).length!==1)return;const a=t.filter(c=>c!==n),s=n[o].map(c=>ec([...a,c]));if(s.some(c=>!c))return;i={[o]:s}}i&&(delete e.allOf,gr(e,i))}function Dn(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 f=e.seen.get(d),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(p)):gr(u,p),gr(u,l),s._zod.parent===d)for(const h in u)h==="$ref"||h==="allOf"||h in l||delete u[h];if(p.$ref&&f.def)for(const h in u)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(u[h])===JSON.stringify(f.def[h])&&delete u[h]}const m=s._zod.parent;if(m&&m!==d){i(m);const f=e.seen.get(m);if(f?.schema.$ref&&(u.$ref=f.schema.$ref,f.def))for(const p in u)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(u[p])===JSON.stringify(f.def[p])&&delete u[p]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const s of[...e.seen.entries()].reverse())i(s[0]);if(e.target!=="openapi-3.0")for(const s of e.seen.entries())Yp(s[1].def??s[1].schema);for(const s of e.deferred)s();if(e.intersections.length){const s=new Map;for(const c of e.seen.values())for(const u of[c.schema,c.def]){const l=u?.allOf;if(!Array.isArray(l))continue;const d=s.get(l);d?d.push(u):s.set(l,[u])}for(const c of e.intersections)for(const u of s.get(c)??[])LS(u)}}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)}gr(n,r.defId?r.schema: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??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const s of e.seen.entries()){const c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,Re(a,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),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:yr(t,"input",e.processors),output:yr(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function tt(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 tt(i.element,r);if(i.type==="set")return tt(i.valueType,r);if(i.type==="lazy")return tt(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"||i.type==="catch")return tt(i.innerType,r);if(i.type==="intersection")return tt(i.left,r)||tt(i.right,r);if(i.type==="record"||i.type==="map")return tt(i.keyType,r)||tt(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:tt(i.in,r)||tt(i.out,r);if(i.type==="object"){for(const n in i.shape)if(tt(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(const n of i.options)if(tt(n,r))return!0;return!1}if(i.type==="tuple"){for(const n of i.items)if(tt(n,r))return!0;return!!(i.rest&&tt(i.rest,r))}return!1}const nh=(e,t={})=>r=>{const i=Nn({...r,processors:t});return Se(e,i),En(i,e),Dn(i,e)},yr=(e,t,r={})=>i=>{const{libraryOptions:n,target:o}=i??{},a=Nn({...n??{},target:o,io:t,processors:r});return Se(e,a),En(a,e),Dn(a,e)},FS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rh=(e,t,r,i)=>{const n=r;n.type="string";const{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:u,laxFormat:l}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),s&&(n.format=FS[s]??s,n.format===""&&delete n.format,(s==="time"||l)&&delete n.format),u&&(n.contentEncoding=u),c&&c.size>0){const d=[...c];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},ih=(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),f=t.target==="draft-04"||t.target==="openapi-3.0";d?f?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:typeof o=="number"&&(n.minimum=o),m?f?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(Number.isFinite(c)&&c!==0?n.multipleOf=Math.abs(c):Be(e,t,n,i,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},oh=(e,t,r,i)=>{r.type="boolean"},ah=(e,t,r,i)=>{Be(e,t,r,i,"BigInt cannot be represented in JSON Schema")},sh=(e,t,r,i)=>{Be(e,t,r,i,"Symbols cannot be represented in JSON Schema")},ch=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},uh=(e,t,r,i)=>{Be(e,t,r,i,"Undefined cannot be represented in JSON Schema")},lh=(e,t,r,i)=>{Be(e,t,r,i,"Void cannot be represented in JSON Schema")},dh=(e,t,r,i)=>{r.not={}},fh=(e,t,r,i)=>{},mh=(e,t,r,i)=>{},ph=(e,t,r,i)=>{Be(e,t,r,i,"Date cannot be represented in JSON Schema")},hh=(e,t,r,i)=>{const n=e._zod.def,o=ua(n.entries);if(o.length===0){r.not={};return}o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},gh=(e,t,r,i)=>{const n=e._zod.def;if(n.values.length===0){r.not={};return}const o=[];for(const a of n.values)if(a===void 0){if(Be(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Be(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){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},yh=(e,t,r,i)=>{Be(e,t,r,i,"NaN cannot be represented in JSON Schema")},vh=(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},$h=(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)},_h=(e,t,r,i)=>{r.type="boolean"},bh=(e,t,r,i)=>{Be(e,t,r,i,"Custom types cannot be represented in JSON Schema")},kh=(e,t,r,i)=>{Be(e,t,r,i,"Function types cannot be represented in JSON Schema")},wh=(e,t,r,i)=>{Be(e,t,r,i,"Transforms cannot be represented in JSON Schema")},Sh=(e,t,r,i)=>{Be(e,t,r,i,"Map cannot be represented in JSON Schema")},Ih=(e,t,r,i)=>{Be(e,t,r,i,"Set cannot be represented in JSON Schema")},Oh=(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=Se(o.element,t,{...i,path:[...i.path,"items"]})};function vr(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?vr(t.out):t.type==="catch"?vr(t.innerType):e._zod.optin}const zh=(e,t,r,i)=>{const n=r,o=e._zod.def,a=o.shape;if(Object.getOwnPropertySymbols(a).length&&Be(e,t,n,i,"Symbol keys cannot be represented in JSON Schema"))return;n.type="object",n.properties={};for(const l in a)Re(n.properties,l,Se(a[l],t,{...i,path:[...i.path,"properties",l]}));const c=new Set(Object.keys(a)),u=new Set([...c].filter(l=>{const d=o.shape[l];return t.io==="input"?vr(d)===void 0:d._zod.optout===void 0}));u.size>0&&(n.required=Array.from(u)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=Se(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},tc=(e,t,r,i)=>{const n=e._zod.def,o=n.inclusive===!1,a=n.options.map((s,c)=>Se(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},xh=(e,t,r,i)=>{const n=e._zod.def,o=Se(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=Se(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,t.intersections.push(c)},Th=(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((y,h)=>Se(y,t,{...i,path:[...i.path,a,h]})),u=o.rest?Se(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;let l=o.items.length;for(;l>0;){const y=o.items[l-1];if(!(t.io==="input"?vr(y)!==void 0:y._zod.optout==="optional"))break;l--}const d=o.items.length,m=!o.rest;t.target==="draft-2020-12"?(n.prefixItems=c,m?n.items=!1:u&&(n.items=u),l>0&&(n.minItems=l),m&&(n.maxItems=d)):t.target==="openapi-3.0"?(n.items={anyOf:c},u&&n.items.anyOf.push(u),l>0&&(n.minItems=l),m&&(n.maxItems=d)):(n.items=c,m?n.additionalItems=!1:u&&(n.additionalItems=u),l>0&&(n.minItems=l),m&&(n.maxItems=d));const{minimum:f,maximum:p}=e._zod.bag;typeof f=="number"&&(n.minItems=f),typeof p=="number"&&(n.maxItems=p)};function nc(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);const p=e.get(t)?.def;if(!p)return t;const y=nc(e,p,r);return y===p?t:y}for(const p of["anyOf","oneOf"]){const y=t[p];if(!Array.isArray(y))continue;const h=y.map($=>nc(e,$,r));h.some(($,g)=>$!==y[g])&&(t={...t,[p]:h})}const i=Array.isArray(t.type)?t.type:[t.type],n=!i.includes("string")&&i.some(p=>p==="number"||p==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!n&&!o?.some(p=>typeof p=="number"))return t;const{minimum:a,maximum:s,exclusiveMinimum:c,exclusiveMaximum:u,multipleOf:l,format:d,id:m,...f}=t;return f.enum?f.enum=f.enum.map(p=>typeof p=="number"?String(p):p):typeof f.const=="number"&&(f.const=String(f.const)),n&&(f.type="string",o||(f.pattern=(i.includes("number")?or:Ra).source)),f}const rc=new WeakMap;function VS(e){const t=new Map;for(const i of e.seen.values())i.def&&!t.has(i.schema)&&t.set(i.schema,i);const r=new Map;for(const i of rc.get(e)??[]){const n=e.seen.get(i),o=(n?.def??n?.schema)?.propertyNames;if(!o||o===!0||r.has(o))continue;const a=nc(t,o,new Set);a!==o&&r.set(o,a)}if(r.size)for(const i of e.seen.values())for(const n of[i.schema,i.def]){const o=n&&r.get(n.propertyNames);o&&(n.propertyNames=o)}}const Ph=(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 d=Se(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(const m of c)Re(n.patternProperties,m.source,d)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){n.propertyNames=Se(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let d=rc.get(t);d||(d=[],rc.set(t,d),t.deferred.push(()=>VS(t))),d.push(e)}n.additionalProperties=Se(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}const u=a._zod.values,l=t.io==="input"&&vr(o.valueType)!==void 0;if(u&&!o.partial&&!l){const d=[...u].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(n.required=d.map(String))}},Nh=(e,t,r,i)=>{const n=e._zod.def,o=Se(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"}]},Eh=(e,t,r,i)=>{const n=e._zod.def;Se(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},ic=Symbol();function Dh(e,t,r,i,n){let o=!1;const a=JSON.stringify(e,(s,c)=>typeof c!="bigint"?c:(o=!0,null));return o?(Be(t,r,i,n,"BigInt defaults cannot be represented in JSON Schema"),ic):JSON.parse(a)}const jh=(e,t,r,i)=>{const n=e._zod.def;Se(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType;const a=Dh(n.defaultValue,e,t,r,i);a!==ic&&(r.default=a)},Ch=(e,t,r,i)=>{const n=e._zod.def;Se(n.innerType,t,i);const o=t.seen.get(e);if(o.ref=n.innerType,t.io!=="input")return;const a=Dh(n.defaultValue,e,t,r,i);a!==ic&&(r._prefault=a)},Ah=(e,t,r,i)=>{const n=e._zod.def;Se(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{Be(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},Uh=(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;Se(a,t,i);const s=t.seen.get(e);s.ref=a},Rh=(e,t,r,i)=>{const n=e._zod.def;Se(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},Zh=(e,t,r,i)=>{const n=e._zod.def;Se(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},oc=(e,t,r,i)=>{const n=e._zod.def;Se(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Mh=(e,t,r,i)=>{const n=e._zod.innerType;Se(n,t,i);const o=t.seen.get(e);o.ref=n},ac={string:rh,number:ih,boolean:oh,bigint:ah,symbol:sh,null:ch,undefined:uh,void:lh,never:dh,any:fh,unknown:mh,date:ph,enum:hh,literal:gh,nan:yh,template_literal:vh,file:$h,success:_h,custom:bh,function:kh,transform:wh,map:Sh,set:Ih,array:Oh,object:zh,union:tc,intersection:xh,tuple:Th,record:Ph,nullable:Nh,nonoptional:Eh,default:jh,prefault:Ch,catch:Ah,pipe:Uh,readonly:Rh,promise:Zh,optional:oc,lazy:Mh};function sc(e,t){if("_idmap"in e){const i=e,n=Nn({...t,processors:ac}),o={};for(const c of i._idmap.entries()){const[u,l]=c;Se(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;En(n,l),Re(a,u,Dn(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=Nn({...t,processors:ac});return Se(e,r),En(r,e),Dn(r,e)}class GS{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=Nn({processors:ac,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 Se(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)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,En(this.ctx,t);const i=Dn(this.ctx,t),{"~standard":n,...o}=i;return o}}var qS=Object.freeze({__proto__:null}),JS=Object.freeze({__proto__:null,$ZodAny:Wf,$ZodArray:nm,$ZodAsyncError:Mt,$ZodBase64:Zf,$ZodBase64URL:Mf,$ZodBigInt:os,$ZodBigIntFormat:qf,$ZodBoolean:is,$ZodCIDRv4:Uf,$ZodCIDRv6:Rf,$ZodCUID:If,$ZodCUID2:Of,$ZodCatch:Cm,$ZodCheck:De,$ZodCheckBigIntFormat:ef,$ZodCheckEndsWith:mf,$ZodCheckGreaterThan:Fa,$ZodCheckIncludes:df,$ZodCheckLengthEquals:sf,$ZodCheckLessThan:La,$ZodCheckLowerCase:uf,$ZodCheckMaxLength:of,$ZodCheckMaxSize:tf,$ZodCheckMimeType:hf,$ZodCheckMinLength:af,$ZodCheckMinSize:nf,$ZodCheckMultipleOf:Yd,$ZodCheckNumberFormat:Qd,$ZodCheckOverwrite:gf,$ZodCheckProperty:Va,$ZodCheckRegex:cf,$ZodCheckSizeEquals:rf,$ZodCheckStartsWith:ff,$ZodCheckStringFormat:cr,$ZodCheckUpperCase:lf,$ZodCodec:ds,$ZodCreditCard:Lf,$ZodCustom:Fm,$ZodCustomStringFormat:Vf,$ZodCyclicError:Gm,$ZodDate:em,$ZodDefault:xm,$ZodDiscriminatedUnion:lm,$ZodE164:Bf,$ZodEmail:bf,$ZodEmoji:wf,$ZodEncodeError:ci,$ZodEnum:bm,$ZodError:wa,$ZodExactOptional:Om,$ZodFile:wm,$ZodFunction:Bm,$ZodGUID:$f,$ZodIPv4:jf,$ZodIPv6:Cf,$ZodISODate:Nf,$ZodISODateTime:Pf,$ZodISODuration:Df,$ZodISOTime:Ef,$ZodIntersection:dm,$ZodJWT:Ff,$ZodKSUID:Tf,$ZodLazy:fs,$ZodLiteral:km,$ZodMAC:Af,$ZodMap:ym,$ZodNaN:Am,$ZodNanoID:Sf,$ZodNever:Yf,$ZodNonOptional:Nm,$ZodNull:Hf,$ZodNullable:zm,$ZodNumber:rs,$ZodNumberFormat:Gf,$ZodObject:ss,$ZodObjectJIT:om,$ZodOptional:us,$ZodPipe:ls,$ZodPrefault:Pm,$ZodPreprocess:Um,$ZodPromise:Lm,$ZodReadonly:Rm,$ZodRealError:lt,$ZodRecord:gm,$ZodRegistry:ap,$ZodSet:$m,$ZodString:ur,$ZodStringFormat:we,$ZodSuccess:Dm,$ZodSymbol:Jf,$ZodTemplateLiteral:Mm,$ZodTransform:Sm,$ZodTuple:cs,$ZodType:ne,$ZodULID:zf,$ZodURL:kf,$ZodUUID:_f,$ZodUndefined:Kf,$ZodUnion:vi,$ZodUnknown:Xf,$ZodVoid:Qf,$ZodXID:xf,$ZodXor:cm,$brand:dd,$constructor:w,$input:op,$output:ip,Doc:Ga,INVALID:dt,JSONSchema:qS,JSONSchemaGenerator:GS,NEVER:ud,TimePrecision:vp,URL_BAD_FORMAT:Ja,URL_UNPARSEABLE:Ka,ZodCompileAsyncError:Ht,ZodCompileUnsupportedError:pe,_any:Cp,_array:Lp,_base64:Ms,_base64url:Bs,_bigint:xp,_boolean:Op,_catch:AS,_check:Jp,_cidrv4:Rs,_cidrv6:Zs,_coercedBigint:Tp,_coercedBoolean:zp,_coercedDate:Mp,_coercedNumber:_p,_coercedString:hp,_creditCard:yp,_cuid:Ns,_cuid2:Es,_custom:Vp,_date:Zp,_decode:za,_decodeAsync:Ta,_default:DS,_discriminatedUnion:bS,_e164:Ls,_email:ws,_emoji:Ts,_encode:Oa,_encodeAsync:xa,_endsWith:Ni,_enum:zS,_file:Fp,_float32:kp,_float64:wp,_gt:Xt,_gte:kt,_guid:Ss,_includes:Ti,_int:bp,_int32:Sp,_int64:Pp,_intersection:kS,_ipv4:As,_ipv6:Us,_isoDate:Gs,_isoDateTime:Vs,_isoDuration:Js,_isoTime:qs,_jwt:Fs,_ksuid:Cs,_lazy:MS,_length:pr,_literal:TS,_lowercase:zi,_lt:Wt,_lte:bt,_mac:gp,_map:IS,_max:bt,_maxLength:mr,_maxSize:Pn,_mime:Ei,_min:kt,_minLength:dn,_minSize:Yt,_multipleOf:Tn,_nan:Bp,_nanoid:Ps,_nativeEnum:xS,_negative:Hs,_never:Up,_nonnegative:Xs,_nonoptional:jS,_nonpositive:Ws,_normalize:Di,_null:jp,_nullable:ES,_number:$p,_optional:NS,_overwrite:Bt,_parse:tr,_parseAsync:nr,_pipe:US,_positive:Ks,_promise:BS,_properties:Qs,_property:Ys,_readonly:RS,_record:SS,_refine:Gp,_regex:Oi,_safeDecode:Na,_safeDecodeAsync:Da,_safeEncode:Pa,_safeEncodeAsync:Ea,_safeParse:rr,_safeParseAsync:ir,_set:OS,_size:fr,_slugify:Ui,_startsWith:Pi,_string:pp,_stringFormat:hr,_stringbool:Wp,_success:CS,_superRefine:qp,_symbol:Ep,_templateLiteral:ZS,_toLowerCase:Ci,_toUpperCase:Ai,_transform:PS,_trim:ji,_tuple:wS,_uint32:Ip,_uint64:Np,_ulid:Ds,_undefined:Dp,_union:$S,_unknown:Ap,_uppercase:xi,_url:Ii,_uuid:Is,_uuidv4:Os,_uuidv6:zs,_uuidv7:xs,_void:Rp,_xid:js,_xor:_S,clone:Ee,compile:cp,compileFn:Si,config:Ve,createStandardJSONSchemaMethod:yr,createToJSONSchemaMethod:nh,decode:I_,decodeAsync:z_,describe:Kp,encode:S_,encodeAsync:O_,extractDefs:En,finalize:Dn,flattenError:Sa,formatError:Ia,getDiscriminatedOption:um,globalConfig:Qe,globalRegistry:_t,handleUnrepresentable:Be,initializeContext:Nn,isBackEdge:ys,isRecursiveSchema:Km,isValidBase64:gi,isValidBase64URL:es,isValidCIDRv6:Qa,isValidCreditCard:ts,isValidIPv6:hi,isValidJWT:ns,locales:np,memoizer:gs,mergeValues:lr,meta:Hp,parse:li,parseAsync:di,parseURLObject:Ha,prettifyError:gd,process:Se,regexes:Za,registry:vs,safeDecode:T_,safeDecodeAsync:N_,safeEncode:x_,safeEncodeAsync:P_,safeParse:fi,safeParseAsync:mi,standardProps:qa,stripTabAndNewline:Wa,toDotPath:hd,toJSONSchema:sc,toZod:ca,treeifyError:pd,urlHostnameOk:Xa,urlProtocolOk:Ya,util:sd,validate:yd,validateAsync:vd,version:yf}),KS=Object.freeze({__proto__:null,endsWith:Ni,gt:Xt,gte:kt,includes:Ti,length:pr,lowercase:zi,lt:Wt,lte:bt,maxLength:mr,maxSize:Pn,mime:Ei,minLength:dn,minSize:Yt,multipleOf:Tn,negative:Hs,nonnegative:Xs,nonpositive:Ws,normalize:Di,overwrite:Bt,positive:Ks,properties:Qs,property:Ys,regex:Oi,size:fr,slugify:Ui,startsWith:Pi,toLowerCase:Ci,toUpperCase:Ai,trim:ji,uppercase:xi});const Bh=new WeakSet([Object.prototype,Error.prototype]);function Ri(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const i=r(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}const Lh=(e,t)=>{wa.init(e,t),e.name="ZodError";const r=Object.getPrototypeOf(e);Bh.has(r)||(Bh.add(r),Ri(r,"format",i=>n=>Ia(i,n)),Ri(r,"flatten",i=>n=>Sa(i,n)),Ri(r,"addIssue",i=>n=>{i.issues.push(n),i.message=JSON.stringify(i.issues,ri,2)}),Ri(r,"addIssues",i=>n=>{i.issues.push(...n),i.message=JSON.stringify(i.issues,ri,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},HS=w("ZodError",Lh),ft=w("ZodError",Lh,void 0,{Parent:Error}),Fh=tr(ft),Vh=nr(ft),Gh=rr(ft),qh=ir(ft),Jh=Oa(ft),Kh=za(ft),Hh=xa(ft),Wh=Ta(ft),Xh=Pa(ft),Yh=Na(ft),Qh=Ea(ft),eg=Da(ft);function WS(){Qe.localeError||Ve(Wm())}function fn(){Qe.memoizer||Ve({memoizer:gs()})}const ie=w("ZodType",(e,t)=>(WS(),ne.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(zt(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ee(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Kc(e,t))},superRefine(e,t){return this.check(Hc(e,t))},overwrite(e){return this.check(Bt(e))},optional(){return ze(this)},exactOptional(){return xc(this)},nullable(){return Nr(this)},nullish(){return ze(Nr(this))},nonoptional(e){return jc(this,e)},array(){return se(this)},or(e){return Oe([this,e])},and(e){return Pr(this,e)},transform(e){return mo(this,uo(e))},default(e){return Nc(this,e)},prefault(e){return Dc(this,e)},catch(e){return Uc(this,e)},pipe(e){return mo(this,e)},readonly(){return Bc(this)},describe(e){const t=this.clone();return _t.add(t,{description:e}),t},meta(...e){if(e.length===0)return _t.get(this);const t=this.clone();return _t.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return ha(this,"~standard",{...qa(this),jsonSchema:{input:yr(this,"input"),output:yr(this,"output")}})},set"~standard"(e){Jt(this,"~standard",e)},parse:function e(t,r){return Fh(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await Vh(this,t,r,{callee:e})},safeParse(e,t){return Gh(this,e,t)},async safeParseAsync(e,t){return qh(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Jt(this,"spa",e)},encode:function e(t,r){return Jh(this,t,r,{callee:e})},decode:function e(t,r){return Kh(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await Hh(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await Wh(this,t,r,{callee:e})},safeEncode(e,t){return Xh(this,e,t)},safeDecode(e,t){return Yh(this,e,t)},async safeEncodeAsync(e,t){return Qh(this,e,t)},async safeDecodeAsync(e,t){return eg(this,e,t)},toJSONSchema(e){return nh(this,{})(e)},get description(){return _t.get(this)?.description},get _def(){return this._zod.def}}),Zi=w("_ZodString",(e,t)=>{ur.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>rh(e,i,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null},{regex(...e){return this.check(Oi(...e))},includes(...e){return this.check(Ti(...e))},startsWith(...e){return this.check(Pi(...e))},endsWith(...e){return this.check(Ni(...e))},min(...e){return this.check(dn(...e))},max(...e){return this.check(mr(...e))},length(...e){return this.check(pr(...e))},nonempty(...e){return this.check(dn(1,...e))},lowercase(e){return this.check(zi(e))},uppercase(e){return this.check(xi(e))},trim(){return this.check(ji())},normalize(...e){return this.check(Di(...e))},toLowerCase(){return this.check(Ci())},toUpperCase(){return this.check(Ai())},slugify(){return this.check(Ui())}}),$r=w("ZodString",(e,t)=>{ur.init(e,t),Zi.init(e,t)},{email(e){return this.check(ws(Mi,e))},url(e){return this.check(Ii(Sr,e))},jwt(e){return this.check(Fs(no,e))},emoji(e){return this.check(Ts(Li,e))},guid(e){return this.check(Ss(Bi,e))},uuid(e){return this.check(Is(Ct,e))},uuidv4(e){return this.check(Os(Ct,e))},uuidv6(e){return this.check(zs(Ct,e))},uuidv7(e){return this.check(xs(Ct,e))},nanoid(e){return this.check(Ps(Fi,e))},cuid(e){return this.check(Ns(Vi,e))},cuid2(e){return this.check(Es(Gi,e))},ulid(e){return this.check(Ds(qi,e))},base64(e){return this.check(Ms(Qi,e))},base64url(e){return this.check(Bs(eo,e))},xid(e){return this.check(js(Ji,e))},ksuid(e){return this.check(Cs(Ki,e))},ipv4(e){return this.check(As(Hi,e))},ipv6(e){return this.check(Us(Wi,e))},cidrv4(e){return this.check(Rs(Xi,e))},cidrv6(e){return this.check(Zs(Yi,e))},e164(e){return this.check(Ls(to,e))},datetime(e){return this.check(Vs(_r,e))},date(e){return this.check(Gs(br,e))},time(e){return this.check(qs(kr,e))},duration(e){return this.check(Js(wr,e))}});function k(e){return pp($r,e)}const Ie=w("ZodStringFormat",(e,t)=>{we.init(e,t),Zi.init(e,t)}),_r=w("ZodISODateTime",(e,t)=>{Pf.init(e,t),Ie.init(e,t)}),br=w("ZodISODate",(e,t)=>{Nf.init(e,t),Ie.init(e,t)}),kr=w("ZodISOTime",(e,t)=>{Ef.init(e,t),Ie.init(e,t)}),wr=w("ZodISODuration",(e,t)=>{Df.init(e,t),Ie.init(e,t)}),Mi=w("ZodEmail",(e,t)=>{bf.init(e,t),Ie.init(e,t)});function tg(e){return ws(Mi,e)}const Bi=w("ZodGUID",(e,t)=>{$f.init(e,t),Ie.init(e,t)});function ng(e){return Ss(Bi,e)}const Ct=w("ZodUUID",(e,t)=>{_f.init(e,t),Ie.init(e,t)});function rg(e){return Is(Ct,e)}function ig(e){return Os(Ct,e)}function og(e){return zs(Ct,e)}function ag(e){return xs(Ct,e)}const Sr=w("ZodURL",(e,t)=>{kf.init(e,t),Ie.init(e,t)});function sg(e){return Ii(Sr,e)}function cg(e){return Ii(Sr,{protocol:Ca,hostname:Rd,...E(e)})}const Li=w("ZodEmoji",(e,t)=>{wf.init(e,t),Ie.init(e,t)});function ug(e){return Ts(Li,e)}const Fi=w("ZodNanoID",(e,t)=>{Sf.init(e,t),Ie.init(e,t)});function lg(e){return Ps(Fi,e)}const Vi=w("ZodCUID",(e,t)=>{If.init(e,t),Ie.init(e,t)});function dg(e){return Ns(Vi,e)}const Gi=w("ZodCUID2",(e,t)=>{Of.init(e,t),Ie.init(e,t)});function fg(e){return Es(Gi,e)}const qi=w("ZodULID",(e,t)=>{zf.init(e,t),Ie.init(e,t)});function mg(e){return Ds(qi,e)}const Ji=w("ZodXID",(e,t)=>{xf.init(e,t),Ie.init(e,t)});function pg(e){return js(Ji,e)}const Ki=w("ZodKSUID",(e,t)=>{Tf.init(e,t),Ie.init(e,t)});function hg(e){return Cs(Ki,e)}const Hi=w("ZodIPv4",(e,t)=>{jf.init(e,t),Ie.init(e,t)});function gg(e){return As(Hi,e)}const cc=w("ZodMAC",(e,t)=>{Af.init(e,t),Ie.init(e,t)});function yg(e){return gp(cc,e)}const Wi=w("ZodIPv6",(e,t)=>{Cf.init(e,t),Ie.init(e,t)});function vg(e){return Us(Wi,e)}const Xi=w("ZodCIDRv4",(e,t)=>{Uf.init(e,t),Ie.init(e,t)});function $g(e){return Rs(Xi,e)}const Yi=w("ZodCIDRv6",(e,t)=>{Rf.init(e,t),Ie.init(e,t)});function _g(e){return Zs(Yi,e)}const Qi=w("ZodBase64",(e,t)=>{Zf.init(e,t),Ie.init(e,t)});function bg(e){return Ms(Qi,e)}const eo=w("ZodBase64URL",(e,t)=>{Mf.init(e,t),Ie.init(e,t)});function kg(e){return Bs(eo,e)}const to=w("ZodE164",(e,t)=>{Bf.init(e,t),Ie.init(e,t)});function wg(e){return Ls(to,e)}const uc=w("ZodCreditCard",(e,t)=>{Lf.init(e,t),Ie.init(e,t)});function Sg(e){return yp(uc,e)}const no=w("ZodJWT",(e,t)=>{Ff.init(e,t),Ie.init(e,t)});function Ig(e){return Fs(no,e)}const jn=w("ZodCustomStringFormat",(e,t)=>{Vf.init(e,t),Ie.init(e,t)});function Og(e,t,r={}){return hr(jn,e,t,r)}function zg(e){return hr(jn,"hostname",Ud,e)}function xg(e){return hr(jn,"hex",Xd,e)}function Tg(e,t){const r=t?.enc??"hex",i=`${e}_${r}`,n=Za[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return hr(jn,i,n,t)}const Ir=w("ZodNumber",(e,t)=>{rs.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>ih(e,i,n,o);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},{gt(e,t){return this.check(Xt(e,t))},gte(e,t){return this.check(kt(e,t))},min(e,t){return this.check(kt(e,t))},lt(e,t){return this.check(Wt(e,t))},lte(e,t){return this.check(bt(e,t))},max(e,t){return this.check(bt(e,t))},int(e){return this.check(ro(e))},safe(e){return this.check(ro(e))},positive(e){return this.check(Xt(0,e))},nonnegative(e){return this.check(kt(0,e))},negative(e){return this.check(Wt(0,e))},nonpositive(e){return this.check(bt(0,e))},multipleOf(e,t){return this.check(Tn(e,t))},step(e,t){return this.check(Tn(e,t))},finite(){return this}});function ae(e){return $p(Ir,e)}const mn=w("ZodNumberFormat",(e,t)=>{Gf.init(e,t),Ir.init(e,t)});function ro(e){return bp(mn,e)}function Pg(e){return kp(mn,e)}function Ng(e){return wp(mn,e)}function Eg(e){return Sp(mn,e)}function Dg(e){return Ip(mn,e)}const Or=w("ZodBoolean",(e,t)=>{is.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>oh(e,r,i)});function Ue(e){return Op(Or,e)}const zr=w("ZodBigInt",(e,t)=>{os.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>ah(e,i,n,o);const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null},{gte(e,t){return this.check(kt(e,t))},min(e,t){return this.check(kt(e,t))},gt(e,t){return this.check(Xt(e,t))},lt(e,t){return this.check(Wt(e,t))},lte(e,t){return this.check(bt(e,t))},max(e,t){return this.check(bt(e,t))},positive(e){return this.check(Xt(BigInt(0),e))},negative(e){return this.check(Wt(BigInt(0),e))},nonpositive(e){return this.check(bt(BigInt(0),e))},nonnegative(e){return this.check(kt(BigInt(0),e))},multipleOf(e,t){return this.check(Tn(e,t))}});function jg(e){return xp(zr,e)}const io=w("ZodBigIntFormat",(e,t)=>{qf.init(e,t),zr.init(e,t)});function Cg(e){return Pp(io,e)}function Ag(e){return Np(io,e)}const lc=w("ZodSymbol",(e,t)=>{Jf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sh(e,r,i,n)});function Ug(e){return Ep(lc,e)}const dc=w("ZodUndefined",(e,t)=>{Kf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uh(e,r,i,n)});function Rg(e){return Dp(dc,e)}const fc=w("ZodNull",(e,t)=>{Hf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ch(e,r,i)});function oo(e){return jp(fc,e)}const mc=w("ZodAny",(e,t)=>{Wf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fh()});function Zg(){return Cp(mc)}const pc=w("ZodUnknown",(e,t)=>{Xf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>mh()});function _e(){return Ap(pc)}const hc=w("ZodNever",(e,t)=>{Yf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dh(e,r,i)});function ao(e){return Up(hc,e)}const gc=w("ZodVoid",(e,t)=>{Qf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lh(e,r,i,n)});function Mg(e){return Rp(gc,e)}const so=w("ZodDate",(e,t)=>{em.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>ph(e,i,n,o),e.min=(i,n)=>e.check(kt(i,n)),e.max=(i,n)=>e.check(bt(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 Bg(e){return Zp(so,e)}const yc=w("ZodArray",(e,t)=>{fn(),nm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Oh(e,r,i,n),e.element=t.element},{min(e,t){return this.check(dn(e,t))},nonempty(e){return this.check(dn(1,e))},max(e,t){return this.check(mr(e,t))},length(e,t){return this.check(pr(e,t))},unwrap(){return this.element}});function se(e,t){return Lp(yc,e,t)}function Lg(e){const t=e._zod.def.shape;return We(Object.keys(t))}const xr=w("ZodObject",(e,t)=>{fn(),om.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zh(e,r,i,n),ya(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return We(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:_e()})},loose(){return this.clone({...this._zod.def,catchall:_e()})},strict(){return this.clone({...this._zod.def,catchall:ao()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Ql(this,e)},safeExtend(e){return ed(this,e)},merge(e){return td(this,e)},pick(e){return Xl(this,e)},omit(e){return Yl(this,e)},partial(...e){return ma(Un,this,e[0])},exactPartial(...e){return ma(lo,this,e[0],"exactPartial")},required(...e){return nd(fo,this,e[0])}});function R(e,t){const r={type:"object",shape:e??{},...E(t)};return new xr(r)}function Fg(e,t){return new xr({type:"object",shape:e,catchall:ao(),...E(t)})}function He(e,t){return new xr({type:"object",shape:e,catchall:_e(),...E(t)})}const Tr=w("ZodUnion",(e,t)=>{vi.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>tc(e,r,i,n),e.options=t.options});function Oe(e,t){return new Tr({type:"union",options:e,...E(t)})}const vc=w("ZodXor",(e,t)=>{Tr.init(e,t),cm.init(e,t),e._zod.processJSONSchema=(r,i,n)=>tc(e,r,i,n),e.options=t.options});function Vg(e,t){return new vc({type:"union",options:e,inclusive:!1,...E(t)})}const $c=w("ZodDiscriminatedUnion",(e,t)=>{Tr.init(e,t),lm.init(e,t)});function co(e,t,r){return new $c({type:"union",options:t,discriminator:e,...E(r)})}const _c=w("ZodIntersection",(e,t)=>{dm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xh(e,r,i,n)});function Pr(e,t){return new _c({type:"intersection",left:e,right:t})}const bc=w("ZodTuple",(e,t)=>{fn(),cs.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Th(e,r,i,n)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){const e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Un({type:"optional",innerType:t}))})}});function kc(e,t,r){const i=t instanceof ne,n=i?r:t,o=i?t:null;return new bc({type:"tuple",items:e,rest:o,...E(n)})}const Cn=w("ZodRecord",(e,t)=>{fn(),gm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ph(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function ve(e,t,r){return!t||!t._zod?new Cn({type:"record",keyType:k(),valueType:e,...E(t)}):new Cn({type:"record",keyType:e,valueType:t,...E(r)})}function Gg(e,t,r){return new Cn({type:"record",keyType:e,valueType:t,...E(r),partial:!0})}function qg(e,t,r){return new Cn({type:"record",keyType:e,valueType:t,mode:"loose",...E(r)})}const wc=w("ZodMap",(e,t)=>{fn(),ym.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sh(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Yt(...r)),e.nonempty=r=>e.check(Yt(1,r)),e.max=(...r)=>e.check(Pn(...r)),e.size=(...r)=>e.check(fr(...r))});function Jg(e,t,r){return new wc({type:"map",keyType:e,valueType:t,...E(r)})}const Sc=w("ZodSet",(e,t)=>{fn(),$m.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ih(e,r,i,n),e.min=(...r)=>e.check(Yt(...r)),e.nonempty=r=>e.check(Yt(1,r)),e.max=(...r)=>e.check(Pn(...r)),e.size=(...r)=>e.check(fr(...r))});function Kg(e,t){return new Sc({type:"set",valueType:e,...E(t)})}const An=w("ZodEnum",(e,t)=>{bm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>hh(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 An({...t,checks:[],...E(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 An({...t,checks:[],...E(n),entries:o})}});function We(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new An({type:"enum",entries:r,...E(t)})}function Hg(e,t){return new An({type:"enum",entries:e,...E(t)})}const Ic=w("ZodLiteral",(e,t)=>{km.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>gh(e,r,i,n),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 q(e,t){return new Ic({type:"literal",values:Array.isArray(e)?e:[e],...E(t)})}const Oc=w("ZodFile",(e,t)=>{wm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$h(e,r,i),e.min=(r,i)=>e.check(Yt(r,i)),e.max=(r,i)=>e.check(Pn(r,i)),e.mime=(r,i)=>e.check(Ei(Array.isArray(r)?r:[r],i))});function Wg(e){return Fp(Oc,e)}const zc=w("ZodTransform",(e,t)=>{fn(),Sm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wh(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new ci(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(On(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(On(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function uo(e){return new zc({type:"transform",transform:e})}const Un=w("ZodOptional",(e,t)=>{us.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>oc(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ze(e){return new Un({type:"optional",innerType:e})}const lo=w("ZodExactOptional",(e,t)=>{Om.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>oc(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function xc(e){return new lo({type:"optional",innerType:e})}const Tc=w("ZodNullable",(e,t)=>{zm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Nr(e){return new Tc({type:"nullable",innerType:e})}function Xg(e){return ze(Nr(e))}const Pc=w("ZodDefault",(e,t)=>{xm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Nc(e,t){return new Pc({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Qn(t)}})}const Ec=w("ZodPrefault",(e,t)=>{Pm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ch(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Dc(e,t){return new Ec({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Qn(t)}})}const fo=w("ZodNonOptional",(e,t)=>{Nm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Eh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function jc(e,t){return new fo({type:"nonoptional",innerType:e,...E(t)})}const Cc=w("ZodSuccess",(e,t)=>{Dm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_h(e,r,i),e.unwrap=()=>e._zod.def.innerType});function Yg(e){return new Cc({type:"success",innerType:e})}const Ac=w("ZodCatch",(e,t)=>{Cm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ah(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Uc(e,t){return new Ac({type:"catch",innerType:e,catchValue:typeof t=="function"?t:$a(t)})}const Rc=w("ZodNaN",(e,t)=>{Am.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yh(e,r,i,n)});function Qg(e){return Bp(Rc,e)}const Er=w("ZodPipe",(e,t)=>{ls.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Uh(e,r,i,n),e.in=t.in,e.out=t.out});function mo(e,t){return new Er({type:"pipe",in:e,out:t})}const Dr=w("ZodCodec",(e,t)=>{Er.init(e,t),ds.init(e,t)});function ey(e,t,r){return new Dr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function ty(e){const t=e._zod.def;return new Dr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}const Zc=w("ZodPreprocess",(e,t)=>{Er.init(e,t),Um.init(e,t)}),Mc=w("ZodReadonly",(e,t)=>{Rm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Bc(e){return new Mc({type:"readonly",innerType:e})}const Lc=w("ZodTemplateLiteral",(e,t)=>{Mm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vh(e,r,i)});function ny(e,t){return new Lc({type:"template_literal",parts:e,...E(t)})}const Fc=w("ZodLazy",(e,t)=>{fs.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Mh(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function Vc(e){return new Fc({type:"lazy",getter:e})}const Gc=w("ZodPromise",(e,t)=>{Lm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ry(e){return new Gc({type:"promise",innerType:e})}const qc=w("ZodFunction",(e,t)=>{Bm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>kh(e,r,i,n)});function po(e){return new qc({type:"function",input:Array.isArray(e?.input)?kc(e?.input):e?.input??se(_e()),output:e?.output??_e()})}const jr=w("ZodCustom",(e,t)=>{Fm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bh(e,r,i,n)});function iy(e){const t=new De({check:"custom"});return t._zod.check=e,t}function Jc(e,t){return Vp(jr,e??(()=>!0),t)}function Kc(e,t={}){return Gp(jr,e,t)}function Hc(e,t){return qp(e,t)}const oy=Kp,ay=Hp;function sy(e,t={}){const r=new jr({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...E(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 cy=(...e)=>Wp({Codec:Dr,Boolean:Or,String:$r},...e);function uy(e){const t=Vc(()=>Oe([k(e),ae(),Ue(),oo(),se(t),ve(k(),t)]));return t}function ho(e,t){return new Zc({type:"pipe",in:uo(e),out:t})}var XS=Object.freeze({__proto__:null,ZodAny:mc,ZodArray:yc,ZodBase64:Qi,ZodBase64URL:eo,ZodBigInt:zr,ZodBigIntFormat:io,ZodBoolean:Or,ZodCIDRv4:Xi,ZodCIDRv6:Yi,ZodCUID:Vi,ZodCUID2:Gi,ZodCatch:Ac,ZodCodec:Dr,ZodCreditCard:uc,ZodCustom:jr,ZodCustomStringFormat:jn,ZodDate:so,ZodDefault:Pc,ZodDiscriminatedUnion:$c,ZodE164:to,ZodEmail:Mi,ZodEmoji:Li,ZodEnum:An,ZodExactOptional:lo,ZodFile:Oc,ZodFunction:qc,ZodGUID:Bi,ZodIPv4:Hi,ZodIPv6:Wi,ZodISODate:br,ZodISODateTime:_r,ZodISODuration:wr,ZodISOTime:kr,ZodIntersection:_c,ZodJWT:no,ZodKSUID:Ki,ZodLazy:Fc,ZodLiteral:Ic,ZodMAC:cc,ZodMap:wc,ZodNaN:Rc,ZodNanoID:Fi,ZodNever:hc,ZodNonOptional:fo,ZodNull:fc,ZodNullable:Tc,ZodNumber:Ir,ZodNumberFormat:mn,ZodObject:xr,ZodOptional:Un,ZodPipe:Er,ZodPrefault:Ec,ZodPreprocess:Zc,ZodPromise:Gc,ZodReadonly:Mc,ZodRecord:Cn,ZodSet:Sc,ZodString:$r,ZodStringFormat:Ie,ZodSuccess:Cc,ZodSymbol:lc,ZodTemplateLiteral:Lc,ZodTransform:zc,ZodTuple:bc,ZodType:ie,ZodULID:qi,ZodURL:Sr,ZodUUID:Ct,ZodUndefined:dc,ZodUnion:Tr,ZodUnknown:pc,ZodVoid:gc,ZodXID:Ji,ZodXor:vc,_ZodString:Zi,_default:Nc,_function:po,any:Zg,array:se,base64:bg,base64url:kg,bigint:jg,boolean:Ue,catch:Uc,check:iy,cidrv4:$g,cidrv6:_g,codec:ey,creditCard:Sg,cuid:dg,cuid2:fg,custom:Jc,date:Bg,describe:oy,discriminatedUnion:co,e164:wg,email:tg,emoji:ug,enum:We,exactOptional:xc,file:Wg,float32:Pg,float64:Ng,function:po,guid:ng,hash:Tg,hex:xg,hostname:zg,httpUrl:cg,instanceof:sy,int:ro,int32:Eg,int64:Cg,intersection:Pr,invertCodec:ty,ipv4:gg,ipv6:vg,json:uy,jwt:Ig,keyof:Lg,ksuid:hg,lazy:Vc,literal:q,looseObject:He,looseRecord:qg,mac:yg,map:Jg,meta:ay,nan:Qg,nanoid:lg,nativeEnum:Hg,never:ao,nonoptional:jc,null:oo,nullable:Nr,nullish:Xg,number:ae,object:R,optional:ze,partialRecord:Gg,pipe:mo,prefault:Dc,preprocess:ho,promise:ry,readonly:Bc,record:ve,refine:Kc,set:Kg,strictObject:Fg,string:k,stringFormat:Og,stringbool:cy,success:Yg,superRefine:Hc,symbol:Ug,templateLiteral:ny,transform:uo,tuple:kc,uint32:Dg,uint64:Ag,ulid:mg,undefined:Rg,union:Oe,unknown:_e,url:sg,uuid:rg,uuidv4:ig,uuidv6:og,uuidv7:ag,void:Mg,xid:pg,xor:Vg});const YS={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 QS(e){Ve({customError:e})}function eI(){return Ve().customError}var re;re||(re={});function ly(e){return Vs(_r,e)}function tI(e){return Gs(br,e)}function nI(e){return qs(kr,e)}function rI(e){return Js(wr,e)}var dy=Object.freeze({__proto__:null,ZodISODate:br,ZodISODateTime:_r,ZodISODuration:wr,ZodISOTime:kr,date:tI,datetime:ly,duration:rI,time:nI});const Z={...XS,...KS,iso:dy},iI=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 oI(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 fy(e,t){return e.map((r,i)=>i<t?r:r.optional())}function aI(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function sI(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]===void 0?void 0:aI(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 cI(e,t){return Z.transform(i=>i).check(i=>{const n=i.value;if(!(typeof n!="object"||n===null||Array.isArray(n)))for(const o of Object.getOwnPropertyNames(n)){const a=t.safeParse(o);a.success||i.issues.push({code:"invalid_key",origin:"record",issues:a.error.issues,input:o,path:[o],continue:!0})}}).pipe(e)}function my(e,t){if(e!==!1)return e===void 0||e===!0?Z.any():ot(e,t)}const uI=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function py(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Z.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 Z.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=sI(n,t),a=ot(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 Z.null();if(n.length===0)return Z.never();if(n.length===1)return Z.literal(n[0]);if(n.every(a=>typeof a=="string"))return Z.enum(n);const o=n.map(a=>Z.literal(a));return o.length<2?o[0]:Z.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return Z.literal(e.const);const r=e.type;if(Array.isArray(r)){const n=r.map(o=>{const a={...e,type:o};return py(a,t)});return n.length===0?Z.never():n.length===1?n[0]:Z.union(n)}if(!r)return Z.any();let i;switch(r){case"string":{let n=Z.string();if(e.format){const o=e.format;o==="email"?n=n.check(Z.email()):o==="uri"||o==="uri-reference"?n=n.check(Z.url()):o==="uuid"||o==="guid"?n=n.check(Z.uuid()):o==="date-time"?n=n.check(Z.iso.datetime({offset:!0})):o==="date"?n=n.check(Z.iso.date()):o==="time"?n=n.check(Z.regex(uI)):o==="duration"?n=n.check(Z.iso.duration()):o==="hostname"?n=n.check(Z.hostname()):o==="ipv4"?n=n.check(Z.ipv4()):o==="ipv6"?n=n.check(Z.ipv6()):o==="mac"?n=n.check(Z.mac()):o==="cidr"?n=n.check(Z.cidrv4()):o==="cidr-v6"?n=n.check(Z.cidrv6()):o==="base64"?n=n.check(Z.base64()):o==="base64url"?n=n.check(Z.base64url()):o==="e164"?n=n.check(Z.e164()):o==="credit_card"?n=n.check(Z.creditCard()):o==="jwt"?n=n.check(Z.jwt()):o==="emoji"?n=n.check(Z.emoji()):o==="nanoid"?n=n.check(Z.nanoid()):o==="cuid"?n=n.check(Z.cuid()):o==="cuid2"?n=n.check(Z.cuid2()):o==="ulid"?n=n.check(Z.ulid()):o==="xid"?n=n.check(Z.xid()):o==="ksuid"&&(n=n.check(Z.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"?Z.number().int():Z.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(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=Z.boolean();break}case"null":{i=Z.null();break}case"object":{const n={},o=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?ot(e.additionalProperties,t):void 0;for(const[c,u]of Object.entries(o)){const l=ot(u,t);Re(n,c,a.has(c)?l:l.optional())}if(e.patternProperties){const c=e.patternProperties,u=Object.keys(c),l=[];for(const m of u){const f=ot(c[m],t),p=Z.string().regex(new RegExp(m));l.push(Z.looseRecord(p,f))}const d=[];if(Object.keys(n).length>0&&d.push(Z.object(n).passthrough()),d.push(...l),d.length===0)i=Z.object({}).passthrough();else if(d.length===1)i=d[0];else{let m=Z.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)m=Z.intersection(m,d[f]);i=m}if(e.additionalProperties===!1){const m=Object.keys(n),f=u.map(y=>new RegExp(y)),p=i;i=i.check(y=>{if(!Rt(y.value))return;const h=[];for(const $ of Object.keys(y.value))m.includes($)||f.some(g=>g.test($))||h.push($);h.length&&y.issues.push({code:"unrecognized_keys",keys:h,input:y.value,inst:p})})}}else{const c=Z.object(n);e.additionalProperties===!1?i=c.strict():s?i=c.catchall(s):i=c.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){const c=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;i=cI(i,ot(c,t))}break}case"array":{const n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){const a=typeof e.minItems=="number"?e.minItems:0,s=n.map(d=>ot(d,t)),c=fy(s,a),u=Array.isArray(o)?void 0:my(o,t),l=Z.tuple(c);i=u?l.rest(u):l,typeof e.minItems=="number"&&(i=i.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Z.maxLength(e.maxItems)))}else if(Array.isArray(o)){const a=typeof e.minItems=="number"?e.minItems:0,s=o.map(d=>ot(d,t)),c=fy(s,a),u=my(e.additionalItems,t),l=Z.tuple(c);i=u?l.rest(u):l,typeof e.minItems=="number"&&(i=i.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Z.maxLength(e.maxItems)))}else if(o!==void 0){const a=ot(o,t);let s=Z.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=Z.array(Z.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}function ot(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let r=py(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=>ot(u,t)),c=Z.union(s);r=i?Z.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){const s=e.oneOf.map(u=>ot(u,t)),c=Z.xor(s);r=i?Z.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:Z.any();else{let s=i?r:ot(e.allOf[0],t);const c=i?0:1;for(let u=c;u<e.allOf.length;u++)s=Z.intersection(s,ot(e.allOf[u],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Z.nullable(r)),e.readOnly===!0&&(r=Z.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]);e.propertyNames!==void 0&&e.type==="object"&&e.$ref===void 0&&(n.propertyNames=e.propertyNames);for(const s of Object.keys(e))iI.has(s)||Re(n,s,e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function lI(e,t){if(typeof e=="boolean")return e?Z.any():Z.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=oI(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??_t};return ot(r,o)}const hy=Symbol("z.visit/resolving");function Wc(e,t){const r=typeof t=="function"?t:(a,s)=>{const c=t[a._zod.def.type];return c?c(a,s):a},i=new Map;function n(a){const s=i.get(a);if(s===hy)return new fs({type:"lazy",getter:()=>i.get(a)});if(s!==void 0)return s;i.set(a,hy);const c=o(a),u=r(c,c!==a);return i.set(a,u),u}function o(a){const s=a._zod.def;switch(s.type){case"object":{const u=s.shape,l=Object.keys(u);let d=!1;const m={};for(const p of l){const y=n(u[p]);y!==u[p]&&(d=!0),m[p]=y}let f=s.catchall;return s.catchall&&(f=n(s.catchall),f!==s.catchall&&(d=!0)),d?Ee(a,{...s,shape:m,catchall:f}):a}case"array":{const u=n(s.element);return u===s.element?a:Ee(a,{...s,element:u})}case"tuple":{const u=s.items;let l=!1;const d=[];for(const f of u){const p=n(f);p!==f&&(l=!0),d.push(p)}let m=s.rest;return s.rest&&(m=n(s.rest),m!==s.rest&&(l=!0)),l?Ee(a,{...s,items:d,rest:m}):a}case"record":case"map":{const u=n(s.keyType),l=n(s.valueType);return u===s.keyType&&l===s.valueType?a:Ee(a,{...s,keyType:u,valueType:l})}case"set":{const u=n(s.valueType);return u===s.valueType?a:Ee(a,{...s,valueType:u})}case"union":{const u=s.options;let l=!1;const d=[];for(const m of u){const f=n(m);f!==m&&(l=!0),d.push(f)}return l?Ee(a,{...s,options:d}):a}case"intersection":{const u=n(s.left),l=n(s.right);return u===s.left&&l===s.right?a:Ee(a,{...s,left:u,right:l})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{const u=n(s.innerType);return u===s.innerType?a:Ee(a,{...s,innerType:u})}case"pipe":{const u=n(s.in),l=n(s.out);return u===s.in&&l===s.out?a:Ee(a,{...s,in:u,out:l})}case"function":{const u=n(s.input),l=n(s.output);return u===s.input&&l===s.output?a:Ee(a,{...s,input:u,output:l})}case"lazy":{const u=s.getter,{_cachedInner:l,...d}=s;return Ee(a,{...d,getter:()=>n(u())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return n(e)}function dI(e){return Wc(e,{object:t=>t.partial(),union:t=>{const r=t._zod.def;return r.discriminator===void 0?t:Oe(r.options)}})}function fI(e,t){if(!t?.length)return e;const r=e._zod.def;return Ee(e,zt(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function gy(e){return fI(e.out,e.checks)}function mI(e){return e.in._zod.traits.has("$ZodTransform")?gy(e):e.in}function pI(e){return Wc(e,{pipe:t=>mI(t._zod.def),default:(t,r)=>r?ze(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function hI(e){return Wc(e,{pipe:t=>gy(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}function gI(e){return hp($r,e)}function yI(e){return _p(Ir,e)}function vI(e){return zp(Or,e)}function $I(e){return Tp(zr,e)}function _I(e){return Mp(so,e)}var bI=Object.freeze({__proto__:null,bigint:$I,boolean:vI,date:_I,number:yI,string:gI}),go=Object.freeze({__proto__:null,$brand:dd,$input:op,$output:ip,NEVER:ud,TimePrecision:vp,ZodAny:mc,ZodArray:yc,ZodBase64:Qi,ZodBase64URL:eo,ZodBigInt:zr,ZodBigIntFormat:io,ZodBoolean:Or,ZodCIDRv4:Xi,ZodCIDRv6:Yi,ZodCUID:Vi,ZodCUID2:Gi,ZodCatch:Ac,ZodCodec:Dr,ZodCompileAsyncError:Ht,ZodCompileUnsupportedError:pe,ZodCreditCard:uc,ZodCustom:jr,ZodCustomStringFormat:jn,ZodDate:so,ZodDefault:Pc,ZodDiscriminatedUnion:$c,ZodE164:to,ZodEmail:Mi,ZodEmoji:Li,ZodEnum:An,ZodError:HS,ZodExactOptional:lo,ZodFile:Oc,get ZodFirstPartyTypeKind(){return re},ZodFunction:qc,ZodGUID:Bi,ZodIPv4:Hi,ZodIPv6:Wi,ZodISODate:br,ZodISODateTime:_r,ZodISODuration:wr,ZodISOTime:kr,ZodIntersection:_c,ZodIssueCode:YS,ZodJWT:no,ZodKSUID:Ki,ZodLazy:Fc,ZodLiteral:Ic,ZodMAC:cc,ZodMap:wc,ZodNaN:Rc,ZodNanoID:Fi,ZodNever:hc,ZodNonOptional:fo,ZodNull:fc,ZodNullable:Tc,ZodNumber:Ir,ZodNumberFormat:mn,ZodObject:xr,ZodOptional:Un,ZodPipe:Er,ZodPrefault:Ec,ZodPreprocess:Zc,ZodPromise:Gc,ZodReadonly:Mc,ZodRealError:ft,ZodRecord:Cn,ZodSet:Sc,ZodString:$r,ZodStringFormat:Ie,ZodSuccess:Cc,ZodSymbol:lc,ZodTemplateLiteral:Lc,ZodTransform:zc,ZodTuple:bc,ZodType:ie,ZodULID:qi,ZodURL:Sr,ZodUUID:Ct,ZodUndefined:dc,ZodUnion:Tr,ZodUnknown:pc,ZodVoid:gc,ZodXID:Ji,ZodXor:vc,_ZodString:Zi,_default:Nc,_function:po,any:Zg,array:se,base64:bg,base64url:kg,bigint:jg,boolean:Ue,catch:Uc,check:iy,cidrv4:$g,cidrv6:_g,clone:Ee,codec:ey,coerce:bI,compile:cp,config:Ve,core:JS,creditCard:Sg,cuid:dg,cuid2:fg,custom:Jc,date:Bg,decode:Kh,decodeAsync:Wh,deepPartial:dI,describe:oy,discriminatedUnion:co,e164:wg,email:tg,emoji:ug,encode:Jh,encodeAsync:Hh,endsWith:Ni,enum:We,exactOptional:xc,file:Wg,flattenError:Sa,float32:Pg,float64:Ng,formatError:Ia,fromJSONSchema:lI,function:po,getDiscriminatedOption:um,getErrorMap:eI,globalRegistry:_t,gt:Xt,gte:kt,guid:ng,hash:Tg,hex:xg,hostname:zg,httpUrl:cg,includes:Ti,input:pI,instanceof:sy,int:ro,int32:Eg,int64:Cg,intersection:Pr,invertCodec:ty,ipv4:gg,ipv6:vg,iso:dy,json:uy,jwt:Ig,keyof:Lg,ksuid:hg,lazy:Vc,length:pr,literal:q,locales:np,looseObject:He,looseRecord:qg,lowercase:zi,lt:Wt,lte:bt,mac:yg,map:Jg,maxLength:mr,maxSize:Pn,memoizer:gs,meta:ay,mime:Ei,minLength:dn,minSize:Yt,multipleOf:Tn,nan:Qg,nanoid:lg,nativeEnum:Hg,negative:Hs,never:ao,nonnegative:Xs,nonoptional:jc,nonpositive:Ws,normalize:Di,null:oo,nullable:Nr,nullish:Xg,number:ae,object:R,optional:ze,output:hI,overwrite:Bt,parse:Fh,parseAsync:Vh,partialRecord:Gg,pipe:mo,positive:Ks,prefault:Dc,preprocess:ho,prettifyError:gd,promise:ry,properties:Qs,property:Ys,readonly:Bc,record:ve,refine:Kc,regex:Oi,regexes:Za,registry:vs,safeDecode:Yh,safeDecodeAsync:eg,safeEncode:Xh,safeEncodeAsync:Qh,safeParse:Gh,safeParseAsync:qh,set:Kg,setErrorMap:QS,size:fr,slugify:Ui,startsWith:Pi,strictObject:Fg,string:k,stringFormat:Og,stringbool:cy,success:Yg,superRefine:Hc,symbol:Ug,templateLiteral:ny,toJSONSchema:sc,toLowerCase:Ci,toUpperCase:Ai,toZod:ca,transform:uo,treeifyError:pd,trim:ji,tuple:kc,uint32:Dg,uint64:Ag,ulid:mg,undefined:Rg,union:Oe,unknown:_e,uppercase:xi,url:sg,util:sd,uuid:rg,uuidv4:ig,uuidv6:og,uuidv7:ag,validate:yd,validateAsync:vd,void:Mg,xid:pg,xor:Vg});const kI=w("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ne.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){Jt(this,"with",e)},parse(e,t){return li(this,e,t,{callee:this.parse})},parseAsync(e,t){return di(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return fi(this,e,t)},safeParseAsync(e,t){return mi(this,e,t)},check(...e){const t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]},{parent:!0})},clone(e,t){return Ee(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),wI=w("ZodMiniObject",(e,t)=>{ss.init(e,t),kI.init(e,t),ya(e,"shape",r=>r._zod.def.shape,!1)});function yy(e,t){const r={type:"object",shape:e??{},...E(t)};return new wI(r)}function Lt(e){return!!e._zod}function Rn(e){const t=Object.values(e);if(t.length===0)return yy({});const r=t.every(Lt),i=t.every(n=>!Lt(n));if(r)return yy(e);if(i)return R(e);throw new Error("Mixed Zod versions detected in object shape.")}function Cr(e,t){return Lt(e)?fi(e,t):e.safeParse(t)}async function Xc(e,t){return Lt(e)?await mi(e,t):await e.safeParseAsync(t)}function Ar(e){if(!e)return;let t;if(Lt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function Ur(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 Rn(e)}}if(Lt(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 SI(e){return e.length===0?"object root":e.reduce((t,r,i)=>i===0?String(r):typeof r=="number"?`${t}[${r}]`:`${t}.${r}`,"")}function Yc(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 ${SI(t.path)}`:t.message).join(`
59
- `);if("message"in e&&typeof e.message=="string")return e.message;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function II(e){return e.description}function OI(e){if(Lt(e))return e._zod?.def?.type==="optional";const t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function Qc(e){if(Lt(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 vy="2025-11-25",zI=[vy,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],pn="io.modelcontextprotocol/related-task",yo="2.0",Ze=Jc(e=>e!==null&&(typeof e=="object"||typeof e=="function")),$y=Oe([k(),ae().int()]),_y=k();He({ttl:ae().optional(),pollInterval:ae().optional()});const xI=R({ttl:ae().optional()}),TI=R({taskId:k()}),eu=He({progressToken:$y.optional(),[pn]:TI.optional()}),mt=R({_meta:eu.optional()}),Rr=mt.extend({task:xI.optional()}),PI=e=>Rr.safeParse(e).success,Ge=R({method:k(),params:mt.loose().optional()}),wt=R({_meta:eu.optional()}),St=R({method:k(),params:wt.loose().optional()}),qe=He({_meta:eu.optional()}),vo=Oe([k(),ae().int()]),by=R({jsonrpc:q(yo),id:vo,...Ge.shape}).strict(),ky=e=>by.safeParse(e).success,wy=R({jsonrpc:q(yo),...St.shape}).strict(),NI=e=>wy.safeParse(e).success,tu=R({jsonrpc:q(yo),id:vo,result:qe}).strict(),$o=e=>tu.safeParse(e).success;var ee;(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"})(ee||(ee={}));const nu=R({jsonrpc:q(yo),id:vo.optional(),error:R({code:ae().int(),message:k(),data:_e().optional()})}).strict(),EI=e=>nu.safeParse(e).success,DI=Oe([by,wy,tu,nu]);Oe([tu,nu]);const ru=qe.strict(),jI=wt.extend({requestId:vo.optional(),reason:k().optional()}),iu=St.extend({method:q("notifications/cancelled"),params:jI}),CI=R({src:k(),mimeType:k().optional(),sizes:se(k()).optional(),theme:We(["light","dark"]).optional()}),Zr=R({icons:se(CI).optional()}),Zn=R({name:k(),title:k().optional()}),Sy=Zn.extend({...Zn.shape,...Zr.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),AI=Pr(R({applyDefaults:Ue().optional()}),ve(k(),_e())),UI=ho(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Pr(R({form:AI.optional(),url:Ze.optional()}),ve(k(),_e()).optional())),RI=He({list:Ze.optional(),cancel:Ze.optional(),requests:He({sampling:He({createMessage:Ze.optional()}).optional(),elicitation:He({create:Ze.optional()}).optional()}).optional()}),ZI=He({list:Ze.optional(),cancel:Ze.optional(),requests:He({tools:He({call:Ze.optional()}).optional()}).optional()}),MI=R({experimental:ve(k(),Ze).optional(),sampling:R({context:Ze.optional(),tools:Ze.optional()}).optional(),elicitation:UI.optional(),roots:R({listChanged:Ue().optional()}).optional(),tasks:RI.optional(),extensions:ve(k(),Ze).optional()}),BI=mt.extend({protocolVersion:k(),capabilities:MI,clientInfo:Sy}),Iy=Ge.extend({method:q("initialize"),params:BI}),LI=R({experimental:ve(k(),Ze).optional(),logging:Ze.optional(),completions:Ze.optional(),prompts:R({listChanged:Ue().optional()}).optional(),resources:R({subscribe:Ue().optional(),listChanged:Ue().optional()}).optional(),tools:R({listChanged:Ue().optional()}).optional(),tasks:ZI.optional(),extensions:ve(k(),Ze).optional()}),FI=qe.extend({protocolVersion:k(),capabilities:LI,serverInfo:Sy,instructions:k().optional()}),Oy=St.extend({method:q("notifications/initialized"),params:wt.optional()}),ou=Ge.extend({method:q("ping"),params:mt.optional()}),VI=R({progress:ae(),total:ze(ae()),message:ze(k())}),GI=R({...wt.shape,...VI.shape,progressToken:$y}),au=St.extend({method:q("notifications/progress"),params:GI}),qI=mt.extend({cursor:_y.optional()}),Mr=Ge.extend({params:qI.optional()}),Br=qe.extend({nextCursor:_y.optional()}),JI=We(["working","input_required","completed","failed","cancelled"]),Lr=R({taskId:k(),status:JI,ttl:Oe([ae(),oo()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:ze(ae()),statusMessage:ze(k())}),_o=qe.extend({task:Lr}),KI=wt.merge(Lr),bo=St.extend({method:q("notifications/tasks/status"),params:KI}),su=Ge.extend({method:q("tasks/get"),params:mt.extend({taskId:k()})}),cu=qe.merge(Lr),uu=Ge.extend({method:q("tasks/result"),params:mt.extend({taskId:k()})});qe.loose();const lu=Mr.extend({method:q("tasks/list")}),du=Br.extend({tasks:se(Lr)}),fu=Ge.extend({method:q("tasks/cancel"),params:mt.extend({taskId:k()})}),HI=qe.merge(Lr),zy=R({uri:k(),mimeType:ze(k()),_meta:ve(k(),_e()).optional()}),xy=zy.extend({text:k()}),mu=k().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ty=zy.extend({blob:mu}),Fr=We(["user","assistant"]),Mn=R({audience:se(Fr).optional(),priority:ae().min(0).max(1).optional(),lastModified:ly({offset:!0}).optional()}),Py=R({...Zn.shape,...Zr.shape,uri:k(),description:ze(k()),mimeType:ze(k()),size:ze(ae()),annotations:Mn.optional(),_meta:ze(He({}))}),WI=R({...Zn.shape,...Zr.shape,uriTemplate:k(),description:ze(k()),mimeType:ze(k()),annotations:Mn.optional(),_meta:ze(He({}))}),pu=Mr.extend({method:q("resources/list")}),XI=Br.extend({resources:se(Py)}),hu=Mr.extend({method:q("resources/templates/list")}),YI=Br.extend({resourceTemplates:se(WI)}),gu=mt.extend({uri:k()}),QI=gu,yu=Ge.extend({method:q("resources/read"),params:QI}),e0=qe.extend({contents:se(Oe([xy,Ty]))}),t0=St.extend({method:q("notifications/resources/list_changed"),params:wt.optional()}),n0=gu,r0=Ge.extend({method:q("resources/subscribe"),params:n0}),i0=gu,o0=Ge.extend({method:q("resources/unsubscribe"),params:i0}),a0=wt.extend({uri:k()}),s0=St.extend({method:q("notifications/resources/updated"),params:a0}),c0=R({name:k(),description:ze(k()),required:ze(Ue())}),u0=R({...Zn.shape,...Zr.shape,description:ze(k()),arguments:ze(se(c0)),_meta:ze(He({}))}),vu=Mr.extend({method:q("prompts/list")}),l0=Br.extend({prompts:se(u0)}),d0=mt.extend({name:k(),arguments:ve(k(),k()).optional()}),$u=Ge.extend({method:q("prompts/get"),params:d0}),_u=R({type:q("text"),text:k(),annotations:Mn.optional(),_meta:ve(k(),_e()).optional()}),bu=R({type:q("image"),data:mu,mimeType:k(),annotations:Mn.optional(),_meta:ve(k(),_e()).optional()}),ku=R({type:q("audio"),data:mu,mimeType:k(),annotations:Mn.optional(),_meta:ve(k(),_e()).optional()}),f0=R({type:q("tool_use"),name:k(),id:k(),input:ve(k(),_e()),_meta:ve(k(),_e()).optional()}),m0=R({type:q("resource"),resource:Oe([xy,Ty]),annotations:Mn.optional(),_meta:ve(k(),_e()).optional()}),p0=Py.extend({type:q("resource_link")}),wu=Oe([_u,bu,ku,p0,m0]),h0=R({role:Fr,content:wu}),g0=qe.extend({description:k().optional(),messages:se(h0)}),y0=St.extend({method:q("notifications/prompts/list_changed"),params:wt.optional()}),v0=R({title:k().optional(),readOnlyHint:Ue().optional(),destructiveHint:Ue().optional(),idempotentHint:Ue().optional(),openWorldHint:Ue().optional()}),$0=R({taskSupport:We(["required","optional","forbidden"]).optional()}),Ny=R({...Zn.shape,...Zr.shape,description:k().optional(),inputSchema:R({type:q("object"),properties:ve(k(),Ze).optional(),required:se(k()).optional()}).catchall(_e()),outputSchema:R({type:q("object"),properties:ve(k(),Ze).optional(),required:se(k()).optional()}).catchall(_e()).optional(),annotations:v0.optional(),execution:$0.optional(),_meta:ve(k(),_e()).optional()}),Su=Mr.extend({method:q("tools/list")}),_0=Br.extend({tools:se(Ny)}),Iu=qe.extend({content:se(wu).default([]),structuredContent:ve(k(),_e()).optional(),isError:Ue().optional()});Iu.or(qe.extend({toolResult:_e()}));const b0=Rr.extend({name:k(),arguments:ve(k(),_e()).optional()}),ko=Ge.extend({method:q("tools/call"),params:b0}),k0=St.extend({method:q("notifications/tools/list_changed"),params:wt.optional()});R({autoRefresh:Ue().default(!0),debounceMs:ae().int().nonnegative().default(300)});const wo=We(["debug","info","notice","warning","error","critical","alert","emergency"]),w0=mt.extend({level:wo}),Ey=Ge.extend({method:q("logging/setLevel"),params:w0}),S0=wt.extend({level:wo,logger:k().optional(),data:_e()}),I0=St.extend({method:q("notifications/message"),params:S0}),O0=R({name:k().optional()}),z0=R({hints:se(O0).optional(),costPriority:ae().min(0).max(1).optional(),speedPriority:ae().min(0).max(1).optional(),intelligencePriority:ae().min(0).max(1).optional()}),x0=R({mode:We(["auto","required","none"]).optional()}),T0=R({type:q("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:se(wu).default([]),structuredContent:R({}).loose().optional(),isError:Ue().optional(),_meta:ve(k(),_e()).optional()}),P0=co("type",[_u,bu,ku]),So=co("type",[_u,bu,ku,f0,T0]),N0=R({role:Fr,content:Oe([So,se(So)]),_meta:ve(k(),_e()).optional()}),E0=Rr.extend({messages:se(N0),modelPreferences:z0.optional(),systemPrompt:k().optional(),includeContext:We(["none","thisServer","allServers"]).optional(),temperature:ae().optional(),maxTokens:ae().int(),stopSequences:se(k()).optional(),metadata:Ze.optional(),tools:se(Ny).optional(),toolChoice:x0.optional()}),D0=Ge.extend({method:q("sampling/createMessage"),params:E0}),Ou=qe.extend({model:k(),stopReason:ze(We(["endTurn","stopSequence","maxTokens"]).or(k())),role:Fr,content:P0}),Dy=qe.extend({model:k(),stopReason:ze(We(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:Fr,content:Oe([So,se(So)])}),j0=R({type:q("boolean"),title:k().optional(),description:k().optional(),default:Ue().optional()}),C0=R({type:q("string"),title:k().optional(),description:k().optional(),minLength:ae().optional(),maxLength:ae().optional(),format:We(["email","uri","date","date-time"]).optional(),default:k().optional()}),A0=R({type:We(["number","integer"]),title:k().optional(),description:k().optional(),minimum:ae().optional(),maximum:ae().optional(),default:ae().optional()}),U0=R({type:q("string"),title:k().optional(),description:k().optional(),enum:se(k()),default:k().optional()}),R0=R({type:q("string"),title:k().optional(),description:k().optional(),oneOf:se(R({const:k(),title:k()})),default:k().optional()}),Z0=R({type:q("string"),title:k().optional(),description:k().optional(),enum:se(k()),enumNames:se(k()).optional(),default:k().optional()}),M0=Oe([U0,R0]),B0=R({type:q("array"),title:k().optional(),description:k().optional(),minItems:ae().optional(),maxItems:ae().optional(),items:R({type:q("string"),enum:se(k())}),default:se(k()).optional()}),L0=R({type:q("array"),title:k().optional(),description:k().optional(),minItems:ae().optional(),maxItems:ae().optional(),items:R({anyOf:se(R({const:k(),title:k()}))}),default:se(k()).optional()}),F0=Oe([B0,L0]),V0=Oe([Z0,M0,F0]),G0=Oe([V0,j0,C0,A0]),q0=Rr.extend({mode:q("form").optional(),message:k(),requestedSchema:R({type:q("object"),properties:ve(k(),G0),required:se(k()).optional()})}),J0=Rr.extend({mode:q("url"),message:k(),elicitationId:k(),url:k().url()}),K0=Oe([q0,J0]),H0=Ge.extend({method:q("elicitation/create"),params:K0}),W0=wt.extend({elicitationId:k()}),X0=St.extend({method:q("notifications/elicitation/complete"),params:W0}),Io=qe.extend({action:We(["accept","decline","cancel"]),content:ho(e=>e===null?void 0:e,ve(k(),Oe([k(),ae(),Ue(),se(k())])).optional())}),Y0=R({type:q("ref/resource"),uri:k()}),Q0=R({type:q("ref/prompt"),name:k()}),eO=mt.extend({ref:Oe([Q0,Y0]),argument:R({name:k(),value:k()}),context:R({arguments:ve(k(),k()).optional()}).optional()}),zu=Ge.extend({method:q("completion/complete"),params:eO});function tO(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function nO(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}const rO=qe.extend({completion:He({values:se(k()).max(100),total:ze(ae().int()),hasMore:ze(Ue())})}),iO=R({uri:k().startsWith("file://"),name:k().optional(),_meta:ve(k(),_e()).optional()}),oO=Ge.extend({method:q("roots/list"),params:mt.optional()}),jy=qe.extend({roots:se(iO)}),aO=St.extend({method:q("notifications/roots/list_changed"),params:wt.optional()});Oe([ou,Iy,zu,Ey,$u,vu,pu,hu,yu,r0,o0,ko,Su,su,uu,lu,fu]),Oe([iu,au,Oy,aO,bo]),Oe([ru,Ou,Dy,Io,jy,cu,du,_o]),Oe([ou,D0,H0,oO,su,uu,lu,fu]),Oe([iu,au,I0,s0,t0,k0,y0,bo,X0]),Oe([ru,FI,rO,g0,l0,XI,YI,e0,Iu,_0,cu,du,_o]);class K 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===ee.UrlElicitationRequired&&i){const n=i;if(n.elicitations)return new sO(n.elicitations,r)}return new K(t,r,i)}}class sO extends K{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(ee.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function hn(e){return e==="completed"||e==="failed"||e==="cancelled"}const cO=Symbol("Let zodToJsonSchema decide on which parser to use"),Cy={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"},uO=e=>typeof e=="string"?{...Cy,name:e}:{...Cy,...e},lO=e=>{const t=uO(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 Ay(e,t,r,i){i?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function be(e,t,r,i,n){e[t]=r,Ay(e,t,i,n)}const Uy=(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 at(e){if(e.target!=="openAi")return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Uy(t,e.currentPath):t.join("/")}}function dO(e,t){const r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==re.ZodAny&&(r.items=$e(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&be(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&be(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(be(r,"minItems",e.exactLength.value,e.exactLength.message,t),be(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function fO(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?be(r,"minimum",i.value,i.message,t):be(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),be(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?be(r,"maximum",i.value,i.message,t):be(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),be(r,"maximum",i.value,i.message,t));break;case"multipleOf":be(r,"multipleOf",i.value,i.message,t);break}return r}function mO(){return{type:"boolean"}}function Ry(e,t){return $e(e.type._def,t)}const pO=(e,t)=>$e(e.innerType._def,t);function Zy(e,t,r){const i=r??t.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((n,o)=>Zy(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 hO(e,t)}}const hO=(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":be(r,"minimum",i.value,i.message,t);break;case"max":be(r,"maximum",i.value,i.message,t);break}return r};function gO(e,t){return{...$e(e.innerType._def,t),default:e.defaultValue()}}function yO(e,t){return t.effectStrategy==="input"?$e(e.schema._def,t):at(t)}function vO(e){return{type:"string",enum:Array.from(e.values)}}const $O=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function _O(e,t){const r=[$e(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),$e(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($O(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 bO(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 xu;const xt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(xu===void 0&&(xu=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),xu),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 My(e,t){const r={type:"string"};if(e.checks)for(const i of e.checks)switch(i.kind){case"min":be(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t);break;case"max":be(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":Tt(r,"email",i.message,t);break;case"format:idn-email":Tt(r,"idn-email",i.message,t);break;case"pattern:zod":nt(r,xt.email,i.message,t);break}break;case"url":Tt(r,"uri",i.message,t);break;case"uuid":Tt(r,"uuid",i.message,t);break;case"regex":nt(r,i.regex,i.message,t);break;case"cuid":nt(r,xt.cuid,i.message,t);break;case"cuid2":nt(r,xt.cuid2,i.message,t);break;case"startsWith":nt(r,RegExp(`^${Tu(i.value,t)}`),i.message,t);break;case"endsWith":nt(r,RegExp(`${Tu(i.value,t)}$`),i.message,t);break;case"datetime":Tt(r,"date-time",i.message,t);break;case"date":Tt(r,"date",i.message,t);break;case"time":Tt(r,"time",i.message,t);break;case"duration":Tt(r,"duration",i.message,t);break;case"length":be(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t),be(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"includes":{nt(r,RegExp(Tu(i.value,t)),i.message,t);break}case"ip":{i.version!=="v6"&&Tt(r,"ipv4",i.message,t),i.version!=="v4"&&Tt(r,"ipv6",i.message,t);break}case"base64url":nt(r,xt.base64url,i.message,t);break;case"jwt":nt(r,xt.jwt,i.message,t);break;case"cidr":{i.version!=="v6"&&nt(r,xt.ipv4Cidr,i.message,t),i.version!=="v4"&&nt(r,xt.ipv6Cidr,i.message,t);break}case"emoji":nt(r,xt.emoji(),i.message,t);break;case"ulid":{nt(r,xt.ulid,i.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Tt(r,"binary",i.message,t);break}case"contentEncoding:base64":{be(r,"contentEncoding","base64",i.message,t);break}case"pattern:zod":{nt(r,xt.base64,i.message,t);break}}break}case"nanoid":nt(r,xt.nanoid,i.message,t)}return r}function Tu(e,t){return t.patternStrategy==="escape"?wO(e):e}const kO=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function wO(e){let t="";for(let r=0;r<e.length;r++)kO.has(e[r])||(t+="\\"),t+=e[r];return t}function Tt(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}}})):be(e,"format",t,r,i)}function nt(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:By(t,i),...r&&i.errorMessages&&{errorMessage:{pattern:r}}})):be(e,"pattern",By(t,i),r,i)}function By(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
58
+ 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}}e.external&&(e.sharedDefsExtractedFor=e.external)}function nh(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const r=[];for(const i of t){if(!i||typeof i!="object")return;nh(i);const n=Object.keys(i);if(n.length!==1||n[0]!=="type")return;const o=i.type;for(const a of Array.isArray(o)?o:[o]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}const rh=new Set(["type","properties","required","additionalProperties"]),ih=["oneOf","anyOf"];function oh(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function rc(e){const t=[];for(const o of e){if(typeof o!="object"||o.type!=="object")return null;for(const a in o)if(!rh.has(a))return null;t.push(o)}const r={},i=new Set;for(const o of t){for(const a in o.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;const s=[];for(const u of t){const l=u.properties?.[a]??oh(u);l!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(l))||s.push(l))}const c=s.length===1?s[0]:rc(s)??{allOf:s};Ze(r,a,c)}for(const a of o.required??[])i.add(a)}const n={type:"object",properties:r};if(i.size&&(n.required=[...i]),t.every(o=>o.additionalProperties===!1))n.additionalProperties=!1;else{const o=[];for(const a of t){const s=oh(a);s&&!o.some(c=>JSON.stringify(c)===JSON.stringify(s))&&o.push(s)}o.length===1?n.additionalProperties=o[0]:o.length>1&&(n.additionalProperties={allOf:o})}return n}function Ww(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const n of rh)if(n in e)return;const r=t.filter(n=>ih.some(o=>Array.isArray(n[o])));let i=null;if(!r.length)i=rc(t);else{const n=r[0],o=ih.find(c=>Array.isArray(n[c]));if(Object.keys(n).length!==1)return;const a=t.filter(c=>c!==n),s=n[o].map(c=>rc([...a,c]));if(s.some(c=>!c))return;i={[o]:s}}i&&(delete e.allOf,br(e,i))}function Rn(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 f=e.seen.get(d),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(p)):br(u,p),br(u,l),s._zod.parent===d)for(const h in u)h==="$ref"||h==="allOf"||h in l||delete u[h];if(p.$ref&&f.def)for(const h in u)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(u[h])===JSON.stringify(f.def[h])&&delete u[h]}const m=s._zod.parent;if(m&&m!==d){i(m);const f=e.seen.get(m);if(f?.schema.$ref&&(u.$ref=f.schema.$ref,f.def))for(const p in u)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(u[p])===JSON.stringify(f.def[p])&&delete u[p]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const s of[...e.seen.entries()].reverse())i(s[0]);if(e.target!=="openapi-3.0")for(const s of e.seen.entries())nh(s[1].def??s[1].schema);for(const s of e.deferred)s();if(e.intersections.length){const s=new Map;for(const c of e.seen.values())for(const u of[c.schema,c.def]){const l=u?.allOf;if(!Array.isArray(l))continue;const d=s.get(l);d?d.push(u):s.set(l,[u])}for(const c of e.intersections)for(const u of s.get(c)??[])Ww(u)}}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)}br(n,r.defId?r.schema: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??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const s of e.seen.entries()){const c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,Ze(a,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),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:kr(t,"input",e.processors),output:kr(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function it(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 it(i.element,r);if(i.type==="set")return it(i.valueType,r);if(i.type==="lazy")return it(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"||i.type==="catch")return it(i.innerType,r);if(i.type==="intersection")return it(i.left,r)||it(i.right,r);if(i.type==="record"||i.type==="map")return it(i.keyType,r)||it(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:it(i.in,r)||it(i.out,r);if(i.type==="object"){for(const n in i.shape)if(it(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(const n of i.options)if(it(n,r))return!0;return!1}if(i.type==="tuple"){for(const n of i.items)if(it(n,r))return!0;return!!(i.rest&&it(i.rest,r))}return!1}const ah=(e,t={})=>r=>{const i=An({...r,processors:t});return Ie(e,i),Un(i,e),Rn(i,e)},kr=(e,t,r={})=>i=>{const{libraryOptions:n,target:o}=i??{},a=An({...n??{},target:o,io:t,processors:r});return Ie(e,a),Un(a,e),Rn(a,e)},Yw={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},sh=(e,t,r,i)=>{const n=r;n.type="string";const{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:u,laxFormat:l}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),s&&(n.format=Yw[s]??s,n.format===""&&delete n.format,(s==="time"||l)&&delete n.format),u&&(n.contentEncoding=u),c&&c.size>0){const d=[...c];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},ch=(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),f=t.target==="draft-04"||t.target==="openapi-3.0";d?f?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:typeof o=="number"&&(n.minimum=o),m?f?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(Number.isFinite(c)&&c!==0?n.multipleOf=Math.abs(c):Ve(e,t,n,i,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},uh=(e,t,r,i)=>{r.type="boolean"},lh=(e,t,r,i)=>{Ve(e,t,r,i,"BigInt cannot be represented in JSON Schema")},dh=(e,t,r,i)=>{Ve(e,t,r,i,"Symbols cannot be represented in JSON Schema")},fh=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},mh=(e,t,r,i)=>{Ve(e,t,r,i,"Undefined cannot be represented in JSON Schema")},ph=(e,t,r,i)=>{Ve(e,t,r,i,"Void cannot be represented in JSON Schema")},hh=(e,t,r,i)=>{r.not={}},gh=(e,t,r,i)=>{},yh=(e,t,r,i)=>{},vh=(e,t,r,i)=>{Ve(e,t,r,i,"Date cannot be represented in JSON Schema")},$h=(e,t,r,i)=>{const n=e._zod.def,o=fa(n.entries);if(o.length===0){r.not={};return}o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},_h=(e,t,r,i)=>{const n=e._zod.def;if(n.values.length===0){r.not={};return}const o=[];for(const a of n.values)if(a===void 0){if(Ve(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Ve(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){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},bh=(e,t,r,i)=>{Ve(e,t,r,i,"NaN cannot be represented in JSON Schema")},kh=(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},Sh=(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)},wh=(e,t,r,i)=>{r.type="boolean"},Ih=(e,t,r,i)=>{Ve(e,t,r,i,"Custom types cannot be represented in JSON Schema")},Oh=(e,t,r,i)=>{Ve(e,t,r,i,"Function types cannot be represented in JSON Schema")},Th=(e,t,r,i)=>{Ve(e,t,r,i,"Transforms cannot be represented in JSON Schema")},xh=(e,t,r,i)=>{Ve(e,t,r,i,"Map cannot be represented in JSON Schema")},Ph=(e,t,r,i)=>{Ve(e,t,r,i,"Set cannot be represented in JSON Schema")},zh=(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=Ie(o.element,t,{...i,path:[...i.path,"items"]})};function Sr(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Sr(t.out):t.type==="catch"?Sr(t.innerType):e._zod.optin}const Nh=(e,t,r,i)=>{const n=r,o=e._zod.def,a=o.shape;if(Object.getOwnPropertySymbols(a).length&&Ve(e,t,n,i,"Symbol keys cannot be represented in JSON Schema"))return;n.type="object",n.properties={};for(const l in a)Ze(n.properties,l,Ie(a[l],t,{...i,path:[...i.path,"properties",l]}));const c=new Set(Object.keys(a)),u=new Set([...c].filter(l=>{const d=o.shape[l];return t.io==="input"?Sr(d)===void 0:d._zod.optout===void 0}));u.size>0&&(n.required=Array.from(u)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=Ie(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},ic=(e,t,r,i)=>{const n=e._zod.def,o=n.inclusive===!1,a=n.options.map((s,c)=>Ie(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},Eh=(e,t,r,i)=>{const n=e._zod.def,o=Ie(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=Ie(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,t.intersections.push(c)},Ch=(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((y,h)=>Ie(y,t,{...i,path:[...i.path,a,h]})),u=o.rest?Ie(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;let l=o.items.length;for(;l>0;){const y=o.items[l-1];if(!(t.io==="input"?Sr(y)!==void 0:y._zod.optout==="optional"))break;l--}const d=o.items.length,m=!o.rest;t.target==="draft-2020-12"?(n.prefixItems=c,m?n.items=!1:u&&(n.items=u),l>0&&(n.minItems=l),m&&(n.maxItems=d)):t.target==="openapi-3.0"?(n.items={anyOf:c},u&&n.items.anyOf.push(u),l>0&&(n.minItems=l),m&&(n.maxItems=d)):(n.items=c,m?n.additionalItems=!1:u&&(n.additionalItems=u),l>0&&(n.minItems=l),m&&(n.maxItems=d));const{minimum:f,maximum:p}=e._zod.bag;typeof f=="number"&&(n.minItems=f),typeof p=="number"&&(n.maxItems=p)};function oc(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);const p=e.get(t)?.def;if(!p)return t;const y=oc(e,p,r);return y===p?t:y}for(const p of["anyOf","oneOf"]){const y=t[p];if(!Array.isArray(y))continue;const h=y.map($=>oc(e,$,r));h.some(($,g)=>$!==y[g])&&(t={...t,[p]:h})}const i=Array.isArray(t.type)?t.type:[t.type],n=!i.includes("string")&&i.some(p=>p==="number"||p==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!n&&!o?.some(p=>typeof p=="number"))return t;const{minimum:a,maximum:s,exclusiveMinimum:c,exclusiveMaximum:u,multipleOf:l,format:d,id:m,...f}=t;return f.enum?f.enum=f.enum.map(p=>typeof p=="number"?String(p):p):typeof f.const=="number"&&(f.const=String(f.const)),n&&(f.type="string",o||(f.pattern=(i.includes("number")?lr:Za).source)),f}const ac=new WeakMap;function Xw(e){const t=new Map;for(const i of e.seen.values())i.def&&!t.has(i.schema)&&t.set(i.schema,i);const r=new Map;for(const i of ac.get(e)??[]){const n=e.seen.get(i),o=(n?.def??n?.schema)?.propertyNames;if(!o||o===!0||r.has(o))continue;const a=oc(t,o,new Set);a!==o&&r.set(o,a)}if(r.size)for(const i of e.seen.values())for(const n of[i.schema,i.def]){const o=n&&r.get(n.propertyNames);o&&(n.propertyNames=o)}}const Dh=(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 d=Ie(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(const m of c)Ze(n.patternProperties,m.source,d)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){n.propertyNames=Ie(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let d=ac.get(t);d||(d=[],ac.set(t,d),t.deferred.push(()=>Xw(t))),d.push(e)}n.additionalProperties=Ie(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}const u=a._zod.values,l=t.io==="input"&&Sr(o.valueType)!==void 0;if(u&&!o.partial&&!l){const d=[...u].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(n.required=d.map(String))}},jh=(e,t,r,i)=>{const n=e._zod.def,o=Ie(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"}]},Ah=(e,t,r,i)=>{const n=e._zod.def;Ie(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},sc=Symbol();function Uh(e,t,r,i,n){let o=!1;const a=JSON.stringify(e,(s,c)=>typeof c!="bigint"?c:(o=!0,null));return o?(Ve(t,r,i,n,"BigInt defaults cannot be represented in JSON Schema"),sc):JSON.parse(a)}const Rh=(e,t,r,i)=>{const n=e._zod.def;Ie(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType;const a=Uh(n.defaultValue,e,t,r,i);a!==sc&&(r.default=a)},Bh=(e,t,r,i)=>{const n=e._zod.def;Ie(n.innerType,t,i);const o=t.seen.get(e);if(o.ref=n.innerType,t.io!=="input")return;const a=Uh(n.defaultValue,e,t,r,i);a!==sc&&(r._prefault=a)},Mh=(e,t,r,i)=>{const n=e._zod.def;Ie(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{Ve(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},Zh=(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;Ie(a,t,i);const s=t.seen.get(e);s.ref=a},Lh=(e,t,r,i)=>{const n=e._zod.def;Ie(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},Fh=(e,t,r,i)=>{const n=e._zod.def;Ie(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},cc=(e,t,r,i)=>{const n=e._zod.def;Ie(n.innerType,t,i);const o=t.seen.get(e);o.ref=n.innerType},Vh=(e,t,r,i)=>{const n=e._zod.innerType;Ie(n,t,i);const o=t.seen.get(e);o.ref=n},uc={string:sh,number:ch,boolean:uh,bigint:lh,symbol:dh,null:fh,undefined:mh,void:ph,never:hh,any:gh,unknown:yh,date:vh,enum:$h,literal:_h,nan:bh,template_literal:kh,file:Sh,success:wh,custom:Ih,function:Oh,transform:Th,map:xh,set:Ph,array:zh,object:Nh,union:ic,intersection:Eh,tuple:Ch,record:Dh,nullable:jh,nonoptional:Ah,default:Rh,prefault:Bh,catch:Mh,pipe:Zh,readonly:Lh,promise:Fh,optional:cc,lazy:Vh};function lc(e,t){if("_idmap"in e){const i=e,n=An({...t,processors:uc}),o={};for(const c of i._idmap.entries()){const[u,l]=c;Ie(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;Un(n,l),Ze(a,u,Rn(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=An({...t,processors:uc});return Ie(e,r),Un(r,e),Rn(r,e)}class Qw{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=An({processors:uc,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 Ie(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)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Un(this.ctx,t);const i=Rn(this.ctx,t),{"~standard":n,...o}=i;return o}}var eI=Object.freeze({__proto__:null}),tI=Object.freeze({__proto__:null,$ZodAny:em,$ZodArray:am,$ZodAsyncError:Gt,$ZodBase64:Ff,$ZodBase64URL:Vf,$ZodBigInt:cs,$ZodBigIntFormat:Wf,$ZodBoolean:ss,$ZodCIDRv4:Zf,$ZodCIDRv6:Lf,$ZodCUID:Pf,$ZodCUID2:zf,$ZodCatch:Bm,$ZodCheck:De,$ZodCheckBigIntFormat:of,$ZodCheckEndsWith:yf,$ZodCheckGreaterThan:qa,$ZodCheckIncludes:hf,$ZodCheckLengthEquals:df,$ZodCheckLessThan:Ga,$ZodCheckLowerCase:mf,$ZodCheckMaxLength:uf,$ZodCheckMaxSize:af,$ZodCheckMimeType:$f,$ZodCheckMinLength:lf,$ZodCheckMinSize:sf,$ZodCheckMultipleOf:nf,$ZodCheckNumberFormat:rf,$ZodCheckOverwrite:_f,$ZodCheckProperty:Ja,$ZodCheckRegex:ff,$ZodCheckSizeEquals:cf,$ZodCheckStartsWith:gf,$ZodCheckStringFormat:mr,$ZodCheckUpperCase:pf,$ZodCodec:ps,$ZodCreditCard:qf,$ZodCustom:Jm,$ZodCustomStringFormat:Kf,$ZodCyclicError:Hm,$ZodDate:im,$ZodDefault:Em,$ZodDiscriminatedUnion:pm,$ZodE164:Gf,$ZodEmail:If,$ZodEmoji:Tf,$ZodEncodeError:fi,$ZodEnum:Im,$ZodError:Oa,$ZodExactOptional:zm,$ZodFile:Tm,$ZodFunction:Gm,$ZodGUID:Sf,$ZodIPv4:Rf,$ZodIPv6:Bf,$ZodISODate:jf,$ZodISODateTime:Df,$ZodISODuration:Uf,$ZodISOTime:Af,$ZodIntersection:hm,$ZodJWT:Jf,$ZodKSUID:Cf,$ZodLazy:hs,$ZodLiteral:Om,$ZodMAC:Mf,$ZodMap:bm,$ZodNaN:Mm,$ZodNanoID:xf,$ZodNever:nm,$ZodNonOptional:jm,$ZodNull:Qf,$ZodNullable:Nm,$ZodNumber:as,$ZodNumberFormat:Hf,$ZodObject:ls,$ZodObjectJIT:um,$ZodOptional:fs,$ZodPipe:ms,$ZodPrefault:Dm,$ZodPreprocess:Zm,$ZodPromise:qm,$ZodReadonly:Lm,$ZodRealError:mt,$ZodRecord:_m,$ZodRegistry:lp,$ZodSet:Sm,$ZodString:pr,$ZodStringFormat:we,$ZodSuccess:Um,$ZodSymbol:Yf,$ZodTemplateLiteral:Vm,$ZodTransform:xm,$ZodTuple:ds,$ZodType:ne,$ZodULID:Nf,$ZodURL:Of,$ZodUUID:wf,$ZodUndefined:Xf,$ZodUnion:ki,$ZodUnknown:tm,$ZodVoid:rm,$ZodXID:Ef,$ZodXor:fm,$brand:hd,$constructor:S,$input:up,$output:cp,Doc:Ka,INVALID:pt,JSONSchema:eI,JSONSchemaGenerator:Qw,NEVER:md,TimePrecision:kp,URL_BAD_FORMAT:Wa,URL_UNPARSEABLE:Ya,ZodCompileAsyncError:en,ZodCompileUnsupportedError:ge,_any:Bp,_array:qp,_base64:Fs,_base64url:Vs,_bigint:Ep,_boolean:zp,_catch:Vw,_check:Yp,_cidrv4:Zs,_cidrv6:Ls,_coercedBigint:Cp,_coercedBoolean:Np,_coercedDate:Vp,_coercedNumber:wp,_coercedString:$p,_creditCard:bp,_cuid:Ds,_cuid2:js,_custom:Kp,_date:Fp,_decode:za,_decodeAsync:Ea,_default:Zw,_discriminatedUnion:Pw,_e164:Gs,_email:Os,_emoji:Es,_encode:Pa,_encodeAsync:Na,_endsWith:ji,_enum:jw,_file:Jp,_float32:Op,_float64:Tp,_gt:nn,_gte:Ot,_guid:Ts,_includes:Ci,_int:Ip,_int32:xp,_int64:Dp,_intersection:zw,_ipv4:Bs,_ipv6:Ms,_isoDate:Ks,_isoDateTime:Js,_isoDuration:Ws,_isoTime:Hs,_jwt:qs,_ksuid:Rs,_lazy:Kw,_length:$r,_literal:Uw,_lowercase:Ni,_lt:tn,_lte:It,_mac:_p,_map:Cw,_max:It,_maxLength:vr,_maxSize:jn,_mime:Ai,_min:Ot,_minLength:gn,_minSize:rn,_multipleOf:Dn,_nan:Gp,_nanoid:Cs,_nativeEnum:Aw,_negative:Xs,_never:Zp,_nonnegative:ec,_nonoptional:Lw,_nonpositive:Qs,_normalize:Ui,_null:Rp,_nullable:Mw,_number:Sp,_optional:Bw,_overwrite:qt,_parse:ar,_parseAsync:sr,_pipe:Gw,_positive:Ys,_promise:Hw,_properties:nc,_property:tc,_readonly:qw,_record:Ew,_refine:Hp,_regex:zi,_safeDecode:Da,_safeDecodeAsync:Aa,_safeEncode:Ca,_safeEncodeAsync:ja,_safeParse:cr,_safeParseAsync:ur,_set:Dw,_size:yr,_slugify:Zi,_startsWith:Di,_string:vp,_stringFormat:_r,_stringbool:eh,_success:Fw,_superRefine:Wp,_symbol:Ap,_templateLiteral:Jw,_toLowerCase:Bi,_toUpperCase:Mi,_transform:Rw,_trim:Ri,_tuple:Nw,_uint32:Pp,_uint64:jp,_ulid:As,_undefined:Up,_union:Tw,_unknown:Mp,_uppercase:Ei,_url:Pi,_uuid:xs,_uuidv4:Ps,_uuidv6:zs,_uuidv7:Ns,_void:Lp,_xid:Us,_xor:xw,clone:Ee,compile:fp,compileFn:xi,config:Je,createStandardJSONSchemaMethod:kr,createToJSONSchemaMethod:ah,decode:C_,decodeAsync:j_,describe:Xp,encode:E_,encodeAsync:D_,extractDefs:Un,finalize:Rn,flattenError:Ta,formatError:xa,getDiscriminatedOption:mm,globalConfig:nt,globalRegistry:wt,handleUnrepresentable:Ve,initializeContext:An,isBackEdge:_s,isRecursiveSchema:Xm,isValidBase64:_i,isValidBase64URL:rs,isValidCIDRv6:ns,isValidCreditCard:is,isValidIPv6:$i,isValidJWT:os,locales:ap,memoizer:$s,mergeValues:hr,meta:Qp,parse:pi,parseAsync:hi,parseURLObject:Xa,prettifyError:_d,process:Ie,regexes:La,registry:bs,safeDecode:U_,safeDecodeAsync:B_,safeEncode:A_,safeEncodeAsync:R_,safeParse:gi,safeParseAsync:yi,standardProps:Ha,stripTabAndNewline:Qa,toDotPath:$d,toJSONSchema:lc,toZod:da,treeifyError:vd,urlHostnameOk:es,urlProtocolOk:ts,util:dd,validate:bd,validateAsync:kd,version:bf}),nI=Object.freeze({__proto__:null,endsWith:ji,gt:nn,gte:Ot,includes:Ci,length:$r,lowercase:Ni,lt:tn,lte:It,maxLength:vr,maxSize:jn,mime:Ai,minLength:gn,minSize:rn,multipleOf:Dn,negative:Xs,nonnegative:ec,nonpositive:Qs,normalize:Ui,overwrite:qt,positive:Ys,properties:nc,property:tc,regex:zi,size:yr,slugify:Zi,startsWith:Di,toLowerCase:Bi,toUpperCase:Mi,trim:Ri,uppercase:Ei});const Gh=new WeakSet([Object.prototype,Error.prototype]);function Li(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const i=r(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}const qh=(e,t)=>{Oa.init(e,t),e.name="ZodError";const r=Object.getPrototypeOf(e);Gh.has(r)||(Gh.add(r),Li(r,"format",i=>n=>xa(i,n)),Li(r,"flatten",i=>n=>Ta(i,n)),Li(r,"addIssue",i=>n=>{i.issues.push(n),i.message=JSON.stringify(i.issues,si,2)}),Li(r,"addIssues",i=>n=>{i.issues.push(...n),i.message=JSON.stringify(i.issues,si,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},rI=S("ZodError",qh),ht=S("ZodError",qh,void 0,{Parent:Error}),Jh=ar(ht),Kh=sr(ht),Hh=cr(ht),Wh=ur(ht),Yh=Pa(ht),Xh=za(ht),Qh=Na(ht),eg=Ea(ht),tg=Ca(ht),ng=Da(ht),rg=ja(ht),ig=Aa(ht);function iI(){nt.localeError||Je(ep())}function yn(){nt.memoizer||Je({memoizer:$s()})}const ie=S("ZodType",(e,t)=>(iI(),ne.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Et(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ee(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Yc(e,t))},superRefine(e,t){return this.check(Xc(e,t))},overwrite(e){return this.check(qt(e))},optional(){return xe(this)},exactOptional(){return Nc(this)},nullable(){return Ar(this)},nullish(){return xe(Ar(this))},nonoptional(e){return Uc(this,e)},array(){return se(this)},or(e){return Te([this,e])},and(e){return jr(this,e)},transform(e){return yo(this,po(e))},default(e){return Dc(this,e)},prefault(e){return Ac(this,e)},catch(e){return Mc(this,e)},pipe(e){return yo(this,e)},readonly(){return Vc(this)},describe(e){const t=this.clone();return wt.add(t,{description:e}),t},meta(...e){if(e.length===0)return wt.get(this);const t=this.clone();return wt.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return va(this,"~standard",{...Ha(this),jsonSchema:{input:kr(this,"input"),output:kr(this,"output")}})},set"~standard"(e){Xt(this,"~standard",e)},parse:function e(t,r){return Jh(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await Kh(this,t,r,{callee:e})},safeParse(e,t){return Hh(this,e,t)},async safeParseAsync(e,t){return Wh(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Xt(this,"spa",e)},encode:function e(t,r){return Yh(this,t,r,{callee:e})},decode:function e(t,r){return Xh(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await Qh(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await eg(this,t,r,{callee:e})},safeEncode(e,t){return tg(this,e,t)},safeDecode(e,t){return ng(this,e,t)},async safeEncodeAsync(e,t){return rg(this,e,t)},async safeDecodeAsync(e,t){return ig(this,e,t)},toJSONSchema(e){return ah(this,{})(e)},get description(){return wt.get(this)?.description},get _def(){return this._zod.def}}),Fi=S("_ZodString",(e,t)=>{pr.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>sh(e,i,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null},{regex(...e){return this.check(zi(...e))},includes(...e){return this.check(Ci(...e))},startsWith(...e){return this.check(Di(...e))},endsWith(...e){return this.check(ji(...e))},min(...e){return this.check(gn(...e))},max(...e){return this.check(vr(...e))},length(...e){return this.check($r(...e))},nonempty(...e){return this.check(gn(1,...e))},lowercase(e){return this.check(Ni(e))},uppercase(e){return this.check(Ei(e))},trim(){return this.check(Ri())},normalize(...e){return this.check(Ui(...e))},toLowerCase(){return this.check(Bi())},toUpperCase(){return this.check(Mi())},slugify(){return this.check(Zi())}}),wr=S("ZodString",(e,t)=>{pr.init(e,t),Fi.init(e,t)},{email(e){return this.check(Os(Vi,e))},url(e){return this.check(Pi(Pr,e))},jwt(e){return this.check(qs(ao,e))},emoji(e){return this.check(Es(qi,e))},guid(e){return this.check(Ts(Gi,e))},uuid(e){return this.check(xs(Mt,e))},uuidv4(e){return this.check(Ps(Mt,e))},uuidv6(e){return this.check(zs(Mt,e))},uuidv7(e){return this.check(Ns(Mt,e))},nanoid(e){return this.check(Cs(Ji,e))},cuid(e){return this.check(Ds(Ki,e))},cuid2(e){return this.check(js(Hi,e))},ulid(e){return this.check(As(Wi,e))},base64(e){return this.check(Fs(ro,e))},base64url(e){return this.check(Vs(io,e))},xid(e){return this.check(Us(Yi,e))},ksuid(e){return this.check(Rs(Xi,e))},ipv4(e){return this.check(Bs(Qi,e))},ipv6(e){return this.check(Ms(eo,e))},cidrv4(e){return this.check(Zs(to,e))},cidrv6(e){return this.check(Ls(no,e))},e164(e){return this.check(Gs(oo,e))},datetime(e){return this.check(Js(Ir,e))},date(e){return this.check(Ks(Or,e))},time(e){return this.check(Hs(Tr,e))},duration(e){return this.check(Ws(xr,e))}});function k(e){return vp(wr,e)}const Oe=S("ZodStringFormat",(e,t)=>{we.init(e,t),Fi.init(e,t)}),Ir=S("ZodISODateTime",(e,t)=>{Df.init(e,t),Oe.init(e,t)}),Or=S("ZodISODate",(e,t)=>{jf.init(e,t),Oe.init(e,t)}),Tr=S("ZodISOTime",(e,t)=>{Af.init(e,t),Oe.init(e,t)}),xr=S("ZodISODuration",(e,t)=>{Uf.init(e,t),Oe.init(e,t)}),Vi=S("ZodEmail",(e,t)=>{If.init(e,t),Oe.init(e,t)});function og(e){return Os(Vi,e)}const Gi=S("ZodGUID",(e,t)=>{Sf.init(e,t),Oe.init(e,t)});function ag(e){return Ts(Gi,e)}const Mt=S("ZodUUID",(e,t)=>{wf.init(e,t),Oe.init(e,t)});function sg(e){return xs(Mt,e)}function cg(e){return Ps(Mt,e)}function ug(e){return zs(Mt,e)}function lg(e){return Ns(Mt,e)}const Pr=S("ZodURL",(e,t)=>{Of.init(e,t),Oe.init(e,t)});function dg(e){return Pi(Pr,e)}function fg(e){return Pi(Pr,{protocol:Ra,hostname:Ld,...E(e)})}const qi=S("ZodEmoji",(e,t)=>{Tf.init(e,t),Oe.init(e,t)});function mg(e){return Es(qi,e)}const Ji=S("ZodNanoID",(e,t)=>{xf.init(e,t),Oe.init(e,t)});function pg(e){return Cs(Ji,e)}const Ki=S("ZodCUID",(e,t)=>{Pf.init(e,t),Oe.init(e,t)});function hg(e){return Ds(Ki,e)}const Hi=S("ZodCUID2",(e,t)=>{zf.init(e,t),Oe.init(e,t)});function gg(e){return js(Hi,e)}const Wi=S("ZodULID",(e,t)=>{Nf.init(e,t),Oe.init(e,t)});function yg(e){return As(Wi,e)}const Yi=S("ZodXID",(e,t)=>{Ef.init(e,t),Oe.init(e,t)});function vg(e){return Us(Yi,e)}const Xi=S("ZodKSUID",(e,t)=>{Cf.init(e,t),Oe.init(e,t)});function $g(e){return Rs(Xi,e)}const Qi=S("ZodIPv4",(e,t)=>{Rf.init(e,t),Oe.init(e,t)});function _g(e){return Bs(Qi,e)}const dc=S("ZodMAC",(e,t)=>{Mf.init(e,t),Oe.init(e,t)});function bg(e){return _p(dc,e)}const eo=S("ZodIPv6",(e,t)=>{Bf.init(e,t),Oe.init(e,t)});function kg(e){return Ms(eo,e)}const to=S("ZodCIDRv4",(e,t)=>{Zf.init(e,t),Oe.init(e,t)});function Sg(e){return Zs(to,e)}const no=S("ZodCIDRv6",(e,t)=>{Lf.init(e,t),Oe.init(e,t)});function wg(e){return Ls(no,e)}const ro=S("ZodBase64",(e,t)=>{Ff.init(e,t),Oe.init(e,t)});function Ig(e){return Fs(ro,e)}const io=S("ZodBase64URL",(e,t)=>{Vf.init(e,t),Oe.init(e,t)});function Og(e){return Vs(io,e)}const oo=S("ZodE164",(e,t)=>{Gf.init(e,t),Oe.init(e,t)});function Tg(e){return Gs(oo,e)}const fc=S("ZodCreditCard",(e,t)=>{qf.init(e,t),Oe.init(e,t)});function xg(e){return bp(fc,e)}const ao=S("ZodJWT",(e,t)=>{Jf.init(e,t),Oe.init(e,t)});function Pg(e){return qs(ao,e)}const Bn=S("ZodCustomStringFormat",(e,t)=>{Kf.init(e,t),Oe.init(e,t)});function zg(e,t,r={}){return _r(Bn,e,t,r)}function Ng(e){return _r(Bn,"hostname",Zd,e)}function Eg(e){return _r(Bn,"hex",tf,e)}function Cg(e,t){const r=t?.enc??"hex",i=`${e}_${r}`,n=La[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return _r(Bn,i,n,t)}const zr=S("ZodNumber",(e,t)=>{as.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>ch(e,i,n,o);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},{gt(e,t){return this.check(nn(e,t))},gte(e,t){return this.check(Ot(e,t))},min(e,t){return this.check(Ot(e,t))},lt(e,t){return this.check(tn(e,t))},lte(e,t){return this.check(It(e,t))},max(e,t){return this.check(It(e,t))},int(e){return this.check(so(e))},safe(e){return this.check(so(e))},positive(e){return this.check(nn(0,e))},nonnegative(e){return this.check(Ot(0,e))},negative(e){return this.check(tn(0,e))},nonpositive(e){return this.check(It(0,e))},multipleOf(e,t){return this.check(Dn(e,t))},step(e,t){return this.check(Dn(e,t))},finite(){return this}});function ae(e){return Sp(zr,e)}const vn=S("ZodNumberFormat",(e,t)=>{Hf.init(e,t),zr.init(e,t)});function so(e){return Ip(vn,e)}function Dg(e){return Op(vn,e)}function jg(e){return Tp(vn,e)}function Ag(e){return xp(vn,e)}function Ug(e){return Pp(vn,e)}const Nr=S("ZodBoolean",(e,t)=>{ss.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uh(e,r,i)});function Me(e){return zp(Nr,e)}const Er=S("ZodBigInt",(e,t)=>{cs.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>lh(e,i,n,o);const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null},{gte(e,t){return this.check(Ot(e,t))},min(e,t){return this.check(Ot(e,t))},gt(e,t){return this.check(nn(e,t))},lt(e,t){return this.check(tn(e,t))},lte(e,t){return this.check(It(e,t))},max(e,t){return this.check(It(e,t))},positive(e){return this.check(nn(BigInt(0),e))},negative(e){return this.check(tn(BigInt(0),e))},nonpositive(e){return this.check(It(BigInt(0),e))},nonnegative(e){return this.check(Ot(BigInt(0),e))},multipleOf(e,t){return this.check(Dn(e,t))}});function Rg(e){return Ep(Er,e)}const co=S("ZodBigIntFormat",(e,t)=>{Wf.init(e,t),Er.init(e,t)});function Bg(e){return Dp(co,e)}function Mg(e){return jp(co,e)}const mc=S("ZodSymbol",(e,t)=>{Yf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dh(e,r,i,n)});function Zg(e){return Ap(mc,e)}const pc=S("ZodUndefined",(e,t)=>{Xf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>mh(e,r,i,n)});function Lg(e){return Up(pc,e)}const hc=S("ZodNull",(e,t)=>{Qf.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fh(e,r,i)});function uo(e){return Rp(hc,e)}const gc=S("ZodAny",(e,t)=>{em.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>gh()});function Fg(){return Bp(gc)}const yc=S("ZodUnknown",(e,t)=>{tm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yh()});function be(){return Mp(yc)}const vc=S("ZodNever",(e,t)=>{nm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>hh(e,r,i)});function lo(e){return Zp(vc,e)}const $c=S("ZodVoid",(e,t)=>{rm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ph(e,r,i,n)});function Vg(e){return Lp($c,e)}const fo=S("ZodDate",(e,t)=>{im.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>vh(e,i,n,o),e.min=(i,n)=>e.check(Ot(i,n)),e.max=(i,n)=>e.check(It(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 Gg(e){return Fp(fo,e)}const _c=S("ZodArray",(e,t)=>{yn(),am.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zh(e,r,i,n),e.element=t.element},{min(e,t){return this.check(gn(e,t))},nonempty(e){return this.check(gn(1,e))},max(e,t){return this.check(vr(e,t))},length(e,t){return this.check($r(e,t))},unwrap(){return this.element}});function se(e,t){return qp(_c,e,t)}function qg(e){const t=e._zod.def.shape;return Qe(Object.keys(t))}const Cr=S("ZodObject",(e,t)=>{yn(),um.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nh(e,r,i,n),_a(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return Qe(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:be()})},loose(){return this.clone({...this._zod.def,catchall:be()})},strict(){return this.clone({...this._zod.def,catchall:lo()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return rd(this,e)},safeExtend(e){return id(this,e)},merge(e){return od(this,e)},pick(e){return td(this,e)},omit(e){return nd(this,e)},partial(...e){return ga(Ln,this,e[0])},exactPartial(...e){return ga(ho,this,e[0],"exactPartial")},required(...e){return ad(go,this,e[0])}});function R(e,t){const r={type:"object",shape:e??{},...E(t)};return new Cr(r)}function Jg(e,t){return new Cr({type:"object",shape:e,catchall:lo(),...E(t)})}function Xe(e,t){return new Cr({type:"object",shape:e,catchall:be(),...E(t)})}const Dr=S("ZodUnion",(e,t)=>{ki.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ic(e,r,i,n),e.options=t.options});function Te(e,t){return new Dr({type:"union",options:e,...E(t)})}const bc=S("ZodXor",(e,t)=>{Dr.init(e,t),fm.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ic(e,r,i,n),e.options=t.options});function Kg(e,t){return new bc({type:"union",options:e,inclusive:!1,...E(t)})}const kc=S("ZodDiscriminatedUnion",(e,t)=>{Dr.init(e,t),pm.init(e,t)});function mo(e,t,r){return new kc({type:"union",options:t,discriminator:e,...E(r)})}const Sc=S("ZodIntersection",(e,t)=>{hm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Eh(e,r,i,n)});function jr(e,t){return new Sc({type:"intersection",left:e,right:t})}const wc=S("ZodTuple",(e,t)=>{yn(),ds.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ch(e,r,i,n)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){const e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Ln({type:"optional",innerType:t}))})}});function Ic(e,t,r){const i=t instanceof ne,n=i?r:t,o=i?t:null;return new wc({type:"tuple",items:e,rest:o,...E(n)})}const Mn=S("ZodRecord",(e,t)=>{yn(),_m.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dh(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function $e(e,t,r){return!t||!t._zod?new Mn({type:"record",keyType:k(),valueType:e,...E(t)}):new Mn({type:"record",keyType:e,valueType:t,...E(r)})}function Hg(e,t,r){return new Mn({type:"record",keyType:e,valueType:t,...E(r),partial:!0})}function Wg(e,t,r){return new Mn({type:"record",keyType:e,valueType:t,mode:"loose",...E(r)})}const Oc=S("ZodMap",(e,t)=>{yn(),bm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xh(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(rn(...r)),e.nonempty=r=>e.check(rn(1,r)),e.max=(...r)=>e.check(jn(...r)),e.size=(...r)=>e.check(yr(...r))});function Yg(e,t,r){return new Oc({type:"map",keyType:e,valueType:t,...E(r)})}const Tc=S("ZodSet",(e,t)=>{yn(),Sm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ph(e,r,i,n),e.min=(...r)=>e.check(rn(...r)),e.nonempty=r=>e.check(rn(1,r)),e.max=(...r)=>e.check(jn(...r)),e.size=(...r)=>e.check(yr(...r))});function Xg(e,t){return new Tc({type:"set",valueType:e,...E(t)})}const Zn=S("ZodEnum",(e,t)=>{Im.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(i,n,o)=>$h(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 Zn({...t,checks:[],...E(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 Zn({...t,checks:[],...E(n),entries:o})}});function Qe(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Zn({type:"enum",entries:r,...E(t)})}function Qg(e,t){return new Zn({type:"enum",entries:e,...E(t)})}const xc=S("ZodLiteral",(e,t)=>{Om.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_h(e,r,i,n),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 q(e,t){return new xc({type:"literal",values:Array.isArray(e)?e:[e],...E(t)})}const Pc=S("ZodFile",(e,t)=>{Tm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sh(e,r,i),e.min=(r,i)=>e.check(rn(r,i)),e.max=(r,i)=>e.check(jn(r,i)),e.mime=(r,i)=>e.check(Ai(Array.isArray(r)?r:[r],i))});function ey(e){return Jp(Pc,e)}const zc=S("ZodTransform",(e,t)=>{yn(),xm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Th(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new fi(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(Nn(o,r.value,t));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Nn(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function po(e){return new zc({type:"transform",transform:e})}const Ln=S("ZodOptional",(e,t)=>{fs.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cc(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function xe(e){return new Ln({type:"optional",innerType:e})}const ho=S("ZodExactOptional",(e,t)=>{zm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cc(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Nc(e){return new ho({type:"optional",innerType:e})}const Ec=S("ZodNullable",(e,t)=>{Nm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Ar(e){return new Ec({type:"nullable",innerType:e})}function ty(e){return xe(Ar(e))}const Cc=S("ZodDefault",(e,t)=>{Em.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Dc(e,t){return new Cc({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ir(t)}})}const jc=S("ZodPrefault",(e,t)=>{Dm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Ac(e,t){return new jc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ir(t)}})}const go=S("ZodNonOptional",(e,t)=>{jm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ah(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Uc(e,t){return new go({type:"nonoptional",innerType:e,...E(t)})}const Rc=S("ZodSuccess",(e,t)=>{Um.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wh(e,r,i),e.unwrap=()=>e._zod.def.innerType});function ny(e){return new Rc({type:"success",innerType:e})}const Bc=S("ZodCatch",(e,t)=>{Bm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Mh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Mc(e,t){return new Bc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:ka(t)})}const Zc=S("ZodNaN",(e,t)=>{Mm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bh(e,r,i,n)});function ry(e){return Gp(Zc,e)}const Ur=S("ZodPipe",(e,t)=>{ms.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zh(e,r,i,n),e.in=t.in,e.out=t.out});function yo(e,t){return new Ur({type:"pipe",in:e,out:t})}const Rr=S("ZodCodec",(e,t)=>{Ur.init(e,t),ps.init(e,t)});function iy(e,t,r){return new Rr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function oy(e){const t=e._zod.def;return new Rr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}const Lc=S("ZodPreprocess",(e,t)=>{Ur.init(e,t),Zm.init(e,t)}),Fc=S("ZodReadonly",(e,t)=>{Lm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Lh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Vc(e){return new Fc({type:"readonly",innerType:e})}const Gc=S("ZodTemplateLiteral",(e,t)=>{Vm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>kh(e,r,i)});function ay(e,t){return new Gc({type:"template_literal",parts:e,...E(t)})}const qc=S("ZodLazy",(e,t)=>{hs.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Vh(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function Jc(e){return new qc({type:"lazy",getter:e})}const Kc=S("ZodPromise",(e,t)=>{qm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function sy(e){return new Kc({type:"promise",innerType:e})}const Hc=S("ZodFunction",(e,t)=>{Gm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Oh(e,r,i,n)});function vo(e){return new Hc({type:"function",input:Array.isArray(e?.input)?Ic(e?.input):e?.input??se(be()),output:e?.output??be()})}const Br=S("ZodCustom",(e,t)=>{Jm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ih(e,r,i,n)});function cy(e){const t=new De({check:"custom"});return t._zod.check=e,t}function Wc(e,t){return Kp(Br,e??(()=>!0),t)}function Yc(e,t={}){return Hp(Br,e,t)}function Xc(e,t){return Wp(e,t)}const uy=Xp,ly=Qp;function dy(e,t={}){const r=new Br({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...E(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 fy=(...e)=>eh({Codec:Rr,Boolean:Nr,String:wr},...e);function my(e){const t=Jc(()=>Te([k(e),ae(),Me(),uo(),se(t),$e(k(),t)]));return t}function $o(e,t){return new Lc({type:"pipe",in:po(e),out:t})}var oI=Object.freeze({__proto__:null,ZodAny:gc,ZodArray:_c,ZodBase64:ro,ZodBase64URL:io,ZodBigInt:Er,ZodBigIntFormat:co,ZodBoolean:Nr,ZodCIDRv4:to,ZodCIDRv6:no,ZodCUID:Ki,ZodCUID2:Hi,ZodCatch:Bc,ZodCodec:Rr,ZodCreditCard:fc,ZodCustom:Br,ZodCustomStringFormat:Bn,ZodDate:fo,ZodDefault:Cc,ZodDiscriminatedUnion:kc,ZodE164:oo,ZodEmail:Vi,ZodEmoji:qi,ZodEnum:Zn,ZodExactOptional:ho,ZodFile:Pc,ZodFunction:Hc,ZodGUID:Gi,ZodIPv4:Qi,ZodIPv6:eo,ZodISODate:Or,ZodISODateTime:Ir,ZodISODuration:xr,ZodISOTime:Tr,ZodIntersection:Sc,ZodJWT:ao,ZodKSUID:Xi,ZodLazy:qc,ZodLiteral:xc,ZodMAC:dc,ZodMap:Oc,ZodNaN:Zc,ZodNanoID:Ji,ZodNever:vc,ZodNonOptional:go,ZodNull:hc,ZodNullable:Ec,ZodNumber:zr,ZodNumberFormat:vn,ZodObject:Cr,ZodOptional:Ln,ZodPipe:Ur,ZodPrefault:jc,ZodPreprocess:Lc,ZodPromise:Kc,ZodReadonly:Fc,ZodRecord:Mn,ZodSet:Tc,ZodString:wr,ZodStringFormat:Oe,ZodSuccess:Rc,ZodSymbol:mc,ZodTemplateLiteral:Gc,ZodTransform:zc,ZodTuple:wc,ZodType:ie,ZodULID:Wi,ZodURL:Pr,ZodUUID:Mt,ZodUndefined:pc,ZodUnion:Dr,ZodUnknown:yc,ZodVoid:$c,ZodXID:Yi,ZodXor:bc,_ZodString:Fi,_default:Dc,_function:vo,any:Fg,array:se,base64:Ig,base64url:Og,bigint:Rg,boolean:Me,catch:Mc,check:cy,cidrv4:Sg,cidrv6:wg,codec:iy,creditCard:xg,cuid:hg,cuid2:gg,custom:Wc,date:Gg,describe:uy,discriminatedUnion:mo,e164:Tg,email:og,emoji:mg,enum:Qe,exactOptional:Nc,file:ey,float32:Dg,float64:jg,function:vo,guid:ag,hash:Cg,hex:Eg,hostname:Ng,httpUrl:fg,instanceof:dy,int:so,int32:Ag,int64:Bg,intersection:jr,invertCodec:oy,ipv4:_g,ipv6:kg,json:my,jwt:Pg,keyof:qg,ksuid:$g,lazy:Jc,literal:q,looseObject:Xe,looseRecord:Wg,mac:bg,map:Yg,meta:ly,nan:ry,nanoid:pg,nativeEnum:Qg,never:lo,nonoptional:Uc,null:uo,nullable:Ar,nullish:ty,number:ae,object:R,optional:xe,partialRecord:Hg,pipe:yo,prefault:Ac,preprocess:$o,promise:sy,readonly:Vc,record:$e,refine:Yc,set:Xg,strictObject:Jg,string:k,stringFormat:zg,stringbool:fy,success:ny,superRefine:Xc,symbol:Zg,templateLiteral:ay,transform:po,tuple:Ic,uint32:Ug,uint64:Mg,ulid:yg,undefined:Lg,union:Te,unknown:be,url:dg,uuid:sg,uuidv4:cg,uuidv6:ug,uuidv7:lg,void:Vg,xid:vg,xor:Kg});const aI={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 sI(e){Je({customError:e})}function cI(){return Je().customError}var re;re||(re={});function py(e){return Js(Ir,e)}function uI(e){return Ks(Or,e)}function lI(e){return Hs(Tr,e)}function dI(e){return Ws(xr,e)}var hy=Object.freeze({__proto__:null,ZodISODate:Or,ZodISODateTime:Ir,ZodISODuration:xr,ZodISOTime:Tr,date:uI,datetime:py,duration:dI,time:lI});const B={...oI,...nI,iso:hy},fI=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 mI(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 gy(e,t){return e.map((r,i)=>i<t?r:r.optional())}function pI(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function hI(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]===void 0?void 0:pI(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 gI(e,t){return B.transform(i=>i).check(i=>{const n=i.value;if(!(typeof n!="object"||n===null||Array.isArray(n)))for(const o of Object.getOwnPropertyNames(n)){const a=t.safeParse(o);a.success||i.issues.push({code:"invalid_key",origin:"record",issues:a.error.issues,input:o,path:[o],continue:!0})}}).pipe(e)}function yy(e,t){if(e!==!1)return e===void 0||e===!0?B.any():ct(e,t)}const yI=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function vy(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return B.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 B.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=hI(n,t),a=ct(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 B.null();if(n.length===0)return B.never();if(n.length===1)return B.literal(n[0]);if(n.every(a=>typeof a=="string"))return B.enum(n);const o=n.map(a=>B.literal(a));return o.length<2?o[0]:B.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return B.literal(e.const);const r=e.type;if(Array.isArray(r)){const n=r.map(o=>{const a={...e,type:o};return vy(a,t)});return n.length===0?B.never():n.length===1?n[0]:B.union(n)}if(!r)return B.any();let i;switch(r){case"string":{let n=B.string();if(e.format){const o=e.format;o==="email"?n=n.check(B.email()):o==="uri"||o==="uri-reference"?n=n.check(B.url()):o==="uuid"||o==="guid"?n=n.check(B.uuid()):o==="date-time"?n=n.check(B.iso.datetime({offset:!0})):o==="date"?n=n.check(B.iso.date()):o==="time"?n=n.check(B.regex(yI)):o==="duration"?n=n.check(B.iso.duration()):o==="hostname"?n=n.check(B.hostname()):o==="ipv4"?n=n.check(B.ipv4()):o==="ipv6"?n=n.check(B.ipv6()):o==="mac"?n=n.check(B.mac()):o==="cidr"?n=n.check(B.cidrv4()):o==="cidr-v6"?n=n.check(B.cidrv6()):o==="base64"?n=n.check(B.base64()):o==="base64url"?n=n.check(B.base64url()):o==="e164"?n=n.check(B.e164()):o==="credit_card"?n=n.check(B.creditCard()):o==="jwt"?n=n.check(B.jwt()):o==="emoji"?n=n.check(B.emoji()):o==="nanoid"?n=n.check(B.nanoid()):o==="cuid"?n=n.check(B.cuid()):o==="cuid2"?n=n.check(B.cuid2()):o==="ulid"?n=n.check(B.ulid()):o==="xid"?n=n.check(B.xid()):o==="ksuid"&&(n=n.check(B.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"?B.number().int():B.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(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=B.boolean();break}case"null":{i=B.null();break}case"object":{const n={},o=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?ct(e.additionalProperties,t):void 0;for(const[c,u]of Object.entries(o)){const l=ct(u,t);Ze(n,c,a.has(c)?l:l.optional())}if(e.patternProperties){const c=e.patternProperties,u=Object.keys(c),l=[];for(const m of u){const f=ct(c[m],t),p=B.string().regex(new RegExp(m));l.push(B.looseRecord(p,f))}const d=[];if(Object.keys(n).length>0&&d.push(B.object(n).passthrough()),d.push(...l),d.length===0)i=B.object({}).passthrough();else if(d.length===1)i=d[0];else{let m=B.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)m=B.intersection(m,d[f]);i=m}if(e.additionalProperties===!1){const m=Object.keys(n),f=u.map(y=>new RegExp(y)),p=i;i=i.check(y=>{if(!Ft(y.value))return;const h=[];for(const $ of Object.keys(y.value))m.includes($)||f.some(g=>g.test($))||h.push($);h.length&&y.issues.push({code:"unrecognized_keys",keys:h,input:y.value,inst:p})})}}else{const c=B.object(n);e.additionalProperties===!1?i=c.strict():s?i=c.catchall(s):i=c.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){const c=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;i=gI(i,ct(c,t))}break}case"array":{const n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){const a=typeof e.minItems=="number"?e.minItems:0,s=n.map(d=>ct(d,t)),c=gy(s,a),u=Array.isArray(o)?void 0:yy(o,t),l=B.tuple(c);i=u?l.rest(u):l,typeof e.minItems=="number"&&(i=i.check(B.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(B.maxLength(e.maxItems)))}else if(Array.isArray(o)){const a=typeof e.minItems=="number"?e.minItems:0,s=o.map(d=>ct(d,t)),c=gy(s,a),u=yy(e.additionalItems,t),l=B.tuple(c);i=u?l.rest(u):l,typeof e.minItems=="number"&&(i=i.check(B.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(B.maxLength(e.maxItems)))}else if(o!==void 0){const a=ct(o,t);let s=B.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=B.array(B.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}function ct(e,t){if(typeof e=="boolean")return e?B.any():B.never();let r=vy(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=>ct(u,t)),c=B.union(s);r=i?B.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){const s=e.oneOf.map(u=>ct(u,t)),c=B.xor(s);r=i?B.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:B.any();else{let s=i?r:ct(e.allOf[0],t);const c=i?0:1;for(let u=c;u<e.allOf.length;u++)s=B.intersection(s,ct(e.allOf[u],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=B.nullable(r)),e.readOnly===!0&&(r=B.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]);e.propertyNames!==void 0&&e.type==="object"&&e.$ref===void 0&&(n.propertyNames=e.propertyNames);for(const s of Object.keys(e))fI.has(s)||Ze(n,s,e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function vI(e,t){if(typeof e=="boolean")return e?B.any():B.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=mI(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??wt};return ct(r,o)}const $y=Symbol("z.visit/resolving");function Qc(e,t){const r=typeof t=="function"?t:(a,s)=>{const c=t[a._zod.def.type];return c?c(a,s):a},i=new Map;function n(a){const s=i.get(a);if(s===$y)return new hs({type:"lazy",getter:()=>i.get(a)});if(s!==void 0)return s;i.set(a,$y);const c=o(a),u=r(c,c!==a);return i.set(a,u),u}function o(a){const s=a._zod.def;switch(s.type){case"object":{const u=s.shape,l=Object.keys(u);let d=!1;const m={};for(const p of l){const y=n(u[p]);y!==u[p]&&(d=!0),m[p]=y}let f=s.catchall;return s.catchall&&(f=n(s.catchall),f!==s.catchall&&(d=!0)),d?Ee(a,{...s,shape:m,catchall:f}):a}case"array":{const u=n(s.element);return u===s.element?a:Ee(a,{...s,element:u})}case"tuple":{const u=s.items;let l=!1;const d=[];for(const f of u){const p=n(f);p!==f&&(l=!0),d.push(p)}let m=s.rest;return s.rest&&(m=n(s.rest),m!==s.rest&&(l=!0)),l?Ee(a,{...s,items:d,rest:m}):a}case"record":case"map":{const u=n(s.keyType),l=n(s.valueType);return u===s.keyType&&l===s.valueType?a:Ee(a,{...s,keyType:u,valueType:l})}case"set":{const u=n(s.valueType);return u===s.valueType?a:Ee(a,{...s,valueType:u})}case"union":{const u=s.options;let l=!1;const d=[];for(const m of u){const f=n(m);f!==m&&(l=!0),d.push(f)}return l?Ee(a,{...s,options:d}):a}case"intersection":{const u=n(s.left),l=n(s.right);return u===s.left&&l===s.right?a:Ee(a,{...s,left:u,right:l})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{const u=n(s.innerType);return u===s.innerType?a:Ee(a,{...s,innerType:u})}case"pipe":{const u=n(s.in),l=n(s.out);return u===s.in&&l===s.out?a:Ee(a,{...s,in:u,out:l})}case"function":{const u=n(s.input),l=n(s.output);return u===s.input&&l===s.output?a:Ee(a,{...s,input:u,output:l})}case"lazy":{const u=s.getter,{_cachedInner:l,...d}=s;return Ee(a,{...d,getter:()=>n(u())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return n(e)}function $I(e){return Qc(e,{object:t=>t.partial(),union:t=>{const r=t._zod.def;return r.discriminator===void 0?t:Te(r.options)}})}function _I(e,t){if(!t?.length)return e;const r=e._zod.def;return Ee(e,Et(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function _y(e){return _I(e.out,e.checks)}function bI(e){return e.in._zod.traits.has("$ZodTransform")?_y(e):e.in}function kI(e){return Qc(e,{pipe:t=>bI(t._zod.def),default:(t,r)=>r?xe(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function SI(e){return Qc(e,{pipe:t=>_y(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}function wI(e){return $p(wr,e)}function II(e){return wp(zr,e)}function OI(e){return Np(Nr,e)}function TI(e){return Cp(Er,e)}function xI(e){return Vp(fo,e)}var PI=Object.freeze({__proto__:null,bigint:TI,boolean:OI,date:xI,number:II,string:wI}),_o=Object.freeze({__proto__:null,$brand:hd,$input:up,$output:cp,NEVER:md,TimePrecision:kp,ZodAny:gc,ZodArray:_c,ZodBase64:ro,ZodBase64URL:io,ZodBigInt:Er,ZodBigIntFormat:co,ZodBoolean:Nr,ZodCIDRv4:to,ZodCIDRv6:no,ZodCUID:Ki,ZodCUID2:Hi,ZodCatch:Bc,ZodCodec:Rr,ZodCompileAsyncError:en,ZodCompileUnsupportedError:ge,ZodCreditCard:fc,ZodCustom:Br,ZodCustomStringFormat:Bn,ZodDate:fo,ZodDefault:Cc,ZodDiscriminatedUnion:kc,ZodE164:oo,ZodEmail:Vi,ZodEmoji:qi,ZodEnum:Zn,ZodError:rI,ZodExactOptional:ho,ZodFile:Pc,get ZodFirstPartyTypeKind(){return re},ZodFunction:Hc,ZodGUID:Gi,ZodIPv4:Qi,ZodIPv6:eo,ZodISODate:Or,ZodISODateTime:Ir,ZodISODuration:xr,ZodISOTime:Tr,ZodIntersection:Sc,ZodIssueCode:aI,ZodJWT:ao,ZodKSUID:Xi,ZodLazy:qc,ZodLiteral:xc,ZodMAC:dc,ZodMap:Oc,ZodNaN:Zc,ZodNanoID:Ji,ZodNever:vc,ZodNonOptional:go,ZodNull:hc,ZodNullable:Ec,ZodNumber:zr,ZodNumberFormat:vn,ZodObject:Cr,ZodOptional:Ln,ZodPipe:Ur,ZodPrefault:jc,ZodPreprocess:Lc,ZodPromise:Kc,ZodReadonly:Fc,ZodRealError:ht,ZodRecord:Mn,ZodSet:Tc,ZodString:wr,ZodStringFormat:Oe,ZodSuccess:Rc,ZodSymbol:mc,ZodTemplateLiteral:Gc,ZodTransform:zc,ZodTuple:wc,ZodType:ie,ZodULID:Wi,ZodURL:Pr,ZodUUID:Mt,ZodUndefined:pc,ZodUnion:Dr,ZodUnknown:yc,ZodVoid:$c,ZodXID:Yi,ZodXor:bc,_ZodString:Fi,_default:Dc,_function:vo,any:Fg,array:se,base64:Ig,base64url:Og,bigint:Rg,boolean:Me,catch:Mc,check:cy,cidrv4:Sg,cidrv6:wg,clone:Ee,codec:iy,coerce:PI,compile:fp,config:Je,core:tI,creditCard:xg,cuid:hg,cuid2:gg,custom:Wc,date:Gg,decode:Xh,decodeAsync:eg,deepPartial:$I,describe:uy,discriminatedUnion:mo,e164:Tg,email:og,emoji:mg,encode:Yh,encodeAsync:Qh,endsWith:ji,enum:Qe,exactOptional:Nc,file:ey,flattenError:Ta,float32:Dg,float64:jg,formatError:xa,fromJSONSchema:vI,function:vo,getDiscriminatedOption:mm,getErrorMap:cI,globalRegistry:wt,gt:nn,gte:Ot,guid:ag,hash:Cg,hex:Eg,hostname:Ng,httpUrl:fg,includes:Ci,input:kI,instanceof:dy,int:so,int32:Ag,int64:Bg,intersection:jr,invertCodec:oy,ipv4:_g,ipv6:kg,iso:hy,json:my,jwt:Pg,keyof:qg,ksuid:$g,lazy:Jc,length:$r,literal:q,locales:ap,looseObject:Xe,looseRecord:Wg,lowercase:Ni,lt:tn,lte:It,mac:bg,map:Yg,maxLength:vr,maxSize:jn,memoizer:$s,meta:ly,mime:Ai,minLength:gn,minSize:rn,multipleOf:Dn,nan:ry,nanoid:pg,nativeEnum:Qg,negative:Xs,never:lo,nonnegative:ec,nonoptional:Uc,nonpositive:Qs,normalize:Ui,null:uo,nullable:Ar,nullish:ty,number:ae,object:R,optional:xe,output:SI,overwrite:qt,parse:Jh,parseAsync:Kh,partialRecord:Hg,pipe:yo,positive:Ys,prefault:Ac,preprocess:$o,prettifyError:_d,promise:sy,properties:nc,property:tc,readonly:Vc,record:$e,refine:Yc,regex:zi,regexes:La,registry:bs,safeDecode:ng,safeDecodeAsync:ig,safeEncode:tg,safeEncodeAsync:rg,safeParse:Hh,safeParseAsync:Wh,set:Xg,setErrorMap:sI,size:yr,slugify:Zi,startsWith:Di,strictObject:Jg,string:k,stringFormat:zg,stringbool:fy,success:ny,superRefine:Xc,symbol:Zg,templateLiteral:ay,toJSONSchema:lc,toLowerCase:Bi,toUpperCase:Mi,toZod:da,transform:po,treeifyError:vd,trim:Ri,tuple:Ic,uint32:Ug,uint64:Mg,ulid:yg,undefined:Lg,union:Te,unknown:be,uppercase:Ei,url:dg,util:dd,uuid:sg,uuidv4:cg,uuidv6:ug,uuidv7:lg,validate:bd,validateAsync:kd,void:Vg,xid:vg,xor:Kg});const zI=S("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ne.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){Xt(this,"with",e)},parse(e,t){return pi(this,e,t,{callee:this.parse})},parseAsync(e,t){return hi(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return gi(this,e,t)},safeParseAsync(e,t){return yi(this,e,t)},check(...e){const t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]},{parent:!0})},clone(e,t){return Ee(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),NI=S("ZodMiniObject",(e,t)=>{ls.init(e,t),zI.init(e,t),_a(e,"shape",r=>r._zod.def.shape,!1)});function by(e,t){const r={type:"object",shape:e??{},...E(t)};return new NI(r)}function Jt(e){return!!e._zod}function Fn(e){const t=Object.values(e);if(t.length===0)return by({});const r=t.every(Jt),i=t.every(n=>!Jt(n));if(r)return by(e);if(i)return R(e);throw new Error("Mixed Zod versions detected in object shape.")}function Mr(e,t){return Jt(e)?gi(e,t):e.safeParse(t)}async function eu(e,t){return Jt(e)?await yi(e,t):await e.safeParseAsync(t)}function Zr(e){if(!e)return;let t;if(Jt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function Lr(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 Fn(e)}}if(Jt(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 EI(e){return e.length===0?"object root":e.reduce((t,r,i)=>i===0?String(r):typeof r=="number"?`${t}[${r}]`:`${t}.${r}`,"")}function tu(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 ${EI(t.path)}`:t.message).join(`
59
+ `);if("message"in e&&typeof e.message=="string")return e.message;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function CI(e){return e.description}function DI(e){if(Jt(e))return e._zod?.def?.type==="optional";const t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function nu(e){if(Jt(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 ky="2025-11-25",jI=[ky,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],$n="io.modelcontextprotocol/related-task",bo="2.0",Le=Wc(e=>e!==null&&(typeof e=="object"||typeof e=="function")),Sy=Te([k(),ae().int()]),wy=k();Xe({ttl:ae().optional(),pollInterval:ae().optional()});const AI=R({ttl:ae().optional()}),UI=R({taskId:k()}),ru=Xe({progressToken:Sy.optional(),[$n]:UI.optional()}),gt=R({_meta:ru.optional()}),Fr=gt.extend({task:AI.optional()}),RI=e=>Fr.safeParse(e).success,Ke=R({method:k(),params:gt.loose().optional()}),Tt=R({_meta:ru.optional()}),xt=R({method:k(),params:Tt.loose().optional()}),He=Xe({_meta:ru.optional()}),ko=Te([k(),ae().int()]),Iy=R({jsonrpc:q(bo),id:ko,...Ke.shape}).strict(),Oy=e=>Iy.safeParse(e).success,Ty=R({jsonrpc:q(bo),...xt.shape}).strict(),BI=e=>Ty.safeParse(e).success,iu=R({jsonrpc:q(bo),id:ko,result:He}).strict(),So=e=>iu.safeParse(e).success;var ee;(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"})(ee||(ee={}));const ou=R({jsonrpc:q(bo),id:ko.optional(),error:R({code:ae().int(),message:k(),data:be().optional()})}).strict(),MI=e=>ou.safeParse(e).success,ZI=Te([Iy,Ty,iu,ou]);Te([iu,ou]);const au=He.strict(),LI=Tt.extend({requestId:ko.optional(),reason:k().optional()}),su=xt.extend({method:q("notifications/cancelled"),params:LI}),FI=R({src:k(),mimeType:k().optional(),sizes:se(k()).optional(),theme:Qe(["light","dark"]).optional()}),Vr=R({icons:se(FI).optional()}),Vn=R({name:k(),title:k().optional()}),xy=Vn.extend({...Vn.shape,...Vr.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),VI=jr(R({applyDefaults:Me().optional()}),$e(k(),be())),GI=$o(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,jr(R({form:VI.optional(),url:Le.optional()}),$e(k(),be()).optional())),qI=Xe({list:Le.optional(),cancel:Le.optional(),requests:Xe({sampling:Xe({createMessage:Le.optional()}).optional(),elicitation:Xe({create:Le.optional()}).optional()}).optional()}),JI=Xe({list:Le.optional(),cancel:Le.optional(),requests:Xe({tools:Xe({call:Le.optional()}).optional()}).optional()}),KI=R({experimental:$e(k(),Le).optional(),sampling:R({context:Le.optional(),tools:Le.optional()}).optional(),elicitation:GI.optional(),roots:R({listChanged:Me().optional()}).optional(),tasks:qI.optional(),extensions:$e(k(),Le).optional()}),HI=gt.extend({protocolVersion:k(),capabilities:KI,clientInfo:xy}),Py=Ke.extend({method:q("initialize"),params:HI}),WI=R({experimental:$e(k(),Le).optional(),logging:Le.optional(),completions:Le.optional(),prompts:R({listChanged:Me().optional()}).optional(),resources:R({subscribe:Me().optional(),listChanged:Me().optional()}).optional(),tools:R({listChanged:Me().optional()}).optional(),tasks:JI.optional(),extensions:$e(k(),Le).optional()}),YI=He.extend({protocolVersion:k(),capabilities:WI,serverInfo:xy,instructions:k().optional()}),zy=xt.extend({method:q("notifications/initialized"),params:Tt.optional()}),cu=Ke.extend({method:q("ping"),params:gt.optional()}),XI=R({progress:ae(),total:xe(ae()),message:xe(k())}),QI=R({...Tt.shape,...XI.shape,progressToken:Sy}),uu=xt.extend({method:q("notifications/progress"),params:QI}),e0=gt.extend({cursor:wy.optional()}),Gr=Ke.extend({params:e0.optional()}),qr=He.extend({nextCursor:wy.optional()}),t0=Qe(["working","input_required","completed","failed","cancelled"]),Jr=R({taskId:k(),status:t0,ttl:Te([ae(),uo()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:xe(ae()),statusMessage:xe(k())}),wo=He.extend({task:Jr}),n0=Tt.merge(Jr),Io=xt.extend({method:q("notifications/tasks/status"),params:n0}),lu=Ke.extend({method:q("tasks/get"),params:gt.extend({taskId:k()})}),du=He.merge(Jr),fu=Ke.extend({method:q("tasks/result"),params:gt.extend({taskId:k()})});He.loose();const mu=Gr.extend({method:q("tasks/list")}),pu=qr.extend({tasks:se(Jr)}),hu=Ke.extend({method:q("tasks/cancel"),params:gt.extend({taskId:k()})}),r0=He.merge(Jr),Ny=R({uri:k(),mimeType:xe(k()),_meta:$e(k(),be()).optional()}),Ey=Ny.extend({text:k()}),gu=k().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Cy=Ny.extend({blob:gu}),Kr=Qe(["user","assistant"]),Gn=R({audience:se(Kr).optional(),priority:ae().min(0).max(1).optional(),lastModified:py({offset:!0}).optional()}),Dy=R({...Vn.shape,...Vr.shape,uri:k(),description:xe(k()),mimeType:xe(k()),size:xe(ae()),annotations:Gn.optional(),_meta:xe(Xe({}))}),i0=R({...Vn.shape,...Vr.shape,uriTemplate:k(),description:xe(k()),mimeType:xe(k()),annotations:Gn.optional(),_meta:xe(Xe({}))}),yu=Gr.extend({method:q("resources/list")}),o0=qr.extend({resources:se(Dy)}),vu=Gr.extend({method:q("resources/templates/list")}),a0=qr.extend({resourceTemplates:se(i0)}),$u=gt.extend({uri:k()}),s0=$u,_u=Ke.extend({method:q("resources/read"),params:s0}),c0=He.extend({contents:se(Te([Ey,Cy]))}),u0=xt.extend({method:q("notifications/resources/list_changed"),params:Tt.optional()}),l0=$u,d0=Ke.extend({method:q("resources/subscribe"),params:l0}),f0=$u,m0=Ke.extend({method:q("resources/unsubscribe"),params:f0}),p0=Tt.extend({uri:k()}),h0=xt.extend({method:q("notifications/resources/updated"),params:p0}),g0=R({name:k(),description:xe(k()),required:xe(Me())}),y0=R({...Vn.shape,...Vr.shape,description:xe(k()),arguments:xe(se(g0)),_meta:xe(Xe({}))}),bu=Gr.extend({method:q("prompts/list")}),v0=qr.extend({prompts:se(y0)}),$0=gt.extend({name:k(),arguments:$e(k(),k()).optional()}),ku=Ke.extend({method:q("prompts/get"),params:$0}),Su=R({type:q("text"),text:k(),annotations:Gn.optional(),_meta:$e(k(),be()).optional()}),wu=R({type:q("image"),data:gu,mimeType:k(),annotations:Gn.optional(),_meta:$e(k(),be()).optional()}),Iu=R({type:q("audio"),data:gu,mimeType:k(),annotations:Gn.optional(),_meta:$e(k(),be()).optional()}),_0=R({type:q("tool_use"),name:k(),id:k(),input:$e(k(),be()),_meta:$e(k(),be()).optional()}),b0=R({type:q("resource"),resource:Te([Ey,Cy]),annotations:Gn.optional(),_meta:$e(k(),be()).optional()}),k0=Dy.extend({type:q("resource_link")}),Ou=Te([Su,wu,Iu,k0,b0]),S0=R({role:Kr,content:Ou}),w0=He.extend({description:k().optional(),messages:se(S0)}),I0=xt.extend({method:q("notifications/prompts/list_changed"),params:Tt.optional()}),O0=R({title:k().optional(),readOnlyHint:Me().optional(),destructiveHint:Me().optional(),idempotentHint:Me().optional(),openWorldHint:Me().optional()}),T0=R({taskSupport:Qe(["required","optional","forbidden"]).optional()}),jy=R({...Vn.shape,...Vr.shape,description:k().optional(),inputSchema:R({type:q("object"),properties:$e(k(),Le).optional(),required:se(k()).optional()}).catchall(be()),outputSchema:R({type:q("object"),properties:$e(k(),Le).optional(),required:se(k()).optional()}).catchall(be()).optional(),annotations:O0.optional(),execution:T0.optional(),_meta:$e(k(),be()).optional()}),Tu=Gr.extend({method:q("tools/list")}),x0=qr.extend({tools:se(jy)}),xu=He.extend({content:se(Ou).default([]),structuredContent:$e(k(),be()).optional(),isError:Me().optional()});xu.or(He.extend({toolResult:be()}));const P0=Fr.extend({name:k(),arguments:$e(k(),be()).optional()}),Oo=Ke.extend({method:q("tools/call"),params:P0}),z0=xt.extend({method:q("notifications/tools/list_changed"),params:Tt.optional()});R({autoRefresh:Me().default(!0),debounceMs:ae().int().nonnegative().default(300)});const To=Qe(["debug","info","notice","warning","error","critical","alert","emergency"]),N0=gt.extend({level:To}),Ay=Ke.extend({method:q("logging/setLevel"),params:N0}),E0=Tt.extend({level:To,logger:k().optional(),data:be()}),C0=xt.extend({method:q("notifications/message"),params:E0}),D0=R({name:k().optional()}),j0=R({hints:se(D0).optional(),costPriority:ae().min(0).max(1).optional(),speedPriority:ae().min(0).max(1).optional(),intelligencePriority:ae().min(0).max(1).optional()}),A0=R({mode:Qe(["auto","required","none"]).optional()}),U0=R({type:q("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:se(Ou).default([]),structuredContent:R({}).loose().optional(),isError:Me().optional(),_meta:$e(k(),be()).optional()}),R0=mo("type",[Su,wu,Iu]),xo=mo("type",[Su,wu,Iu,_0,U0]),B0=R({role:Kr,content:Te([xo,se(xo)]),_meta:$e(k(),be()).optional()}),M0=Fr.extend({messages:se(B0),modelPreferences:j0.optional(),systemPrompt:k().optional(),includeContext:Qe(["none","thisServer","allServers"]).optional(),temperature:ae().optional(),maxTokens:ae().int(),stopSequences:se(k()).optional(),metadata:Le.optional(),tools:se(jy).optional(),toolChoice:A0.optional()}),Z0=Ke.extend({method:q("sampling/createMessage"),params:M0}),Pu=He.extend({model:k(),stopReason:xe(Qe(["endTurn","stopSequence","maxTokens"]).or(k())),role:Kr,content:R0}),Uy=He.extend({model:k(),stopReason:xe(Qe(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:Kr,content:Te([xo,se(xo)])}),L0=R({type:q("boolean"),title:k().optional(),description:k().optional(),default:Me().optional()}),F0=R({type:q("string"),title:k().optional(),description:k().optional(),minLength:ae().optional(),maxLength:ae().optional(),format:Qe(["email","uri","date","date-time"]).optional(),default:k().optional()}),V0=R({type:Qe(["number","integer"]),title:k().optional(),description:k().optional(),minimum:ae().optional(),maximum:ae().optional(),default:ae().optional()}),G0=R({type:q("string"),title:k().optional(),description:k().optional(),enum:se(k()),default:k().optional()}),q0=R({type:q("string"),title:k().optional(),description:k().optional(),oneOf:se(R({const:k(),title:k()})),default:k().optional()}),J0=R({type:q("string"),title:k().optional(),description:k().optional(),enum:se(k()),enumNames:se(k()).optional(),default:k().optional()}),K0=Te([G0,q0]),H0=R({type:q("array"),title:k().optional(),description:k().optional(),minItems:ae().optional(),maxItems:ae().optional(),items:R({type:q("string"),enum:se(k())}),default:se(k()).optional()}),W0=R({type:q("array"),title:k().optional(),description:k().optional(),minItems:ae().optional(),maxItems:ae().optional(),items:R({anyOf:se(R({const:k(),title:k()}))}),default:se(k()).optional()}),Y0=Te([H0,W0]),X0=Te([J0,K0,Y0]),Q0=Te([X0,L0,F0,V0]),eO=Fr.extend({mode:q("form").optional(),message:k(),requestedSchema:R({type:q("object"),properties:$e(k(),Q0),required:se(k()).optional()})}),tO=Fr.extend({mode:q("url"),message:k(),elicitationId:k(),url:k().url()}),nO=Te([eO,tO]),rO=Ke.extend({method:q("elicitation/create"),params:nO}),iO=Tt.extend({elicitationId:k()}),oO=xt.extend({method:q("notifications/elicitation/complete"),params:iO}),Po=He.extend({action:Qe(["accept","decline","cancel"]),content:$o(e=>e===null?void 0:e,$e(k(),Te([k(),ae(),Me(),se(k())])).optional())}),aO=R({type:q("ref/resource"),uri:k()}),sO=R({type:q("ref/prompt"),name:k()}),cO=gt.extend({ref:Te([sO,aO]),argument:R({name:k(),value:k()}),context:R({arguments:$e(k(),k()).optional()}).optional()}),zu=Ke.extend({method:q("completion/complete"),params:cO});function uO(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function lO(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}const dO=He.extend({completion:Xe({values:se(k()).max(100),total:xe(ae().int()),hasMore:xe(Me())})}),fO=R({uri:k().startsWith("file://"),name:k().optional(),_meta:$e(k(),be()).optional()}),mO=Ke.extend({method:q("roots/list"),params:gt.optional()}),Ry=He.extend({roots:se(fO)}),pO=xt.extend({method:q("notifications/roots/list_changed"),params:Tt.optional()});Te([cu,Py,zu,Ay,ku,bu,yu,vu,_u,d0,m0,Oo,Tu,lu,fu,mu,hu]),Te([su,uu,zy,pO,Io]),Te([au,Pu,Uy,Po,Ry,du,pu,wo]),Te([cu,Z0,rO,mO,lu,fu,mu,hu]),Te([su,uu,C0,h0,u0,z0,I0,Io,oO]),Te([au,YI,dO,w0,v0,o0,a0,c0,xu,x0,du,pu,wo]);class K 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===ee.UrlElicitationRequired&&i){const n=i;if(n.elicitations)return new hO(n.elicitations,r)}return new K(t,r,i)}}class hO extends K{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(ee.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function _n(e){return e==="completed"||e==="failed"||e==="cancelled"}const gO=Symbol("Let zodToJsonSchema decide on which parser to use"),By={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"},yO=e=>typeof e=="string"?{...By,name:e}:{...By,...e},vO=e=>{const t=yO(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 My(e,t,r,i){i?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function ke(e,t,r,i,n){e[t]=r,My(e,t,i,n)}const Zy=(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 ut(e){if(e.target!=="openAi")return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Zy(t,e.currentPath):t.join("/")}}function $O(e,t){const r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==re.ZodAny&&(r.items=_e(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ke(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ke(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ke(r,"minItems",e.exactLength.value,e.exactLength.message,t),ke(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function _O(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?ke(r,"minimum",i.value,i.message,t):ke(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),ke(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?ke(r,"maximum",i.value,i.message,t):ke(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),ke(r,"maximum",i.value,i.message,t));break;case"multipleOf":ke(r,"multipleOf",i.value,i.message,t);break}return r}function bO(){return{type:"boolean"}}function Ly(e,t){return _e(e.type._def,t)}const kO=(e,t)=>_e(e.innerType._def,t);function Fy(e,t,r){const i=r??t.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((n,o)=>Fy(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 SO(e,t)}}const SO=(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":ke(r,"minimum",i.value,i.message,t);break;case"max":ke(r,"maximum",i.value,i.message,t);break}return r};function wO(e,t){return{..._e(e.innerType._def,t),default:e.defaultValue()}}function IO(e,t){return t.effectStrategy==="input"?_e(e.schema._def,t):ut(t)}function OO(e){return{type:"string",enum:Array.from(e.values)}}const TO=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function xO(e,t){const r=[_e(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),_e(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(TO(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 PO(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 Nu;const Ct={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:()=>(Nu===void 0&&(Nu=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Nu),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 Vy(e,t){const r={type:"string"};if(e.checks)for(const i of e.checks)switch(i.kind){case"min":ke(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t);break;case"max":ke(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":Dt(r,"email",i.message,t);break;case"format:idn-email":Dt(r,"idn-email",i.message,t);break;case"pattern:zod":ot(r,Ct.email,i.message,t);break}break;case"url":Dt(r,"uri",i.message,t);break;case"uuid":Dt(r,"uuid",i.message,t);break;case"regex":ot(r,i.regex,i.message,t);break;case"cuid":ot(r,Ct.cuid,i.message,t);break;case"cuid2":ot(r,Ct.cuid2,i.message,t);break;case"startsWith":ot(r,RegExp(`^${Eu(i.value,t)}`),i.message,t);break;case"endsWith":ot(r,RegExp(`${Eu(i.value,t)}$`),i.message,t);break;case"datetime":Dt(r,"date-time",i.message,t);break;case"date":Dt(r,"date",i.message,t);break;case"time":Dt(r,"time",i.message,t);break;case"duration":Dt(r,"duration",i.message,t);break;case"length":ke(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,i.value):i.value,i.message,t),ke(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"includes":{ot(r,RegExp(Eu(i.value,t)),i.message,t);break}case"ip":{i.version!=="v6"&&Dt(r,"ipv4",i.message,t),i.version!=="v4"&&Dt(r,"ipv6",i.message,t);break}case"base64url":ot(r,Ct.base64url,i.message,t);break;case"jwt":ot(r,Ct.jwt,i.message,t);break;case"cidr":{i.version!=="v6"&&ot(r,Ct.ipv4Cidr,i.message,t),i.version!=="v4"&&ot(r,Ct.ipv6Cidr,i.message,t);break}case"emoji":ot(r,Ct.emoji(),i.message,t);break;case"ulid":{ot(r,Ct.ulid,i.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Dt(r,"binary",i.message,t);break}case"contentEncoding:base64":{ke(r,"contentEncoding","base64",i.message,t);break}case"pattern:zod":{ot(r,Ct.base64,i.message,t);break}}break}case"nanoid":ot(r,Ct.nanoid,i.message,t)}return r}function Eu(e,t){return t.patternStrategy==="escape"?NO(e):e}const zO=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function NO(e){let t="";for(let r=0;r<e.length;r++)zO.has(e[r])||(t+="\\"),t+=e[r];return t}function Dt(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}}})):ke(e,"format",t,r,i)}function ot(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:Gy(t,i),...r&&i.errorMessages&&{errorMessage:{pattern:r}}})):ke(e,"pattern",Gy(t,i),r,i)}function Gy(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
60
60
  ]))`;continue}else if(i[c]==="$"){n+=`($|(?=[\r
61
61
  ]))`;continue}}if(r.s&&i[c]==="."){n+=a?`${i[c]}\r
62
62
  `:`[${i[c]}\r
63
- ]`;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 Ly(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===re.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((i,n)=>({...i,[n]:$e(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??at(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};const r={type:"object",additionalProperties:$e(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===re.ZodString&&e.keyType._def.checks?.length){const{type:i,...n}=My(e.keyType._def,t);return{...r,propertyNames:n}}else{if(e.keyType?._def.typeName===re.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===re.ZodBranded&&e.keyType._def.type._def.typeName===re.ZodString&&e.keyType._def.type._def.checks?.length){const{type:i,...n}=Ry(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function SO(e,t){if(t.mapStrategy==="record")return Ly(e,t);const r=$e(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||at(t),i=$e(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||at(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,i],minItems:2,maxItems:2}}}function IO(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 OO(e){return e.target==="openAi"?void 0:{not:at({...e,currentPath:[...e.currentPath,"not"]})}}function zO(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const Oo={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function xO(e,t){if(t.target==="openApi3")return Fy(e,t);const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(i=>i._def.typeName in Oo&&(!i._def.checks||!i._def.checks.length))){const i=r.reduce((n,o)=>{const a=Oo[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 Fy(e,t)}const Fy=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((i,n)=>$e(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 TO(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:Oo[e.innerType._def.typeName],nullable:!0}:{type:[Oo[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const i=$e(e.innerType._def,{...t,currentPath:[...t.currentPath]});return i&&"$ref"in i?{allOf:[i],nullable:!0}:i&&{...i,nullable:!0}}const r=$e(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function PO(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",Ay(r,"type",i.message,t);break;case"min":t.target==="jsonSchema7"?i.inclusive?be(r,"minimum",i.value,i.message,t):be(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),be(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?be(r,"maximum",i.value,i.message,t):be(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),be(r,"maximum",i.value,i.message,t));break;case"multipleOf":be(r,"multipleOf",i.value,i.message,t);break}return r}function NO(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=DO(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);const l=$e(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=EO(e,t);return a!==void 0&&(i.additionalProperties=a),i}function EO(e,t){if(e.catchall._def.typeName!=="ZodNever")return $e(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 DO(e){try{return e.isOptional()}catch{return!0}}const jO=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return $e(e.innerType._def,t);const r=$e(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:at(t)},r]}:at(t)},CO=(e,t)=>{if(t.pipeStrategy==="input")return $e(e.in._def,t);if(t.pipeStrategy==="output")return $e(e.out._def,t);const r=$e(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),i=$e(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,i].filter(n=>n!==void 0)}};function AO(e,t){return $e(e.type._def,t)}function UO(e,t){const i={type:"array",uniqueItems:!0,items:$e(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&be(i,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&be(i,"maxItems",e.maxSize.value,e.maxSize.message,t),i}function RO(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,i)=>$e(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[]),additionalItems:$e(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,i)=>$e(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[])}}function ZO(e){return{not:at(e)}}function MO(e){return at(e)}const BO=(e,t)=>$e(e.innerType._def,t),LO=(e,t,r)=>{switch(t){case re.ZodString:return My(e,r);case re.ZodNumber:return PO(e,r);case re.ZodObject:return NO(e,r);case re.ZodBigInt:return fO(e,r);case re.ZodBoolean:return mO();case re.ZodDate:return Zy(e,r);case re.ZodUndefined:return ZO(r);case re.ZodNull:return zO(r);case re.ZodArray:return dO(e,r);case re.ZodUnion:case re.ZodDiscriminatedUnion:return xO(e,r);case re.ZodIntersection:return _O(e,r);case re.ZodTuple:return RO(e,r);case re.ZodRecord:return Ly(e,r);case re.ZodLiteral:return bO(e,r);case re.ZodEnum:return vO(e);case re.ZodNativeEnum:return IO(e);case re.ZodNullable:return TO(e,r);case re.ZodOptional:return jO(e,r);case re.ZodMap:return SO(e,r);case re.ZodSet:return UO(e,r);case re.ZodLazy:return()=>e.getter()._def;case re.ZodPromise:return AO(e,r);case re.ZodNaN:case re.ZodNever:return OO(r);case re.ZodEffects:return yO(e,r);case re.ZodAny:return at(r);case re.ZodUnknown:return MO(r);case re.ZodDefault:return gO(e,r);case re.ZodBranded:return Ry(e,r);case re.ZodReadonly:return BO(e,r);case re.ZodCatch:return pO(e,r);case re.ZodPipeline:return CO(e,r);case re.ZodFunction:case re.ZodVoid:case re.ZodSymbol:return;default:return(i=>{})()}};function $e(e,t,r=!1){const i=t.seen.get(e);if(t.override){const s=t.override?.(e,t,i,r);if(s!==cO)return s}if(i&&!r){const s=FO(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=LO(e,e.typeName,t),a=typeof o=="function"?$e(o(),t):o;if(a&&VO(e,t,a),t.postProcess){const s=t.postProcess(a,e,t);return n.jsonSchema=a,s}return n.jsonSchema=a,a}const FO=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Uy(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`),at(t)):t.$refStrategy==="seen"?at(t):void 0}},VO=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r),GO=(e,t)=>{const r=lO(t);let i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:$e(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??at(r)}),{}):void 0;const n=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=$e(e._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??at(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 qO(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Vy(e,t){return Lt(e)?sc(e,{target:qO(t?.target),io:t?.pipeStrategy??"input"}):GO(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Gy(e){const r=Ar(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=Qc(r);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function qy(e,t){const r=Cr(e,t);if(!r.success)throw r.error;return r.data}const JO=6e4;class KO{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(iu,r=>{this._oncancel(r)}),this.setNotificationHandler(au,r=>{this._onprogress(r)}),this.setRequestHandler(ou,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(su,async(r,i)=>{const n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new K(ee.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(uu,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 K(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 K(ee.InvalidParams,`Task not found: ${o}`);if(!hn(a.status))return await this._waitForTaskUpdate(o,i.signal),await n();if(hn(a.status)){const s=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o),{...s,_meta:{...s._meta,[pn]:{taskId:o}}}}return await n()};return await n()}),this.setRequestHandler(lu,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 K(ee.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(fu,async(r,i)=>{try{const n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new K(ee.InvalidParams,`Task not found: ${r.params.taskId}`);if(hn(n.status))throw new K(ee.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 K(ee.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...o}}catch(n){throw n instanceof K?n:new K(ee.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),K.fromError(ee.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),$o(o)||EI(o)?this._onresponse(o):ky(o)?this._onrequest(o,a):NI(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=K.fromError(ee.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?.[pn]?.taskId;if(i===void 0){const l={jsonrpc:"2.0",id:t.id,error:{code:ee.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=PI(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 K(ee.ConnectionClosed,"Request was cancelled");const f={...m,relatedRequestId:t.id};o&&!f.relatedTask&&(f.relatedTask={taskId:o});const p=f.relatedTask?.taskId??o;return p&&c&&await c.updateTaskStatus(p,"input_required"),await this.request(l,d,f)},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:ee.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),$o(t))i(t);else{const a=new K(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($o(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),$o(t))n(t);else{const a=K.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 K?a:new K(ee.InternalError,String(a))}}return}let o;try{const a=await this.request(t,_o,i);if(a.task)o=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new K(ee.InternalError,"Task creation did not return a task");for(;;){const s=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:s},hn(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},r,i)}:s.status==="failed"?yield{type:"error",error:new K(ee.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new K(ee.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 K?a:new K(ee.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++,f={...t,jsonrpc:"2.0",id:m};i?.onprogress&&(this._progressHandlers.set(m,i.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:m}}),s&&(f.params={...f.params,task:s}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[pn]:c}});const p=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(I=>this._onerror(new Error(`Failed to send cancellation: ${I}`)));const _=g instanceof K?g:new K(ee.RequestTimeout,String(g));l(_)};this._responseHandlers.set(m,g=>{if(!i?.signal?.aborted){if(g instanceof Error)return l(g);try{const _=Cr(r,g.result);_.success?u(_.data):l(_.error)}catch(_){l(_)}}}),i?.signal?.addEventListener("abort",()=>{p(i?.signal?.reason)});const y=i?.timeout??JO,h=()=>p(K.fromError(ee.RequestTimeout,"Request timed out",{timeout:y}));this._setupTimeout(m,y,i?.maxTotalTimeout,h,i?.resetTimeoutOnProgress??!1);const $=c?.taskId;if($){const g=_=>{const I=this._responseHandlers.get(m);I?I(_):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))};this._requestResolvers.set(m,g),this._enqueueTaskMessage($,{type:"request",message:f,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(m),l(_)})}else this._transport.send(f,{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},cu,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},du,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},HI,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||{},[pn]: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||{},[pn]: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||{},[pn]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(t,r){const i=Gy(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(n,o)=>{const a=qy(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=Gy(t);this._notificationHandlers.set(i,n=>{const o=qy(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"&&ky(n.message)){const o=n.message.id,a=this._requestResolvers.get(o);a?(a(new K(ee.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 K(ee.InvalidRequest,"Request cancelled"));return}const a=setTimeout(n,i);r.addEventListener("abort",()=>{clearTimeout(a),o(new K(ee.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 K(ee.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=bo.parse({method:"notifications/tasks/status",params:s});await this.notification(c),hn(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 K(ee.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(hn(s.status))throw new K(ee.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=bo.parse({method:"notifications/tasks/status",params:c});await this.notification(u),hn(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>i.listTasks(n,r)}}}function Jy(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function HO(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];Jy(a)&&Jy(o)?r[n]={...a,...o}:r[n]=o}return r}function Ky(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pu={exports:{}},Hy={},Ft={},gn={},Nu={},ce={},Vr={};(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((_,I)=>`${_}${I}`,"")}get names(){var g;return(g=this._names)!==null&&g!==void 0?g:this._names=this._items.reduce((_,I)=>(I instanceof r&&(_[I.str]=(_[I.str]||0)+1),_),{})}}e._Code=i,e.nil=new i("");function n($,...g){const _=[$[0]];let I=0;for(;I<g.length;)s(_,g[I]),_.push($[++I]);return new i(_)}e._=n;const o=new i("+");function a($,...g){const _=[f($[0])];let I=0;for(;I<g.length;)_.push(o),s(_,g[I]),_.push(o,f($[++I]));return c(_),new i(_)}e.str=a;function s($,g){g instanceof i?$.push(...g._items):g instanceof r?$.push(g):$.push(d(g))}e.addCodeArg=s;function c($){let g=1;for(;g<$.length-1;){if($[g]===o){const _=u($[g-1],$[g+1]);if(_!==void 0){$.splice(g-1,3,_);continue}$[g++]="+"}g++}}function u($,g){if(g==='""')return $;if($==='""')return g;if(typeof $=="string")return g instanceof r||$[$.length-1]!=='"'?void 0:typeof g!="string"?`${$.slice(0,-1)}${g}"`:g[0]==='"'?$.slice(0,-1)+g.slice(1):void 0;if(typeof g=="string"&&g[0]==='"'&&!($ instanceof r))return`"${$}${g.slice(1)}`}function l($,g){return g.emptyStr()?$:$.emptyStr()?g:a`${$}${g}`}e.strConcat=l;function d($){return typeof $=="number"||typeof $=="boolean"||$===null?$:f(Array.isArray($)?$.join(","):$)}function m($){return new i(f($))}e.stringify=m;function f($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=f;function p($){return typeof $=="string"&&e.IDENTIFIER.test($)?new i(`.${$}`):n`[${$}]`}e.getProperty=p;function y($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new i(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=y;function h($){return new i($.toString())}e.regexpCode=h})(Vr);var Eu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Vr;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:f}=m,p=(d=l.key)!==null&&d!==void 0?d:l.ref;let y=this._values[f];if(y){const g=y.get(p);if(g)return g}else y=this._values[f]=new Map;y.set(p,m);const h=this._scope[f]||(this._scope[f]=[]),$=h.length;return h[$]=l.ref,m.setValue(l,{property:f,itemIndex:$}),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 f=t.nil;for(const p in u){const y=u[p];if(!y)continue;const h=d[p]=d[p]||new Map;y.forEach($=>{if(h.has($))return;h.set($,i.Started);let g=l($);if(g){const _=this.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,t._)`${f}${_} ${$} = ${g};${this.opts._n}`}else if(g=m?.($))f=(0,t._)`${f}${g}${this.opts._n}`;else throw new r($);h.set($,i.Completed)})}return f}}e.ValueScope=s})(Eu),(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=Vr,r=Eu;var i=Vr;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=Eu;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(v,b){return this}}class a extends o{constructor(v,b,P){super(),this.varKind=v,this.name=b,this.rhs=P}render({es5:v,_n:b}){const P=v?r.varKinds.var:this.varKind,G=this.rhs===void 0?"":` = ${this.rhs}`;return`${P} ${this.name}${G};`+b}optimizeNames(v,b){if(v[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,v,b)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends o{constructor(v,b,P){super(),this.lhs=v,this.rhs=b,this.sideEffects=P}render({_n:v}){return`${this.lhs} = ${this.rhs};`+v}optimizeNames(v,b){if(!(this.lhs instanceof t.Name&&!v[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,v,b),this}get names(){const v=this.lhs instanceof t.Name?{}:{...this.lhs.names};return Y(v,this.rhs)}}class c extends s{constructor(v,b,P,G){super(v,P,G),this.op=b}render({_n:v}){return`${this.lhs} ${this.op}= ${this.rhs};`+v}}class u extends o{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`${this.label}:`+v}}class l extends o{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`break${this.label?` ${this.label}`:""};`+v}}class d extends o{constructor(v){super(),this.error=v}render({_n:v}){return`throw ${this.error};`+v}get names(){return this.error.names}}class m extends o{constructor(v){super(),this.code=v}render({_n:v}){return`${this.code};`+v}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(v,b){return this.code=W(this.code,v,b),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends o{constructor(v=[]){super(),this.nodes=v}render(v){return this.nodes.reduce((b,P)=>b+P.render(v),"")}optimizeNodes(){const{nodes:v}=this;let b=v.length;for(;b--;){const P=v[b].optimizeNodes();Array.isArray(P)?v.splice(b,1,...P):P?v[b]=P:v.splice(b,1)}return v.length>0?this:void 0}optimizeNames(v,b){const{nodes:P}=this;let G=P.length;for(;G--;){const H=P[G];H.optimizeNames(v,b)||(Ce(v,H.names),P.splice(G,1))}return P.length>0?this:void 0}get names(){return this.nodes.reduce((v,b)=>Q(v,b.names),{})}}class p extends f{render(v){return"{"+v._n+super.render(v)+"}"+v._n}}class y extends f{}class h extends p{}h.kind="else";class $ extends p{constructor(v,b){super(b),this.condition=v}render(v){let b=`if(${this.condition})`+super.render(v);return this.else&&(b+="else "+this.else.render(v)),b}optimizeNodes(){super.optimizeNodes();const v=this.condition;if(v===!0)return this.nodes;let b=this.else;if(b){const P=b.optimizeNodes();b=this.else=Array.isArray(P)?new h(P):P}if(b)return v===!1?b instanceof $?b:b.nodes:this.nodes.length?this:new $(pt(v),b instanceof $?[b]:b.nodes);if(!(v===!1||!this.nodes.length))return this}optimizeNames(v,b){var P;if(this.else=(P=this.else)===null||P===void 0?void 0:P.optimizeNames(v,b),!!(super.optimizeNames(v,b)||this.else))return this.condition=W(this.condition,v,b),this}get names(){const v=super.names;return Y(v,this.condition),this.else&&Q(v,this.else.names),v}}$.kind="if";class g extends p{}g.kind="for";class _ extends g{constructor(v){super(),this.iteration=v}render(v){return`for(${this.iteration})`+super.render(v)}optimizeNames(v,b){if(super.optimizeNames(v,b))return this.iteration=W(this.iteration,v,b),this}get names(){return Q(super.names,this.iteration.names)}}class I extends g{constructor(v,b,P,G){super(),this.varKind=v,this.name=b,this.from=P,this.to=G}render(v){const b=v.es5?r.varKinds.var:this.varKind,{name:P,from:G,to:H}=this;return`for(${b} ${P}=${G}; ${P}<${H}; ${P}++)`+super.render(v)}get names(){const v=Y(super.names,this.from);return Y(v,this.to)}}class T extends g{constructor(v,b,P,G){super(),this.loop=v,this.varKind=b,this.name=P,this.iterable=G}render(v){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(v)}optimizeNames(v,b){if(super.optimizeNames(v,b))return this.iterable=W(this.iterable,v,b),this}get names(){return Q(super.names,this.iterable.names)}}class C extends p{constructor(v,b,P){super(),this.name=v,this.args=b,this.async=P}render(v){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(v)}}C.kind="func";class M extends f{render(v){return"return "+super.render(v)}}M.kind="return";class ue extends p{render(v){let b="try"+super.render(v);return this.catch&&(b+=this.catch.render(v)),this.finally&&(b+=this.finally.render(v)),b}optimizeNodes(){var v,b;return super.optimizeNodes(),(v=this.catch)===null||v===void 0||v.optimizeNodes(),(b=this.finally)===null||b===void 0||b.optimizeNodes(),this}optimizeNames(v,b){var P,G;return super.optimizeNames(v,b),(P=this.catch)===null||P===void 0||P.optimizeNames(v,b),(G=this.finally)===null||G===void 0||G.optimizeNames(v,b),this}get names(){const v=super.names;return this.catch&&Q(v,this.catch.names),this.finally&&Q(v,this.finally.names),v}}class fe extends p{constructor(v){super(),this.error=v}render(v){return`catch(${this.error})`+super.render(v)}}fe.kind="catch";class Ne extends p{render(v){return"finally"+super.render(v)}}Ne.kind="finally";class L{constructor(v,b={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...b,_n:b.lines?`
64
- `:""},this._extScope=v,this._scope=new r.Scope({parent:v}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(v){return this._scope.name(v)}scopeName(v){return this._extScope.name(v)}scopeValue(v,b){const P=this._extScope.value(v,b);return(this._values[P.prefix]||(this._values[P.prefix]=new Set)).add(P),P}getScopeValue(v,b){return this._extScope.getValue(v,b)}scopeRefs(v){return this._extScope.scopeRefs(v,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(v,b,P,G){const H=this._scope.toName(b);return P!==void 0&&G&&(this._constants[H.str]=P),this._leafNode(new a(v,H,P)),H}const(v,b,P){return this._def(r.varKinds.const,v,b,P)}let(v,b,P){return this._def(r.varKinds.let,v,b,P)}var(v,b,P){return this._def(r.varKinds.var,v,b,P)}assign(v,b,P){return this._leafNode(new s(v,b,P))}add(v,b){return this._leafNode(new c(v,e.operators.ADD,b))}code(v){return typeof v=="function"?v():v!==t.nil&&this._leafNode(new m(v)),this}object(...v){const b=["{"];for(const[P,G]of v)b.length>1&&b.push(","),b.push(P),(P!==G||this.opts.es5)&&(b.push(":"),(0,t.addCodeArg)(b,G));return b.push("}"),new t._Code(b)}if(v,b,P){if(this._blockNode(new $(v)),b&&P)this.code(b).else().code(P).endIf();else if(b)this.code(b).endIf();else if(P)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(v){return this._elseNode(new $(v))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode($,h)}_for(v,b){return this._blockNode(v),b&&this.code(b).endFor(),this}for(v,b){return this._for(new _(v),b)}forRange(v,b,P,G,H=this.opts.es5?r.varKinds.var:r.varKinds.let){const ye=this._scope.toName(v);return this._for(new I(H,ye,b,P),()=>G(ye))}forOf(v,b,P,G=r.varKinds.const){const H=this._scope.toName(v);if(this.opts.es5){const ye=b instanceof t.Name?b:this.var("_arr",b);return this.forRange("_i",0,(0,t._)`${ye}.length`,me=>{this.var(H,(0,t._)`${ye}[${me}]`),P(H)})}return this._for(new T("of",G,H,b),()=>P(H))}forIn(v,b,P,G=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(v,(0,t._)`Object.keys(${b})`,P);const H=this._scope.toName(v);return this._for(new T("in",G,H,b),()=>P(H))}endFor(){return this._endBlockNode(g)}label(v){return this._leafNode(new u(v))}break(v){return this._leafNode(new l(v))}return(v){const b=new M;if(this._blockNode(b),this.code(v),b.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}try(v,b,P){if(!b&&!P)throw new Error('CodeGen: "try" without "catch" and "finally"');const G=new ue;if(this._blockNode(G),this.code(v),b){const H=this.name("e");this._currNode=G.catch=new fe(H),b(H)}return P&&(this._currNode=G.finally=new Ne,this.code(P)),this._endBlockNode(fe,Ne)}throw(v){return this._leafNode(new d(v))}block(v,b){return this._blockStarts.push(this._nodes.length),v&&this.code(v).endBlock(b),this}endBlock(v){const b=this._blockStarts.pop();if(b===void 0)throw new Error("CodeGen: not in self-balancing block");const P=this._nodes.length-b;if(P<0||v!==void 0&&P!==v)throw new Error(`CodeGen: wrong number of nodes: ${P} vs ${v} expected`);return this._nodes.length=b,this}func(v,b=t.nil,P,G){return this._blockNode(new C(v,b,P)),G&&this.code(G).endFunc(),this}endFunc(){return this._endBlockNode(C)}optimize(v=1){for(;v-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(v){return this._currNode.nodes.push(v),this}_blockNode(v){this._currNode.nodes.push(v),this._nodes.push(v)}_endBlockNode(v,b){const P=this._currNode;if(P instanceof v||b&&P instanceof b)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${b?`${v.kind}/${b.kind}`:v.kind}"`)}_elseNode(v){const b=this._currNode;if(!(b instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=b.else=v,this}get _root(){return this._nodes[0]}get _currNode(){const v=this._nodes;return v[v.length-1]}set _currNode(v){const b=this._nodes;b[b.length-1]=v}}e.CodeGen=L;function Q(x,v){for(const b in v)x[b]=(x[b]||0)+(v[b]||0);return x}function Y(x,v){return v instanceof t._CodeOrName?Q(x,v.names):x}function W(x,v,b){if(x instanceof t.Name)return P(x);if(!G(x))return x;return new t._Code(x._items.reduce((H,ye)=>(ye instanceof t.Name&&(ye=P(ye)),ye instanceof t._Code?H.push(...ye._items):H.push(ye),H),[]));function P(H){const ye=b[H.str];return ye===void 0||v[H.str]!==1?H:(delete v[H.str],ye)}function G(H){return H instanceof t._Code&&H._items.some(ye=>ye instanceof t.Name&&v[ye.str]===1&&b[ye.str]!==void 0)}}function Ce(x,v){for(const b in v)x[b]=(x[b]||0)-(v[b]||0)}function pt(x){return typeof x=="boolean"||typeof x=="number"||x===null?!x:(0,t._)`!${j(x)}`}e.not=pt;const ht=O(e.operators.AND);function on(...x){return x.reduce(ht)}e.and=on;const Ut=O(e.operators.OR);function U(...x){return x.reduce(Ut)}e.or=U;function O(x){return(v,b)=>v===t.nil?b:b===t.nil?v:(0,t._)`${j(v)} ${x} ${j(b)}`}function j(x){return x instanceof t.Name?x:(0,t._)`(${x})`}})(ce);var B={};Object.defineProperty(B,"__esModule",{value:!0}),B.checkStrictMode=B.getErrorPath=B.Type=B.useFunc=B.setEvaluated=B.evaluatedPropsToName=B.mergeEvaluated=B.eachItem=B.unescapeJsonPointer=B.escapeJsonPointer=B.escapeFragment=B.unescapeFragment=B.schemaRefOrVal=B.schemaHasRulesButRef=B.schemaHasRules=B.checkUnknownRules=B.alwaysValidSchema=B.toHash=void 0;const xe=ce,WO=Vr;function XO(e){const t={};for(const r of e)t[r]=!0;return t}B.toHash=XO;function YO(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Wy(e,t),!Xy(t,e.self.RULES.all))}B.alwaysValidSchema=YO;function Wy(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]||nv(e,`unknown keyword: "${o}"`)}B.checkUnknownRules=Wy;function Xy(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}B.schemaHasRules=Xy;function QO(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}B.schemaHasRulesButRef=QO;function ez({topSchemaRef:e,schemaPath:t},r,i,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,xe._)`${r}`}return(0,xe._)`${e}${t}${(0,xe.getProperty)(i)}`}B.schemaRefOrVal=ez;function tz(e){return Yy(decodeURIComponent(e))}B.unescapeFragment=tz;function nz(e){return encodeURIComponent(Du(e))}B.escapeFragment=nz;function Du(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}B.escapeJsonPointer=Du;function Yy(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}B.unescapeJsonPointer=Yy;function rz(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}B.eachItem=rz;function Qy({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(n,o,a,s)=>{const c=a===void 0?o:a instanceof xe.Name?(o instanceof xe.Name?e(n,o,a):t(n,o,a),a):o instanceof xe.Name?(t(n,a,o),o):r(o,a);return s===xe.Name&&!(c instanceof xe.Name)?i(n,c):c}}B.mergeEvaluated={props:Qy({mergeNames:(e,t,r)=>e.if((0,xe._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,xe._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,xe._)`${r} || {}`).code((0,xe._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,xe._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,xe._)`${r} || {}`),ju(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:ev}),items:Qy({mergeNames:(e,t,r)=>e.if((0,xe._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,xe._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,xe._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,xe._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function ev(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,xe._)`{}`);return t!==void 0&&ju(e,r,t),r}B.evaluatedPropsToName=ev;function ju(e,t,r){Object.keys(r).forEach(i=>e.assign((0,xe._)`${t}${(0,xe.getProperty)(i)}`,!0))}B.setEvaluated=ju;const tv={};function iz(e,t){return e.scopeValue("func",{ref:t,code:tv[t.code]||(tv[t.code]=new WO._Code(t.code))})}B.useFunc=iz;var Cu;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Cu||(B.Type=Cu={}));function oz(e,t,r){if(e instanceof xe.Name){const i=t===Cu.Num;return r?i?(0,xe._)`"[" + ${e} + "]"`:(0,xe._)`"['" + ${e} + "']"`:i?(0,xe._)`"/" + ${e}`:(0,xe._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,xe.getProperty)(e).toString():"/"+Du(e)}B.getErrorPath=oz;function nv(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}B.checkStrictMode=nv;var zo={},rv;function Qt(){if(rv)return zo;rv=1,Object.defineProperty(zo,"__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 zo.default=t,zo}var iv;function xo(){return iv||(iv=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=B,i=Qt();e.keywordError={message:({keyword:h})=>(0,t.str)`must pass "${h}" keyword validation`},e.keyword$DataError={message:({keyword:h,schemaType:$})=>$?(0,t.str)`"${h}" keyword must be ${$} ($data)`:(0,t.str)`"${h}" keyword is invalid ($data)`};function n(h,$=e.keywordError,g,_){const{it:I}=h,{gen:T,compositeRule:C,allErrors:M}=I,ue=d(h,$,g);_??(C||M)?c(T,ue):u(I,(0,t._)`[${ue}]`)}e.reportError=n;function o(h,$=e.keywordError,g){const{it:_}=h,{gen:I,compositeRule:T,allErrors:C}=_,M=d(h,$,g);c(I,M),T||C||u(_,i.default.vErrors)}e.reportExtraError=o;function a(h,$){h.assign(i.default.errors,$),h.if((0,t._)`${i.default.vErrors} !== null`,()=>h.if($,()=>h.assign((0,t._)`${i.default.vErrors}.length`,$),()=>h.assign(i.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:h,keyword:$,schemaValue:g,data:_,errsCount:I,it:T}){if(I===void 0)throw new Error("ajv implementation error");const C=h.name("err");h.forRange("i",I,i.default.errors,M=>{h.const(C,(0,t._)`${i.default.vErrors}[${M}]`),h.if((0,t._)`${C}.instancePath === undefined`,()=>h.assign((0,t._)`${C}.instancePath`,(0,t.strConcat)(i.default.instancePath,T.errorPath))),h.assign((0,t._)`${C}.schemaPath`,(0,t.str)`${T.errSchemaPath}/${$}`),T.opts.verbose&&(h.assign((0,t._)`${C}.schema`,g),h.assign((0,t._)`${C}.data`,_))})}e.extendErrors=s;function c(h,$){const g=h.const("err",$);h.if((0,t._)`${i.default.vErrors} === null`,()=>h.assign(i.default.vErrors,(0,t._)`[${g}]`),(0,t._)`${i.default.vErrors}.push(${g})`),h.code((0,t._)`${i.default.errors}++`)}function u(h,$){const{gen:g,validateName:_,schemaEnv:I}=h;I.$async?g.throw((0,t._)`new ${h.ValidationError}(${$})`):(g.assign((0,t._)`${_}.errors`,$),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(h,$,g){const{createErrors:_}=h.it;return _===!1?(0,t._)`{}`:m(h,$,g)}function m(h,$,g={}){const{gen:_,it:I}=h,T=[f(I,g),p(h,g)];return y(h,$,T),_.object(...T)}function f({errorPath:h},{instancePath:$}){const g=$?(0,t.str)`${h}${(0,r.getErrorPath)($,r.Type.Str)}`:h;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,g)]}function p({keyword:h,it:{errSchemaPath:$}},{schemaPath:g,parentSchema:_}){let I=_?$:(0,t.str)`${$}/${h}`;return g&&(I=(0,t.str)`${I}${(0,r.getErrorPath)(g,r.Type.Str)}`),[l.schemaPath,I]}function y(h,{params:$,message:g},_){const{keyword:I,data:T,schemaValue:C,it:M}=h,{opts:ue,propertyName:fe,topSchemaRef:Ne,schemaPath:L}=M;_.push([l.keyword,I],[l.params,typeof $=="function"?$(h):$||(0,t._)`{}`]),ue.messages&&_.push([l.message,typeof g=="function"?g(h):g]),ue.verbose&&_.push([l.schema,C],[l.parentSchema,(0,t._)`${Ne}${L}`],[i.default.data,T]),fe&&_.push([l.propertyName,fe])}})(Nu)),Nu}var ov;function az(){if(ov)return gn;ov=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.boolOrEmptySchema=gn.topBoolOrEmptySchema=void 0;const e=xo(),t=ce,r=Qt(),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))}gn.topBoolOrEmptySchema=n;function o(s,c){const{gen:u,schema:l}=s;l===!1?(u.var(c,!1),a(s)):u.var(c,!0)}gn.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 gn}var Me={},yn={};Object.defineProperty(yn,"__esModule",{value:!0}),yn.getRules=yn.isJSONType=void 0;const sz=["string","number","integer","boolean","null","object","array"],cz=new Set(sz);function uz(e){return typeof e=="string"&&cz.has(e)}yn.isJSONType=uz;function lz(){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:{}}}yn.getRules=lz;var Vt={},av;function sv(){if(av)return Vt;av=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.shouldUseRule=Vt.shouldUseGroup=Vt.schemaHasRulesForType=void 0;function e({schema:i,self:n},o){const a=n.RULES.types[o];return a&&a!==!0&&t(i,a)}Vt.schemaHasRulesForType=e;function t(i,n){return n.rules.some(o=>r(i,o))}Vt.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 Vt.shouldUseRule=r,Vt}Object.defineProperty(Me,"__esModule",{value:!0}),Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;const dz=yn,fz=sv(),mz=xo(),oe=ce,cv=B;var Bn;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Bn||(Me.DataType=Bn={}));function pz(e){const t=uv(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}Me.getSchemaTypes=pz;function uv(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(dz.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Me.getJSONTypes=uv;function hz(e,t){const{gen:r,data:i,opts:n}=e,o=gz(t,n.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,fz.schemaHasRulesForType)(e,t[0]));if(a){const s=Uu(t,i,n.strictNumbers,Bn.Wrong);r.if(s,()=>{o.length?yz(e,t,o):Ru(e)})}return a}Me.coerceAndCheckDataType=hz;const lv=new Set(["string","number","integer","boolean","null"]);function gz(e,t){return t?e.filter(r=>lv.has(r)||t==="array"&&r==="array"):[]}function yz(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(Uu(t,n,o.strictNumbers),()=>i.assign(s,n))),i.if((0,oe._)`${s} !== undefined`);for(const u of r)(lv.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);i.else(),Ru(e),i.endIf(),i.if((0,oe._)`${s} !== undefined`,()=>{i.assign(n,s),vz(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
63
+ ]`;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 qy(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===re.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((i,n)=>({...i,[n]:_e(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??ut(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};const r={type:"object",additionalProperties:_e(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===re.ZodString&&e.keyType._def.checks?.length){const{type:i,...n}=Vy(e.keyType._def,t);return{...r,propertyNames:n}}else{if(e.keyType?._def.typeName===re.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===re.ZodBranded&&e.keyType._def.type._def.typeName===re.ZodString&&e.keyType._def.type._def.checks?.length){const{type:i,...n}=Ly(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function EO(e,t){if(t.mapStrategy==="record")return qy(e,t);const r=_e(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||ut(t),i=_e(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||ut(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,i],minItems:2,maxItems:2}}}function CO(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 DO(e){return e.target==="openAi"?void 0:{not:ut({...e,currentPath:[...e.currentPath,"not"]})}}function jO(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const zo={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function AO(e,t){if(t.target==="openApi3")return Jy(e,t);const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(i=>i._def.typeName in zo&&(!i._def.checks||!i._def.checks.length))){const i=r.reduce((n,o)=>{const a=zo[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 Jy(e,t)}const Jy=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((i,n)=>_e(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 UO(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:zo[e.innerType._def.typeName],nullable:!0}:{type:[zo[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const i=_e(e.innerType._def,{...t,currentPath:[...t.currentPath]});return i&&"$ref"in i?{allOf:[i],nullable:!0}:i&&{...i,nullable:!0}}const r=_e(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function RO(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",My(r,"type",i.message,t);break;case"min":t.target==="jsonSchema7"?i.inclusive?ke(r,"minimum",i.value,i.message,t):ke(r,"exclusiveMinimum",i.value,i.message,t):(i.inclusive||(r.exclusiveMinimum=!0),ke(r,"minimum",i.value,i.message,t));break;case"max":t.target==="jsonSchema7"?i.inclusive?ke(r,"maximum",i.value,i.message,t):ke(r,"exclusiveMaximum",i.value,i.message,t):(i.inclusive||(r.exclusiveMaximum=!0),ke(r,"maximum",i.value,i.message,t));break;case"multipleOf":ke(r,"multipleOf",i.value,i.message,t);break}return r}function BO(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=ZO(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);const l=_e(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=MO(e,t);return a!==void 0&&(i.additionalProperties=a),i}function MO(e,t){if(e.catchall._def.typeName!=="ZodNever")return _e(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 ZO(e){try{return e.isOptional()}catch{return!0}}const LO=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return _e(e.innerType._def,t);const r=_e(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:ut(t)},r]}:ut(t)},FO=(e,t)=>{if(t.pipeStrategy==="input")return _e(e.in._def,t);if(t.pipeStrategy==="output")return _e(e.out._def,t);const r=_e(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),i=_e(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,i].filter(n=>n!==void 0)}};function VO(e,t){return _e(e.type._def,t)}function GO(e,t){const i={type:"array",uniqueItems:!0,items:_e(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ke(i,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ke(i,"maxItems",e.maxSize.value,e.maxSize.message,t),i}function qO(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,i)=>_e(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[]),additionalItems:_e(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,i)=>_e(r._def,{...t,currentPath:[...t.currentPath,"items",`${i}`]})).reduce((r,i)=>i===void 0?r:[...r,i],[])}}function JO(e){return{not:ut(e)}}function KO(e){return ut(e)}const HO=(e,t)=>_e(e.innerType._def,t),WO=(e,t,r)=>{switch(t){case re.ZodString:return Vy(e,r);case re.ZodNumber:return RO(e,r);case re.ZodObject:return BO(e,r);case re.ZodBigInt:return _O(e,r);case re.ZodBoolean:return bO();case re.ZodDate:return Fy(e,r);case re.ZodUndefined:return JO(r);case re.ZodNull:return jO(r);case re.ZodArray:return $O(e,r);case re.ZodUnion:case re.ZodDiscriminatedUnion:return AO(e,r);case re.ZodIntersection:return xO(e,r);case re.ZodTuple:return qO(e,r);case re.ZodRecord:return qy(e,r);case re.ZodLiteral:return PO(e,r);case re.ZodEnum:return OO(e);case re.ZodNativeEnum:return CO(e);case re.ZodNullable:return UO(e,r);case re.ZodOptional:return LO(e,r);case re.ZodMap:return EO(e,r);case re.ZodSet:return GO(e,r);case re.ZodLazy:return()=>e.getter()._def;case re.ZodPromise:return VO(e,r);case re.ZodNaN:case re.ZodNever:return DO(r);case re.ZodEffects:return IO(e,r);case re.ZodAny:return ut(r);case re.ZodUnknown:return KO(r);case re.ZodDefault:return wO(e,r);case re.ZodBranded:return Ly(e,r);case re.ZodReadonly:return HO(e,r);case re.ZodCatch:return kO(e,r);case re.ZodPipeline:return FO(e,r);case re.ZodFunction:case re.ZodVoid:case re.ZodSymbol:return;default:return(i=>{})()}};function _e(e,t,r=!1){const i=t.seen.get(e);if(t.override){const s=t.override?.(e,t,i,r);if(s!==gO)return s}if(i&&!r){const s=YO(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=WO(e,e.typeName,t),a=typeof o=="function"?_e(o(),t):o;if(a&&XO(e,t,a),t.postProcess){const s=t.postProcess(a,e,t);return n.jsonSchema=a,s}return n.jsonSchema=a,a}const YO=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Zy(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`),ut(t)):t.$refStrategy==="seen"?ut(t):void 0}},XO=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r),QO=(e,t)=>{const r=vO(t);let i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:_e(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??ut(r)}),{}):void 0;const n=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=_e(e._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??ut(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 eT(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Ky(e,t){return Jt(e)?lc(e,{target:eT(t?.target),io:t?.pipeStrategy??"input"}):QO(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Hy(e){const r=Zr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=nu(r);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Wy(e,t){const r=Mr(e,t);if(!r.success)throw r.error;return r.data}const tT=6e4;class nT{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(su,r=>{this._oncancel(r)}),this.setNotificationHandler(uu,r=>{this._onprogress(r)}),this.setRequestHandler(cu,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(lu,async(r,i)=>{const n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new K(ee.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(fu,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 K(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 K(ee.InvalidParams,`Task not found: ${o}`);if(!_n(a.status))return await this._waitForTaskUpdate(o,i.signal),await n();if(_n(a.status)){const s=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o),{...s,_meta:{...s._meta,[$n]:{taskId:o}}}}return await n()};return await n()}),this.setRequestHandler(mu,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 K(ee.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(hu,async(r,i)=>{try{const n=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!n)throw new K(ee.InvalidParams,`Task not found: ${r.params.taskId}`);if(_n(n.status))throw new K(ee.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 K(ee.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...o}}catch(n){throw n instanceof K?n:new K(ee.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),K.fromError(ee.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),So(o)||MI(o)?this._onresponse(o):Oy(o)?this._onrequest(o,a):BI(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){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=K.fromError(ee.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?.[$n]?.taskId;if(i===void 0){const l={jsonrpc:"2.0",id:t.id,error:{code:ee.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=RI(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 K(ee.ConnectionClosed,"Request was cancelled");const f={...m,relatedRequestId:t.id};o&&!f.relatedTask&&(f.relatedTask={taskId:o});const p=f.relatedTask?.taskId??o;return p&&c&&await c.updateTaskStatus(p,"input_required"),await this.request(l,d,f)},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:ee.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),So(t))i(t);else{const a=new K(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(So(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),So(t))n(t);else{const a=K.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 K?a:new K(ee.InternalError,String(a))}}return}let o;try{const a=await this.request(t,wo,i);if(a.task)o=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new K(ee.InternalError,"Task creation did not return a task");for(;;){const s=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:s},_n(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},r,i)}:s.status==="failed"?yield{type:"error",error:new K(ee.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new K(ee.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 K?a:new K(ee.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++,f={...t,jsonrpc:"2.0",id:m};i?.onprogress&&(this._progressHandlers.set(m,i.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:m}}),s&&(f.params={...f.params,task:s}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[$n]:c}});const p=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(I=>this._onerror(new Error(`Failed to send cancellation: ${I}`)));const _=g instanceof K?g:new K(ee.RequestTimeout,String(g));l(_)};this._responseHandlers.set(m,g=>{if(!i?.signal?.aborted){if(g instanceof Error)return l(g);try{const _=Mr(r,g.result);_.success?u(_.data):l(_.error)}catch(_){l(_)}}}),i?.signal?.addEventListener("abort",()=>{p(i?.signal?.reason)});const y=i?.timeout??tT,h=()=>p(K.fromError(ee.RequestTimeout,"Request timed out",{timeout:y}));this._setupTimeout(m,y,i?.maxTotalTimeout,h,i?.resetTimeoutOnProgress??!1);const $=c?.taskId;if($){const g=_=>{const I=this._responseHandlers.get(m);I?I(_):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))};this._requestResolvers.set(m,g),this._enqueueTaskMessage($,{type:"request",message:f,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(m),l(_)})}else this._transport.send(f,{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},du,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},pu,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},r0,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||{},[$n]: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||{},[$n]: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||{},[$n]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(t,r){const i=Hy(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(n,o)=>{const a=Wy(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=Hy(t);this._notificationHandlers.set(i,n=>{const o=Wy(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"&&Oy(n.message)){const o=n.message.id,a=this._requestResolvers.get(o);a?(a(new K(ee.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 K(ee.InvalidRequest,"Request cancelled"));return}const a=setTimeout(n,i);r.addEventListener("abort",()=>{clearTimeout(a),o(new K(ee.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 K(ee.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=Io.parse({method:"notifications/tasks/status",params:s});await this.notification(c),_n(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 K(ee.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(_n(s.status))throw new K(ee.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=Io.parse({method:"notifications/tasks/status",params:c});await this.notification(u),_n(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>i.listTasks(n,r)}}}function Yy(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function rT(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];Yy(a)&&Yy(o)?r[n]={...a,...o}:r[n]=o}return r}function Xy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cu={exports:{}},Qy={},Kt={},bn={},Du={},ce={},Hr={};(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((_,I)=>`${_}${I}`,"")}get names(){var g;return(g=this._names)!==null&&g!==void 0?g:this._names=this._items.reduce((_,I)=>(I instanceof r&&(_[I.str]=(_[I.str]||0)+1),_),{})}}e._Code=i,e.nil=new i("");function n($,...g){const _=[$[0]];let I=0;for(;I<g.length;)s(_,g[I]),_.push($[++I]);return new i(_)}e._=n;const o=new i("+");function a($,...g){const _=[f($[0])];let I=0;for(;I<g.length;)_.push(o),s(_,g[I]),_.push(o,f($[++I]));return c(_),new i(_)}e.str=a;function s($,g){g instanceof i?$.push(...g._items):g instanceof r?$.push(g):$.push(d(g))}e.addCodeArg=s;function c($){let g=1;for(;g<$.length-1;){if($[g]===o){const _=u($[g-1],$[g+1]);if(_!==void 0){$.splice(g-1,3,_);continue}$[g++]="+"}g++}}function u($,g){if(g==='""')return $;if($==='""')return g;if(typeof $=="string")return g instanceof r||$[$.length-1]!=='"'?void 0:typeof g!="string"?`${$.slice(0,-1)}${g}"`:g[0]==='"'?$.slice(0,-1)+g.slice(1):void 0;if(typeof g=="string"&&g[0]==='"'&&!($ instanceof r))return`"${$}${g.slice(1)}`}function l($,g){return g.emptyStr()?$:$.emptyStr()?g:a`${$}${g}`}e.strConcat=l;function d($){return typeof $=="number"||typeof $=="boolean"||$===null?$:f(Array.isArray($)?$.join(","):$)}function m($){return new i(f($))}e.stringify=m;function f($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=f;function p($){return typeof $=="string"&&e.IDENTIFIER.test($)?new i(`.${$}`):n`[${$}]`}e.getProperty=p;function y($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new i(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=y;function h($){return new i($.toString())}e.regexpCode=h})(Hr);var ju={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Hr;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:f}=m,p=(d=l.key)!==null&&d!==void 0?d:l.ref;let y=this._values[f];if(y){const g=y.get(p);if(g)return g}else y=this._values[f]=new Map;y.set(p,m);const h=this._scope[f]||(this._scope[f]=[]),$=h.length;return h[$]=l.ref,m.setValue(l,{property:f,itemIndex:$}),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 f=t.nil;for(const p in u){const y=u[p];if(!y)continue;const h=d[p]=d[p]||new Map;y.forEach($=>{if(h.has($))return;h.set($,i.Started);let g=l($);if(g){const _=this.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,t._)`${f}${_} ${$} = ${g};${this.opts._n}`}else if(g=m?.($))f=(0,t._)`${f}${g}${this.opts._n}`;else throw new r($);h.set($,i.Completed)})}return f}}e.ValueScope=s})(ju),(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=Hr,r=ju;var i=Hr;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=ju;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(v,b){return this}}class a extends o{constructor(v,b,z){super(),this.varKind=v,this.name=b,this.rhs=z}render({es5:v,_n:b}){const z=v?r.varKinds.var:this.varKind,G=this.rhs===void 0?"":` = ${this.rhs}`;return`${z} ${this.name}${G};`+b}optimizeNames(v,b){if(v[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,v,b)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends o{constructor(v,b,z){super(),this.lhs=v,this.rhs=b,this.sideEffects=z}render({_n:v}){return`${this.lhs} = ${this.rhs};`+v}optimizeNames(v,b){if(!(this.lhs instanceof t.Name&&!v[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,v,b),this}get names(){const v=this.lhs instanceof t.Name?{}:{...this.lhs.names};return X(v,this.rhs)}}class c extends s{constructor(v,b,z,G){super(v,z,G),this.op=b}render({_n:v}){return`${this.lhs} ${this.op}= ${this.rhs};`+v}}class u extends o{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`${this.label}:`+v}}class l extends o{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`break${this.label?` ${this.label}`:""};`+v}}class d extends o{constructor(v){super(),this.error=v}render({_n:v}){return`throw ${this.error};`+v}get names(){return this.error.names}}class m extends o{constructor(v){super(),this.code=v}render({_n:v}){return`${this.code};`+v}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(v,b){return this.code=W(this.code,v,b),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends o{constructor(v=[]){super(),this.nodes=v}render(v){return this.nodes.reduce((b,z)=>b+z.render(v),"")}optimizeNodes(){const{nodes:v}=this;let b=v.length;for(;b--;){const z=v[b].optimizeNodes();Array.isArray(z)?v.splice(b,1,...z):z?v[b]=z:v.splice(b,1)}return v.length>0?this:void 0}optimizeNames(v,b){const{nodes:z}=this;let G=z.length;for(;G--;){const H=z[G];H.optimizeNames(v,b)||(Re(v,H.names),z.splice(G,1))}return z.length>0?this:void 0}get names(){return this.nodes.reduce((v,b)=>Q(v,b.names),{})}}class p extends f{render(v){return"{"+v._n+super.render(v)+"}"+v._n}}class y extends f{}class h extends p{}h.kind="else";class $ extends p{constructor(v,b){super(b),this.condition=v}render(v){let b=`if(${this.condition})`+super.render(v);return this.else&&(b+="else "+this.else.render(v)),b}optimizeNodes(){super.optimizeNodes();const v=this.condition;if(v===!0)return this.nodes;let b=this.else;if(b){const z=b.optimizeNodes();b=this.else=Array.isArray(z)?new h(z):z}if(b)return v===!1?b instanceof $?b:b.nodes:this.nodes.length?this:new $(vt(v),b instanceof $?[b]:b.nodes);if(!(v===!1||!this.nodes.length))return this}optimizeNames(v,b){var z;if(this.else=(z=this.else)===null||z===void 0?void 0:z.optimizeNames(v,b),!!(super.optimizeNames(v,b)||this.else))return this.condition=W(this.condition,v,b),this}get names(){const v=super.names;return X(v,this.condition),this.else&&Q(v,this.else.names),v}}$.kind="if";class g extends p{}g.kind="for";class _ extends g{constructor(v){super(),this.iteration=v}render(v){return`for(${this.iteration})`+super.render(v)}optimizeNames(v,b){if(super.optimizeNames(v,b))return this.iteration=W(this.iteration,v,b),this}get names(){return Q(super.names,this.iteration.names)}}class I extends g{constructor(v,b,z,G){super(),this.varKind=v,this.name=b,this.from=z,this.to=G}render(v){const b=v.es5?r.varKinds.var:this.varKind,{name:z,from:G,to:H}=this;return`for(${b} ${z}=${G}; ${z}<${H}; ${z}++)`+super.render(v)}get names(){const v=X(super.names,this.from);return X(v,this.to)}}class P extends g{constructor(v,b,z,G){super(),this.loop=v,this.varKind=b,this.name=z,this.iterable=G}render(v){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(v)}optimizeNames(v,b){if(super.optimizeNames(v,b))return this.iterable=W(this.iterable,v,b),this}get names(){return Q(super.names,this.iterable.names)}}class j extends p{constructor(v,b,z){super(),this.name=v,this.args=b,this.async=z}render(v){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(v)}}j.kind="func";class M extends f{render(v){return"return "+super.render(v)}}M.kind="return";class le extends p{render(v){let b="try"+super.render(v);return this.catch&&(b+=this.catch.render(v)),this.finally&&(b+=this.finally.render(v)),b}optimizeNodes(){var v,b;return super.optimizeNodes(),(v=this.catch)===null||v===void 0||v.optimizeNodes(),(b=this.finally)===null||b===void 0||b.optimizeNodes(),this}optimizeNames(v,b){var z,G;return super.optimizeNames(v,b),(z=this.catch)===null||z===void 0||z.optimizeNames(v,b),(G=this.finally)===null||G===void 0||G.optimizeNames(v,b),this}get names(){const v=super.names;return this.catch&&Q(v,this.catch.names),this.finally&&Q(v,this.finally.names),v}}class pe extends p{constructor(v){super(),this.error=v}render(v){return`catch(${this.error})`+super.render(v)}}pe.kind="catch";class Ne extends p{render(v){return"finally"+super.render(v)}}Ne.kind="finally";class L{constructor(v,b={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...b,_n:b.lines?`
64
+ `:""},this._extScope=v,this._scope=new r.Scope({parent:v}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(v){return this._scope.name(v)}scopeName(v){return this._extScope.name(v)}scopeValue(v,b){const z=this._extScope.value(v,b);return(this._values[z.prefix]||(this._values[z.prefix]=new Set)).add(z),z}getScopeValue(v,b){return this._extScope.getValue(v,b)}scopeRefs(v){return this._extScope.scopeRefs(v,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(v,b,z,G){const H=this._scope.toName(b);return z!==void 0&&G&&(this._constants[H.str]=z),this._leafNode(new a(v,H,z)),H}const(v,b,z){return this._def(r.varKinds.const,v,b,z)}let(v,b,z){return this._def(r.varKinds.let,v,b,z)}var(v,b,z){return this._def(r.varKinds.var,v,b,z)}assign(v,b,z){return this._leafNode(new s(v,b,z))}add(v,b){return this._leafNode(new c(v,e.operators.ADD,b))}code(v){return typeof v=="function"?v():v!==t.nil&&this._leafNode(new m(v)),this}object(...v){const b=["{"];for(const[z,G]of v)b.length>1&&b.push(","),b.push(z),(z!==G||this.opts.es5)&&(b.push(":"),(0,t.addCodeArg)(b,G));return b.push("}"),new t._Code(b)}if(v,b,z){if(this._blockNode(new $(v)),b&&z)this.code(b).else().code(z).endIf();else if(b)this.code(b).endIf();else if(z)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(v){return this._elseNode(new $(v))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode($,h)}_for(v,b){return this._blockNode(v),b&&this.code(b).endFor(),this}for(v,b){return this._for(new _(v),b)}forRange(v,b,z,G,H=this.opts.es5?r.varKinds.var:r.varKinds.let){const ve=this._scope.toName(v);return this._for(new I(H,ve,b,z),()=>G(ve))}forOf(v,b,z,G=r.varKinds.const){const H=this._scope.toName(v);if(this.opts.es5){const ve=b instanceof t.Name?b:this.var("_arr",b);return this.forRange("_i",0,(0,t._)`${ve}.length`,he=>{this.var(H,(0,t._)`${ve}[${he}]`),z(H)})}return this._for(new P("of",G,H,b),()=>z(H))}forIn(v,b,z,G=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(v,(0,t._)`Object.keys(${b})`,z);const H=this._scope.toName(v);return this._for(new P("in",G,H,b),()=>z(H))}endFor(){return this._endBlockNode(g)}label(v){return this._leafNode(new u(v))}break(v){return this._leafNode(new l(v))}return(v){const b=new M;if(this._blockNode(b),this.code(v),b.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}try(v,b,z){if(!b&&!z)throw new Error('CodeGen: "try" without "catch" and "finally"');const G=new le;if(this._blockNode(G),this.code(v),b){const H=this.name("e");this._currNode=G.catch=new pe(H),b(H)}return z&&(this._currNode=G.finally=new Ne,this.code(z)),this._endBlockNode(pe,Ne)}throw(v){return this._leafNode(new d(v))}block(v,b){return this._blockStarts.push(this._nodes.length),v&&this.code(v).endBlock(b),this}endBlock(v){const b=this._blockStarts.pop();if(b===void 0)throw new Error("CodeGen: not in self-balancing block");const z=this._nodes.length-b;if(z<0||v!==void 0&&z!==v)throw new Error(`CodeGen: wrong number of nodes: ${z} vs ${v} expected`);return this._nodes.length=b,this}func(v,b=t.nil,z,G){return this._blockNode(new j(v,b,z)),G&&this.code(G).endFunc(),this}endFunc(){return this._endBlockNode(j)}optimize(v=1){for(;v-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(v){return this._currNode.nodes.push(v),this}_blockNode(v){this._currNode.nodes.push(v),this._nodes.push(v)}_endBlockNode(v,b){const z=this._currNode;if(z instanceof v||b&&z instanceof b)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${b?`${v.kind}/${b.kind}`:v.kind}"`)}_elseNode(v){const b=this._currNode;if(!(b instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=b.else=v,this}get _root(){return this._nodes[0]}get _currNode(){const v=this._nodes;return v[v.length-1]}set _currNode(v){const b=this._nodes;b[b.length-1]=v}}e.CodeGen=L;function Q(x,v){for(const b in v)x[b]=(x[b]||0)+(v[b]||0);return x}function X(x,v){return v instanceof t._CodeOrName?Q(x,v.names):x}function W(x,v,b){if(x instanceof t.Name)return z(x);if(!G(x))return x;return new t._Code(x._items.reduce((H,ve)=>(ve instanceof t.Name&&(ve=z(ve)),ve instanceof t._Code?H.push(...ve._items):H.push(ve),H),[]));function z(H){const ve=b[H.str];return ve===void 0||v[H.str]!==1?H:(delete v[H.str],ve)}function G(H){return H instanceof t._Code&&H._items.some(ve=>ve instanceof t.Name&&v[ve.str]===1&&b[ve.str]!==void 0)}}function Re(x,v){for(const b in v)x[b]=(x[b]||0)-(v[b]||0)}function vt(x){return typeof x=="boolean"||typeof x=="number"||x===null?!x:(0,t._)`!${D(x)}`}e.not=vt;const $t=O(e.operators.AND);function ln(...x){return x.reduce($t)}e.and=ln;const Lt=O(e.operators.OR);function U(...x){return x.reduce(Lt)}e.or=U;function O(x){return(v,b)=>v===t.nil?b:b===t.nil?v:(0,t._)`${D(v)} ${x} ${D(b)}`}function D(x){return x instanceof t.Name?x:(0,t._)`(${x})`}})(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 Pe=ce,iT=Hr;function oT(e){const t={};for(const r of e)t[r]=!0;return t}Z.toHash=oT;function aT(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(ev(e,t),!tv(t,e.self.RULES.all))}Z.alwaysValidSchema=aT;function ev(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]||av(e,`unknown keyword: "${o}"`)}Z.checkUnknownRules=ev;function tv(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}Z.schemaHasRules=tv;function sT(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=sT;function cT({topSchemaRef:e,schemaPath:t},r,i,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Pe._)`${r}`}return(0,Pe._)`${e}${t}${(0,Pe.getProperty)(i)}`}Z.schemaRefOrVal=cT;function uT(e){return nv(decodeURIComponent(e))}Z.unescapeFragment=uT;function lT(e){return encodeURIComponent(Au(e))}Z.escapeFragment=lT;function Au(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Z.escapeJsonPointer=Au;function nv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Z.unescapeJsonPointer=nv;function dT(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}Z.eachItem=dT;function rv({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(n,o,a,s)=>{const c=a===void 0?o:a instanceof Pe.Name?(o instanceof Pe.Name?e(n,o,a):t(n,o,a),a):o instanceof Pe.Name?(t(n,a,o),o):r(o,a);return s===Pe.Name&&!(c instanceof Pe.Name)?i(n,c):c}}Z.mergeEvaluated={props:rv({mergeNames:(e,t,r)=>e.if((0,Pe._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Pe._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Pe._)`${r} || {}`).code((0,Pe._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Pe._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Pe._)`${r} || {}`),Uu(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:iv}),items:rv({mergeNames:(e,t,r)=>e.if((0,Pe._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Pe._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Pe._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Pe._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function iv(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,Pe._)`{}`);return t!==void 0&&Uu(e,r,t),r}Z.evaluatedPropsToName=iv;function Uu(e,t,r){Object.keys(r).forEach(i=>e.assign((0,Pe._)`${t}${(0,Pe.getProperty)(i)}`,!0))}Z.setEvaluated=Uu;const ov={};function fT(e,t){return e.scopeValue("func",{ref:t,code:ov[t.code]||(ov[t.code]=new iT._Code(t.code))})}Z.useFunc=fT;var Ru;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ru||(Z.Type=Ru={}));function mT(e,t,r){if(e instanceof Pe.Name){const i=t===Ru.Num;return r?i?(0,Pe._)`"[" + ${e} + "]"`:(0,Pe._)`"['" + ${e} + "']"`:i?(0,Pe._)`"/" + ${e}`:(0,Pe._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Pe.getProperty)(e).toString():"/"+Au(e)}Z.getErrorPath=mT;function av(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=av;var No={},sv;function on(){if(sv)return No;sv=1,Object.defineProperty(No,"__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 No.default=t,No}var cv;function Eo(){return cv||(cv=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=on();e.keywordError={message:({keyword:h})=>(0,t.str)`must pass "${h}" keyword validation`},e.keyword$DataError={message:({keyword:h,schemaType:$})=>$?(0,t.str)`"${h}" keyword must be ${$} ($data)`:(0,t.str)`"${h}" keyword is invalid ($data)`};function n(h,$=e.keywordError,g,_){const{it:I}=h,{gen:P,compositeRule:j,allErrors:M}=I,le=d(h,$,g);_??(j||M)?c(P,le):u(I,(0,t._)`[${le}]`)}e.reportError=n;function o(h,$=e.keywordError,g){const{it:_}=h,{gen:I,compositeRule:P,allErrors:j}=_,M=d(h,$,g);c(I,M),P||j||u(_,i.default.vErrors)}e.reportExtraError=o;function a(h,$){h.assign(i.default.errors,$),h.if((0,t._)`${i.default.vErrors} !== null`,()=>h.if($,()=>h.assign((0,t._)`${i.default.vErrors}.length`,$),()=>h.assign(i.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:h,keyword:$,schemaValue:g,data:_,errsCount:I,it:P}){if(I===void 0)throw new Error("ajv implementation error");const j=h.name("err");h.forRange("i",I,i.default.errors,M=>{h.const(j,(0,t._)`${i.default.vErrors}[${M}]`),h.if((0,t._)`${j}.instancePath === undefined`,()=>h.assign((0,t._)`${j}.instancePath`,(0,t.strConcat)(i.default.instancePath,P.errorPath))),h.assign((0,t._)`${j}.schemaPath`,(0,t.str)`${P.errSchemaPath}/${$}`),P.opts.verbose&&(h.assign((0,t._)`${j}.schema`,g),h.assign((0,t._)`${j}.data`,_))})}e.extendErrors=s;function c(h,$){const g=h.const("err",$);h.if((0,t._)`${i.default.vErrors} === null`,()=>h.assign(i.default.vErrors,(0,t._)`[${g}]`),(0,t._)`${i.default.vErrors}.push(${g})`),h.code((0,t._)`${i.default.errors}++`)}function u(h,$){const{gen:g,validateName:_,schemaEnv:I}=h;I.$async?g.throw((0,t._)`new ${h.ValidationError}(${$})`):(g.assign((0,t._)`${_}.errors`,$),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(h,$,g){const{createErrors:_}=h.it;return _===!1?(0,t._)`{}`:m(h,$,g)}function m(h,$,g={}){const{gen:_,it:I}=h,P=[f(I,g),p(h,g)];return y(h,$,P),_.object(...P)}function f({errorPath:h},{instancePath:$}){const g=$?(0,t.str)`${h}${(0,r.getErrorPath)($,r.Type.Str)}`:h;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,g)]}function p({keyword:h,it:{errSchemaPath:$}},{schemaPath:g,parentSchema:_}){let I=_?$:(0,t.str)`${$}/${h}`;return g&&(I=(0,t.str)`${I}${(0,r.getErrorPath)(g,r.Type.Str)}`),[l.schemaPath,I]}function y(h,{params:$,message:g},_){const{keyword:I,data:P,schemaValue:j,it:M}=h,{opts:le,propertyName:pe,topSchemaRef:Ne,schemaPath:L}=M;_.push([l.keyword,I],[l.params,typeof $=="function"?$(h):$||(0,t._)`{}`]),le.messages&&_.push([l.message,typeof g=="function"?g(h):g]),le.verbose&&_.push([l.schema,j],[l.parentSchema,(0,t._)`${Ne}${L}`],[i.default.data,P]),pe&&_.push([l.propertyName,pe])}})(Du)),Du}var uv;function pT(){if(uv)return bn;uv=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.boolOrEmptySchema=bn.topBoolOrEmptySchema=void 0;const e=Eo(),t=ce,r=on(),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))}bn.topBoolOrEmptySchema=n;function o(s,c){const{gen:u,schema:l}=s;l===!1?(u.var(c,!1),a(s)):u.var(c,!0)}bn.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 bn}var Fe={},kn={};Object.defineProperty(kn,"__esModule",{value:!0}),kn.getRules=kn.isJSONType=void 0;const hT=["string","number","integer","boolean","null","object","array"],gT=new Set(hT);function yT(e){return typeof e=="string"&&gT.has(e)}kn.isJSONType=yT;function vT(){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:{}}}kn.getRules=vT;var Ht={},lv;function dv(){if(lv)return Ht;lv=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.shouldUseRule=Ht.shouldUseGroup=Ht.schemaHasRulesForType=void 0;function e({schema:i,self:n},o){const a=n.RULES.types[o];return a&&a!==!0&&t(i,a)}Ht.schemaHasRulesForType=e;function t(i,n){return n.rules.some(o=>r(i,o))}Ht.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 Ht.shouldUseRule=r,Ht}Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.reportTypeError=Fe.checkDataTypes=Fe.checkDataType=Fe.coerceAndCheckDataType=Fe.getJSONTypes=Fe.getSchemaTypes=Fe.DataType=void 0;const $T=kn,_T=dv(),bT=Eo(),oe=ce,fv=Z;var qn;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(qn||(Fe.DataType=qn={}));function kT(e){const t=mv(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}Fe.getSchemaTypes=kT;function mv(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every($T.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Fe.getJSONTypes=mv;function ST(e,t){const{gen:r,data:i,opts:n}=e,o=wT(t,n.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,_T.schemaHasRulesForType)(e,t[0]));if(a){const s=Mu(t,i,n.strictNumbers,qn.Wrong);r.if(s,()=>{o.length?IT(e,t,o):Zu(e)})}return a}Fe.coerceAndCheckDataType=ST;const pv=new Set(["string","number","integer","boolean","null"]);function wT(e,t){return t?e.filter(r=>pv.has(r)||t==="array"&&r==="array"):[]}function IT(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(Mu(t,n,o.strictNumbers),()=>i.assign(s,n))),i.if((0,oe._)`${s} !== undefined`);for(const u of r)(pv.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);i.else(),Zu(e),i.endIf(),i.if((0,oe._)`${s} !== undefined`,()=>{i.assign(n,s),OT(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
65
65
  || (${a} == "string" && ${n} && ${n} == +${n})`).assign(s,(0,oe._)`+${n}`);return;case"integer":i.elseIf((0,oe._)`${a} === "boolean" || ${n} === null
66
66
  || (${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"
67
- || ${a} === "boolean" || ${n} === null`).assign(s,(0,oe._)`[${n}]`)}}}function vz({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,oe._)`${t} !== undefined`,()=>e.assign((0,oe._)`${t}[${r}]`,i))}function Au(e,t,r,i=Bn.Correct){const n=i===Bn.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===Bn.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)}}Me.checkDataType=Au;function Uu(e,t,r,i){if(e.length===1)return Au(e[0],t,r,i);let n;const o=(0,cv.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,Au(a,t,r,i));return n}Me.checkDataTypes=Uu;const $z={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,oe._)`{type: ${e}}`:(0,oe._)`{type: ${t}}`};function Ru(e){const t=_z(e);(0,mz.reportError)(t,$z)}Me.reportTypeError=Ru;function _z(e){const{gen:t,data:r,schema:i}=e,n=(0,cv.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}var Gr={},dv;function bz(){if(dv)return Gr;dv=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.assignDefaults=void 0;const e=ce,t=B;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))}Gr.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 Gr}var Pt={},ke={},fv;function Nt(){if(fv)return ke;fv=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateUnion=ke.validateArray=ke.usePattern=ke.callValidateCode=ke.schemaProperties=ke.allSchemaProperties=ke.noPropertyInData=ke.propertyInData=ke.isOwnProperty=ke.hasPropFunc=ke.reportMissingProp=ke.checkMissingProp=ke.checkReportMissingProp=void 0;const e=ce,t=B,r=Qt(),i=B;function n(g,_){const{gen:I,data:T,it:C}=g;I.if(l(I,T,_,C.opts.ownProperties),()=>{g.setParams({missingProperty:(0,e._)`${_}`},!0),g.error()})}ke.checkReportMissingProp=n;function o({gen:g,data:_,it:{opts:I}},T,C){return(0,e.or)(...T.map(M=>(0,e.and)(l(g,_,M,I.ownProperties),(0,e._)`${C} = ${M}`)))}ke.checkMissingProp=o;function a(g,_){g.setParams({missingProperty:_},!0),g.error()}ke.reportMissingProp=a;function s(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ke.hasPropFunc=s;function c(g,_,I){return(0,e._)`${s(g)}.call(${_}, ${I})`}ke.isOwnProperty=c;function u(g,_,I,T){const C=(0,e._)`${_}${(0,e.getProperty)(I)} !== undefined`;return T?(0,e._)`${C} && ${c(g,_,I)}`:C}ke.propertyInData=u;function l(g,_,I,T){const C=(0,e._)`${_}${(0,e.getProperty)(I)} === undefined`;return T?(0,e.or)(C,(0,e.not)(c(g,_,I))):C}ke.noPropertyInData=l;function d(g){return g?Object.keys(g).filter(_=>_!=="__proto__"):[]}ke.allSchemaProperties=d;function m(g,_){return d(_).filter(I=>!(0,t.alwaysValidSchema)(g,_[I]))}ke.schemaProperties=m;function f({schemaCode:g,data:_,it:{gen:I,topSchemaRef:T,schemaPath:C,errorPath:M},it:ue},fe,Ne,L){const Q=L?(0,e._)`${g}, ${_}, ${T}${C}`:_,Y=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,M)],[r.default.parentData,ue.parentData],[r.default.parentDataProperty,ue.parentDataProperty],[r.default.rootData,r.default.rootData]];ue.opts.dynamicRef&&Y.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const W=(0,e._)`${Q}, ${I.object(...Y)}`;return Ne!==e.nil?(0,e._)`${fe}.call(${Ne}, ${W})`:(0,e._)`${fe}(${W})`}ke.callValidateCode=f;const p=(0,e._)`new RegExp`;function y({gen:g,it:{opts:_}},I){const T=_.unicodeRegExp?"u":"",{regExp:C}=_.code,M=C(I,T);return g.scopeValue("pattern",{key:M.toString(),ref:M,code:(0,e._)`${C.code==="new RegExp"?p:(0,i.useFunc)(g,C)}(${I}, ${T})`})}ke.usePattern=y;function h(g){const{gen:_,data:I,keyword:T,it:C}=g,M=_.name("valid");if(C.allErrors){const fe=_.let("valid",!0);return ue(()=>_.assign(fe,!1)),fe}return _.var(M,!0),ue(()=>_.break()),M;function ue(fe){const Ne=_.const("len",(0,e._)`${I}.length`);_.forRange("i",0,Ne,L=>{g.subschema({keyword:T,dataProp:L,dataPropType:t.Type.Num},M),_.if((0,e.not)(M),fe)})}}ke.validateArray=h;function $(g){const{gen:_,schema:I,keyword:T,it:C}=g;if(!Array.isArray(I))throw new Error("ajv implementation error");if(I.some(Ne=>(0,t.alwaysValidSchema)(C,Ne))&&!C.opts.unevaluated)return;const ue=_.let("valid",!1),fe=_.name("_valid");_.block(()=>I.forEach((Ne,L)=>{const Q=g.subschema({keyword:T,schemaProp:L,compositeRule:!0},fe);_.assign(ue,(0,e._)`${ue} || ${fe}`),g.mergeValidEvaluated(Q,fe)||_.if((0,e.not)(ue))})),g.result(ue,()=>g.reset(),()=>g.error(!0))}return ke.validateUnion=$,ke}var mv;function kz(){if(mv)return Pt;mv=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.validateKeywordUsage=Pt.validSchemaType=Pt.funcKeywordCode=Pt.macroKeywordCode=void 0;const e=ce,t=Qt(),r=Nt(),i=xo();function n(m,f){const{gen:p,keyword:y,schema:h,parentSchema:$,it:g}=m,_=f.macro.call(g.self,h,$,g),I=u(p,y,_);g.opts.validateSchema!==!1&&g.self.validateSchema(_,!0);const T=p.name("valid");m.subschema({schema:_,schemaPath:e.nil,errSchemaPath:`${g.errSchemaPath}/${y}`,topSchemaRef:I,compositeRule:!0},T),m.pass(T,()=>m.error(!0))}Pt.macroKeywordCode=n;function o(m,f){var p;const{gen:y,keyword:h,schema:$,parentSchema:g,$data:_,it:I}=m;c(I,f);const T=!_&&f.compile?f.compile.call(I.self,$,g,I):f.validate,C=u(y,h,T),M=y.let("valid");m.block$data(M,ue),m.ok((p=f.valid)!==null&&p!==void 0?p:M);function ue(){if(f.errors===!1)L(),f.modifying&&a(m),Q(()=>m.error());else{const Y=f.async?fe():Ne();f.modifying&&a(m),Q(()=>s(m,Y))}}function fe(){const Y=y.let("ruleErrs",null);return y.try(()=>L((0,e._)`await `),W=>y.assign(M,!1).if((0,e._)`${W} instanceof ${I.ValidationError}`,()=>y.assign(Y,(0,e._)`${W}.errors`),()=>y.throw(W))),Y}function Ne(){const Y=(0,e._)`${C}.errors`;return y.assign(Y,null),L(e.nil),Y}function L(Y=f.async?(0,e._)`await `:e.nil){const W=I.opts.passContext?t.default.this:t.default.self,Ce=!("compile"in f&&!_||f.schema===!1);y.assign(M,(0,e._)`${Y}${(0,r.callValidateCode)(m,C,W,Ce)}`,f.modifying)}function Q(Y){var W;y.if((0,e.not)((W=f.valid)!==null&&W!==void 0?W:M),Y)}}Pt.funcKeywordCode=o;function a(m){const{gen:f,data:p,it:y}=m;f.if(y.parentData,()=>f.assign(p,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function s(m,f){const{gen:p}=m;p.if((0,e._)`Array.isArray(${f})`,()=>{p.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${f} : ${t.default.vErrors}.concat(${f})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},f){if(f.async&&!m.$async)throw new Error("async keyword in sync schema")}function u(m,f,p){if(p===void 0)throw new Error(`keyword "${f}" failed to compile`);return m.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0,e.stringify)(p)})}function l(m,f,p=!1){return!f.length||f.some(y=>y==="array"?Array.isArray(m):y==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==y||p&&typeof m>"u")}Pt.validSchemaType=l;function d({schema:m,opts:f,self:p,errSchemaPath:y},h,$){if(Array.isArray(h.keyword)?!h.keyword.includes($):h.keyword!==$)throw new Error("ajv implementation error");const g=h.dependencies;if(g?.some(_=>!Object.prototype.hasOwnProperty.call(m,_)))throw new Error(`parent schema must have dependencies of ${$}: ${g.join(",")}`);if(h.validateSchema&&!h.validateSchema(m[$])){const I=`keyword "${$}" value is invalid at path "${y}": `+p.errorsText(h.validateSchema.errors);if(f.validateSchema==="log")p.logger.error(I);else throw new Error(I)}}return Pt.validateKeywordUsage=d,Pt}var Gt={},pv;function wz(){if(pv)return Gt;pv=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.extendSubschemaMode=Gt.extendSubschemaData=Gt.getSubschema=void 0;const e=ce,t=B;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')}Gt.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:p,dataPathArr:y,opts:h}=a,$=m.let("data",(0,e._)`${a.data}${(0,e.getProperty)(s)}`,!0);f($),o.errorPath=(0,e.str)`${p}${(0,t.getErrorPath)(s,c,h.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${s}`,o.dataPathArr=[...y,o.parentDataProperty]}if(u!==void 0){const p=u instanceof e.Name?u:m.let("data",u,!0);f(p),d!==void 0&&(o.propertyName=d)}l&&(o.dataTypes=l);function f(p){o.data=p,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,p]}}Gt.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 Gt.extendSubschemaMode=n,Gt}var Je={},hv=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},gv={exports:{}},en=gv.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(){};To(t,i,n,e,"",e)};en.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},en.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},en.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},en.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 To(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 en.arrayKeywords)for(var m=0;m<d.length;m++)To(e,t,r,d[m],n+"/"+l+"/"+m,o,n,l,i,m)}else if(l in en.propsKeywords){if(d&&typeof d=="object")for(var f in d)To(e,t,r,d[f],n+"/"+l+"/"+Sz(f),o,n,l,i,f)}else(l in en.keywords||e.allKeys&&!(l in en.skipKeywords))&&To(e,t,r,d,n+"/"+l,o,n,l,i)}r(i,n,o,a,s,c,u)}}function Sz(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var Iz=gv.exports;Object.defineProperty(Je,"__esModule",{value:!0}),Je.getSchemaRefs=Je.resolveUrl=Je.normalizeId=Je._getFullPath=Je.getFullPath=Je.inlineRef=void 0;const Oz=B,zz=hv,xz=Iz,Tz=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Pz(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Zu(e):t?yv(e)<=t:!1}Je.inlineRef=Pz;const Nz=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Zu(e){for(const t in e){if(Nz.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Zu)||typeof r=="object"&&Zu(r))return!0}return!1}function yv(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!Tz.has(r)&&(typeof e[r]=="object"&&(0,Oz.eachItem)(e[r],i=>t+=yv(i)),t===1/0))return 1/0}return t}function vv(e,t="",r){r!==!1&&(t=Ln(t));const i=e.parse(t);return $v(e,i)}Je.getFullPath=vv;function $v(e,t){return e.serialize(t).split("#")[0]+"#"}Je._getFullPath=$v;const Ez=/#\/?$/;function Ln(e){return e?e.replace(Ez,""):""}Je.normalizeId=Ln;function Dz(e,t,r){return r=Ln(r),e.resolve(t,r)}Je.resolveUrl=Dz;const jz=/^[a-z_][-a-z0-9._]*$/i;function Cz(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:i}=this.opts,n=Ln(e[r]||t),o={"":n},a=vv(i,n,!1),s={},c=new Set;return xz(e,{allKeys:!0},(d,m,f,p)=>{if(p===void 0)return;const y=a+m;let h=o[p];typeof d[r]=="string"&&(h=$.call(this,d[r])),g.call(this,d.$anchor),g.call(this,d.$dynamicAnchor),o[m]=h;function $(_){const I=this.opts.uriResolver.resolve;if(_=Ln(h?I(h,_):_),c.has(_))throw l(_);c.add(_);let T=this.refs[_];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(d,T.schema,_):_!==Ln(y)&&(_[0]==="#"?(u(d,s[_],_),s[_]=d):this.refs[_]=y),_}function g(_){if(typeof _=="string"){if(!jz.test(_))throw new Error(`invalid anchor "${_}"`);$.call(this,`#${_}`)}}}),s;function u(d,m,f){if(m!==void 0&&!zz(d,m))throw l(f)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Je.getSchemaRefs=Cz;var _v;function Po(){if(_v)return Ft;_v=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.getData=Ft.KeywordCxt=Ft.validateFunctionCode=void 0;const e=az(),t=Me,r=sv(),i=Me,n=bz(),o=kz(),a=wz(),s=ce,c=Qt(),u=Je,l=B,d=xo();function m(S){if(T(S)&&(M(S),I(S))){h(S);return}f(S,()=>(0,e.topBoolOrEmptySchema)(S))}Ft.validateFunctionCode=m;function f({gen:S,validateName:z,schema:D,schemaEnv:A,opts:J},le){J.code.es5?S.func(z,(0,s._)`${c.default.data}, ${c.default.valCxt}`,A.$async,()=>{S.code((0,s._)`"use strict"; ${g(D,J)}`),y(S,J),S.code(le)}):S.func(z,(0,s._)`${c.default.data}, ${p(J)}`,A.$async,()=>S.code(g(D,J)).code(le))}function p(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 y(S,z){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}`),z.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),z.dynamicRef&&S.var(c.default.dynamicAnchors,(0,s._)`{}`)})}function h(S){const{schema:z,opts:D,gen:A}=S;f(S,()=>{D.$comment&&z.$comment&&Y(S),Ne(S),A.let(c.default.vErrors,null),A.let(c.default.errors,0),D.unevaluated&&$(S),ue(S),W(S)})}function $(S){const{gen:z,validateName:D}=S;S.evaluated=z.const("evaluated",(0,s._)`${D}.evaluated`),z.if((0,s._)`${S.evaluated}.dynamicProps`,()=>z.assign((0,s._)`${S.evaluated}.props`,(0,s._)`undefined`)),z.if((0,s._)`${S.evaluated}.dynamicItems`,()=>z.assign((0,s._)`${S.evaluated}.items`,(0,s._)`undefined`))}function g(S,z){const D=typeof S=="object"&&S[z.schemaId];return D&&(z.code.source||z.code.process)?(0,s._)`/*# sourceURL=${D} */`:s.nil}function _(S,z){if(T(S)&&(M(S),I(S))){C(S,z);return}(0,e.boolOrEmptySchema)(S,z)}function I({schema:S,self:z}){if(typeof S=="boolean")return!S;for(const D in S)if(z.RULES.all[D])return!0;return!1}function T(S){return typeof S.schema!="boolean"}function C(S,z){const{schema:D,gen:A,opts:J}=S;J.$comment&&D.$comment&&Y(S),L(S),Q(S);const le=A.const("_errs",c.default.errors);ue(S,le),A.var(z,(0,s._)`${le} === ${c.default.errors}`)}function M(S){(0,l.checkUnknownRules)(S),fe(S)}function ue(S,z){if(S.opts.jtd)return pt(S,[],!1,z);const D=(0,t.getSchemaTypes)(S.schema),A=(0,t.coerceAndCheckDataType)(S,D);pt(S,D,!A,z)}function fe(S){const{schema:z,errSchemaPath:D,opts:A,self:J}=S;z.$ref&&A.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(z,J.RULES)&&J.logger.warn(`$ref: keywords ignored in schema at path "${D}"`)}function Ne(S){const{schema:z,opts:D}=S;z.default!==void 0&&D.useDefaults&&D.strictSchema&&(0,l.checkStrictMode)(S,"default is ignored in the schema root")}function L(S){const z=S.schema[S.opts.schemaId];z&&(S.baseId=(0,u.resolveUrl)(S.opts.uriResolver,S.baseId,z))}function Q(S){if(S.schema.$async&&!S.schemaEnv.$async)throw new Error("async schema in sync schema")}function Y({gen:S,schemaEnv:z,schema:D,errSchemaPath:A,opts:J}){const le=D.$comment;if(J.$comment===!0)S.code((0,s._)`${c.default.self}.logger.log(${le})`);else if(typeof J.$comment=="function"){const Le=(0,s.str)`${A}/$comment`,Ot=S.scopeValue("root",{ref:z.root});S.code((0,s._)`${c.default.self}.opts.$comment(${le}, ${Le}, ${Ot}.schema)`)}}function W(S){const{gen:z,schemaEnv:D,validateName:A,ValidationError:J,opts:le}=S;D.$async?z.if((0,s._)`${c.default.errors} === 0`,()=>z.return(c.default.data),()=>z.throw((0,s._)`new ${J}(${c.default.vErrors})`)):(z.assign((0,s._)`${A}.errors`,c.default.vErrors),le.unevaluated&&Ce(S),z.return((0,s._)`${c.default.errors} === 0`))}function Ce({gen:S,evaluated:z,props:D,items:A}){D instanceof s.Name&&S.assign((0,s._)`${z}.props`,D),A instanceof s.Name&&S.assign((0,s._)`${z}.items`,A)}function pt(S,z,D,A){const{gen:J,schema:le,data:Le,allErrors:Ot,opts:rt,self:it}=S,{RULES:Fe}=it;if(le.$ref&&(rt.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(le,Fe))){J.block(()=>G(S,"$ref",Fe.all.$ref.definition));return}rt.jtd||on(S,z),J.block(()=>{for(const gt of Fe.rules)wn(gt);wn(Fe.post)});function wn(gt){(0,r.shouldUseGroup)(le,gt)&&(gt.type?(J.if((0,i.checkDataType)(gt.type,Le,rt.strictNumbers)),ht(S,gt),z.length===1&&z[0]===gt.type&&D&&(J.else(),(0,i.reportTypeError)(S)),J.endIf()):ht(S,gt),Ot||J.if((0,s._)`${c.default.errors} === ${A||0}`))}}function ht(S,z){const{gen:D,schema:A,opts:{useDefaults:J}}=S;J&&(0,n.assignDefaults)(S,z.type),D.block(()=>{for(const le of z.rules)(0,r.shouldUseRule)(A,le)&&G(S,le.keyword,le.definition,z.type)})}function on(S,z){S.schemaEnv.meta||!S.opts.strictTypes||(Ut(S,z),S.opts.allowUnionTypes||U(S,z),O(S,S.dataTypes))}function Ut(S,z){if(z.length){if(!S.dataTypes.length){S.dataTypes=z;return}z.forEach(D=>{x(S.dataTypes,D)||b(S,`type "${D}" not allowed by context "${S.dataTypes.join(",")}"`)}),v(S,z)}}function U(S,z){z.length>1&&!(z.length===2&&z.includes("null"))&&b(S,"use allowUnionTypes to allow union type keyword")}function O(S,z){const D=S.self.RULES.all;for(const A in D){const J=D[A];if(typeof J=="object"&&(0,r.shouldUseRule)(S.schema,J)){const{type:le}=J.definition;le.length&&!le.some(Le=>j(z,Le))&&b(S,`missing type "${le.join(",")}" for keyword "${A}"`)}}}function j(S,z){return S.includes(z)||z==="number"&&S.includes("integer")}function x(S,z){return S.includes(z)||z==="integer"&&S.includes("number")}function v(S,z){const D=[];for(const A of S.dataTypes)x(z,A)?D.push(A):z.includes("integer")&&A==="number"&&D.push("integer");S.dataTypes=D}function b(S,z){const D=S.schemaEnv.baseId+S.errSchemaPath;z+=` at "${D}" (strictTypes)`,(0,l.checkStrictMode)(S,z,S.opts.strictTypes)}class P{constructor(z,D,A){if((0,o.validateKeywordUsage)(z,D,A),this.gen=z.gen,this.allErrors=z.allErrors,this.keyword=A,this.data=z.data,this.schema=z.schema[A],this.$data=D.$data&&z.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(z,this.schema,A,this.$data),this.schemaType=D.schemaType,this.parentSchema=z.schema,this.params={},this.it=z,this.def=D,this.$data)this.schemaCode=z.gen.const("vSchema",me(this.$data,z));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw new Error(`${A} value must be ${JSON.stringify(D.schemaType)}`);("code"in D?D.trackErrors:D.errors!==!1)&&(this.errsCount=z.gen.const("_errs",c.default.errors))}result(z,D,A){this.failResult((0,s.not)(z),D,A)}failResult(z,D,A){this.gen.if(z),A?A():this.error(),D?(this.gen.else(),D(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(z,D){this.failResult((0,s.not)(z),void 0,D)}fail(z){if(z===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(z),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(z){if(!this.$data)return this.fail(z);const{schemaCode:D}=this;this.fail((0,s._)`${D} !== undefined && (${(0,s.or)(this.invalid$data(),z)})`)}error(z,D,A){if(D){this.setParams(D),this._error(z,A),this.setParams({});return}this._error(z,A)}_error(z,D){(z?d.reportExtraError:d.reportError)(this,this.def.error,D)}$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(z){this.allErrors||this.gen.if(z)}setParams(z,D){D?Object.assign(this.params,z):this.params=z}block$data(z,D,A=s.nil){this.gen.block(()=>{this.check$data(z,A),D()})}check$data(z=s.nil,D=s.nil){if(!this.$data)return;const{gen:A,schemaCode:J,schemaType:le,def:Le}=this;A.if((0,s.or)((0,s._)`${J} === undefined`,D)),z!==s.nil&&A.assign(z,!0),(le.length||Le.validateSchema)&&(A.elseIf(this.invalid$data()),this.$dataError(),z!==s.nil&&A.assign(z,!1)),A.else()}invalid$data(){const{gen:z,schemaCode:D,schemaType:A,def:J,it:le}=this;return(0,s.or)(Le(),Ot());function Le(){if(A.length){if(!(D instanceof s.Name))throw new Error("ajv implementation error");const rt=Array.isArray(A)?A:[A];return(0,s._)`${(0,i.checkDataTypes)(rt,D,le.opts.strictNumbers,i.DataType.Wrong)}`}return s.nil}function Ot(){if(J.validateSchema){const rt=z.scopeValue("validate$data",{ref:J.validateSchema});return(0,s._)`!${rt}(${D})`}return s.nil}}subschema(z,D){const A=(0,a.getSubschema)(this.it,z);(0,a.extendSubschemaData)(A,this.it,z),(0,a.extendSubschemaMode)(A,z);const J={...this.it,...A,items:void 0,props:void 0};return _(J,D),J}mergeEvaluated(z,D){const{it:A,gen:J}=this;A.opts.unevaluated&&(A.props!==!0&&z.props!==void 0&&(A.props=l.mergeEvaluated.props(J,z.props,A.props,D)),A.items!==!0&&z.items!==void 0&&(A.items=l.mergeEvaluated.items(J,z.items,A.items,D)))}mergeValidEvaluated(z,D){const{it:A,gen:J}=this;if(A.opts.unevaluated&&(A.props!==!0||A.items!==!0))return J.if(D,()=>this.mergeEvaluated(z,s.Name)),!0}}Ft.KeywordCxt=P;function G(S,z,D,A){const J=new P(S,D,z);"code"in D?D.code(J,A):J.$data&&D.validate?(0,o.funcKeywordCode)(J,D):"macro"in D?(0,o.macroKeywordCode)(J,D):(D.compile||D.validate)&&(0,o.funcKeywordCode)(J,D)}const H=/^\/(?:[^~]|~0|~1)*$/,ye=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function me(S,{dataLevel:z,dataNames:D,dataPathArr:A}){let J,le;if(S==="")return c.default.rootData;if(S[0]==="/"){if(!H.test(S))throw new Error(`Invalid JSON-pointer: ${S}`);J=S,le=c.default.rootData}else{const it=ye.exec(S);if(!it)throw new Error(`Invalid JSON-pointer: ${S}`);const Fe=+it[1];if(J=it[2],J==="#"){if(Fe>=z)throw new Error(rt("property/index",Fe));return A[z-Fe]}if(Fe>z)throw new Error(rt("data",Fe));if(le=D[z-Fe],!J)return le}let Le=le;const Ot=J.split("/");for(const it of Ot)it&&(le=(0,s._)`${le}${(0,s.getProperty)((0,l.unescapeJsonPointer)(it))}`,Le=(0,s._)`${Le} && ${le}`);return Le;function rt(it,Fe){return`Cannot access ${it} ${Fe} levels up, current level is ${z}`}}return Ft.getData=me,Ft}var No={},bv;function Mu(){if(bv)return No;bv=1,Object.defineProperty(No,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return No.default=e,No}var Eo={},kv;function Do(){if(kv)return Eo;kv=1,Object.defineProperty(Eo,"__esModule",{value:!0});const e=Je;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 Eo.default=t,Eo}var st={};Object.defineProperty(st,"__esModule",{value:!0}),st.resolveSchema=st.getCompilingSchema=st.resolveRef=st.compileSchema=st.SchemaEnv=void 0;const Et=ce,Az=Mu(),vn=Qt(),Dt=Je,wv=B,Uz=Po();class jo{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,Dt.normalizeId)(i?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=i?.$async,this.refs={}}}st.SchemaEnv=jo;function Bu(e){const t=Sv.call(this,e);if(t)return t;const r=(0,Dt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:n}=this.opts.code,{ownProperties:o}=this.opts,a=new Et.CodeGen(this.scope,{es5:i,lines:n,ownProperties:o});let s;e.$async&&(s=a.scopeValue("Error",{ref:Az.default,code:(0,Et._)`require("ajv/dist/runtime/validation_error").default`}));const c=a.scopeName("validate");e.validateName=c;const u={gen:a,allErrors:this.opts.allErrors,data:vn.default.data,parentData:vn.default.parentData,parentDataProperty:vn.default.parentDataProperty,dataNames:[vn.default.data],dataPathArr:[Et.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Et.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Et.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Et._)`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,Uz.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);const d=a.toString();l=`${a.scopeRefs(vn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const f=new Function(`${vn.default.self}`,`${vn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){const{props:p,items:y}=u;f.evaluated={props:p instanceof Et.Name?void 0:p,items:y instanceof Et.Name?void 0:y,dynamicProps:p instanceof Et.Name,dynamicItems:y instanceof Et.Name},f.source&&(f.source.evaluated=(0,Et.stringify)(f.evaluated))}return e.validate=f,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)}}st.compileSchema=Bu;function Rz(e,t,r){var i;r=(0,Dt.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let o=Bz.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 jo({schema:a,schemaId:s,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=Zz.call(this,o)}st.resolveRef=Rz;function Zz(e){return(0,Dt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Bu.call(this,e)}function Sv(e){for(const t of this._compilations)if(Mz(t,e))return t}st.getCompilingSchema=Sv;function Mz(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Bz(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Co.call(this,e,t)}function Co(e,t){const r=this.opts.uriResolver.parse(t),i=(0,Dt._getFullPath)(this.opts.uriResolver,r);let n=(0,Dt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return Lu.call(this,r,e);const o=(0,Dt.normalizeId)(i),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){const s=Co.call(this,e,a);return typeof s?.schema!="object"?void 0:Lu.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||Bu.call(this,a),o===(0,Dt.normalizeId)(t)){const{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(n=(0,Dt.resolveUrl)(this.opts.uriResolver,n,u)),new jo({schema:s,schemaId:c,root:e,baseId:n})}return Lu.call(this,r,a)}}st.resolveSchema=Co;const Lz=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Lu(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,wv.unescapeFragment)(s)];if(c===void 0)return;r=c;const u=typeof r=="object"&&r[this.opts.schemaId];!Lz.has(s)&&u&&(t=(0,Dt.resolveUrl)(this.opts.uriResolver,t,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,wv.schemaHasRulesButRef)(r,this.RULES)){const s=(0,Dt.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=Co.call(this,i,s)}const{schemaId:a}=this.opts;if(o=o||new jo({schema:r,schemaId:a,root:i,baseId:t}),o.schema!==o.root.schema)return o}var Fz="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Vz="Meta-schema for $data reference (JSON AnySchema extension proposal)",Gz="object",qz=["$data"],Jz={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Kz=!1,Hz={$id:Fz,description:Vz,type:Gz,required:qz,properties:Jz,additionalProperties:Kz},Fu={},Ao={exports:{}};const Wz=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Vu=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),Xz=RegExp.prototype.test.bind(/^\d*$/u),Fn=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Gu=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Iv=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),qu=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),Yz=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),ct=new Array(256);{const e="0123456789ABCDEF";for(let t=0;t<256;t++)ct[t]="%"+e[t>>4]+e[t&15]}function Xe(e){return e<2048?ct[192|e>>6]+ct[128|e&63]:e<65536?ct[224|e>>12]+ct[128|e>>6&63]+ct[128|e&63]:ct[240|e>>18]+ct[128|e>>12&63]+ct[128|e>>6&63]+ct[128|e&63]}const Qz=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),ex=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),tx=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),nx=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function rx(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!tx(e[t])){if(e[t]==="%"&&t+2<e.length&&Fn(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function Ov(e){let t=-1,r=0,i=-1,n=0;for(let s=0;s<e.length;s++)e[s]==="0"?(i===-1&&(i=s),n++,n>r&&(r=n,t=i)):(i=-1,n=0);if(r<2)return e.join(":");const o=e.slice(0,t).join(":"),a=e.slice(t+r).join(":");return o+"::"+a}function ix(e){const t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;const r=t===-1?e.split(":"):e.slice(0,t).split(":"),i=t===-1?[]:e.slice(t+2).split(":");t!==-1&&(r.length===1&&r[0]===""&&(r.length=0),i.length===1&&i[0]===""&&(i.length=0));const n=r.concat(i);let o=0;for(let s=0;s<n.length;s++){const c=n[s];if(c==="")return;if(c.indexOf(".")!==-1){if(s!==n.length-1||t!==-1&&i.length===0||!Vu(c))return;o+=2;continue}if(!Qz(c))return;n[s]=parseInt(c,16).toString(16),o++}if(t===-1)return o!==8?void 0:Ov(n);if(o>=8)return;const a=n.slice(0,r.length);for(let s=o;s<8;s++)a.push("0");for(let s=r.length;s<n.length;s++)a.push(n[s]);return Ov(a)}function Ju(e){const t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let i=t?e.slice(1,-1):e;if(t&&ex(i))return i=i.toLowerCase(),{host:`[${i}]`,escapedHost:i,isIPV6:!1,isIPVFuture:!0};if(ox(i,":")<2)return{host:e,isIPV6:!1,error:t};let n="";const o=i.indexOf("%");if(o!==-1){const s=i.slice(o,o+3).toLowerCase()==="%25"?3:1;if(n=i.slice(o+s),!rx(n))return{host:e,isIPV6:!1,error:!0};i=i.slice(0,o)}const a=ix(i);return a===void 0?{host:e,isIPV6:!1,error:!0}:{host:a+(n?"%"+n:""),escapedHost:a+(n?"%25"+n:""),isIPV6:!0}}function ox(e,t){let r=0;for(let i=0;i<e.length;i++)e[i]===t&&r++;return r}function ax(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 sx={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},cx=/[@/?#:]/g,ux=/[@/?#]/g;function zv(e,t){const r=t?ux:cx;return r.lastIndex=0,e.replace(r,i=>sx[i])}function xv(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(Fn(n)){const o=n.toUpperCase(),a=String.fromCharCode(parseInt(o,16));t&&Gu(a)?r+=a:r+="%"+o,i+=2;continue}}r+=e[i]}return r}function lx(e){let t="";for(let r=0;r<e.length;r++){const i=e[r];if(i==="%"&&r+2<e.length){const n=e.slice(r+1,r+3);if(Fn(n)){const o=n.toUpperCase(),a=String.fromCharCode(parseInt(o,16));a!=="."&&Gu(a)?t+=a:t+="%"+o,r+=2;continue}}if(Iv(i))t+=i;else{const n=e.charCodeAt(r);if(n<128)t+=Tv(n)?i:ct[n];else if(n<55296||n>57343)t+=Xe(n);else if(n<=56319&&r+1<e.length){const o=e.charCodeAt(r+1);o>=56320&&o<=57343?(t+=Xe(65536+(n-55296<<10)+(o-56320)),r++):t+=Xe(65533)}else t+=Xe(65533)}}return t}function dx(e,t=!1){let r="",i=t&&e[0]!=="/";for(let n=0;n<e.length;n++){const o=e[n];if(o==="%"&&n+2<e.length){const a=e.slice(n+1,n+3);if(Fn(a)){r+="%"+a.toUpperCase(),n+=2;continue}}if(o==="/"&&(i=!1),Iv(o)&&(o!==":"||!i))r+=o;else{const a=e.charCodeAt(n);if(a<128)r+=ct[a];else if(a<55296||a>57343)r+=Xe(a);else if(a<=56319&&n+1<e.length){const s=e.charCodeAt(n+1);s>=56320&&s<=57343?(r+=Xe(65536+(a-55296<<10)+(s-56320)),n++):r+=Xe(65533)}else r+=Xe(65533)}}return r}function Ku(e,t){let r="";for(let i=0;i<e.length;i++){const n=e[i];if(n==="%"&&i+2<e.length){const o=e.slice(i+1,i+3);if(Fn(o)){r+="%"+o.toUpperCase(),i+=2;continue}}if(t(n))r+=n;else{const o=e.charCodeAt(i);if(o<128)r+=ct[o];else if(o<55296||o>57343)r+=Xe(o);else if(o<=56319&&i+1<e.length){const a=e.charCodeAt(i+1);a>=56320&&a<=57343?(r+=Xe(65536+(o-55296<<10)+(a-56320)),i++):r+=Xe(65533)}else r+=Xe(65533)}}return r}function fx(e){return Ku(e,Yz)}function mx(e){return Ku(e,qu)}function px(e){return Ku(e,qu)}function Tv(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function hx(e){let t="";for(let r=0;r<e.length;r++){const i=e[r];if(i==="%"&&r+2<e.length){const n=e.slice(r+1,r+3);if(Fn(n)){const o=n.toUpperCase(),a=String.fromCharCode(parseInt(o,16));Gu(a)?t+=a:t+="%"+o,r+=2;continue}}if(qu(i))t+=i;else{const n=e.charCodeAt(r);if(n<128)t+=Tv(n)?i:ct[n];else if(n<55296||n>57343)t+=Xe(n);else if(n<=56319&&r+1<e.length){const o=e.charCodeAt(r+1);o>=56320&&o<=57343?(t+=Xe(65536+(n-55296<<10)+(o-56320)),r++):t+=Xe(65533)}else t+=Xe(65533)}}return t}function gx(e){const t=[];if(e.userinfo!==void 0&&(t.push(fx(e.userinfo)),t.push("@")),e.host!==void 0){let r=e.host;if(!Vu(r)){let i=Ju(r);i.isIPV6!==!0&&i.isIPVFuture!==!0&&(r=xv(r,!0),i=Ju(r)),i.isIPV6===!0||i.isIPVFuture===!0?r=`[${i.escapedHost}]`:r=zv(r,!1)}t.push(r)}if(typeof e.port=="number"||typeof e.port=="string"){const r=String(e.port);if(!Xz(r))throw new TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}var Pv={nonSimpleDomain:nx,recomposeAuthority:gx,reescapeHostDelimiters:zv,normalizePercentEncoding:xv,normalizePathEncoding:lx,serializePathEncoding:dx,normalizeQueryFragmentEncoding:hx,encodeQuery:mx,encodeFragment:px,removeDotSegments:ax,isIPv4:Vu,isUUID:Wz,normalizeIPv6:Ju};const{isUUID:yx}=Pv,vx=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;function Nv(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 Ev(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function Dv(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 $x(e){return e.secure=Nv(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function _x(e){if((e.port===(Nv(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=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function bx(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(vx);if(r&&r[0]===e.path){const i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const n=`${i}:${t.nid||e.nid}`,o=Hu(n);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function kx(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=Hu(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 wx(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!yx(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Sx(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const jv={scheme:"http",domainHost:!0,parse:Ev,serialize:Dv},Ix={scheme:"https",domainHost:jv.domainHost,parse:Ev,serialize:Dv},Uo={scheme:"ws",domainHost:!0,parse:$x,serialize:_x},Ox={scheme:"wss",domainHost:Uo.domainHost,parse:Uo.parse,serialize:Uo.serialize},zx={scheme:"urn",parse:bx,serialize:kx,skipNormalize:!0},xx={scheme:"urn:uuid",parse:wx,serialize:Sx,skipNormalize:!0},Ro={http:jv,https:Ix,ws:Uo,wss:Ox,urn:zx,"urn:uuid":xx};Object.setPrototypeOf(Ro,null);function Hu(e){return e&&(Ro[e]||Ro[e.toLowerCase()])||void 0}var Tx={SCHEMES:Ro,getSchemeHandler:Hu};const{normalizeIPv6:Cv,removeDotSegments:qr,recomposeAuthority:Px,normalizePercentEncoding:Av,normalizePathEncoding:Nx,serializePathEncoding:Uv,normalizeQueryFragmentEncoding:Rv,encodeQuery:Ex,encodeFragment:Dx,reescapeHostDelimiters:jx,isIPv4:Zv,nonSimpleDomain:Cx}=Pv,{SCHEMES:Mv,getSchemeHandler:Wu}=Tx,Bv=/^[A-Za-z][A-Za-z0-9+.-]*$/u,Lv="URI scheme is malformed.";function Fv(e){const t=unescape(String(e));if(!Bv.test(t))throw new TypeError(Lv);return t}function Ax(e,t){return typeof e=="string"?e=Vx(e,t):typeof e=="object"&&(e=Mo($n(e,t),t)),e}function Ux(e,t,r){const i=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:o,malformedPercentEncoding:a,malformedSchemeSpecific:s,malformedHost:c,malformedScheme:u}=Zo(e,i),{parsed:l,malformedAuthorityOrPort:d,malformedPercentEncoding:m,malformedSchemeSpecific:f,malformedHost:p,malformedScheme:y}=Zo(t,i);if(o||d||a||m||s||f||c||p||u||y)throw new Error(n.error||l.error||"URI is malformed.");const h=Vv(n,l,i,!0),$=Wu(r&&r.scheme||h.scheme),g=h.host,_=g!==void 0&&g!==""&&(Zv(g)||Cv(g).isIPV6);Gv(h,r||{},$,_);const I=g&&g.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(g);if(h.error&&!I)throw new Error(h.error);return i.skipEscape=!0,$n(h,i)}function Vv(e,t,r,i){const n={};return i||(e=Mo($n(e,r),r),t=Mo($n(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=qr(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=qr(t.path||""),n.query=t.query):(t.path?(t.path[0]==="/"?n.path=qr(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=qr(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 Rx(e,t,r){const i=Jv(e,r),n=Jv(t,r);return i!==void 0&&n!==void 0&&i===n}function $n(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=[];r.scheme&&(r.scheme=Fv(r.scheme));const o=Wu(i.scheme||r.scheme);o&&o.serialize&&o.serialize(r,i);const a=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,s=!i.skipEscape&&r.scheme===void 0&&!a;r.path!==void 0&&(i.skipEscape?r.path=Av(r.path):r.path=Uv(r.path,s)),i.reference!=="suffix"&&r.scheme&&(r.scheme=Fv(r.scheme),n.push(r.scheme,":"));const c=Px(r);if(c!==void 0&&(i.reference!=="suffix"&&n.push("//"),n.push(c),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let u=r.path;!i.absolutePath&&(!o||!o.absolutePath)&&(u=qr(u)),s&&(u=Uv(u,!0)),c===void 0&&u[0]==="/"&&u[1]==="/"&&(u="/%2F"+u.slice(2)),n.push(u)}return r.query!==void 0&&n.push("?",Ex(r.query)),r.fragment!==void 0&&n.push("#",Dx(r.fragment)),n.join("")}const Zx=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Mx=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Bx=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Lx(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 Jr(e){if(e===void 0)return!1;let t=e.indexOf("%");for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function Xu(e){return e[0]==="["&&e[e.length-1]==="]"}function Fx(e){const t=e[4];return Jr(e[3])||t!==void 0&&!Xu(t)&&Jr(t)||Jr(e[6])||Jr(e[7])||Jr(e[8])}function Gv(e,t,r,i){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!Xu(e.host)&&(t.domainHost||r&&r.domainHost)&&i===!1&&Cx(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(n){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+n,!0}return!1}function Zo(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,a=!1,s=!1,c=!1,u=!1,l=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);const d=e.match(Mx);d!==null&&d[1].indexOf("\\")!==-1&&(i.error="URI authority must not contain a literal backslash.",n=!0);const m=e.match(Bx);if(m!==null){const p=m[1],y=p.replace(/[\t\n\r]/g,"");y.length>=2&&(y.slice(0,2)!=="//"?(i.error=i.error||"URI authority must not contain a literal backslash.",n=!0):p.length!==y.length&&(i.error=i.error||"URI authority introducer must not contain whitespace.",n=!0))}const f=e.match(Zx);if(f){if(i.scheme=f[1],i.userinfo=f[3],i.host=f[4],i.port=parseInt(f[5],10),i.path=f[6]||"",i.query=f[7],i.fragment=f[8],i.scheme!==void 0){const h=unescape(i.scheme);Bv.test(h)?i.scheme=h.toLowerCase():(i.error=i.error||Lv,u=!0)}o=Fx(f),o&&(i.error=i.error||"URI contains malformed percent-encoding."),isNaN(i.port)&&(i.port=f[5]);const p=Lx(i,f);if(p!==void 0&&(i.error=i.error||p,n=!0),i.host)if(Zv(i.host)===!1){const $=Xu(i.host),g=i.host.indexOf("[")!==-1||i.host.indexOf("]")!==-1,_=Cv(i.host);l=_.isIPV6||_.isIPVFuture===!0,c=g&&(!$||_.error===!0),i.host=l?_.host:_.host.toLowerCase(),c&&(i.error=i.error||"URI host is malformed.",n=!0)}else l=!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 y=Wu(r.scheme||i.scheme);if(c||(s=Gv(i,r,y,l)),!y||y&&!y.skipNormalize){if(e.indexOf("%")!==-1&&i.host!==void 0&&!c){const h=l?i.host:Av(i.host,!0);i.host=jx(h,l)}i.path&&(i.path=Nx(i.path)),i.query&&(i.query=Rv(i.query)),i.fragment&&(i.fragment=Rv(i.fragment))}y&&y.parse&&(y.parse(i,r),y===Mv.urn&&i.nid===void 0&&(a=!0))}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:u}}function Mo(e,t){return Zo(e,t).parsed}function Vx(e,t){return qv(e,t).normalized}function qv(e,t){const{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:s}=Zo(e,t);return{normalized:i||n||o||a||s?e:$n(r,t),malformedAuthorityOrPort:i,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:s}}function Jv(e,t){if(typeof e!="string"&&typeof e!="object")return;let r;try{r=typeof e=="string"?e:$n(e,t)}catch{return}const{normalized:i,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:c}=qv(r,t);return n||o||a||s||c?void 0:i}const Yu={SCHEMES:Mv,normalize:Ax,resolve:Ux,resolveComponent:Vv,equal:Rx,serialize:$n,parse:Mo};Ao.exports=Yu,Ao.exports.default=Yu,Ao.exports.fastUri=Yu;var Gx=Ao.exports;Object.defineProperty(Fu,"__esModule",{value:!0});const Kv=Gx;Kv.code='require("ajv/dist/runtime/uri").default',Fu.default=Kv,(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=Po();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=Mu(),n=Do(),o=yn,a=st,s=ce,c=Je,u=Me,l=B,d=Hz,m=Fu,f=(U,O)=>new RegExp(U,O);f.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),h={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."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},g=200;function _(U){var O,j,x,v,b,P,G,H,ye,me,S,z,D,A,J,le,Le,Ot,rt,it,Fe,wn,gt,ia,oa;const Xn=U.strict,aa=(O=U.code)===null||O===void 0?void 0:O.optimize,Ml=aa===!0||aa===void 0?1:aa||0,Bl=(x=(j=U.code)===null||j===void 0?void 0:j.regExp)!==null&&x!==void 0?x:f,B$=(v=U.uriResolver)!==null&&v!==void 0?v:m.default;return{strictSchema:(P=(b=U.strictSchema)!==null&&b!==void 0?b:Xn)!==null&&P!==void 0?P:!0,strictNumbers:(H=(G=U.strictNumbers)!==null&&G!==void 0?G:Xn)!==null&&H!==void 0?H:!0,strictTypes:(me=(ye=U.strictTypes)!==null&&ye!==void 0?ye:Xn)!==null&&me!==void 0?me:"log",strictTuples:(z=(S=U.strictTuples)!==null&&S!==void 0?S:Xn)!==null&&z!==void 0?z:"log",strictRequired:(A=(D=U.strictRequired)!==null&&D!==void 0?D:Xn)!==null&&A!==void 0?A:!1,code:U.code?{...U.code,optimize:Ml,regExp:Bl}:{optimize:Ml,regExp:Bl},loopRequired:(J=U.loopRequired)!==null&&J!==void 0?J:g,loopEnum:(le=U.loopEnum)!==null&&le!==void 0?le:g,meta:(Le=U.meta)!==null&&Le!==void 0?Le:!0,messages:(Ot=U.messages)!==null&&Ot!==void 0?Ot:!0,inlineRefs:(rt=U.inlineRefs)!==null&&rt!==void 0?rt:!0,schemaId:(it=U.schemaId)!==null&&it!==void 0?it:"$id",addUsedSchema:(Fe=U.addUsedSchema)!==null&&Fe!==void 0?Fe:!0,validateSchema:(wn=U.validateSchema)!==null&&wn!==void 0?wn:!0,validateFormats:(gt=U.validateFormats)!==null&&gt!==void 0?gt:!0,unicodeRegExp:(ia=U.unicodeRegExp)!==null&&ia!==void 0?ia:!0,int32range:(oa=U.int32range)!==null&&oa!==void 0?oa:!0,uriResolver:B$}}class I{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,..._(O)};const{es5:j,lines:x}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:y,es5:j,lines:x}),this.logger=Q(O.logger);const v=O.validateFormats;O.validateFormats=!1,this.RULES=(0,o.getRules)(),T.call(this,h,O,"NOT SUPPORTED"),T.call(this,$,O,"DEPRECATED","warn"),this._metaOpts=Ne.call(this),O.formats&&ue.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&fe.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),M.call(this),O.validateFormats=v}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:j,schemaId:x}=this.opts;let v=d;x==="id"&&(v={...d},v.id=v.$id,delete v.$id),j&&O&&this.addMetaSchema(v,v[x],!1)}defaultMeta(){const{meta:O,schemaId:j}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[j]||O:void 0}validate(O,j){let x;if(typeof O=="string"){if(x=this.getSchema(O),!x)throw new Error(`no schema with key or ref "${O}"`)}else x=this.compile(O);const v=x(j);return"$async"in x||(this.errors=x.errors),v}compile(O,j){const x=this._addSchema(O,j);return x.validate||this._compileSchemaEnv(x)}compileAsync(O,j){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:x}=this.opts;return v.call(this,O,j);async function v(me,S){await b.call(this,me.$schema);const z=this._addSchema(me,S);return z.validate||P.call(this,z)}async function b(me){me&&!this.getSchema(me)&&await v.call(this,{$ref:me},!0)}async function P(me){try{return this._compileSchemaEnv(me)}catch(S){if(!(S instanceof n.default))throw S;return G.call(this,S),await H.call(this,S.missingSchema),P.call(this,me)}}function G({missingSchema:me,missingRef:S}){if(this.refs[me])throw new Error(`AnySchema ${me} is loaded but ${S} cannot be resolved`)}async function H(me){const S=await ye.call(this,me);this.refs[me]||await b.call(this,S.$schema),this.refs[me]||this.addSchema(S,me,j)}async function ye(me){const S=this._loading[me];if(S)return S;try{return await(this._loading[me]=x(me))}finally{delete this._loading[me]}}}addSchema(O,j,x,v=this.opts.validateSchema){if(Array.isArray(O)){for(const P of O)this.addSchema(P,void 0,x,v);return this}let b;if(typeof O=="object"){const{schemaId:P}=this.opts;if(b=O[P],b!==void 0&&typeof b!="string")throw new Error(`schema ${P} must be string`)}return j=(0,c.normalizeId)(j||b),this._checkUnique(j),this.schemas[j]=this._addSchema(O,x,j,v,!0),this}addMetaSchema(O,j,x=this.opts.validateSchema){return this.addSchema(O,j,!0,x),this}validateSchema(O,j){if(typeof O=="boolean")return!0;let x;if(x=O.$schema,x!==void 0&&typeof x!="string")throw new Error("$schema must be a string");if(x=x||this.opts.defaultMeta||this.defaultMeta(),!x)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const v=this.validate(x,O);if(!v&&j){const b="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(b);else throw new Error(b)}return v}getSchema(O){let j;for(;typeof(j=C.call(this,O))=="string";)O=j;if(j===void 0){const{schemaId:x}=this.opts,v=new a.SchemaEnv({schema:{},schemaId:x});if(j=a.resolveSchema.call(this,v,O),!j)return;this.refs[O]=j}return j.validate||this._compileSchemaEnv(j)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const j=C.call(this,O);return typeof j=="object"&&this._cache.delete(j.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const j=O;this._cache.delete(j);let x=O[this.opts.schemaId];return x&&(x=(0,c.normalizeId)(x),delete this.schemas[x],delete this.refs[x]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const j of O)this.addKeyword(j);return this}addKeyword(O,j){let x;if(typeof O=="string")x=O,typeof j=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),j.keyword=x);else if(typeof O=="object"&&j===void 0){if(j=O,x=j.keyword,Array.isArray(x)&&!x.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,x,j),!j)return(0,l.eachItem)(x,b=>Ce.call(this,b)),this;ht.call(this,j);const v={...j,type:(0,u.getJSONTypes)(j.type),schemaType:(0,u.getJSONTypes)(j.schemaType)};return(0,l.eachItem)(x,v.type.length===0?b=>Ce.call(this,b,v):b=>v.type.forEach(P=>Ce.call(this,b,v,P))),this}getKeyword(O){const j=this.RULES.all[O];return typeof j=="object"?j.definition:!!j}removeKeyword(O){const{RULES:j}=this;delete j.keywords[O],delete j.all[O];for(const x of j.rules){const v=x.rules.findIndex(b=>b.keyword===O);v>=0&&x.rules.splice(v,1)}return this}addFormat(O,j){return typeof j=="string"&&(j=new RegExp(j)),this.formats[O]=j,this}errorsText(O=this.errors,{separator:j=", ",dataVar:x="data"}={}){return!O||O.length===0?"No errors":O.map(v=>`${x}${v.instancePath} ${v.message}`).reduce((v,b)=>v+j+b)}$dataMetaSchema(O,j){const x=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const v of j){const b=v.split("/").slice(1);let P=O;for(const G of b)P=P[G];for(const G in x){const H=x[G];if(typeof H!="object")continue;const{$data:ye}=H.definition,me=P[G];ye&&me&&(P[G]=Ut(me))}}return O}_removeAllSchemas(O,j){for(const x in O){const v=O[x];(!j||j.test(x))&&(typeof v=="string"?delete O[x]:v&&!v.meta&&(this._cache.delete(v.schema),delete O[x]))}}_addSchema(O,j,x,v=this.opts.validateSchema,b=this.opts.addUsedSchema){let P;const{schemaId:G}=this.opts;if(typeof O=="object")P=O[G];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let H=this._cache.get(O);if(H!==void 0)return H;x=(0,c.normalizeId)(P||x);const ye=c.getSchemaRefs.call(this,O,x);return H=new a.SchemaEnv({schema:O,schemaId:G,meta:j,baseId:x,localRefs:ye}),this._cache.set(H.schema,H),b&&!x.startsWith("#")&&(x&&this._checkUnique(x),this.refs[x]=H),v&&this.validateSchema(O,!0),H}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):a.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const j=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,O)}finally{this.opts=j}}}I.ValidationError=i.default,I.MissingRefError=n.default,e.default=I;function T(U,O,j,x="error"){for(const v in U){const b=v;b in O&&this.logger[x](`${j}: option ${v}. ${U[b]}`)}}function C(U){return U=(0,c.normalizeId)(U),this.schemas[U]||this.refs[U]}function M(){const U=this.opts.schemas;if(U)if(Array.isArray(U))this.addSchema(U);else for(const O in U)this.addSchema(U[O],O)}function ue(){for(const U in this.opts.formats){const O=this.opts.formats[U];O&&this.addFormat(U,O)}}function fe(U){if(Array.isArray(U)){this.addVocabulary(U);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in U){const j=U[O];j.keyword||(j.keyword=O),this.addKeyword(j)}}function Ne(){const U={...this.opts};for(const O of p)delete U[O];return U}const L={log(){},warn(){},error(){}};function Q(U){if(U===!1)return L;if(U===void 0)return console;if(U.log&&U.warn&&U.error)return U;throw new Error("logger must implement log, warn and error methods")}const Y=/^[a-z_$][a-z0-9_$:-]*$/i;function W(U,O){const{RULES:j}=this;if((0,l.eachItem)(U,x=>{if(j.keywords[x])throw new Error(`Keyword ${x} is already defined`);if(!Y.test(x))throw new Error(`Keyword ${x} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function Ce(U,O,j){var x;const v=O?.post;if(j&&v)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:b}=this;let P=v?b.post:b.rules.find(({type:H})=>H===j);if(P||(P={type:j,rules:[]},b.rules.push(P)),b.keywords[U]=!0,!O)return;const G={keyword:U,definition:{...O,type:(0,u.getJSONTypes)(O.type),schemaType:(0,u.getJSONTypes)(O.schemaType)}};O.before?pt.call(this,P,G,O.before):P.rules.push(G),b.all[U]=G,(x=O.implements)===null||x===void 0||x.forEach(H=>this.addKeyword(H))}function pt(U,O,j){const x=U.rules.findIndex(v=>v.keyword===j);x>=0?U.rules.splice(x,0,O):(U.rules.push(O),this.logger.warn(`rule ${j} is not defined`))}function ht(U){let{metaSchema:O}=U;O!==void 0&&(U.$data&&this.opts.$data&&(O=Ut(O)),U.validateSchema=this.compile(O,!0))}const on={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ut(U){return{anyOf:[U,on]}}})(Hy);var Qu={},el={},tl={};Object.defineProperty(tl,"__esModule",{value:!0});const qx={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};tl.default=qx;var _n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.callRef=_n.getValidate=void 0;const Jx=Do(),Hv=Nt(),ut=ce,Vn=Qt(),Wv=st,Bo=B,Kx={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=Wv.resolveRef.call(c,u,n,r);if(l===void 0)throw new Jx.default(i.opts.uriResolver,n,r);if(l instanceof Wv.SchemaEnv)return m(l);return f(l);function d(){if(o===u)return Lo(e,a,o,o.$async);const p=t.scopeValue("root",{ref:u});return Lo(e,(0,ut._)`${p}.validate`,u,u.$async)}function m(p){const y=Xv(e,p);Lo(e,y,p,p.$async)}function f(p){const y=t.scopeValue("schema",s.code.source===!0?{ref:p,code:(0,ut.stringify)(p)}:{ref:p}),h=t.name("valid"),$=e.subschema({schema:p,dataTypes:[],schemaPath:ut.nil,topSchemaRef:y,errSchemaPath:r},h);e.mergeEvaluated($),e.ok(h)}}};function Xv(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,ut._)`${r.scopeValue("wrapper",{ref:t})}.validate`}_n.getValidate=Xv;function Lo(e,t,r,i){const{gen:n,it:o}=e,{allErrors:a,schemaEnv:s,opts:c}=o,u=c.passContext?Vn.default.this:ut.nil;i?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");const p=n.let("valid");n.try(()=>{n.code((0,ut._)`await ${(0,Hv.callValidateCode)(e,t,u)}`),f(t),a||n.assign(p,!0)},y=>{n.if((0,ut._)`!(${y} instanceof ${o.ValidationError})`,()=>n.throw(y)),m(y),a||n.assign(p,!1)}),e.ok(p)}function d(){e.result((0,Hv.callValidateCode)(e,t,u),()=>f(t),()=>m(t))}function m(p){const y=(0,ut._)`${p}.errors`;n.assign(Vn.default.vErrors,(0,ut._)`${Vn.default.vErrors} === null ? ${y} : ${Vn.default.vErrors}.concat(${y})`),n.assign(Vn.default.errors,(0,ut._)`${Vn.default.vErrors}.length`)}function f(p){var y;if(!o.opts.unevaluated)return;const h=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(h&&!h.dynamicProps)h.props!==void 0&&(o.props=Bo.mergeEvaluated.props(n,h.props,o.props));else{const $=n.var("props",(0,ut._)`${p}.evaluated.props`);o.props=Bo.mergeEvaluated.props(n,$,o.props,ut.Name)}if(o.items!==!0)if(h&&!h.dynamicItems)h.items!==void 0&&(o.items=Bo.mergeEvaluated.items(n,h.items,o.items));else{const $=n.var("items",(0,ut._)`${p}.evaluated.items`);o.items=Bo.mergeEvaluated.items(n,$,o.items,ut.Name)}}}_n.callRef=Lo,_n.default=Kx,Object.defineProperty(el,"__esModule",{value:!0});const Hx=tl,Wx=_n,Xx=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Hx.default,Wx.default];el.default=Xx;var nl={},rl={};Object.defineProperty(rl,"__esModule",{value:!0});const Fo=ce,tn=Fo.operators,Vo={maximum:{okStr:"<=",ok:tn.LTE,fail:tn.GT},minimum:{okStr:">=",ok:tn.GTE,fail:tn.LT},exclusiveMaximum:{okStr:"<",ok:tn.LT,fail:tn.GTE},exclusiveMinimum:{okStr:">",ok:tn.GT,fail:tn.LTE}},Yx={message:({keyword:e,schemaCode:t})=>(0,Fo.str)`must be ${Vo[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Fo._)`{comparison: ${Vo[e].okStr}, limit: ${t}}`},Qx={keyword:Object.keys(Vo),type:"number",schemaType:"number",$data:!0,error:Yx,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,Fo._)`${r} ${Vo[t].fail} ${i} || isNaN(${r})`)}};rl.default=Qx;var il={};Object.defineProperty(il,"__esModule",{value:!0});const Kr=ce,eT={message:({schemaCode:e})=>(0,Kr.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Kr._)`{multipleOf: ${e}}`},tT={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:eT,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}))`)}};il.default=tT;var ol={},al={};Object.defineProperty(al,"__esModule",{value:!0});function Yv(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}al.default=Yv,Yv.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(ol,"__esModule",{value:!0});const bn=ce,nT=B,rT=al,iT={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,bn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,bn._)`{limit: ${e}}`},oT={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:iT,code(e){const{keyword:t,data:r,schemaCode:i,it:n}=e,o=t==="maxLength"?bn.operators.GT:bn.operators.LT,a=n.opts.unicode===!1?(0,bn._)`${r}.length`:(0,bn._)`${(0,nT.useFunc)(e.gen,rT.default)}(${r})`;e.fail$data((0,bn._)`${a} ${o} ${i}`)}};ol.default=oT;var sl={};Object.defineProperty(sl,"__esModule",{value:!0});const aT=Nt(),sT=B,Gn=ce,cT={message:({schemaCode:e})=>(0,Gn.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Gn._)`{pattern: ${e}}`},uT={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:cT,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,Gn._)`new RegExp`:(0,sT.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,Gn._)`${u}(${o}, ${s}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,Gn._)`!${l}`)}else{const c=(0,aT.usePattern)(e,n);e.fail$data((0,Gn._)`!${c}.test(${r})`)}}};sl.default=uT;var cl={};Object.defineProperty(cl,"__esModule",{value:!0});const Hr=ce,lT={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Hr.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Hr._)`{limit: ${e}}`},dT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:lT,code(e){const{keyword:t,data:r,schemaCode:i}=e,n=t==="maxProperties"?Hr.operators.GT:Hr.operators.LT;e.fail$data((0,Hr._)`Object.keys(${r}).length ${n} ${i}`)}};cl.default=dT;var ul={};Object.defineProperty(ul,"__esModule",{value:!0});const Wr=Nt(),Xr=ce,fT=B,mT={message:({params:{missingProperty:e}})=>(0,Xr.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Xr._)`{missingProperty: ${e}}`},pT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:mT,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 f=e.parentSchema.properties,{definedProperties:p}=e.it;for(const y of r)if(f?.[y]===void 0&&!p.has(y)){const h=a.schemaEnv.baseId+a.errSchemaPath,$=`required property "${y}" is not defined at "${h}" (strictRequired)`;(0,fT.checkStrictMode)(a,$,a.opts.strictRequired)}}function u(){if(c||o)e.block$data(Xr.nil,d);else for(const f of r)(0,Wr.checkReportMissingProp)(e,f)}function l(){const f=t.let("missing");if(c||o){const p=t.let("valid",!0);e.block$data(p,()=>m(f,p)),e.ok(p)}else t.if((0,Wr.checkMissingProp)(e,r,f)),(0,Wr.reportMissingProp)(e,f),t.else()}function d(){t.forOf("prop",i,f=>{e.setParams({missingProperty:f}),t.if((0,Wr.noPropertyInData)(t,n,f,s.ownProperties),()=>e.error())})}function m(f,p){e.setParams({missingProperty:f}),t.forOf(f,i,()=>{t.assign(p,(0,Wr.propertyInData)(t,n,f,s.ownProperties)),t.if((0,Xr.not)(p),()=>{e.error(),t.break()})},Xr.nil)}}};ul.default=pT;var ll={};Object.defineProperty(ll,"__esModule",{value:!0});const Yr=ce,hT={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Yr.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Yr._)`{limit: ${e}}`},gT={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:hT,code(e){const{keyword:t,data:r,schemaCode:i}=e,n=t==="maxItems"?Yr.operators.GT:Yr.operators.LT;e.fail$data((0,Yr._)`${r}.length ${n} ${i}`)}};ll.default=gT;var dl={},Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});const Qv=hv;Qv.code='require("ajv/dist/runtime/equal").default',Qr.default=Qv,Object.defineProperty(dl,"__esModule",{value:!0});const fl=Me,Ke=ce,yT=B,vT=Qr,$T={message:({params:{i:e,j:t}})=>(0,Ke.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ke._)`{i: ${e}, j: ${t}}`},_T={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:$T,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,fl.getSchemaTypes)(o.items):[];e.block$data(c,l,(0,Ke._)`${a} === false`),e.ok(c);function l(){const p=t.let("i",(0,Ke._)`${r}.length`),y=t.let("j");e.setParams({i:p,j:y}),t.assign(c,!0),t.if((0,Ke._)`${p} > 1`,()=>(d()?m:f)(p,y))}function d(){return u.length>0&&!u.some(p=>p==="object"||p==="array")}function m(p,y){const h=t.name("item"),$=(0,fl.checkDataTypes)(u,h,s.opts.strictNumbers,fl.DataType.Wrong),g=t.const("indices",(0,Ke._)`{}`);t.for((0,Ke._)`;${p}--;`,()=>{t.let(h,(0,Ke._)`${r}[${p}]`),t.if($,(0,Ke._)`continue`),u.length>1&&t.if((0,Ke._)`typeof ${h} == "string"`,(0,Ke._)`${h} += "_"`),t.if((0,Ke._)`typeof ${g}[${h}] == "number"`,()=>{t.assign(y,(0,Ke._)`${g}[${h}]`),e.error(),t.assign(c,!1).break()}).code((0,Ke._)`${g}[${h}] = ${p}`)})}function f(p,y){const h=(0,yT.useFunc)(t,vT.default),$=t.name("outer");t.label($).for((0,Ke._)`;${p}--;`,()=>t.for((0,Ke._)`${y} = ${p}; ${y}--;`,()=>t.if((0,Ke._)`${h}(${r}[${p}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break($)})))}}};dl.default=_T;var ml={};Object.defineProperty(ml,"__esModule",{value:!0});const pl=ce,bT=B,kT=Qr,wT={message:"must be equal to constant",params:({schemaCode:e})=>(0,pl._)`{allowedValue: ${e}}`},ST={keyword:"const",$data:!0,error:wT,code(e){const{gen:t,data:r,$data:i,schemaCode:n,schema:o}=e;i||o&&typeof o=="object"?e.fail$data((0,pl._)`!${(0,bT.useFunc)(t,kT.default)}(${r}, ${n})`):e.fail((0,pl._)`${o} !== ${r}`)}};ml.default=ST;var hl={};Object.defineProperty(hl,"__esModule",{value:!0});const ei=ce,IT=B,OT=Qr,zT={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ei._)`{allowedValues: ${e}}`},xT={keyword:"enum",schemaType:"array",$data:!0,error:zT,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,IT.useFunc)(t,OT.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 f=t.const("vSchema",o);l=(0,ei.or)(...n.map((p,y)=>m(f,y)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",o,f=>t.if((0,ei._)`${u()}(${r}, ${f})`,()=>t.assign(l,!0).break()))}function m(f,p){const y=n[p];return typeof y=="object"&&y!==null?(0,ei._)`${u()}(${r}, ${f}[${p}])`:(0,ei._)`${r} === ${y}`}}};hl.default=xT,Object.defineProperty(nl,"__esModule",{value:!0});const TT=rl,PT=il,NT=ol,ET=sl,DT=cl,jT=ul,CT=ll,AT=dl,UT=ml,RT=hl,ZT=[TT.default,PT.default,NT.default,ET.default,DT.default,jT.default,CT.default,AT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},UT.default,RT.default];nl.default=ZT;var gl={},qn={};Object.defineProperty(qn,"__esModule",{value:!0}),qn.validateAdditionalItems=void 0;const kn=ce,yl=B,MT={message:({params:{len:e}})=>(0,kn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,kn._)`{limit: ${e}}`},BT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:MT,code(e){const{parentSchema:t,it:r}=e,{items:i}=t;if(!Array.isArray(i)){(0,yl.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}e$(e,i)}};function e$(e,t){const{gen:r,schema:i,data:n,keyword:o,it:a}=e;a.items=!0;const s=r.const("len",(0,kn._)`${n}.length`);if(i===!1)e.setParams({len:t.length}),e.pass((0,kn._)`${s} <= ${t.length}`);else if(typeof i=="object"&&!(0,yl.alwaysValidSchema)(a,i)){const u=r.var("valid",(0,kn._)`${s} <= ${t.length}`);r.if((0,kn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,s,l=>{e.subschema({keyword:o,dataProp:l,dataPropType:yl.Type.Num},u),a.allErrors||r.if((0,kn.not)(u),()=>r.break())})}}qn.validateAdditionalItems=e$,qn.default=BT;var vl={},Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.validateTuple=void 0;const t$=ce,Go=B,LT=Nt(),FT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return n$(e,"additionalItems",t);r.items=!0,!(0,Go.alwaysValidSchema)(r,t)&&e.ok((0,LT.validateArray)(e))}};function n$(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=Go.mergeEvaluated.items(i,r.length,s.items));const c=i.name("valid"),u=i.const("len",(0,t$._)`${o}.length`);r.forEach((d,m)=>{(0,Go.alwaysValidSchema)(s,d)||(i.if((0,t$._)`${u} > ${m}`,()=>e.subschema({keyword:a,schemaProp:m,dataProp:m},c)),e.ok(c))});function l(d){const{opts:m,errSchemaPath:f}=s,p=r.length,y=p===d.minItems&&(p===d.maxItems||d[t]===!1);if(m.strictTuples&&!y){const h=`"${a}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,Go.checkStrictMode)(s,h,m.strictTuples)}}}Jn.validateTuple=n$,Jn.default=FT,Object.defineProperty(vl,"__esModule",{value:!0});const VT=Jn,GT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,VT.validateTuple)(e,"items")};vl.default=GT;var $l={};Object.defineProperty($l,"__esModule",{value:!0});const r$=ce,qT=B,JT=Nt(),KT=qn,HT={message:({params:{len:e}})=>(0,r$.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,r$._)`{limit: ${e}}`},WT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:HT,code(e){const{schema:t,parentSchema:r,it:i}=e,{prefixItems:n}=r;i.items=!0,!(0,qT.alwaysValidSchema)(i,t)&&(n?(0,KT.validateAdditionalItems)(e,n):e.ok((0,JT.validateArray)(e)))}};$l.default=WT;var _l={};Object.defineProperty(_l,"__esModule",{value:!0});const It=ce,qo=B,XT={message:({params:{min:e,max:t}})=>t===void 0?(0,It.str)`must contain at least ${e} valid item(s)`:(0,It.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,It._)`{minContains: ${e}}`:(0,It._)`{minContains: ${e}, maxContains: ${t}}`},YT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:XT,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,It._)`${n}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,qo.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,qo.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,qo.alwaysValidSchema)(o,r)){let y=(0,It._)`${l} >= ${a}`;s!==void 0&&(y=(0,It._)`${y} && ${l} <= ${s}`),e.pass(y);return}o.items=!0;const d=t.name("valid");s===void 0&&a===1?f(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),s!==void 0&&t.if((0,It._)`${n}.length > 0`,m)):(t.let(d,!1),m()),e.result(d,()=>e.reset());function m(){const y=t.name("_valid"),h=t.let("count",0);f(y,()=>t.if(y,()=>p(h)))}function f(y,h){t.forRange("i",0,l,$=>{e.subschema({keyword:"contains",dataProp:$,dataPropType:qo.Type.Num,compositeRule:!0},y),h()})}function p(y){t.code((0,It._)`${y}++`),s===void 0?t.if((0,It._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,It._)`${y} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,It._)`${y} >= ${a}`,()=>t.assign(d,!0)))}}};_l.default=YT;var i$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ce,r=B,i=Nt();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},
67
+ || ${a} === "boolean" || ${n} === null`).assign(s,(0,oe._)`[${n}]`)}}}function OT({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,oe._)`${t} !== undefined`,()=>e.assign((0,oe._)`${t}[${r}]`,i))}function Bu(e,t,r,i=qn.Correct){const n=i===qn.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===qn.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)}}Fe.checkDataType=Bu;function Mu(e,t,r,i){if(e.length===1)return Bu(e[0],t,r,i);let n;const o=(0,fv.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,Bu(a,t,r,i));return n}Fe.checkDataTypes=Mu;const TT={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,oe._)`{type: ${e}}`:(0,oe._)`{type: ${t}}`};function Zu(e){const t=xT(e);(0,bT.reportError)(t,TT)}Fe.reportTypeError=Zu;function xT(e){const{gen:t,data:r,schema:i}=e,n=(0,fv.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}var Wr={},hv;function PT(){if(hv)return Wr;hv=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.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))}Wr.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 Wr}var jt={},Se={},gv;function At(){if(gv)return Se;gv=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.validateUnion=Se.validateArray=Se.usePattern=Se.callValidateCode=Se.schemaProperties=Se.allSchemaProperties=Se.noPropertyInData=Se.propertyInData=Se.isOwnProperty=Se.hasPropFunc=Se.reportMissingProp=Se.checkMissingProp=Se.checkReportMissingProp=void 0;const e=ce,t=Z,r=on(),i=Z;function n(g,_){const{gen:I,data:P,it:j}=g;I.if(l(I,P,_,j.opts.ownProperties),()=>{g.setParams({missingProperty:(0,e._)`${_}`},!0),g.error()})}Se.checkReportMissingProp=n;function o({gen:g,data:_,it:{opts:I}},P,j){return(0,e.or)(...P.map(M=>(0,e.and)(l(g,_,M,I.ownProperties),(0,e._)`${j} = ${M}`)))}Se.checkMissingProp=o;function a(g,_){g.setParams({missingProperty:_},!0),g.error()}Se.reportMissingProp=a;function s(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Se.hasPropFunc=s;function c(g,_,I){return(0,e._)`${s(g)}.call(${_}, ${I})`}Se.isOwnProperty=c;function u(g,_,I,P){const j=(0,e._)`${_}${(0,e.getProperty)(I)} !== undefined`;return P?(0,e._)`${j} && ${c(g,_,I)}`:j}Se.propertyInData=u;function l(g,_,I,P){const j=(0,e._)`${_}${(0,e.getProperty)(I)} === undefined`;return P?(0,e.or)(j,(0,e.not)(c(g,_,I))):j}Se.noPropertyInData=l;function d(g){return g?Object.keys(g).filter(_=>_!=="__proto__"):[]}Se.allSchemaProperties=d;function m(g,_){return d(_).filter(I=>!(0,t.alwaysValidSchema)(g,_[I]))}Se.schemaProperties=m;function f({schemaCode:g,data:_,it:{gen:I,topSchemaRef:P,schemaPath:j,errorPath:M},it:le},pe,Ne,L){const Q=L?(0,e._)`${g}, ${_}, ${P}${j}`:_,X=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,M)],[r.default.parentData,le.parentData],[r.default.parentDataProperty,le.parentDataProperty],[r.default.rootData,r.default.rootData]];le.opts.dynamicRef&&X.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const W=(0,e._)`${Q}, ${I.object(...X)}`;return Ne!==e.nil?(0,e._)`${pe}.call(${Ne}, ${W})`:(0,e._)`${pe}(${W})`}Se.callValidateCode=f;const p=(0,e._)`new RegExp`;function y({gen:g,it:{opts:_}},I){const P=_.unicodeRegExp?"u":"",{regExp:j}=_.code,M=j(I,P);return g.scopeValue("pattern",{key:M.toString(),ref:M,code:(0,e._)`${j.code==="new RegExp"?p:(0,i.useFunc)(g,j)}(${I}, ${P})`})}Se.usePattern=y;function h(g){const{gen:_,data:I,keyword:P,it:j}=g,M=_.name("valid");if(j.allErrors){const pe=_.let("valid",!0);return le(()=>_.assign(pe,!1)),pe}return _.var(M,!0),le(()=>_.break()),M;function le(pe){const Ne=_.const("len",(0,e._)`${I}.length`);_.forRange("i",0,Ne,L=>{g.subschema({keyword:P,dataProp:L,dataPropType:t.Type.Num},M),_.if((0,e.not)(M),pe)})}}Se.validateArray=h;function $(g){const{gen:_,schema:I,keyword:P,it:j}=g;if(!Array.isArray(I))throw new Error("ajv implementation error");if(I.some(Ne=>(0,t.alwaysValidSchema)(j,Ne))&&!j.opts.unevaluated)return;const le=_.let("valid",!1),pe=_.name("_valid");_.block(()=>I.forEach((Ne,L)=>{const Q=g.subschema({keyword:P,schemaProp:L,compositeRule:!0},pe);_.assign(le,(0,e._)`${le} || ${pe}`),g.mergeValidEvaluated(Q,pe)||_.if((0,e.not)(le))})),g.result(le,()=>g.reset(),()=>g.error(!0))}return Se.validateUnion=$,Se}var yv;function zT(){if(yv)return jt;yv=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.validateKeywordUsage=jt.validSchemaType=jt.funcKeywordCode=jt.macroKeywordCode=void 0;const e=ce,t=on(),r=At(),i=Eo();function n(m,f){const{gen:p,keyword:y,schema:h,parentSchema:$,it:g}=m,_=f.macro.call(g.self,h,$,g),I=u(p,y,_);g.opts.validateSchema!==!1&&g.self.validateSchema(_,!0);const P=p.name("valid");m.subschema({schema:_,schemaPath:e.nil,errSchemaPath:`${g.errSchemaPath}/${y}`,topSchemaRef:I,compositeRule:!0},P),m.pass(P,()=>m.error(!0))}jt.macroKeywordCode=n;function o(m,f){var p;const{gen:y,keyword:h,schema:$,parentSchema:g,$data:_,it:I}=m;c(I,f);const P=!_&&f.compile?f.compile.call(I.self,$,g,I):f.validate,j=u(y,h,P),M=y.let("valid");m.block$data(M,le),m.ok((p=f.valid)!==null&&p!==void 0?p:M);function le(){if(f.errors===!1)L(),f.modifying&&a(m),Q(()=>m.error());else{const X=f.async?pe():Ne();f.modifying&&a(m),Q(()=>s(m,X))}}function pe(){const X=y.let("ruleErrs",null);return y.try(()=>L((0,e._)`await `),W=>y.assign(M,!1).if((0,e._)`${W} instanceof ${I.ValidationError}`,()=>y.assign(X,(0,e._)`${W}.errors`),()=>y.throw(W))),X}function Ne(){const X=(0,e._)`${j}.errors`;return y.assign(X,null),L(e.nil),X}function L(X=f.async?(0,e._)`await `:e.nil){const W=I.opts.passContext?t.default.this:t.default.self,Re=!("compile"in f&&!_||f.schema===!1);y.assign(M,(0,e._)`${X}${(0,r.callValidateCode)(m,j,W,Re)}`,f.modifying)}function Q(X){var W;y.if((0,e.not)((W=f.valid)!==null&&W!==void 0?W:M),X)}}jt.funcKeywordCode=o;function a(m){const{gen:f,data:p,it:y}=m;f.if(y.parentData,()=>f.assign(p,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function s(m,f){const{gen:p}=m;p.if((0,e._)`Array.isArray(${f})`,()=>{p.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${f} : ${t.default.vErrors}.concat(${f})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},f){if(f.async&&!m.$async)throw new Error("async keyword in sync schema")}function u(m,f,p){if(p===void 0)throw new Error(`keyword "${f}" failed to compile`);return m.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0,e.stringify)(p)})}function l(m,f,p=!1){return!f.length||f.some(y=>y==="array"?Array.isArray(m):y==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==y||p&&typeof m>"u")}jt.validSchemaType=l;function d({schema:m,opts:f,self:p,errSchemaPath:y},h,$){if(Array.isArray(h.keyword)?!h.keyword.includes($):h.keyword!==$)throw new Error("ajv implementation error");const g=h.dependencies;if(g?.some(_=>!Object.prototype.hasOwnProperty.call(m,_)))throw new Error(`parent schema must have dependencies of ${$}: ${g.join(",")}`);if(h.validateSchema&&!h.validateSchema(m[$])){const I=`keyword "${$}" value is invalid at path "${y}": `+p.errorsText(h.validateSchema.errors);if(f.validateSchema==="log")p.logger.error(I);else throw new Error(I)}}return jt.validateKeywordUsage=d,jt}var Wt={},vv;function NT(){if(vv)return Wt;vv=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.extendSubschemaMode=Wt.extendSubschemaData=Wt.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')}Wt.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:p,dataPathArr:y,opts:h}=a,$=m.let("data",(0,e._)`${a.data}${(0,e.getProperty)(s)}`,!0);f($),o.errorPath=(0,e.str)`${p}${(0,t.getErrorPath)(s,c,h.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${s}`,o.dataPathArr=[...y,o.parentDataProperty]}if(u!==void 0){const p=u instanceof e.Name?u:m.let("data",u,!0);f(p),d!==void 0&&(o.propertyName=d)}l&&(o.dataTypes=l);function f(p){o.data=p,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,p]}}Wt.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 Wt.extendSubschemaMode=n,Wt}var We={},$v=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},_v={exports:{}},an=_v.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(){};Co(t,i,n,e,"",e)};an.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},an.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},an.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},an.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Co(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 an.arrayKeywords)for(var m=0;m<d.length;m++)Co(e,t,r,d[m],n+"/"+l+"/"+m,o,n,l,i,m)}else if(l in an.propsKeywords){if(d&&typeof d=="object")for(var f in d)Co(e,t,r,d[f],n+"/"+l+"/"+ET(f),o,n,l,i,f)}else(l in an.keywords||e.allKeys&&!(l in an.skipKeywords))&&Co(e,t,r,d,n+"/"+l,o,n,l,i)}r(i,n,o,a,s,c,u)}}function ET(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var CT=_v.exports;Object.defineProperty(We,"__esModule",{value:!0}),We.getSchemaRefs=We.resolveUrl=We.normalizeId=We._getFullPath=We.getFullPath=We.inlineRef=void 0;const DT=Z,jT=$v,AT=CT,UT=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function RT(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Lu(e):t?bv(e)<=t:!1}We.inlineRef=RT;const BT=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Lu(e){for(const t in e){if(BT.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Lu)||typeof r=="object"&&Lu(r))return!0}return!1}function bv(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!UT.has(r)&&(typeof e[r]=="object"&&(0,DT.eachItem)(e[r],i=>t+=bv(i)),t===1/0))return 1/0}return t}function kv(e,t="",r){r!==!1&&(t=Jn(t));const i=e.parse(t);return Sv(e,i)}We.getFullPath=kv;function Sv(e,t){return e.serialize(t).split("#")[0]+"#"}We._getFullPath=Sv;const MT=/#\/?$/;function Jn(e){return e?e.replace(MT,""):""}We.normalizeId=Jn;function ZT(e,t,r){return r=Jn(r),e.resolve(t,r)}We.resolveUrl=ZT;const LT=/^[a-z_][-a-z0-9._]*$/i;function FT(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:i}=this.opts,n=Jn(e[r]||t),o={"":n},a=kv(i,n,!1),s={},c=new Set;return AT(e,{allKeys:!0},(d,m,f,p)=>{if(p===void 0)return;const y=a+m;let h=o[p];typeof d[r]=="string"&&(h=$.call(this,d[r])),g.call(this,d.$anchor),g.call(this,d.$dynamicAnchor),o[m]=h;function $(_){const I=this.opts.uriResolver.resolve;if(_=Jn(h?I(h,_):_),c.has(_))throw l(_);c.add(_);let P=this.refs[_];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?u(d,P.schema,_):_!==Jn(y)&&(_[0]==="#"?(u(d,s[_],_),s[_]=d):this.refs[_]=y),_}function g(_){if(typeof _=="string"){if(!LT.test(_))throw new Error(`invalid anchor "${_}"`);$.call(this,`#${_}`)}}}),s;function u(d,m,f){if(m!==void 0&&!jT(d,m))throw l(f)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}We.getSchemaRefs=FT;var wv;function Do(){if(wv)return Kt;wv=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.getData=Kt.KeywordCxt=Kt.validateFunctionCode=void 0;const e=pT(),t=Fe,r=dv(),i=Fe,n=PT(),o=zT(),a=NT(),s=ce,c=on(),u=We,l=Z,d=Eo();function m(w){if(P(w)&&(M(w),I(w))){h(w);return}f(w,()=>(0,e.topBoolOrEmptySchema)(w))}Kt.validateFunctionCode=m;function f({gen:w,validateName:T,schema:C,schemaEnv:A,opts:J},de){J.code.es5?w.func(T,(0,s._)`${c.default.data}, ${c.default.valCxt}`,A.$async,()=>{w.code((0,s._)`"use strict"; ${g(C,J)}`),y(w,J),w.code(de)}):w.func(T,(0,s._)`${c.default.data}, ${p(J)}`,A.$async,()=>w.code(g(C,J)).code(de))}function p(w){return(0,s._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${w.dynamicRef?(0,s._)`, ${c.default.dynamicAnchors}={}`:s.nil}}={}`}function y(w,T){w.if(c.default.valCxt,()=>{w.var(c.default.instancePath,(0,s._)`${c.default.valCxt}.${c.default.instancePath}`),w.var(c.default.parentData,(0,s._)`${c.default.valCxt}.${c.default.parentData}`),w.var(c.default.parentDataProperty,(0,s._)`${c.default.valCxt}.${c.default.parentDataProperty}`),w.var(c.default.rootData,(0,s._)`${c.default.valCxt}.${c.default.rootData}`),T.dynamicRef&&w.var(c.default.dynamicAnchors,(0,s._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{w.var(c.default.instancePath,(0,s._)`""`),w.var(c.default.parentData,(0,s._)`undefined`),w.var(c.default.parentDataProperty,(0,s._)`undefined`),w.var(c.default.rootData,c.default.data),T.dynamicRef&&w.var(c.default.dynamicAnchors,(0,s._)`{}`)})}function h(w){const{schema:T,opts:C,gen:A}=w;f(w,()=>{C.$comment&&T.$comment&&X(w),Ne(w),A.let(c.default.vErrors,null),A.let(c.default.errors,0),C.unevaluated&&$(w),le(w),W(w)})}function $(w){const{gen:T,validateName:C}=w;w.evaluated=T.const("evaluated",(0,s._)`${C}.evaluated`),T.if((0,s._)`${w.evaluated}.dynamicProps`,()=>T.assign((0,s._)`${w.evaluated}.props`,(0,s._)`undefined`)),T.if((0,s._)`${w.evaluated}.dynamicItems`,()=>T.assign((0,s._)`${w.evaluated}.items`,(0,s._)`undefined`))}function g(w,T){const C=typeof w=="object"&&w[T.schemaId];return C&&(T.code.source||T.code.process)?(0,s._)`/*# sourceURL=${C} */`:s.nil}function _(w,T){if(P(w)&&(M(w),I(w))){j(w,T);return}(0,e.boolOrEmptySchema)(w,T)}function I({schema:w,self:T}){if(typeof w=="boolean")return!w;for(const C in w)if(T.RULES.all[C])return!0;return!1}function P(w){return typeof w.schema!="boolean"}function j(w,T){const{schema:C,gen:A,opts:J}=w;J.$comment&&C.$comment&&X(w),L(w),Q(w);const de=A.const("_errs",c.default.errors);le(w,de),A.var(T,(0,s._)`${de} === ${c.default.errors}`)}function M(w){(0,l.checkUnknownRules)(w),pe(w)}function le(w,T){if(w.opts.jtd)return vt(w,[],!1,T);const C=(0,t.getSchemaTypes)(w.schema),A=(0,t.coerceAndCheckDataType)(w,C);vt(w,C,!A,T)}function pe(w){const{schema:T,errSchemaPath:C,opts:A,self:J}=w;T.$ref&&A.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(T,J.RULES)&&J.logger.warn(`$ref: keywords ignored in schema at path "${C}"`)}function Ne(w){const{schema:T,opts:C}=w;T.default!==void 0&&C.useDefaults&&C.strictSchema&&(0,l.checkStrictMode)(w,"default is ignored in the schema root")}function L(w){const T=w.schema[w.opts.schemaId];T&&(w.baseId=(0,u.resolveUrl)(w.opts.uriResolver,w.baseId,T))}function Q(w){if(w.schema.$async&&!w.schemaEnv.$async)throw new Error("async schema in sync schema")}function X({gen:w,schemaEnv:T,schema:C,errSchemaPath:A,opts:J}){const de=C.$comment;if(J.$comment===!0)w.code((0,s._)`${c.default.self}.logger.log(${de})`);else if(typeof J.$comment=="function"){const Ge=(0,s.str)`${A}/$comment`,Nt=w.scopeValue("root",{ref:T.root});w.code((0,s._)`${c.default.self}.opts.$comment(${de}, ${Ge}, ${Nt}.schema)`)}}function W(w){const{gen:T,schemaEnv:C,validateName:A,ValidationError:J,opts:de}=w;C.$async?T.if((0,s._)`${c.default.errors} === 0`,()=>T.return(c.default.data),()=>T.throw((0,s._)`new ${J}(${c.default.vErrors})`)):(T.assign((0,s._)`${A}.errors`,c.default.vErrors),de.unevaluated&&Re(w),T.return((0,s._)`${c.default.errors} === 0`))}function Re({gen:w,evaluated:T,props:C,items:A}){C instanceof s.Name&&w.assign((0,s._)`${T}.props`,C),A instanceof s.Name&&w.assign((0,s._)`${T}.items`,A)}function vt(w,T,C,A){const{gen:J,schema:de,data:Ge,allErrors:Nt,opts:at,self:st}=w,{RULES:qe}=st;if(de.$ref&&(at.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(de,qe))){J.block(()=>G(w,"$ref",qe.all.$ref.definition));return}at.jtd||ln(w,T),J.block(()=>{for(const _t of qe.rules)xn(_t);xn(qe.post)});function xn(_t){(0,r.shouldUseGroup)(de,_t)&&(_t.type?(J.if((0,i.checkDataType)(_t.type,Ge,at.strictNumbers)),$t(w,_t),T.length===1&&T[0]===_t.type&&C&&(J.else(),(0,i.reportTypeError)(w)),J.endIf()):$t(w,_t),Nt||J.if((0,s._)`${c.default.errors} === ${A||0}`))}}function $t(w,T){const{gen:C,schema:A,opts:{useDefaults:J}}=w;J&&(0,n.assignDefaults)(w,T.type),C.block(()=>{for(const de of T.rules)(0,r.shouldUseRule)(A,de)&&G(w,de.keyword,de.definition,T.type)})}function ln(w,T){w.schemaEnv.meta||!w.opts.strictTypes||(Lt(w,T),w.opts.allowUnionTypes||U(w,T),O(w,w.dataTypes))}function Lt(w,T){if(T.length){if(!w.dataTypes.length){w.dataTypes=T;return}T.forEach(C=>{x(w.dataTypes,C)||b(w,`type "${C}" not allowed by context "${w.dataTypes.join(",")}"`)}),v(w,T)}}function U(w,T){T.length>1&&!(T.length===2&&T.includes("null"))&&b(w,"use allowUnionTypes to allow union type keyword")}function O(w,T){const C=w.self.RULES.all;for(const A in C){const J=C[A];if(typeof J=="object"&&(0,r.shouldUseRule)(w.schema,J)){const{type:de}=J.definition;de.length&&!de.some(Ge=>D(T,Ge))&&b(w,`missing type "${de.join(",")}" for keyword "${A}"`)}}}function D(w,T){return w.includes(T)||T==="number"&&w.includes("integer")}function x(w,T){return w.includes(T)||T==="integer"&&w.includes("number")}function v(w,T){const C=[];for(const A of w.dataTypes)x(T,A)?C.push(A):T.includes("integer")&&A==="number"&&C.push("integer");w.dataTypes=C}function b(w,T){const C=w.schemaEnv.baseId+w.errSchemaPath;T+=` at "${C}" (strictTypes)`,(0,l.checkStrictMode)(w,T,w.opts.strictTypes)}class z{constructor(T,C,A){if((0,o.validateKeywordUsage)(T,C,A),this.gen=T.gen,this.allErrors=T.allErrors,this.keyword=A,this.data=T.data,this.schema=T.schema[A],this.$data=C.$data&&T.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(T,this.schema,A,this.$data),this.schemaType=C.schemaType,this.parentSchema=T.schema,this.params={},this.it=T,this.def=C,this.$data)this.schemaCode=T.gen.const("vSchema",he(this.$data,T));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,C.schemaType,C.allowUndefined))throw new Error(`${A} value must be ${JSON.stringify(C.schemaType)}`);("code"in C?C.trackErrors:C.errors!==!1)&&(this.errsCount=T.gen.const("_errs",c.default.errors))}result(T,C,A){this.failResult((0,s.not)(T),C,A)}failResult(T,C,A){this.gen.if(T),A?A():this.error(),C?(this.gen.else(),C(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(T,C){this.failResult((0,s.not)(T),void 0,C)}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:C}=this;this.fail((0,s._)`${C} !== undefined && (${(0,s.or)(this.invalid$data(),T)})`)}error(T,C,A){if(C){this.setParams(C),this._error(T,A),this.setParams({});return}this._error(T,A)}_error(T,C){(T?d.reportExtraError:d.reportError)(this,this.def.error,C)}$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,C){C?Object.assign(this.params,T):this.params=T}block$data(T,C,A=s.nil){this.gen.block(()=>{this.check$data(T,A),C()})}check$data(T=s.nil,C=s.nil){if(!this.$data)return;const{gen:A,schemaCode:J,schemaType:de,def:Ge}=this;A.if((0,s.or)((0,s._)`${J} === undefined`,C)),T!==s.nil&&A.assign(T,!0),(de.length||Ge.validateSchema)&&(A.elseIf(this.invalid$data()),this.$dataError(),T!==s.nil&&A.assign(T,!1)),A.else()}invalid$data(){const{gen:T,schemaCode:C,schemaType:A,def:J,it:de}=this;return(0,s.or)(Ge(),Nt());function Ge(){if(A.length){if(!(C instanceof s.Name))throw new Error("ajv implementation error");const at=Array.isArray(A)?A:[A];return(0,s._)`${(0,i.checkDataTypes)(at,C,de.opts.strictNumbers,i.DataType.Wrong)}`}return s.nil}function Nt(){if(J.validateSchema){const at=T.scopeValue("validate$data",{ref:J.validateSchema});return(0,s._)`!${at}(${C})`}return s.nil}}subschema(T,C){const A=(0,a.getSubschema)(this.it,T);(0,a.extendSubschemaData)(A,this.it,T),(0,a.extendSubschemaMode)(A,T);const J={...this.it,...A,items:void 0,props:void 0};return _(J,C),J}mergeEvaluated(T,C){const{it:A,gen:J}=this;A.opts.unevaluated&&(A.props!==!0&&T.props!==void 0&&(A.props=l.mergeEvaluated.props(J,T.props,A.props,C)),A.items!==!0&&T.items!==void 0&&(A.items=l.mergeEvaluated.items(J,T.items,A.items,C)))}mergeValidEvaluated(T,C){const{it:A,gen:J}=this;if(A.opts.unevaluated&&(A.props!==!0||A.items!==!0))return J.if(C,()=>this.mergeEvaluated(T,s.Name)),!0}}Kt.KeywordCxt=z;function G(w,T,C,A){const J=new z(w,C,T);"code"in C?C.code(J,A):J.$data&&C.validate?(0,o.funcKeywordCode)(J,C):"macro"in C?(0,o.macroKeywordCode)(J,C):(C.compile||C.validate)&&(0,o.funcKeywordCode)(J,C)}const H=/^\/(?:[^~]|~0|~1)*$/,ve=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function he(w,{dataLevel:T,dataNames:C,dataPathArr:A}){let J,de;if(w==="")return c.default.rootData;if(w[0]==="/"){if(!H.test(w))throw new Error(`Invalid JSON-pointer: ${w}`);J=w,de=c.default.rootData}else{const st=ve.exec(w);if(!st)throw new Error(`Invalid JSON-pointer: ${w}`);const qe=+st[1];if(J=st[2],J==="#"){if(qe>=T)throw new Error(at("property/index",qe));return A[T-qe]}if(qe>T)throw new Error(at("data",qe));if(de=C[T-qe],!J)return de}let Ge=de;const Nt=J.split("/");for(const st of Nt)st&&(de=(0,s._)`${de}${(0,s.getProperty)((0,l.unescapeJsonPointer)(st))}`,Ge=(0,s._)`${Ge} && ${de}`);return Ge;function at(st,qe){return`Cannot access ${st} ${qe} levels up, current level is ${T}`}}return Kt.getData=he,Kt}var jo={},Iv;function Fu(){if(Iv)return jo;Iv=1,Object.defineProperty(jo,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return jo.default=e,jo}var Ao={},Ov;function Uo(){if(Ov)return Ao;Ov=1,Object.defineProperty(Ao,"__esModule",{value:!0});const e=We;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 Ao.default=t,Ao}var lt={};Object.defineProperty(lt,"__esModule",{value:!0}),lt.resolveSchema=lt.getCompilingSchema=lt.resolveRef=lt.compileSchema=lt.SchemaEnv=void 0;const Ut=ce,VT=Fu(),Sn=on(),Rt=We,Tv=Z,GT=Do();class Ro{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,Rt.normalizeId)(i?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=i?.$async,this.refs={}}}lt.SchemaEnv=Ro;function Vu(e){const t=xv.call(this,e);if(t)return t;const r=(0,Rt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:n}=this.opts.code,{ownProperties:o}=this.opts,a=new Ut.CodeGen(this.scope,{es5:i,lines:n,ownProperties:o});let s;e.$async&&(s=a.scopeValue("Error",{ref:VT.default,code:(0,Ut._)`require("ajv/dist/runtime/validation_error").default`}));const c=a.scopeName("validate");e.validateName=c;const u={gen:a,allErrors:this.opts.allErrors,data:Sn.default.data,parentData:Sn.default.parentData,parentDataProperty:Sn.default.parentDataProperty,dataNames:[Sn.default.data],dataPathArr:[Ut.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Ut.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Ut.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ut._)`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,GT.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);const d=a.toString();l=`${a.scopeRefs(Sn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const f=new Function(`${Sn.default.self}`,`${Sn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){const{props:p,items:y}=u;f.evaluated={props:p instanceof Ut.Name?void 0:p,items:y instanceof Ut.Name?void 0:y,dynamicProps:p instanceof Ut.Name,dynamicItems:y instanceof Ut.Name},f.source&&(f.source.evaluated=(0,Ut.stringify)(f.evaluated))}return e.validate=f,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)}}lt.compileSchema=Vu;function qT(e,t,r){var i;r=(0,Rt.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let o=HT.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 Ro({schema:a,schemaId:s,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=JT.call(this,o)}lt.resolveRef=qT;function JT(e){return(0,Rt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Vu.call(this,e)}function xv(e){for(const t of this._compilations)if(KT(t,e))return t}lt.getCompilingSchema=xv;function KT(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function HT(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Bo.call(this,e,t)}function Bo(e,t){const r=this.opts.uriResolver.parse(t),i=(0,Rt._getFullPath)(this.opts.uriResolver,r);let n=(0,Rt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return Gu.call(this,r,e);const o=(0,Rt.normalizeId)(i),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){const s=Bo.call(this,e,a);return typeof s?.schema!="object"?void 0:Gu.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||Vu.call(this,a),o===(0,Rt.normalizeId)(t)){const{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(n=(0,Rt.resolveUrl)(this.opts.uriResolver,n,u)),new Ro({schema:s,schemaId:c,root:e,baseId:n})}return Gu.call(this,r,a)}}lt.resolveSchema=Bo;const WT=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Gu(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,Tv.unescapeFragment)(s)];if(c===void 0)return;r=c;const u=typeof r=="object"&&r[this.opts.schemaId];!WT.has(s)&&u&&(t=(0,Rt.resolveUrl)(this.opts.uriResolver,t,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Tv.schemaHasRulesButRef)(r,this.RULES)){const s=(0,Rt.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=Bo.call(this,i,s)}const{schemaId:a}=this.opts;if(o=o||new Ro({schema:r,schemaId:a,root:i,baseId:t}),o.schema!==o.root.schema)return o}var YT="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",XT="Meta-schema for $data reference (JSON AnySchema extension proposal)",QT="object",ex=["$data"],tx={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},nx=!1,rx={$id:YT,description:XT,type:QT,required:ex,properties:tx,additionalProperties:nx},qu={},Mo={exports:{}};const ix=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Ju=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),ox=RegExp.prototype.test.bind(/^\d*$/u),Kn=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Ku=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Pv=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Hu=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),ax=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),dt=new Array(256);{const e="0123456789ABCDEF";for(let t=0;t<256;t++)dt[t]="%"+e[t>>4]+e[t&15]}function et(e){return e<2048?dt[192|e>>6]+dt[128|e&63]:e<65536?dt[224|e>>12]+dt[128|e>>6&63]+dt[128|e&63]:dt[240|e>>18]+dt[128|e>>12&63]+dt[128|e>>6&63]+dt[128|e&63]}const sx=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),cx=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),ux=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),lx=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function dx(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!ux(e[t])){if(e[t]==="%"&&t+2<e.length&&Kn(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function zv(e){let t=-1,r=0,i=-1,n=0;for(let s=0;s<e.length;s++)e[s]==="0"?(i===-1&&(i=s),n++,n>r&&(r=n,t=i)):(i=-1,n=0);if(r<2)return e.join(":");const o=e.slice(0,t).join(":"),a=e.slice(t+r).join(":");return o+"::"+a}function fx(e){const t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;const r=t===-1?e.split(":"):e.slice(0,t).split(":"),i=t===-1?[]:e.slice(t+2).split(":");t!==-1&&(r.length===1&&r[0]===""&&(r.length=0),i.length===1&&i[0]===""&&(i.length=0));const n=r.concat(i);let o=0;for(let s=0;s<n.length;s++){const c=n[s];if(c==="")return;if(c.indexOf(".")!==-1){if(s!==n.length-1||t!==-1&&i.length===0||!Ju(c))return;o+=2;continue}if(!sx(c))return;n[s]=parseInt(c,16).toString(16),o++}if(t===-1)return o!==8?void 0:zv(n);if(o>=8)return;const a=n.slice(0,r.length);for(let s=o;s<8;s++)a.push("0");for(let s=r.length;s<n.length;s++)a.push(n[s]);return zv(a)}function Wu(e){const t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let i=t?e.slice(1,-1):e;if(t&&cx(i))return i=i.toLowerCase(),{host:`[${i}]`,escapedHost:i,isIPV6:!1,isIPVFuture:!0};if(mx(i,":")<2)return{host:e,isIPV6:!1,error:t};let n="";const o=i.indexOf("%");if(o!==-1){const s=i.slice(o,o+3).toLowerCase()==="%25"?3:1;if(n=i.slice(o+s),!dx(n))return{host:e,isIPV6:!1,error:!0};i=i.slice(0,o)}const a=fx(i);return a===void 0?{host:e,isIPV6:!1,error:!0}:{host:a+(n?"%"+n:""),escapedHost:a+(n?"%25"+n:""),isIPV6:!0}}function mx(e,t){let r=0;for(let i=0;i<e.length;i++)e[i]===t&&r++;return r}function px(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 hx={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},gx=/[@/?#:]/g,yx=/[@/?#]/g;function Nv(e,t){const r=t?yx:gx;return r.lastIndex=0,e.replace(r,i=>hx[i])}function Ev(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(Kn(n)){const o=n.toUpperCase(),a=String.fromCharCode(parseInt(o,16));t&&Ku(a)?r+=a:r+="%"+o,i+=2;continue}}r+=e[i]}return r}function vx(e){let t="";for(let r=0;r<e.length;r++){const i=e[r];if(i==="%"&&r+2<e.length){const n=e.slice(r+1,r+3);if(Kn(n)){const o=n.toUpperCase(),a=String.fromCharCode(parseInt(o,16));a!=="."&&Ku(a)?t+=a:t+="%"+o,r+=2;continue}}if(Pv(i))t+=i;else{const n=e.charCodeAt(r);if(n<128)t+=Cv(n)?i:dt[n];else if(n<55296||n>57343)t+=et(n);else if(n<=56319&&r+1<e.length){const o=e.charCodeAt(r+1);o>=56320&&o<=57343?(t+=et(65536+(n-55296<<10)+(o-56320)),r++):t+=et(65533)}else t+=et(65533)}}return t}function $x(e,t=!1){let r="",i=t&&e[0]!=="/";for(let n=0;n<e.length;n++){const o=e[n];if(o==="%"&&n+2<e.length){const a=e.slice(n+1,n+3);if(Kn(a)){r+="%"+a.toUpperCase(),n+=2;continue}}if(o==="/"&&(i=!1),Pv(o)&&(o!==":"||!i))r+=o;else{const a=e.charCodeAt(n);if(a<128)r+=dt[a];else if(a<55296||a>57343)r+=et(a);else if(a<=56319&&n+1<e.length){const s=e.charCodeAt(n+1);s>=56320&&s<=57343?(r+=et(65536+(a-55296<<10)+(s-56320)),n++):r+=et(65533)}else r+=et(65533)}}return r}function Yu(e,t){let r="";for(let i=0;i<e.length;i++){const n=e[i];if(n==="%"&&i+2<e.length){const o=e.slice(i+1,i+3);if(Kn(o)){r+="%"+o.toUpperCase(),i+=2;continue}}if(t(n))r+=n;else{const o=e.charCodeAt(i);if(o<128)r+=dt[o];else if(o<55296||o>57343)r+=et(o);else if(o<=56319&&i+1<e.length){const a=e.charCodeAt(i+1);a>=56320&&a<=57343?(r+=et(65536+(o-55296<<10)+(a-56320)),i++):r+=et(65533)}else r+=et(65533)}}return r}function _x(e){return Yu(e,ax)}function bx(e){return Yu(e,Hu)}function kx(e){return Yu(e,Hu)}function Cv(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function Sx(e){let t="";for(let r=0;r<e.length;r++){const i=e[r];if(i==="%"&&r+2<e.length){const n=e.slice(r+1,r+3);if(Kn(n)){const o=n.toUpperCase(),a=String.fromCharCode(parseInt(o,16));Ku(a)?t+=a:t+="%"+o,r+=2;continue}}if(Hu(i))t+=i;else{const n=e.charCodeAt(r);if(n<128)t+=Cv(n)?i:dt[n];else if(n<55296||n>57343)t+=et(n);else if(n<=56319&&r+1<e.length){const o=e.charCodeAt(r+1);o>=56320&&o<=57343?(t+=et(65536+(n-55296<<10)+(o-56320)),r++):t+=et(65533)}else t+=et(65533)}}return t}function wx(e){const t=[];if(e.userinfo!==void 0&&(t.push(_x(e.userinfo)),t.push("@")),e.host!==void 0){let r=e.host;if(!Ju(r)){let i=Wu(r);i.isIPV6!==!0&&i.isIPVFuture!==!0&&(r=Ev(r,!0),i=Wu(r)),i.isIPV6===!0||i.isIPVFuture===!0?r=`[${i.escapedHost}]`:r=Nv(r,!1)}t.push(r)}if(typeof e.port=="number"||typeof e.port=="string"){const r=String(e.port);if(!ox(r))throw new TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}var Dv={nonSimpleDomain:lx,recomposeAuthority:wx,reescapeHostDelimiters:Nv,normalizePercentEncoding:Ev,normalizePathEncoding:vx,serializePathEncoding:$x,normalizeQueryFragmentEncoding:Sx,encodeQuery:bx,encodeFragment:kx,removeDotSegments:px,isIPv4:Ju,isUUID:ix,normalizeIPv6:Wu};const{isUUID:Ix}=Dv,Ox=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;function jv(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 Av(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function Uv(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 Tx(e){return e.secure=jv(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function xx(e){if((e.port===(jv(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=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function Px(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(Ox);if(r&&r[0]===e.path){const i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const n=`${i}:${t.nid||e.nid}`,o=Xu(n);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function zx(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=Xu(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 Nx(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!Ix(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Ex(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const Rv={scheme:"http",domainHost:!0,parse:Av,serialize:Uv},Cx={scheme:"https",domainHost:Rv.domainHost,parse:Av,serialize:Uv},Zo={scheme:"ws",domainHost:!0,parse:Tx,serialize:xx},Dx={scheme:"wss",domainHost:Zo.domainHost,parse:Zo.parse,serialize:Zo.serialize},jx={scheme:"urn",parse:Px,serialize:zx,skipNormalize:!0},Ax={scheme:"urn:uuid",parse:Nx,serialize:Ex,skipNormalize:!0},Lo={http:Rv,https:Cx,ws:Zo,wss:Dx,urn:jx,"urn:uuid":Ax};Object.setPrototypeOf(Lo,null);function Xu(e){return e&&(Lo[e]||Lo[e.toLowerCase()])||void 0}var Ux={SCHEMES:Lo,getSchemeHandler:Xu};const{normalizeIPv6:Bv,removeDotSegments:Yr,recomposeAuthority:Rx,normalizePercentEncoding:Mv,normalizePathEncoding:Bx,serializePathEncoding:Zv,normalizeQueryFragmentEncoding:Lv,encodeQuery:Mx,encodeFragment:Zx,reescapeHostDelimiters:Lx,isIPv4:Fv,nonSimpleDomain:Fx}=Dv,{SCHEMES:Vv,getSchemeHandler:Qu}=Ux,Gv=/^[A-Za-z][A-Za-z0-9+.-]*$/u,qv="URI scheme is malformed.";function Jv(e){const t=unescape(String(e));if(!Gv.test(t))throw new TypeError(qv);return t}function Vx(e,t){return typeof e=="string"?e=Xx(e,t):typeof e=="object"&&(e=Vo(wn(e,t),t)),e}function Gx(e,t,r){const i=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:o,malformedPercentEncoding:a,malformedSchemeSpecific:s,malformedHost:c,malformedScheme:u}=Fo(e,i),{parsed:l,malformedAuthorityOrPort:d,malformedPercentEncoding:m,malformedSchemeSpecific:f,malformedHost:p,malformedScheme:y}=Fo(t,i);if(o||d||a||m||s||f||c||p||u||y)throw new Error(n.error||l.error||"URI is malformed.");const h=Kv(n,l,i,!0),$=Qu(r&&r.scheme||h.scheme),g=h.host,_=g!==void 0&&g!==""&&(Fv(g)||Bv(g).isIPV6);Hv(h,r||{},$,_);const I=g&&g.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(g);if(h.error&&!I)throw new Error(h.error);return i.skipEscape=!0,wn(h,i)}function Kv(e,t,r,i){const n={};return i||(e=Vo(wn(e,r),r),t=Vo(wn(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=Yr(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=Yr(t.path||""),n.query=t.query):(t.path?(t.path[0]==="/"?n.path=Yr(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=Yr(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 qx(e,t,r){const i=Yv(e,r),n=Yv(t,r);return i!==void 0&&n!==void 0&&i===n}function wn(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=[];r.scheme&&(r.scheme=Jv(r.scheme));const o=Qu(i.scheme||r.scheme);o&&o.serialize&&o.serialize(r,i);const a=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,s=!i.skipEscape&&r.scheme===void 0&&!a;r.path!==void 0&&(i.skipEscape?r.path=Mv(r.path):r.path=Zv(r.path,s)),i.reference!=="suffix"&&r.scheme&&(r.scheme=Jv(r.scheme),n.push(r.scheme,":"));const c=Rx(r);if(c!==void 0&&(i.reference!=="suffix"&&n.push("//"),n.push(c),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let u=r.path;!i.absolutePath&&(!o||!o.absolutePath)&&(u=Yr(u)),s&&(u=Zv(u,!0)),c===void 0&&u[0]==="/"&&u[1]==="/"&&(u="/%2F"+u.slice(2)),n.push(u)}return r.query!==void 0&&n.push("?",Mx(r.query)),r.fragment!==void 0&&n.push("#",Zx(r.fragment)),n.join("")}const Jx=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Kx=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Hx=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Wx(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 Xr(e){if(e===void 0)return!1;let t=e.indexOf("%");for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function el(e){return e[0]==="["&&e[e.length-1]==="]"}function Yx(e){const t=e[4];return Xr(e[3])||t!==void 0&&!el(t)&&Xr(t)||Xr(e[6])||Xr(e[7])||Xr(e[8])}function Hv(e,t,r,i){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!el(e.host)&&(t.domainHost||r&&r.domainHost)&&i===!1&&Fx(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(n){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+n,!0}return!1}function Fo(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,a=!1,s=!1,c=!1,u=!1,l=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);const d=e.match(Kx);d!==null&&d[1].indexOf("\\")!==-1&&(i.error="URI authority must not contain a literal backslash.",n=!0);const m=e.match(Hx);if(m!==null){const p=m[1],y=p.replace(/[\t\n\r]/g,"");y.length>=2&&(y.slice(0,2)!=="//"?(i.error=i.error||"URI authority must not contain a literal backslash.",n=!0):p.length!==y.length&&(i.error=i.error||"URI authority introducer must not contain whitespace.",n=!0))}const f=e.match(Jx);if(f){if(i.scheme=f[1],i.userinfo=f[3],i.host=f[4],i.port=parseInt(f[5],10),i.path=f[6]||"",i.query=f[7],i.fragment=f[8],i.scheme!==void 0){const h=unescape(i.scheme);Gv.test(h)?i.scheme=h.toLowerCase():(i.error=i.error||qv,u=!0)}o=Yx(f),o&&(i.error=i.error||"URI contains malformed percent-encoding."),isNaN(i.port)&&(i.port=f[5]);const p=Wx(i,f);if(p!==void 0&&(i.error=i.error||p,n=!0),i.host)if(Fv(i.host)===!1){const $=el(i.host),g=i.host.indexOf("[")!==-1||i.host.indexOf("]")!==-1,_=Bv(i.host);l=_.isIPV6||_.isIPVFuture===!0,c=g&&(!$||_.error===!0),i.host=l?_.host:_.host.toLowerCase(),c&&(i.error=i.error||"URI host is malformed.",n=!0)}else l=!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 y=Qu(r.scheme||i.scheme);if(c||(s=Hv(i,r,y,l)),!y||y&&!y.skipNormalize){if(e.indexOf("%")!==-1&&i.host!==void 0&&!c){const h=l?i.host:Mv(i.host,!0);i.host=Lx(h,l)}i.path&&(i.path=Bx(i.path)),i.query&&(i.query=Lv(i.query)),i.fragment&&(i.fragment=Lv(i.fragment))}y&&y.parse&&(y.parse(i,r),y===Vv.urn&&i.nid===void 0&&(a=!0))}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:u}}function Vo(e,t){return Fo(e,t).parsed}function Xx(e,t){return Wv(e,t).normalized}function Wv(e,t){const{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:s}=Fo(e,t);return{normalized:i||n||o||a||s?e:wn(r,t),malformedAuthorityOrPort:i,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:a,malformedScheme:s}}function Yv(e,t){if(typeof e!="string"&&typeof e!="object")return;let r;try{r=typeof e=="string"?e:wn(e,t)}catch{return}const{normalized:i,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:c}=Wv(r,t);return n||o||a||s||c?void 0:i}const tl={SCHEMES:Vv,normalize:Vx,resolve:Gx,resolveComponent:Kv,equal:qx,serialize:wn,parse:Vo};Mo.exports=tl,Mo.exports.default=tl,Mo.exports.fastUri=tl;var Qx=Mo.exports;Object.defineProperty(qu,"__esModule",{value:!0});const Xv=Qx;Xv.code='require("ajv/dist/runtime/uri").default',qu.default=Xv,(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=Do();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=Fu(),n=Uo(),o=kn,a=lt,s=ce,c=We,u=Fe,l=Z,d=rx,m=qu,f=(U,O)=>new RegExp(U,O);f.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),h={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."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},g=200;function _(U){var O,D,x,v,b,z,G,H,ve,he,w,T,C,A,J,de,Ge,Nt,at,st,qe,xn,_t,sa,ca;const nr=U.strict,ua=(O=U.code)===null||O===void 0?void 0:O.optimize,Vl=ua===!0||ua===void 0?1:ua||0,Gl=(x=(D=U.code)===null||D===void 0?void 0:D.regExp)!==null&&x!==void 0?x:f,H$=(v=U.uriResolver)!==null&&v!==void 0?v:m.default;return{strictSchema:(z=(b=U.strictSchema)!==null&&b!==void 0?b:nr)!==null&&z!==void 0?z:!0,strictNumbers:(H=(G=U.strictNumbers)!==null&&G!==void 0?G:nr)!==null&&H!==void 0?H:!0,strictTypes:(he=(ve=U.strictTypes)!==null&&ve!==void 0?ve:nr)!==null&&he!==void 0?he:"log",strictTuples:(T=(w=U.strictTuples)!==null&&w!==void 0?w:nr)!==null&&T!==void 0?T:"log",strictRequired:(A=(C=U.strictRequired)!==null&&C!==void 0?C:nr)!==null&&A!==void 0?A:!1,code:U.code?{...U.code,optimize:Vl,regExp:Gl}:{optimize:Vl,regExp:Gl},loopRequired:(J=U.loopRequired)!==null&&J!==void 0?J:g,loopEnum:(de=U.loopEnum)!==null&&de!==void 0?de:g,meta:(Ge=U.meta)!==null&&Ge!==void 0?Ge:!0,messages:(Nt=U.messages)!==null&&Nt!==void 0?Nt:!0,inlineRefs:(at=U.inlineRefs)!==null&&at!==void 0?at:!0,schemaId:(st=U.schemaId)!==null&&st!==void 0?st:"$id",addUsedSchema:(qe=U.addUsedSchema)!==null&&qe!==void 0?qe:!0,validateSchema:(xn=U.validateSchema)!==null&&xn!==void 0?xn:!0,validateFormats:(_t=U.validateFormats)!==null&&_t!==void 0?_t:!0,unicodeRegExp:(sa=U.unicodeRegExp)!==null&&sa!==void 0?sa:!0,int32range:(ca=U.int32range)!==null&&ca!==void 0?ca:!0,uriResolver:H$}}class I{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,..._(O)};const{es5:D,lines:x}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:y,es5:D,lines:x}),this.logger=Q(O.logger);const v=O.validateFormats;O.validateFormats=!1,this.RULES=(0,o.getRules)(),P.call(this,h,O,"NOT SUPPORTED"),P.call(this,$,O,"DEPRECATED","warn"),this._metaOpts=Ne.call(this),O.formats&&le.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&pe.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),M.call(this),O.validateFormats=v}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:D,schemaId:x}=this.opts;let v=d;x==="id"&&(v={...d},v.id=v.$id,delete v.$id),D&&O&&this.addMetaSchema(v,v[x],!1)}defaultMeta(){const{meta:O,schemaId:D}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[D]||O:void 0}validate(O,D){let x;if(typeof O=="string"){if(x=this.getSchema(O),!x)throw new Error(`no schema with key or ref "${O}"`)}else x=this.compile(O);const v=x(D);return"$async"in x||(this.errors=x.errors),v}compile(O,D){const x=this._addSchema(O,D);return x.validate||this._compileSchemaEnv(x)}compileAsync(O,D){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:x}=this.opts;return v.call(this,O,D);async function v(he,w){await b.call(this,he.$schema);const T=this._addSchema(he,w);return T.validate||z.call(this,T)}async function b(he){he&&!this.getSchema(he)&&await v.call(this,{$ref:he},!0)}async function z(he){try{return this._compileSchemaEnv(he)}catch(w){if(!(w instanceof n.default))throw w;return G.call(this,w),await H.call(this,w.missingSchema),z.call(this,he)}}function G({missingSchema:he,missingRef:w}){if(this.refs[he])throw new Error(`AnySchema ${he} is loaded but ${w} cannot be resolved`)}async function H(he){const w=await ve.call(this,he);this.refs[he]||await b.call(this,w.$schema),this.refs[he]||this.addSchema(w,he,D)}async function ve(he){const w=this._loading[he];if(w)return w;try{return await(this._loading[he]=x(he))}finally{delete this._loading[he]}}}addSchema(O,D,x,v=this.opts.validateSchema){if(Array.isArray(O)){for(const z of O)this.addSchema(z,void 0,x,v);return this}let b;if(typeof O=="object"){const{schemaId:z}=this.opts;if(b=O[z],b!==void 0&&typeof b!="string")throw new Error(`schema ${z} must be string`)}return D=(0,c.normalizeId)(D||b),this._checkUnique(D),this.schemas[D]=this._addSchema(O,x,D,v,!0),this}addMetaSchema(O,D,x=this.opts.validateSchema){return this.addSchema(O,D,!0,x),this}validateSchema(O,D){if(typeof O=="boolean")return!0;let x;if(x=O.$schema,x!==void 0&&typeof x!="string")throw new Error("$schema must be a string");if(x=x||this.opts.defaultMeta||this.defaultMeta(),!x)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const v=this.validate(x,O);if(!v&&D){const b="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(b);else throw new Error(b)}return v}getSchema(O){let D;for(;typeof(D=j.call(this,O))=="string";)O=D;if(D===void 0){const{schemaId:x}=this.opts,v=new a.SchemaEnv({schema:{},schemaId:x});if(D=a.resolveSchema.call(this,v,O),!D)return;this.refs[O]=D}return D.validate||this._compileSchemaEnv(D)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const D=j.call(this,O);return typeof D=="object"&&this._cache.delete(D.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const D=O;this._cache.delete(D);let x=O[this.opts.schemaId];return x&&(x=(0,c.normalizeId)(x),delete this.schemas[x],delete this.refs[x]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const D of O)this.addKeyword(D);return this}addKeyword(O,D){let x;if(typeof O=="string")x=O,typeof D=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),D.keyword=x);else if(typeof O=="object"&&D===void 0){if(D=O,x=D.keyword,Array.isArray(x)&&!x.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,x,D),!D)return(0,l.eachItem)(x,b=>Re.call(this,b)),this;$t.call(this,D);const v={...D,type:(0,u.getJSONTypes)(D.type),schemaType:(0,u.getJSONTypes)(D.schemaType)};return(0,l.eachItem)(x,v.type.length===0?b=>Re.call(this,b,v):b=>v.type.forEach(z=>Re.call(this,b,v,z))),this}getKeyword(O){const D=this.RULES.all[O];return typeof D=="object"?D.definition:!!D}removeKeyword(O){const{RULES:D}=this;delete D.keywords[O],delete D.all[O];for(const x of D.rules){const v=x.rules.findIndex(b=>b.keyword===O);v>=0&&x.rules.splice(v,1)}return this}addFormat(O,D){return typeof D=="string"&&(D=new RegExp(D)),this.formats[O]=D,this}errorsText(O=this.errors,{separator:D=", ",dataVar:x="data"}={}){return!O||O.length===0?"No errors":O.map(v=>`${x}${v.instancePath} ${v.message}`).reduce((v,b)=>v+D+b)}$dataMetaSchema(O,D){const x=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const v of D){const b=v.split("/").slice(1);let z=O;for(const G of b)z=z[G];for(const G in x){const H=x[G];if(typeof H!="object")continue;const{$data:ve}=H.definition,he=z[G];ve&&he&&(z[G]=Lt(he))}}return O}_removeAllSchemas(O,D){for(const x in O){const v=O[x];(!D||D.test(x))&&(typeof v=="string"?delete O[x]:v&&!v.meta&&(this._cache.delete(v.schema),delete O[x]))}}_addSchema(O,D,x,v=this.opts.validateSchema,b=this.opts.addUsedSchema){let z;const{schemaId:G}=this.opts;if(typeof O=="object")z=O[G];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let H=this._cache.get(O);if(H!==void 0)return H;x=(0,c.normalizeId)(z||x);const ve=c.getSchemaRefs.call(this,O,x);return H=new a.SchemaEnv({schema:O,schemaId:G,meta:D,baseId:x,localRefs:ve}),this._cache.set(H.schema,H),b&&!x.startsWith("#")&&(x&&this._checkUnique(x),this.refs[x]=H),v&&this.validateSchema(O,!0),H}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):a.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const D=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,O)}finally{this.opts=D}}}I.ValidationError=i.default,I.MissingRefError=n.default,e.default=I;function P(U,O,D,x="error"){for(const v in U){const b=v;b in O&&this.logger[x](`${D}: option ${v}. ${U[b]}`)}}function j(U){return U=(0,c.normalizeId)(U),this.schemas[U]||this.refs[U]}function M(){const U=this.opts.schemas;if(U)if(Array.isArray(U))this.addSchema(U);else for(const O in U)this.addSchema(U[O],O)}function le(){for(const U in this.opts.formats){const O=this.opts.formats[U];O&&this.addFormat(U,O)}}function pe(U){if(Array.isArray(U)){this.addVocabulary(U);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in U){const D=U[O];D.keyword||(D.keyword=O),this.addKeyword(D)}}function Ne(){const U={...this.opts};for(const O of p)delete U[O];return U}const L={log(){},warn(){},error(){}};function Q(U){if(U===!1)return L;if(U===void 0)return console;if(U.log&&U.warn&&U.error)return U;throw new Error("logger must implement log, warn and error methods")}const X=/^[a-z_$][a-z0-9_$:-]*$/i;function W(U,O){const{RULES:D}=this;if((0,l.eachItem)(U,x=>{if(D.keywords[x])throw new Error(`Keyword ${x} is already defined`);if(!X.test(x))throw new Error(`Keyword ${x} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function Re(U,O,D){var x;const v=O?.post;if(D&&v)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:b}=this;let z=v?b.post:b.rules.find(({type:H})=>H===D);if(z||(z={type:D,rules:[]},b.rules.push(z)),b.keywords[U]=!0,!O)return;const G={keyword:U,definition:{...O,type:(0,u.getJSONTypes)(O.type),schemaType:(0,u.getJSONTypes)(O.schemaType)}};O.before?vt.call(this,z,G,O.before):z.rules.push(G),b.all[U]=G,(x=O.implements)===null||x===void 0||x.forEach(H=>this.addKeyword(H))}function vt(U,O,D){const x=U.rules.findIndex(v=>v.keyword===D);x>=0?U.rules.splice(x,0,O):(U.rules.push(O),this.logger.warn(`rule ${D} is not defined`))}function $t(U){let{metaSchema:O}=U;O!==void 0&&(U.$data&&this.opts.$data&&(O=Lt(O)),U.validateSchema=this.compile(O,!0))}const ln={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Lt(U){return{anyOf:[U,ln]}}})(Qy);var nl={},rl={},il={};Object.defineProperty(il,"__esModule",{value:!0});const eP={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};il.default=eP;var In={};Object.defineProperty(In,"__esModule",{value:!0}),In.callRef=In.getValidate=void 0;const tP=Uo(),Qv=At(),ft=ce,Hn=on(),e$=lt,Go=Z,nP={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=e$.resolveRef.call(c,u,n,r);if(l===void 0)throw new tP.default(i.opts.uriResolver,n,r);if(l instanceof e$.SchemaEnv)return m(l);return f(l);function d(){if(o===u)return qo(e,a,o,o.$async);const p=t.scopeValue("root",{ref:u});return qo(e,(0,ft._)`${p}.validate`,u,u.$async)}function m(p){const y=t$(e,p);qo(e,y,p,p.$async)}function f(p){const y=t.scopeValue("schema",s.code.source===!0?{ref:p,code:(0,ft.stringify)(p)}:{ref:p}),h=t.name("valid"),$=e.subschema({schema:p,dataTypes:[],schemaPath:ft.nil,topSchemaRef:y,errSchemaPath:r},h);e.mergeEvaluated($),e.ok(h)}}};function t$(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,ft._)`${r.scopeValue("wrapper",{ref:t})}.validate`}In.getValidate=t$;function qo(e,t,r,i){const{gen:n,it:o}=e,{allErrors:a,schemaEnv:s,opts:c}=o,u=c.passContext?Hn.default.this:ft.nil;i?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");const p=n.let("valid");n.try(()=>{n.code((0,ft._)`await ${(0,Qv.callValidateCode)(e,t,u)}`),f(t),a||n.assign(p,!0)},y=>{n.if((0,ft._)`!(${y} instanceof ${o.ValidationError})`,()=>n.throw(y)),m(y),a||n.assign(p,!1)}),e.ok(p)}function d(){e.result((0,Qv.callValidateCode)(e,t,u),()=>f(t),()=>m(t))}function m(p){const y=(0,ft._)`${p}.errors`;n.assign(Hn.default.vErrors,(0,ft._)`${Hn.default.vErrors} === null ? ${y} : ${Hn.default.vErrors}.concat(${y})`),n.assign(Hn.default.errors,(0,ft._)`${Hn.default.vErrors}.length`)}function f(p){var y;if(!o.opts.unevaluated)return;const h=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(h&&!h.dynamicProps)h.props!==void 0&&(o.props=Go.mergeEvaluated.props(n,h.props,o.props));else{const $=n.var("props",(0,ft._)`${p}.evaluated.props`);o.props=Go.mergeEvaluated.props(n,$,o.props,ft.Name)}if(o.items!==!0)if(h&&!h.dynamicItems)h.items!==void 0&&(o.items=Go.mergeEvaluated.items(n,h.items,o.items));else{const $=n.var("items",(0,ft._)`${p}.evaluated.items`);o.items=Go.mergeEvaluated.items(n,$,o.items,ft.Name)}}}In.callRef=qo,In.default=nP,Object.defineProperty(rl,"__esModule",{value:!0});const rP=il,iP=In,oP=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",rP.default,iP.default];rl.default=oP;var ol={},al={};Object.defineProperty(al,"__esModule",{value:!0});const Jo=ce,sn=Jo.operators,Ko={maximum:{okStr:"<=",ok:sn.LTE,fail:sn.GT},minimum:{okStr:">=",ok:sn.GTE,fail:sn.LT},exclusiveMaximum:{okStr:"<",ok:sn.LT,fail:sn.GTE},exclusiveMinimum:{okStr:">",ok:sn.GT,fail:sn.LTE}},aP={message:({keyword:e,schemaCode:t})=>(0,Jo.str)`must be ${Ko[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Jo._)`{comparison: ${Ko[e].okStr}, limit: ${t}}`},sP={keyword:Object.keys(Ko),type:"number",schemaType:"number",$data:!0,error:aP,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,Jo._)`${r} ${Ko[t].fail} ${i} || isNaN(${r})`)}};al.default=sP;var sl={};Object.defineProperty(sl,"__esModule",{value:!0});const Qr=ce,cP={message:({schemaCode:e})=>(0,Qr.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Qr._)`{multipleOf: ${e}}`},uP={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:cP,code(e){const{gen:t,data:r,schemaCode:i,it:n}=e,o=n.opts.multipleOfPrecision,a=t.let("res"),s=o?(0,Qr._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,Qr._)`${a} !== parseInt(${a})`;e.fail$data((0,Qr._)`(${i} === 0 || (${a} = ${r}/${i}, ${s}))`)}};sl.default=uP;var cl={},ul={};Object.defineProperty(ul,"__esModule",{value:!0});function n$(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}ul.default=n$,n$.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(cl,"__esModule",{value:!0});const On=ce,lP=Z,dP=ul,fP={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,On.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,On._)`{limit: ${e}}`},mP={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:fP,code(e){const{keyword:t,data:r,schemaCode:i,it:n}=e,o=t==="maxLength"?On.operators.GT:On.operators.LT,a=n.opts.unicode===!1?(0,On._)`${r}.length`:(0,On._)`${(0,lP.useFunc)(e.gen,dP.default)}(${r})`;e.fail$data((0,On._)`${a} ${o} ${i}`)}};cl.default=mP;var ll={};Object.defineProperty(ll,"__esModule",{value:!0});const pP=At(),hP=Z,Wn=ce,gP={message:({schemaCode:e})=>(0,Wn.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Wn._)`{pattern: ${e}}`},yP={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:gP,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,Wn._)`new RegExp`:(0,hP.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,Wn._)`${u}(${o}, ${s}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,Wn._)`!${l}`)}else{const c=(0,pP.usePattern)(e,n);e.fail$data((0,Wn._)`!${c}.test(${r})`)}}};ll.default=yP;var dl={};Object.defineProperty(dl,"__esModule",{value:!0});const ei=ce,vP={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,ei.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,ei._)`{limit: ${e}}`},$P={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:vP,code(e){const{keyword:t,data:r,schemaCode:i}=e,n=t==="maxProperties"?ei.operators.GT:ei.operators.LT;e.fail$data((0,ei._)`Object.keys(${r}).length ${n} ${i}`)}};dl.default=$P;var fl={};Object.defineProperty(fl,"__esModule",{value:!0});const ti=At(),ni=ce,_P=Z,bP={message:({params:{missingProperty:e}})=>(0,ni.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,ni._)`{missingProperty: ${e}}`},kP={keyword:"required",type:"object",schemaType:"array",$data:!0,error:bP,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 f=e.parentSchema.properties,{definedProperties:p}=e.it;for(const y of r)if(f?.[y]===void 0&&!p.has(y)){const h=a.schemaEnv.baseId+a.errSchemaPath,$=`required property "${y}" is not defined at "${h}" (strictRequired)`;(0,_P.checkStrictMode)(a,$,a.opts.strictRequired)}}function u(){if(c||o)e.block$data(ni.nil,d);else for(const f of r)(0,ti.checkReportMissingProp)(e,f)}function l(){const f=t.let("missing");if(c||o){const p=t.let("valid",!0);e.block$data(p,()=>m(f,p)),e.ok(p)}else t.if((0,ti.checkMissingProp)(e,r,f)),(0,ti.reportMissingProp)(e,f),t.else()}function d(){t.forOf("prop",i,f=>{e.setParams({missingProperty:f}),t.if((0,ti.noPropertyInData)(t,n,f,s.ownProperties),()=>e.error())})}function m(f,p){e.setParams({missingProperty:f}),t.forOf(f,i,()=>{t.assign(p,(0,ti.propertyInData)(t,n,f,s.ownProperties)),t.if((0,ni.not)(p),()=>{e.error(),t.break()})},ni.nil)}}};fl.default=kP;var ml={};Object.defineProperty(ml,"__esModule",{value:!0});const ri=ce,SP={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,ri.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,ri._)`{limit: ${e}}`},wP={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:SP,code(e){const{keyword:t,data:r,schemaCode:i}=e,n=t==="maxItems"?ri.operators.GT:ri.operators.LT;e.fail$data((0,ri._)`${r}.length ${n} ${i}`)}};ml.default=wP;var pl={},ii={};Object.defineProperty(ii,"__esModule",{value:!0});const r$=$v;r$.code='require("ajv/dist/runtime/equal").default',ii.default=r$,Object.defineProperty(pl,"__esModule",{value:!0});const hl=Fe,Ye=ce,IP=Z,OP=ii,TP={message:({params:{i:e,j:t}})=>(0,Ye.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ye._)`{i: ${e}, j: ${t}}`},xP={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:TP,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,hl.getSchemaTypes)(o.items):[];e.block$data(c,l,(0,Ye._)`${a} === false`),e.ok(c);function l(){const p=t.let("i",(0,Ye._)`${r}.length`),y=t.let("j");e.setParams({i:p,j:y}),t.assign(c,!0),t.if((0,Ye._)`${p} > 1`,()=>(d()?m:f)(p,y))}function d(){return u.length>0&&!u.some(p=>p==="object"||p==="array")}function m(p,y){const h=t.name("item"),$=(0,hl.checkDataTypes)(u,h,s.opts.strictNumbers,hl.DataType.Wrong),g=t.const("indices",(0,Ye._)`{}`);t.for((0,Ye._)`;${p}--;`,()=>{t.let(h,(0,Ye._)`${r}[${p}]`),t.if($,(0,Ye._)`continue`),u.length>1&&t.if((0,Ye._)`typeof ${h} == "string"`,(0,Ye._)`${h} += "_"`),t.if((0,Ye._)`typeof ${g}[${h}] == "number"`,()=>{t.assign(y,(0,Ye._)`${g}[${h}]`),e.error(),t.assign(c,!1).break()}).code((0,Ye._)`${g}[${h}] = ${p}`)})}function f(p,y){const h=(0,IP.useFunc)(t,OP.default),$=t.name("outer");t.label($).for((0,Ye._)`;${p}--;`,()=>t.for((0,Ye._)`${y} = ${p}; ${y}--;`,()=>t.if((0,Ye._)`${h}(${r}[${p}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break($)})))}}};pl.default=xP;var gl={};Object.defineProperty(gl,"__esModule",{value:!0});const yl=ce,PP=Z,zP=ii,NP={message:"must be equal to constant",params:({schemaCode:e})=>(0,yl._)`{allowedValue: ${e}}`},EP={keyword:"const",$data:!0,error:NP,code(e){const{gen:t,data:r,$data:i,schemaCode:n,schema:o}=e;i||o&&typeof o=="object"?e.fail$data((0,yl._)`!${(0,PP.useFunc)(t,zP.default)}(${r}, ${n})`):e.fail((0,yl._)`${o} !== ${r}`)}};gl.default=EP;var vl={};Object.defineProperty(vl,"__esModule",{value:!0});const oi=ce,CP=Z,DP=ii,jP={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,oi._)`{allowedValues: ${e}}`},AP={keyword:"enum",schemaType:"array",$data:!0,error:jP,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,CP.useFunc)(t,DP.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 f=t.const("vSchema",o);l=(0,oi.or)(...n.map((p,y)=>m(f,y)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",o,f=>t.if((0,oi._)`${u()}(${r}, ${f})`,()=>t.assign(l,!0).break()))}function m(f,p){const y=n[p];return typeof y=="object"&&y!==null?(0,oi._)`${u()}(${r}, ${f}[${p}])`:(0,oi._)`${r} === ${y}`}}};vl.default=AP,Object.defineProperty(ol,"__esModule",{value:!0});const UP=al,RP=sl,BP=cl,MP=ll,ZP=dl,LP=fl,FP=ml,VP=pl,GP=gl,qP=vl,JP=[UP.default,RP.default,BP.default,MP.default,ZP.default,LP.default,FP.default,VP.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},GP.default,qP.default];ol.default=JP;var $l={},Yn={};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.validateAdditionalItems=void 0;const Tn=ce,_l=Z,KP={message:({params:{len:e}})=>(0,Tn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Tn._)`{limit: ${e}}`},HP={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:KP,code(e){const{parentSchema:t,it:r}=e,{items:i}=t;if(!Array.isArray(i)){(0,_l.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}i$(e,i)}};function i$(e,t){const{gen:r,schema:i,data:n,keyword:o,it:a}=e;a.items=!0;const s=r.const("len",(0,Tn._)`${n}.length`);if(i===!1)e.setParams({len:t.length}),e.pass((0,Tn._)`${s} <= ${t.length}`);else if(typeof i=="object"&&!(0,_l.alwaysValidSchema)(a,i)){const u=r.var("valid",(0,Tn._)`${s} <= ${t.length}`);r.if((0,Tn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,s,l=>{e.subschema({keyword:o,dataProp:l,dataPropType:_l.Type.Num},u),a.allErrors||r.if((0,Tn.not)(u),()=>r.break())})}}Yn.validateAdditionalItems=i$,Yn.default=HP;var bl={},Xn={};Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.validateTuple=void 0;const o$=ce,Ho=Z,WP=At(),YP={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a$(e,"additionalItems",t);r.items=!0,!(0,Ho.alwaysValidSchema)(r,t)&&e.ok((0,WP.validateArray)(e))}};function a$(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=Ho.mergeEvaluated.items(i,r.length,s.items));const c=i.name("valid"),u=i.const("len",(0,o$._)`${o}.length`);r.forEach((d,m)=>{(0,Ho.alwaysValidSchema)(s,d)||(i.if((0,o$._)`${u} > ${m}`,()=>e.subschema({keyword:a,schemaProp:m,dataProp:m},c)),e.ok(c))});function l(d){const{opts:m,errSchemaPath:f}=s,p=r.length,y=p===d.minItems&&(p===d.maxItems||d[t]===!1);if(m.strictTuples&&!y){const h=`"${a}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,Ho.checkStrictMode)(s,h,m.strictTuples)}}}Xn.validateTuple=a$,Xn.default=YP,Object.defineProperty(bl,"__esModule",{value:!0});const XP=Xn,QP={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,XP.validateTuple)(e,"items")};bl.default=QP;var kl={};Object.defineProperty(kl,"__esModule",{value:!0});const s$=ce,ez=Z,tz=At(),nz=Yn,rz={message:({params:{len:e}})=>(0,s$.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s$._)`{limit: ${e}}`},iz={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:rz,code(e){const{schema:t,parentSchema:r,it:i}=e,{prefixItems:n}=r;i.items=!0,!(0,ez.alwaysValidSchema)(i,t)&&(n?(0,nz.validateAdditionalItems)(e,n):e.ok((0,tz.validateArray)(e)))}};kl.default=iz;var Sl={};Object.defineProperty(Sl,"__esModule",{value:!0});const Pt=ce,Wo=Z,oz={message:({params:{min:e,max:t}})=>t===void 0?(0,Pt.str)`must contain at least ${e} valid item(s)`:(0,Pt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Pt._)`{minContains: ${e}}`:(0,Pt._)`{minContains: ${e}, maxContains: ${t}}`},az={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:oz,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,Pt._)`${n}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,Wo.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Wo.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Wo.alwaysValidSchema)(o,r)){let y=(0,Pt._)`${l} >= ${a}`;s!==void 0&&(y=(0,Pt._)`${y} && ${l} <= ${s}`),e.pass(y);return}o.items=!0;const d=t.name("valid");s===void 0&&a===1?f(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),s!==void 0&&t.if((0,Pt._)`${n}.length > 0`,m)):(t.let(d,!1),m()),e.result(d,()=>e.reset());function m(){const y=t.name("_valid"),h=t.let("count",0);f(y,()=>t.if(y,()=>p(h)))}function f(y,h){t.forRange("i",0,l,$=>{e.subschema({keyword:"contains",dataProp:$,dataPropType:Wo.Type.Num,compositeRule:!0},y),h()})}function p(y){t.code((0,Pt._)`${y}++`),s===void 0?t.if((0,Pt._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,Pt._)`${y} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,Pt._)`${y} >= ${a}`,()=>t.assign(d,!0)))}}};Sl.default=az;var c$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ce,r=Z,i=At();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},
68
68
  missingProperty: ${d},
69
69
  depsCount: ${u},
70
- 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 f=l.let("missing");for(const p in u){const y=u[p];if(y.length===0)continue;const h=(0,i.propertyInData)(l,d,p,m.opts.ownProperties);c.setParams({property:p,depsCount:y.length,deps:y.join(", ")}),m.allErrors?l.if(h,()=>{for(const $ of y)(0,i.checkReportMissingProp)(c,$)}):(l.if((0,t._)`${h} && (${(0,i.checkMissingProp)(c,y,f)})`),(0,i.reportMissingProp)(c,f),l.else())}}e.validatePropertyDeps=a;function s(c,u=c.schema){const{gen:l,data:d,keyword:m,it:f}=c,p=l.name("valid");for(const y in u)(0,r.alwaysValidSchema)(f,u[y])||(l.if((0,i.propertyInData)(l,d,y,f.opts.ownProperties),()=>{const h=c.subschema({keyword:m,schemaProp:y},p);c.mergeValidEvaluated(h,p)},()=>l.var(p,!0)),c.ok(p))}e.validateSchemaDeps=s,e.default=n})(i$);var bl={};Object.defineProperty(bl,"__esModule",{value:!0});const o$=ce,QT=B,eP={message:"property name must be valid",params:({params:e})=>(0,o$._)`{propertyName: ${e.propertyName}}`},tP={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:eP,code(e){const{gen:t,schema:r,data:i,it:n}=e;if((0,QT.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,o$.not)(o),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(o)}};bl.default=tP;var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0});const Ko=Nt(),jt=ce,nP=Qt(),Ho=B,rP={message:"must NOT have additional properties",params:({params:e})=>(0,jt._)`{additionalProperty: ${e.additionalProperty}}`},iP={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:rP,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,Ho.alwaysValidSchema)(a,r))return;const u=(0,Ko.allSchemaProperties)(i.properties),l=(0,Ko.allSchemaProperties)(i.patternProperties);d(),e.ok((0,jt._)`${o} === ${nP.default.errors}`);function d(){t.forIn("key",n,h=>{!u.length&&!l.length?p(h):t.if(m(h),()=>p(h))})}function m(h){let $;if(u.length>8){const g=(0,Ho.schemaRefOrVal)(a,i.properties,"properties");$=(0,Ko.isOwnProperty)(t,g,h)}else u.length?$=(0,jt.or)(...u.map(g=>(0,jt._)`${h} === ${g}`)):$=jt.nil;return l.length&&($=(0,jt.or)($,...l.map(g=>(0,jt._)`${(0,Ko.usePattern)(e,g)}.test(${h})`))),(0,jt.not)($)}function f(h){t.code((0,jt._)`delete ${n}[${h}]`)}function p(h){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(h);return}if(r===!1){e.setParams({additionalProperty:h}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,Ho.alwaysValidSchema)(a,r)){const $=t.name("valid");c.removeAdditional==="failing"?(y(h,$,!1),t.if((0,jt.not)($),()=>{e.reset(),f(h)})):(y(h,$),s||t.if((0,jt.not)($),()=>t.break()))}}function y(h,$,g){const _={keyword:"additionalProperties",dataProp:h,dataPropType:Ho.Type.Str};g===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(_,$)}}};Jo.default=iP;var kl={};Object.defineProperty(kl,"__esModule",{value:!0});const oP=Po(),a$=Nt(),wl=B,s$=Jo,aP={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&&s$.default.code(new oP.KeywordCxt(o,s$.default,"additionalProperties"));const a=(0,a$.allSchemaProperties)(r);for(const d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=wl.mergeEvaluated.props(t,(0,wl.toHash)(a),o.props));const s=a.filter(d=>!(0,wl.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,a$.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)}}};kl.default=aP;var Sl={};Object.defineProperty(Sl,"__esModule",{value:!0});const c$=Nt(),Wo=ce,u$=B,l$=B,sP={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,c$.allSchemaProperties)(r),c=s.filter(y=>(0,u$.alwaysValidSchema)(o,r[y]));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 Wo.Name)&&(o.props=(0,l$.evaluatedPropsToName)(t,o.props));const{props:d}=o;m();function m(){for(const y of s)u&&f(y),o.allErrors?p(y):(t.var(l,!0),p(y),t.if(l))}function f(y){for(const h in u)new RegExp(y).test(h)&&(0,u$.checkStrictMode)(o,`property ${h} matches pattern ${y} (use allowMatchingProperties)`)}function p(y){t.forIn("key",i,h=>{t.if((0,Wo._)`${(0,c$.usePattern)(e,y)}.test(${h})`,()=>{const $=c.includes(y);$||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:h,dataPropType:l$.Type.Str},l),o.opts.unevaluated&&d!==!0?t.assign((0,Wo._)`${d}[${h}]`,!0):!$&&!o.allErrors&&t.if((0,Wo.not)(l),()=>t.break())})})}}};Sl.default=sP;var Il={};Object.defineProperty(Il,"__esModule",{value:!0});const cP=B,uP={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,cP.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"}};Il.default=uP;var Ol={};Object.defineProperty(Ol,"__esModule",{value:!0});const lP=Nt(),dP={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:lP.validateUnion,error:{message:"must match a schema in anyOf"}};Ol.default=dP;var zl={};Object.defineProperty(zl,"__esModule",{value:!0});const Xo=ce,fP=B,mP={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Xo._)`{passingSchemas: ${e.passing}}`},pP={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:mP,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,fP.alwaysValidSchema)(n,l)?t.var(c,!0):m=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Xo._)`${c} && ${a}`).assign(a,!1).assign(s,(0,Xo._)`[${s}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,d),m&&e.mergeEvaluated(m,Xo.Name)})})}}};zl.default=pP;var xl={};Object.defineProperty(xl,"__esModule",{value:!0});const hP=B,gP={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,hP.alwaysValidSchema)(i,o))return;const s=e.subschema({keyword:"allOf",schemaProp:a},n);e.ok(n),e.mergeEvaluated(s)})}};xl.default=gP;var Tl={};Object.defineProperty(Tl,"__esModule",{value:!0});const Yo=ce,d$=B,yP={message:({params:e})=>(0,Yo.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Yo._)`{failingKeyword: ${e.ifClause}}`},vP={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:yP,code(e){const{gen:t,parentSchema:r,it:i}=e;r.then===void 0&&r.else===void 0&&(0,d$.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const n=f$(i,"then"),o=f$(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,Yo.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,Yo._)`${l}`):e.setParams({ifClause:l})}}}};function f$(e,t){const r=e.schema[t];return r!==void 0&&!(0,d$.alwaysValidSchema)(e,r)}Tl.default=vP;var Pl={};Object.defineProperty(Pl,"__esModule",{value:!0});const $P=B,_P={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,$P.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Pl.default=_P,Object.defineProperty(gl,"__esModule",{value:!0});const bP=qn,kP=vl,wP=Jn,SP=$l,IP=_l,OP=i$,zP=bl,xP=Jo,TP=kl,PP=Sl,NP=Il,EP=Ol,DP=zl,jP=xl,CP=Tl,AP=Pl;function UP(e=!1){const t=[NP.default,EP.default,DP.default,jP.default,CP.default,AP.default,zP.default,xP.default,OP.default,TP.default,PP.default];return e?t.push(kP.default,SP.default):t.push(bP.default,wP.default),t.push(IP.default),t}gl.default=UP;var Nl={},El={};Object.defineProperty(El,"__esModule",{value:!0});const Ae=ce,RP={message:({schemaCode:e})=>(0,Ae.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ae._)`{format: ${e}}`},ZP={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:RP,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():f();function m(){const p=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,Ae._)`${p}[${a}]`),h=r.let("fType"),$=r.let("format");r.if((0,Ae._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(h,(0,Ae._)`${y}.type || "string"`).assign($,(0,Ae._)`${y}.validate`),()=>r.assign(h,(0,Ae._)`"string"`).assign($,y)),e.fail$data((0,Ae.or)(g(),_()));function g(){return c.strictSchema===!1?Ae.nil:(0,Ae._)`${a} && !${$}`}function _(){const I=l.$async?(0,Ae._)`(${y}.async ? await ${$}(${i}) : ${$}(${i}))`:(0,Ae._)`${$}(${i})`,T=(0,Ae._)`(typeof ${$} == "function" ? ${I} : ${$}.test(${i}))`;return(0,Ae._)`${$} && ${$} !== true && ${h} === ${t} && !${T}`}}function f(){const p=d.formats[o];if(!p){g();return}if(p===!0)return;const[y,h,$]=_(p);y===t&&e.pass(I());function g(){if(c.strictSchema===!1){d.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function _(T){const C=T instanceof RegExp?(0,Ae.regexpCode)(T):c.code.formats?(0,Ae._)`${c.code.formats}${(0,Ae.getProperty)(o)}`:void 0,M=r.scopeValue("formats",{key:o,ref:T,code:C});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Ae._)`${M}.validate`]:["string",T,M]}function I(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ae._)`await ${$}(${i})`}return typeof h=="function"?(0,Ae._)`${$}(${i})`:(0,Ae._)`${$}.test(${i})`}}}};El.default=ZP,Object.defineProperty(Nl,"__esModule",{value:!0});const MP=El,BP=[MP.default];Nl.default=BP;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.contentVocabulary=Kn.metadataVocabulary=void 0,Kn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Kn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(Qu,"__esModule",{value:!0});const LP=el,FP=nl,VP=gl,GP=Nl,m$=Kn,qP=[LP.default,FP.default,(0,VP.default)(),GP.default,m$.metadataVocabulary,m$.contentVocabulary];Qu.default=qP;var Dl={},Qo={};Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.DiscrError=void 0;var p$;(function(e){e.Tag="tag",e.Mapping="mapping"})(p$||(Qo.DiscrError=p$={})),Object.defineProperty(Dl,"__esModule",{value:!0});const Hn=ce,jl=Qo,h$=st,JP=Do(),KP=B,HP={message:({params:{discrError:e,tagName:t}})=>e===jl.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Hn._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},WP={keyword:"discriminator",type:"object",schemaType:"object",error:HP,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,Hn._)`${r}${(0,Hn.getProperty)(s)}`);t.if((0,Hn._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:jl.DiscrError.Tag,tag:u,tagName:s})),e.ok(c);function l(){const f=m();t.if(!1);for(const p in f)t.elseIf((0,Hn._)`${u} === ${p}`),t.assign(c,d(f[p]));t.else(),e.error(!1,{discrError:jl.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(f){const p=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:f},p);return e.mergeEvaluated(y,Hn.Name),p}function m(){var f;const p={},y=$(n);let h=!0;for(let I=0;I<a.length;I++){let T=a[I];if(T?.$ref&&!(0,KP.schemaHasRulesButRef)(T,o.self.RULES)){const M=T.$ref;if(T=h$.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,M),T instanceof h$.SchemaEnv&&(T=T.schema),T===void 0)throw new JP.default(o.opts.uriResolver,o.baseId,M)}const C=(f=T?.properties)===null||f===void 0?void 0:f[s];if(typeof C!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);h=h&&(y||$(T)),g(C,I)}if(!h)throw new Error(`discriminator: "${s}" must be required`);return p;function $({required:I}){return Array.isArray(I)&&I.includes(s)}function g(I,T){if(I.const)_(I.const,T);else if(I.enum)for(const C of I.enum)_(C,T);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function _(I,T){if(typeof I!="string"||I in p)throw new Error(`discriminator: "${s}" values must be unique strings`);p[I]=T}}}};Dl.default=WP;var XP="http://json-schema.org/draft-07/schema#",YP="http://json-schema.org/draft-07/schema#",QP="Core schema meta-schema",eN={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:[]}},tN=["object","boolean"],nN={$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:"#"}},rN={$schema:XP,$id:YP,title:QP,definitions:eN,type:tN,properties:nN,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=Hy,i=Qu,n=Dl,o=rN,a=["/properties"],s="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const p=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(p,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=Po();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=Mu();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=Do();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Pu,Pu.exports);var g$=Pu.exports,iN=Ky(g$),Cl={exports:{}},y$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(L,Q){return{validate:L,compare:Q}}e.fullFormats={date:t(o,a),time:t(c(!0),u),"date-time":t(m(!0),f),"iso-time":t(c(),l),"iso-date-time":t(m(),p),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:$,"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:Ne,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:_,int32:{type:"number",validate:C},int64:{type:"number",validate:M},float:{type:"number",validate:ue},double:{type:"number",validate:ue},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,f),"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,p),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(L){return L%4===0&&(L%100!==0||L%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(L){const Q=i.exec(L);if(!Q)return!1;const Y=+Q[1],W=+Q[2],Ce=+Q[3];return W>=1&&W<=12&&Ce>=1&&Ce<=(W===2&&r(Y)?29:n[W])}function a(L,Q){if(L&&Q)return L>Q?1:L<Q?-1:0}const s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(L){return function(Y){const W=s.exec(Y);if(!W)return!1;const Ce=+W[1],pt=+W[2],ht=+W[3],on=W[4],Ut=W[5]==="-"?-1:1,U=+(W[6]||0),O=+(W[7]||0);if(U>23||O>59||L&&!on)return!1;if(Ce<=23&&pt<=59&&ht<60)return!0;const j=pt-O*Ut,x=Ce-U*Ut-(j<0?1:0);return(x===23||x===-1)&&(j===59||j===-1)&&ht<61}}function u(L,Q){if(!(L&&Q))return;const Y=new Date("2020-01-01T"+L).valueOf(),W=new Date("2020-01-01T"+Q).valueOf();if(Y&&W)return Y-W}function l(L,Q){if(!(L&&Q))return;const Y=s.exec(L),W=s.exec(Q);if(Y&&W)return L=Y[1]+Y[2]+Y[3],Q=W[1]+W[2]+W[3],L>Q?1:L<Q?-1:0}const d=/t|\s/i;function m(L){const Q=c(L);return function(W){const Ce=W.split(d);return Ce.length===2&&o(Ce[0])&&Q(Ce[1])}}function f(L,Q){if(!(L&&Q))return;const Y=new Date(L).valueOf(),W=new Date(Q).valueOf();if(Y&&W)return Y-W}function p(L,Q){if(!(L&&Q))return;const[Y,W]=L.split(d),[Ce,pt]=Q.split(d),ht=a(Y,Ce);if(ht!==void 0)return ht||u(W,pt)}const y=/\/|:/,h=/^(?:[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 $(L){return y.test(L)&&h.test(L)}const g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(L){return g.lastIndex=0,g.test(L)}const I=-2147483648,T=2**31-1;function C(L){return Number.isInteger(L)&&L<=T&&L>=I}function M(L){return Number.isInteger(L)}function ue(){return!0}const fe=/[^\\]\\Z/;function Ne(L){if(fe.test(L))return!1;try{return new RegExp(L),!0}catch{return!1}}})(y$);var v$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=g$,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:f,self:p}=m;if(!f.validateFormats)return;const y=new t.KeywordCxt(m,p.RULES.all.format.definition,"format");y.$data?h():$();function h(){const _=c.scopeValue("formats",{ref:p.formats,code:f.code.formats}),I=c.const("fmt",(0,r._)`${_}[${y.schemaCode}]`);s.fail$data((0,r.or)((0,r._)`typeof ${I} != "object"`,(0,r._)`${I} instanceof RegExp`,(0,r._)`typeof ${I}.compare != "function"`,g(I)))}function $(){const _=y.schema,I=p.formats[_];if(!I||I===!0)return;if(typeof I!="object"||I instanceof RegExp||typeof I.compare!="function")throw new Error(`"${d}": format "${_}" does not define "compare" function`);const T=c.scopeValue("formats",{key:_,ref:I,code:f.code.formats?(0,r._)`${f.code.formats}${(0,r.getProperty)(_)}`:void 0});s.fail$data(g(T))}function g(_){return(0,r._)`${_}.compare(${u}, ${l}) ${n[d].fail} 0`}},dependencies:["format"]};const a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})(v$),(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=y$,i=v$,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],f=l.formats||r.formatNames;return c(u,f,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 f,p;(f=(p=u.opts.code).formats)!==null&&f!==void 0||(p.formats=(0,n._)`require("ajv-formats/dist/formats").${m}`);for(const y of l)u.addFormat(y,d[y])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s})(Cl,Cl.exports);var oN=Cl.exports,aN=Ky(oN);function sN(){const e=new iN({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return aN(e),e}class cN{constructor(t){this._ajv=t??sN()}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 uN{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},Ou,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},Io,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 lN(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 dN(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 fN extends KO{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(wo.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 cN,this.setRequestHandler(Iy,i=>this._oninitialize(i)),this.setNotificationHandler(Oy,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Ey,async(i,n)=>{const o=n.sessionId||n.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=i.params,s=wo.safeParse(a);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new uN(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=HO(this._capabilities,t)}setRequestHandler(t,r){const n=Ar(t)?.method;if(!n)throw new Error("Schema is missing a method literal");const o=Qc(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=Cr(ko,c);if(!l.success){const p=l.error instanceof Error?l.error.message:String(l.error);throw new K(ee.InvalidParams,`Invalid tools/call request: ${p}`)}const{params:d}=l.data,m=await Promise.resolve(r(c,u));if(d.task){const p=Cr(_o,m);if(!p.success){const y=p.error instanceof Error?p.error.message:String(p.error);throw new K(ee.InvalidParams,`Invalid task creation result: ${y}`)}return p.data}const f=Cr(Iu,m);if(!f.success){const p=f.error instanceof Error?f.error.message:String(f.error);throw new K(ee.InvalidParams,`Invalid tools/call result: ${p}`)}return f.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){dN(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&lN(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:zI.includes(r)?r:vy,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"},ru)}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},Dy,r):this.request({method:"sampling/createMessage",params:t},Ou,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},Io,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},Io,r);if(o.action==="accept"&&o.content&&n.requestedSchema)try{const s=this._jsonSchemaValidator.getValidator(n.requestedSchema)(o.content);if(!s.valid)throw new K(ee.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof K?a:new K(ee.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},jy,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 $$=Symbol.for("mcp.completable");function _$(e){return!!e&&typeof e=="object"&&$$ in e}function mN(e){return e[$$]?.complete}var b$;(function(e){e.Completable="McpCompletable"})(b$||(b$={}));const pN=/^[A-Za-z0-9._-]{1,128}$/;function hN(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"),!pN.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 gN(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 k$(e){const t=hN(e);return gN(e,t.warnings),t.isValid}class yN{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 vN{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 fN(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new yN(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(nn(Su)),this.server.assertCanSetRequestHandler(nn(ko)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Su,()=>({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=Ur(r.inputSchema);return n?Vy(n,{strictUnions:!0,pipeStrategy:"input"}):$N})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){const n=Ur(r.outputSchema);n&&(i.outputSchema=Vy(n,{strictUnions:!0,pipeStrategy:"output"}))}return i})})),this.server.setRequestHandler(ko,async(t,r)=>{try{const i=this._registeredTools[t.params.name];if(!i)throw new K(ee.InvalidParams,`Tool ${t.params.name} not found`);if(!i.enabled)throw new K(ee.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 K(ee.InternalError,`Tool ${t.params.name} has taskSupport '${o}' but was not registered with registerToolTask`);if(o==="required"&&!n)throw new K(ee.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 K&&i.code===ee.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=Ur(t.inputSchema)??t.inputSchema,a=await Xc(o,r);if(!a.success){const s="error"in a?a.error:"Unknown error",c=Yc(s);throw new K(ee.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 K(ee.InvalidParams,`Output validation error: Tool ${i} has an output schema but no structured content was provided`);const n=Ur(t.outputSchema),o=await Xc(n,r.structuredContent);if(!o.success){const a="error"in o?o.error:"Unknown error",s=Yc(a);throw new K(ee.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 K(ee.InternalError,`Task ${c} not found during polling`);u=d}return await i.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(nn(zu)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(zu,async t=>{switch(t.params.ref.type){case"ref/prompt":return tO(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return nO(t),this.handleResourceCompletion(t,t.params.ref);default:throw new K(ee.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){const i=this._registeredPrompts[r.name];if(!i)throw new K(ee.InvalidParams,`Prompt ${r.name} not found`);if(!i.enabled)throw new K(ee.InvalidParams,`Prompt ${r.name} disabled`);if(!i.argsSchema)return ti;const o=Ar(i.argsSchema)?.[t.params.argument.name];if(!_$(o))return ti;const a=mN(o);if(!a)return ti;const s=await a(t.params.argument.value,t.params.context);return O$(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 ti;throw new K(ee.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}const n=i.resourceTemplate.completeCallback(t.params.argument.name);if(!n)return ti;const o=await n(t.params.argument.value,t.params.context);return O$(o)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(nn(pu)),this.server.assertCanSetRequestHandler(nn(hu)),this.server.assertCanSetRequestHandler(nn(yu)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(pu,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(hu,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,i])=>({name:r,uriTemplate:i.resourceTemplate.uriTemplate.toString(),...i.metadata}))})),this.server.setRequestHandler(yu,async(t,r)=>{const i=new URL(t.params.uri),n=this._registeredResources[i.toString()];if(n){if(!n.enabled)throw new K(ee.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 K(ee.InvalidParams,`Resource ${i} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(nn(vu)),this.server.assertCanSetRequestHandler(nn($u)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(vu,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?_N(r.argsSchema):void 0}))})),this.server.setRequestHandler($u,async(t,r)=>{const i=this._registeredPrompts[t.params.name];if(!i)throw new K(ee.InvalidParams,`Prompt ${t.params.name} not found`);if(!i.enabled)throw new K(ee.InvalidParams,`Prompt ${t.params.name} disabled`);if(i.argsSchema){const n=Ur(i.argsSchema),o=await Xc(n,t.params.arguments);if(!o.success){const c="error"in o?o.error:"Unknown error",u=Yc(c);throw new K(ee.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:Rn(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=Rn(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 Un?c._def?.innerType:c;return _$(u)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,r,i,n,o,a,s,c,u){k$(t);const l={title:r,description:i,inputSchema:I$(n),outputSchema:I$(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"&&k$(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=Rn(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=Rn(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(Al(c))n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!Al(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 $N={type:"object",properties:{}};function w$(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function S$(e){return"_def"in e||"_zod"in e||w$(e)}function Al(e){return typeof e!="object"||e===null||S$(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(w$)}function I$(e){if(e){if(Al(e))return Rn(e);if(!S$(e))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return e}}function _N(e){const t=Ar(e);return t?Object.entries(t).map(([r,i])=>{const n=II(i),o=OI(i);return{name:r,description:n,required:!o}}):[]}function nn(e){const r=Ar(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=Qc(r);if(typeof i=="string")return i;throw new Error("Schema method literal must be a string")}function O$(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}const ti={completion:{values:[],hasMore:!1}},bN=10*1024*1024;class kN{constructor(t){this._maxBufferSize=t?.maxBufferSize??bN}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(`
71
- `);if(t===-1)return null;const r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),wN(r)}clear(){this._buffer=void 0}}function wN(e){return DI.parse(JSON.parse(e))}function SN(e){return JSON.stringify(e)+`
72
- `}class IN{constructor(t=Ll.stdin,r=Ll.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 kN({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=SN(t);this._stdout.write(i)?r():this._stdout.once("drain",r)})}}function ea(e){return e==null?!1:typeof e=="string"?e.length>0:!0}function ON(e){const t=e.isPresent??ea;if(!e.candidates.some(r=>t(r.value)))throw new Error(e.missingMessage??`Error: ${zN(e.candidates.map(r=>r.label))} must be provided.`)}function zN(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 xN(e){const t=e.inlineLabel??"json",r=e.fileLabel??"jsonFile",i=e.fileDescription??"file";if(ea(e.inlineText)&&ea(e.filePath))throw new Error(`Provide either ${t} or ${r}, not both.`);if(ea(e.inlineText))return{text:e.inlineText,source:"inline"};ON({candidates:[{label:t,value:e.inlineText},{label:r,value:e.filePath}],missingMessage:`Either ${t} or ${r} must be provided.`});try{return{text:q$(e.filePath,"utf-8"),source:"file"}}catch(n){throw new Error(`Error reading ${i}: ${n.message}`,{cause:n})}}function TN(e,t){V$(F$(e),{recursive:!0}),G$(e,t,"utf-8")}function z$(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 x$(e){return{type:"text",text:e}}function qt(e){return{content:[x$(e)]}}function At(e){return{content:[x$(e)],isError:!0}}function PN(e){if(!e.jsonText)return At(e.missingMessage);if(!e.outputFile)return qt(e.jsonText);try{return TN(e.outputFile,e.jsonText),qt(`${e.fileLabel} written to: ${e.outputFile}`)}catch(t){return At(`Error writing file: ${t.message}`)}}function NN(e){let t;try{t=xN({inlineText:e.json,filePath:e.jsonFile,inlineLabel:"json",fileLabel:"jsonFile",fileDescription:e.fileDescription}).text}catch(i){return At(i.message)}const r=e.importJson(t);return r!=="OK"?At(`Error: ${r}`):qt(`${e.successMessage??"Imported successfully."}
70
+ 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 f=l.let("missing");for(const p in u){const y=u[p];if(y.length===0)continue;const h=(0,i.propertyInData)(l,d,p,m.opts.ownProperties);c.setParams({property:p,depsCount:y.length,deps:y.join(", ")}),m.allErrors?l.if(h,()=>{for(const $ of y)(0,i.checkReportMissingProp)(c,$)}):(l.if((0,t._)`${h} && (${(0,i.checkMissingProp)(c,y,f)})`),(0,i.reportMissingProp)(c,f),l.else())}}e.validatePropertyDeps=a;function s(c,u=c.schema){const{gen:l,data:d,keyword:m,it:f}=c,p=l.name("valid");for(const y in u)(0,r.alwaysValidSchema)(f,u[y])||(l.if((0,i.propertyInData)(l,d,y,f.opts.ownProperties),()=>{const h=c.subschema({keyword:m,schemaProp:y},p);c.mergeValidEvaluated(h,p)},()=>l.var(p,!0)),c.ok(p))}e.validateSchemaDeps=s,e.default=n})(c$);var wl={};Object.defineProperty(wl,"__esModule",{value:!0});const u$=ce,sz=Z,cz={message:"property name must be valid",params:({params:e})=>(0,u$._)`{propertyName: ${e.propertyName}}`},uz={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:cz,code(e){const{gen:t,schema:r,data:i,it:n}=e;if((0,sz.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,u$.not)(o),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(o)}};wl.default=uz;var Yo={};Object.defineProperty(Yo,"__esModule",{value:!0});const Xo=At(),Bt=ce,lz=on(),Qo=Z,dz={message:"must NOT have additional properties",params:({params:e})=>(0,Bt._)`{additionalProperty: ${e.additionalProperty}}`},fz={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:dz,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,Qo.alwaysValidSchema)(a,r))return;const u=(0,Xo.allSchemaProperties)(i.properties),l=(0,Xo.allSchemaProperties)(i.patternProperties);d(),e.ok((0,Bt._)`${o} === ${lz.default.errors}`);function d(){t.forIn("key",n,h=>{!u.length&&!l.length?p(h):t.if(m(h),()=>p(h))})}function m(h){let $;if(u.length>8){const g=(0,Qo.schemaRefOrVal)(a,i.properties,"properties");$=(0,Xo.isOwnProperty)(t,g,h)}else u.length?$=(0,Bt.or)(...u.map(g=>(0,Bt._)`${h} === ${g}`)):$=Bt.nil;return l.length&&($=(0,Bt.or)($,...l.map(g=>(0,Bt._)`${(0,Xo.usePattern)(e,g)}.test(${h})`))),(0,Bt.not)($)}function f(h){t.code((0,Bt._)`delete ${n}[${h}]`)}function p(h){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(h);return}if(r===!1){e.setParams({additionalProperty:h}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,Qo.alwaysValidSchema)(a,r)){const $=t.name("valid");c.removeAdditional==="failing"?(y(h,$,!1),t.if((0,Bt.not)($),()=>{e.reset(),f(h)})):(y(h,$),s||t.if((0,Bt.not)($),()=>t.break()))}}function y(h,$,g){const _={keyword:"additionalProperties",dataProp:h,dataPropType:Qo.Type.Str};g===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(_,$)}}};Yo.default=fz;var Il={};Object.defineProperty(Il,"__esModule",{value:!0});const mz=Do(),l$=At(),Ol=Z,d$=Yo,pz={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&&d$.default.code(new mz.KeywordCxt(o,d$.default,"additionalProperties"));const a=(0,l$.allSchemaProperties)(r);for(const d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=Ol.mergeEvaluated.props(t,(0,Ol.toHash)(a),o.props));const s=a.filter(d=>!(0,Ol.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,l$.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)}}};Il.default=pz;var Tl={};Object.defineProperty(Tl,"__esModule",{value:!0});const f$=At(),ea=ce,m$=Z,p$=Z,hz={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,f$.allSchemaProperties)(r),c=s.filter(y=>(0,m$.alwaysValidSchema)(o,r[y]));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 ea.Name)&&(o.props=(0,p$.evaluatedPropsToName)(t,o.props));const{props:d}=o;m();function m(){for(const y of s)u&&f(y),o.allErrors?p(y):(t.var(l,!0),p(y),t.if(l))}function f(y){for(const h in u)new RegExp(y).test(h)&&(0,m$.checkStrictMode)(o,`property ${h} matches pattern ${y} (use allowMatchingProperties)`)}function p(y){t.forIn("key",i,h=>{t.if((0,ea._)`${(0,f$.usePattern)(e,y)}.test(${h})`,()=>{const $=c.includes(y);$||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:h,dataPropType:p$.Type.Str},l),o.opts.unevaluated&&d!==!0?t.assign((0,ea._)`${d}[${h}]`,!0):!$&&!o.allErrors&&t.if((0,ea.not)(l),()=>t.break())})})}}};Tl.default=hz;var xl={};Object.defineProperty(xl,"__esModule",{value:!0});const gz=Z,yz={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,gz.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"}};xl.default=yz;var Pl={};Object.defineProperty(Pl,"__esModule",{value:!0});const vz=At(),$z={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:vz.validateUnion,error:{message:"must match a schema in anyOf"}};Pl.default=$z;var zl={};Object.defineProperty(zl,"__esModule",{value:!0});const ta=ce,_z=Z,bz={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,ta._)`{passingSchemas: ${e.passing}}`},kz={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:bz,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,_z.alwaysValidSchema)(n,l)?t.var(c,!0):m=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,ta._)`${c} && ${a}`).assign(a,!1).assign(s,(0,ta._)`[${s}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,d),m&&e.mergeEvaluated(m,ta.Name)})})}}};zl.default=kz;var Nl={};Object.defineProperty(Nl,"__esModule",{value:!0});const Sz=Z,wz={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,Sz.alwaysValidSchema)(i,o))return;const s=e.subschema({keyword:"allOf",schemaProp:a},n);e.ok(n),e.mergeEvaluated(s)})}};Nl.default=wz;var El={};Object.defineProperty(El,"__esModule",{value:!0});const na=ce,h$=Z,Iz={message:({params:e})=>(0,na.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,na._)`{failingKeyword: ${e.ifClause}}`},Oz={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Iz,code(e){const{gen:t,parentSchema:r,it:i}=e;r.then===void 0&&r.else===void 0&&(0,h$.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const n=g$(i,"then"),o=g$(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,na.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,na._)`${l}`):e.setParams({ifClause:l})}}}};function g$(e,t){const r=e.schema[t];return r!==void 0&&!(0,h$.alwaysValidSchema)(e,r)}El.default=Oz;var Cl={};Object.defineProperty(Cl,"__esModule",{value:!0});const Tz=Z,xz={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Tz.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Cl.default=xz,Object.defineProperty($l,"__esModule",{value:!0});const Pz=Yn,zz=bl,Nz=Xn,Ez=kl,Cz=Sl,Dz=c$,jz=wl,Az=Yo,Uz=Il,Rz=Tl,Bz=xl,Mz=Pl,Zz=zl,Lz=Nl,Fz=El,Vz=Cl;function Gz(e=!1){const t=[Bz.default,Mz.default,Zz.default,Lz.default,Fz.default,Vz.default,jz.default,Az.default,Dz.default,Uz.default,Rz.default];return e?t.push(zz.default,Ez.default):t.push(Pz.default,Nz.default),t.push(Cz.default),t}$l.default=Gz;var Dl={},jl={};Object.defineProperty(jl,"__esModule",{value:!0});const Be=ce,qz={message:({schemaCode:e})=>(0,Be.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Be._)`{format: ${e}}`},Jz={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:qz,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():f();function m(){const p=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,Be._)`${p}[${a}]`),h=r.let("fType"),$=r.let("format");r.if((0,Be._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(h,(0,Be._)`${y}.type || "string"`).assign($,(0,Be._)`${y}.validate`),()=>r.assign(h,(0,Be._)`"string"`).assign($,y)),e.fail$data((0,Be.or)(g(),_()));function g(){return c.strictSchema===!1?Be.nil:(0,Be._)`${a} && !${$}`}function _(){const I=l.$async?(0,Be._)`(${y}.async ? await ${$}(${i}) : ${$}(${i}))`:(0,Be._)`${$}(${i})`,P=(0,Be._)`(typeof ${$} == "function" ? ${I} : ${$}.test(${i}))`;return(0,Be._)`${$} && ${$} !== true && ${h} === ${t} && !${P}`}}function f(){const p=d.formats[o];if(!p){g();return}if(p===!0)return;const[y,h,$]=_(p);y===t&&e.pass(I());function g(){if(c.strictSchema===!1){d.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function _(P){const j=P instanceof RegExp?(0,Be.regexpCode)(P):c.code.formats?(0,Be._)`${c.code.formats}${(0,Be.getProperty)(o)}`:void 0,M=r.scopeValue("formats",{key:o,ref:P,code:j});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,Be._)`${M}.validate`]:["string",P,M]}function I(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Be._)`await ${$}(${i})`}return typeof h=="function"?(0,Be._)`${$}(${i})`:(0,Be._)`${$}.test(${i})`}}}};jl.default=Jz,Object.defineProperty(Dl,"__esModule",{value:!0});const Kz=jl,Hz=[Kz.default];Dl.default=Hz;var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.contentVocabulary=Qn.metadataVocabulary=void 0,Qn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Qn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(nl,"__esModule",{value:!0});const Wz=rl,Yz=ol,Xz=$l,Qz=Dl,y$=Qn,eN=[Wz.default,Yz.default,(0,Xz.default)(),Qz.default,y$.metadataVocabulary,y$.contentVocabulary];nl.default=eN;var Al={},ra={};Object.defineProperty(ra,"__esModule",{value:!0}),ra.DiscrError=void 0;var v$;(function(e){e.Tag="tag",e.Mapping="mapping"})(v$||(ra.DiscrError=v$={})),Object.defineProperty(Al,"__esModule",{value:!0});const er=ce,Ul=ra,$$=lt,tN=Uo(),nN=Z,rN={message:({params:{discrError:e,tagName:t}})=>e===Ul.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,er._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},iN={keyword:"discriminator",type:"object",schemaType:"object",error:rN,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,er._)`${r}${(0,er.getProperty)(s)}`);t.if((0,er._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:Ul.DiscrError.Tag,tag:u,tagName:s})),e.ok(c);function l(){const f=m();t.if(!1);for(const p in f)t.elseIf((0,er._)`${u} === ${p}`),t.assign(c,d(f[p]));t.else(),e.error(!1,{discrError:Ul.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(f){const p=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:f},p);return e.mergeEvaluated(y,er.Name),p}function m(){var f;const p={},y=$(n);let h=!0;for(let I=0;I<a.length;I++){let P=a[I];if(P?.$ref&&!(0,nN.schemaHasRulesButRef)(P,o.self.RULES)){const M=P.$ref;if(P=$$.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,M),P instanceof $$.SchemaEnv&&(P=P.schema),P===void 0)throw new tN.default(o.opts.uriResolver,o.baseId,M)}const j=(f=P?.properties)===null||f===void 0?void 0:f[s];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);h=h&&(y||$(P)),g(j,I)}if(!h)throw new Error(`discriminator: "${s}" must be required`);return p;function $({required:I}){return Array.isArray(I)&&I.includes(s)}function g(I,P){if(I.const)_(I.const,P);else if(I.enum)for(const j of I.enum)_(j,P);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function _(I,P){if(typeof I!="string"||I in p)throw new Error(`discriminator: "${s}" values must be unique strings`);p[I]=P}}}};Al.default=iN;var oN="http://json-schema.org/draft-07/schema#",aN="http://json-schema.org/draft-07/schema#",sN="Core schema meta-schema",cN={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:[]}},uN=["object","boolean"],lN={$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:"#"}},dN={$schema:oN,$id:aN,title:sN,definitions:cN,type:uN,properties:lN,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=Qy,i=nl,n=Al,o=dN,a=["/properties"],s="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const p=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(p,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=Do();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=Fu();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=Uo();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Cu,Cu.exports);var _$=Cu.exports,fN=Xy(_$),Rl={exports:{}},b$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(L,Q){return{validate:L,compare:Q}}e.fullFormats={date:t(o,a),time:t(c(!0),u),"date-time":t(m(!0),f),"iso-time":t(c(),l),"iso-date-time":t(m(),p),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:$,"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:Ne,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:_,int32:{type:"number",validate:j},int64:{type:"number",validate:M},float:{type:"number",validate:le},double:{type:"number",validate:le},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,f),"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,p),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(L){return L%4===0&&(L%100!==0||L%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(L){const Q=i.exec(L);if(!Q)return!1;const X=+Q[1],W=+Q[2],Re=+Q[3];return W>=1&&W<=12&&Re>=1&&Re<=(W===2&&r(X)?29:n[W])}function a(L,Q){if(L&&Q)return L>Q?1:L<Q?-1:0}const s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(L){return function(X){const W=s.exec(X);if(!W)return!1;const Re=+W[1],vt=+W[2],$t=+W[3],ln=W[4],Lt=W[5]==="-"?-1:1,U=+(W[6]||0),O=+(W[7]||0);if(U>23||O>59||L&&!ln)return!1;if(Re<=23&&vt<=59&&$t<60)return!0;const D=vt-O*Lt,x=Re-U*Lt-(D<0?1:0);return(x===23||x===-1)&&(D===59||D===-1)&&$t<61}}function u(L,Q){if(!(L&&Q))return;const X=new Date("2020-01-01T"+L).valueOf(),W=new Date("2020-01-01T"+Q).valueOf();if(X&&W)return X-W}function l(L,Q){if(!(L&&Q))return;const X=s.exec(L),W=s.exec(Q);if(X&&W)return L=X[1]+X[2]+X[3],Q=W[1]+W[2]+W[3],L>Q?1:L<Q?-1:0}const d=/t|\s/i;function m(L){const Q=c(L);return function(W){const Re=W.split(d);return Re.length===2&&o(Re[0])&&Q(Re[1])}}function f(L,Q){if(!(L&&Q))return;const X=new Date(L).valueOf(),W=new Date(Q).valueOf();if(X&&W)return X-W}function p(L,Q){if(!(L&&Q))return;const[X,W]=L.split(d),[Re,vt]=Q.split(d),$t=a(X,Re);if($t!==void 0)return $t||u(W,vt)}const y=/\/|:/,h=/^(?:[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 $(L){return y.test(L)&&h.test(L)}const g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(L){return g.lastIndex=0,g.test(L)}const I=-2147483648,P=2**31-1;function j(L){return Number.isInteger(L)&&L<=P&&L>=I}function M(L){return Number.isInteger(L)}function le(){return!0}const pe=/[^\\]\\Z/;function Ne(L){if(pe.test(L))return!1;try{return new RegExp(L),!0}catch{return!1}}})(b$);var k$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=_$,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:f,self:p}=m;if(!f.validateFormats)return;const y=new t.KeywordCxt(m,p.RULES.all.format.definition,"format");y.$data?h():$();function h(){const _=c.scopeValue("formats",{ref:p.formats,code:f.code.formats}),I=c.const("fmt",(0,r._)`${_}[${y.schemaCode}]`);s.fail$data((0,r.or)((0,r._)`typeof ${I} != "object"`,(0,r._)`${I} instanceof RegExp`,(0,r._)`typeof ${I}.compare != "function"`,g(I)))}function $(){const _=y.schema,I=p.formats[_];if(!I||I===!0)return;if(typeof I!="object"||I instanceof RegExp||typeof I.compare!="function")throw new Error(`"${d}": format "${_}" does not define "compare" function`);const P=c.scopeValue("formats",{key:_,ref:I,code:f.code.formats?(0,r._)`${f.code.formats}${(0,r.getProperty)(_)}`:void 0});s.fail$data(g(P))}function g(_){return(0,r._)`${_}.compare(${u}, ${l}) ${n[d].fail} 0`}},dependencies:["format"]};const a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})(k$),(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=b$,i=k$,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],f=l.formats||r.formatNames;return c(u,f,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 f,p;(f=(p=u.opts.code).formats)!==null&&f!==void 0||(p.formats=(0,n._)`require("ajv-formats/dist/formats").${m}`);for(const y of l)u.addFormat(y,d[y])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s})(Rl,Rl.exports);var mN=Rl.exports,pN=Xy(mN);function hN(){const e=new fN({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return pN(e),e}class gN{constructor(t){this._ajv=t??hN()}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 yN{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},Pu,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},Po,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 vN(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 $N(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 _N extends nT{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(To.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 gN,this.setRequestHandler(Py,i=>this._oninitialize(i)),this.setNotificationHandler(zy,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Ay,async(i,n)=>{const o=n.sessionId||n.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=i.params,s=To.safeParse(a);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new yN(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=rT(this._capabilities,t)}setRequestHandler(t,r){const n=Zr(t)?.method;if(!n)throw new Error("Schema is missing a method literal");const o=nu(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=Mr(Oo,c);if(!l.success){const p=l.error instanceof Error?l.error.message:String(l.error);throw new K(ee.InvalidParams,`Invalid tools/call request: ${p}`)}const{params:d}=l.data,m=await Promise.resolve(r(c,u));if(d.task){const p=Mr(wo,m);if(!p.success){const y=p.error instanceof Error?p.error.message:String(p.error);throw new K(ee.InvalidParams,`Invalid task creation result: ${y}`)}return p.data}const f=Mr(xu,m);if(!f.success){const p=f.error instanceof Error?f.error.message:String(f.error);throw new K(ee.InvalidParams,`Invalid tools/call result: ${p}`)}return f.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){$N(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&vN(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:jI.includes(r)?r:ky,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"},au)}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},Uy,r):this.request({method:"sampling/createMessage",params:t},Pu,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},Po,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},Po,r);if(o.action==="accept"&&o.content&&n.requestedSchema)try{const s=this._jsonSchemaValidator.getValidator(n.requestedSchema)(o.content);if(!s.valid)throw new K(ee.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof K?a:new K(ee.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},Ry,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 S$=Symbol.for("mcp.completable");function w$(e){return!!e&&typeof e=="object"&&S$ in e}function bN(e){return e[S$]?.complete}var I$;(function(e){e.Completable="McpCompletable"})(I$||(I$={}));const kN=/^[A-Za-z0-9._-]{1,128}$/;function SN(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"),!kN.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 wN(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 O$(e){const t=SN(e);return wN(e,t.warnings),t.isValid}class IN{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 ON{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 _N(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new IN(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(cn(Tu)),this.server.assertCanSetRequestHandler(cn(Oo)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Tu,()=>({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=Lr(r.inputSchema);return n?Ky(n,{strictUnions:!0,pipeStrategy:"input"}):TN})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){const n=Lr(r.outputSchema);n&&(i.outputSchema=Ky(n,{strictUnions:!0,pipeStrategy:"output"}))}return i})})),this.server.setRequestHandler(Oo,async(t,r)=>{try{const i=this._registeredTools[t.params.name];if(!i)throw new K(ee.InvalidParams,`Tool ${t.params.name} not found`);if(!i.enabled)throw new K(ee.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 K(ee.InternalError,`Tool ${t.params.name} has taskSupport '${o}' but was not registered with registerToolTask`);if(o==="required"&&!n)throw new K(ee.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 K&&i.code===ee.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=Lr(t.inputSchema)??t.inputSchema,a=await eu(o,r);if(!a.success){const s="error"in a?a.error:"Unknown error",c=tu(s);throw new K(ee.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 K(ee.InvalidParams,`Output validation error: Tool ${i} has an output schema but no structured content was provided`);const n=Lr(t.outputSchema),o=await eu(n,r.structuredContent);if(!o.success){const a="error"in o?o.error:"Unknown error",s=tu(a);throw new K(ee.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 K(ee.InternalError,`Task ${c} not found during polling`);u=d}return await i.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(cn(zu)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(zu,async t=>{switch(t.params.ref.type){case"ref/prompt":return uO(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return lO(t),this.handleResourceCompletion(t,t.params.ref);default:throw new K(ee.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){const i=this._registeredPrompts[r.name];if(!i)throw new K(ee.InvalidParams,`Prompt ${r.name} not found`);if(!i.enabled)throw new K(ee.InvalidParams,`Prompt ${r.name} disabled`);if(!i.argsSchema)return ai;const o=Zr(i.argsSchema)?.[t.params.argument.name];if(!w$(o))return ai;const a=bN(o);if(!a)return ai;const s=await a(t.params.argument.value,t.params.context);return z$(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 ai;throw new K(ee.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}const n=i.resourceTemplate.completeCallback(t.params.argument.name);if(!n)return ai;const o=await n(t.params.argument.value,t.params.context);return z$(o)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(cn(yu)),this.server.assertCanSetRequestHandler(cn(vu)),this.server.assertCanSetRequestHandler(cn(_u)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(yu,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(vu,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,i])=>({name:r,uriTemplate:i.resourceTemplate.uriTemplate.toString(),...i.metadata}))})),this.server.setRequestHandler(_u,async(t,r)=>{const i=new URL(t.params.uri),n=this._registeredResources[i.toString()];if(n){if(!n.enabled)throw new K(ee.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 K(ee.InvalidParams,`Resource ${i} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(cn(bu)),this.server.assertCanSetRequestHandler(cn(ku)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(bu,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?xN(r.argsSchema):void 0}))})),this.server.setRequestHandler(ku,async(t,r)=>{const i=this._registeredPrompts[t.params.name];if(!i)throw new K(ee.InvalidParams,`Prompt ${t.params.name} not found`);if(!i.enabled)throw new K(ee.InvalidParams,`Prompt ${t.params.name} disabled`);if(i.argsSchema){const n=Lr(i.argsSchema),o=await eu(n,t.params.arguments);if(!o.success){const c="error"in o?o.error:"Unknown error",u=tu(c);throw new K(ee.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:Fn(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=Fn(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 Ln?c._def?.innerType:c;return w$(u)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,r,i,n,o,a,s,c,u){O$(t);const l={title:r,description:i,inputSchema:P$(n),outputSchema:P$(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"&&O$(d.name),delete this._registeredTools[t],d.name&&(this._registeredTools[d.name]=l)),typeof d.title<"u"&&(l.title=d.title),typeof d.description<"u"&&(l.description=d.description),typeof d.paramsSchema<"u"&&(l.inputSchema=Fn(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=Fn(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(Bl(c))n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!Bl(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 TN={type:"object",properties:{}};function T$(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function x$(e){return"_def"in e||"_zod"in e||T$(e)}function Bl(e){return typeof e!="object"||e===null||x$(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(T$)}function P$(e){if(e){if(Bl(e))return Fn(e);if(!x$(e))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return e}}function xN(e){const t=Zr(e);return t?Object.entries(t).map(([r,i])=>{const n=CI(i),o=DI(i);return{name:r,description:n,required:!o}}):[]}function cn(e){const r=Zr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=nu(r);if(typeof i=="string")return i;throw new Error("Schema method literal must be a string")}function z$(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}const ai={completion:{values:[],hasMore:!1}},PN=10*1024*1024;class zN{constructor(t){this._maxBufferSize=t?.maxBufferSize??PN}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(`
71
+ `);if(t===-1)return null;const r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),NN(r)}clear(){this._buffer=void 0}}function NN(e){return ZI.parse(JSON.parse(e))}function EN(e){return JSON.stringify(e)+`
72
+ `}class CN{constructor(t=ql.stdin,r=ql.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 zN({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=EN(t);this._stdout.write(i)?r():this._stdout.once("drain",r)})}}function ia(e){return e==null?!1:typeof e=="string"?e.length>0:!0}function DN(e){const t=e.isPresent??ia;if(!e.candidates.some(r=>t(r.value)))throw new Error(e.missingMessage??`Error: ${jN(e.candidates.map(r=>r.label))} must be provided.`)}function jN(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 AN(e){const t=e.inlineLabel??"json",r=e.fileLabel??"jsonFile",i=e.fileDescription??"file";if(ia(e.inlineText)&&ia(e.filePath))throw new Error(`Provide either ${t} or ${r}, not both.`);if(ia(e.inlineText))return{text:e.inlineText,source:"inline"};DN({candidates:[{label:t,value:e.inlineText},{label:r,value:e.filePath}],missingMessage:`Either ${t} or ${r} must be provided.`});try{return{text:e_(e.filePath,"utf-8"),source:"file"}}catch(n){throw new Error(`Error reading ${i}: ${n.message}`,{cause:n})}}function UN(e,t){X$(Y$(e),{recursive:!0}),Q$(e,t,"utf-8")}function RN(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 N$(e){return{type:"text",text:e}}function Yt(e){return{content:[N$(e)]}}function Zt(e){return{content:[N$(e)],isError:!0}}function BN(e){if(!e.jsonText)return Zt(e.missingMessage);if(!e.outputFile)return Yt(e.jsonText);try{return UN(e.outputFile,e.jsonText),Yt(`${e.fileLabel} written to: ${e.outputFile}`)}catch(t){return Zt(`Error writing file: ${t.message}`)}}function MN(e){let t;try{t=AN({inlineText:e.json,filePath:e.jsonFile,inlineLabel:"json",fileLabel:"jsonFile",fileDescription:e.fileDescription}).text}catch(i){return Zt(i.message)}const r=e.importJson(t);return r!=="OK"?Zt(`Error: ${r}`):Yt(`${e.successMessage??"Imported successfully."}
73
73
 
74
- ${e.describeImported()}`)}function EN(e){if(e.snippetResult.type==="unknown")return At(`Error: Snippet "${e.snippetId}" has an unrecognized format.`);if(e.snippetResult.type!==e.expectedType)return At(`Error: Snippet "${e.snippetId}" is of type "${e.snippetResult.type}", not "${e.expectedType}".`);const t=e.importJson(JSON.stringify(e.snippetResult.data));return t!=="OK"?At(`Error importing snippet data: ${t}`):qt(`${e.successMessage}
74
+ ${e.describeImported()}`)}function ZN(e){if(e.snippetResult.type==="unknown")return Zt(`Error: Snippet "${e.snippetId}" has an unrecognized format.`);if(e.snippetResult.type!==e.expectedType)return Zt(`Error: Snippet "${e.snippetId}" is of type "${e.snippetResult.type}", not "${e.expectedType}".`);const t=e.importJson(JSON.stringify(e.snippetResult.data));return t!=="OK"?Zt(`Error importing snippet data: ${t}`):Yt(`${e.successMessage}
75
75
 
76
- ${e.describeImported()}`)}async function DN(e){try{return e.createResponse(await e.loadSnippet(e.snippetId))}catch(t){return At(`Error fetching snippet "${e.snippetId}": ${t.message}`)}}function jN(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 CN(e,t){return e.string().optional().describe(t)}function AN(e,t){return e.string().optional().describe(t)}function UN(e){return e.string().describe('Snippet ID from the Babylon.js Snippet Server (e.g. "ABC123" or "ABC123#2")')}function RN(e,t){const r=typeof e=="string"?z$({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 ZN(e){const t=RN(e,"NGE JSON");if(t.customType!=="BABYLON.NodeGeometry")throw new Error(`Invalid NGE JSON: customType must be "BABYLON.NodeGeometry" but got "${String(t.customType)}".`);if(!Array.isArray(t.blocks))throw new Error("Invalid NGE JSON: must contain a 'blocks' array.");return t}const T$="babylon-mcp-editor-session",MN="1.0",BN="127.0.0.1",P$="localhost",LN=3001,FN=10,VN=15e3,GN=15*6e4,ta="last-writer-wins",qN=["babylonjs.com"];function JN(e,t,r=P$){return`http://${r}:${t}/session/${e}`}function KN(){return sa.createHash("sha256").update(process.cwd()).digest("hex")}function HN(){return`${process.pid}-${sa.randomBytes(8).toString("hex")}`}class WN{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??LN,this._portRange=r.portRange??FN,this._host=r.host??BN,this._publicHostname=r.publicHostname??P$,this._protocolVersion=r.protocolVersion??MN,this._keepAliveIntervalMs=r.keepAliveIntervalMs??VN,this._idleTimeoutMs=r.idleTimeoutMs??GN,this._corsOrigin=r.corsOrigin,this._allowedOrigins=r.allowedOrigins?new Set(r.allowedOrigins):null,this._trustedOriginHostSuffixes=r.trustedOriginHostSuffixes??qN,this._legacyDocumentRoutes=new Set((r.legacyDocumentRoutes??[]).map(i=>i.replace(/^\//,""))),this._capabilities=["sse","document-get","document-post","session-close","session-list","diagnostics","idle-timeout",ta,...r.capabilities??[]],this._statusTitle=r.statusTitle??t.serverName,this._workspaceId=r.workspaceId??KN(),this._ownerId=r.ownerId??HN()}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
76
+ ${e.describeImported()}`)}async function LN(e){try{return e.createResponse(await e.loadSnippet(e.snippetId))}catch(t){return Zt(`Error fetching snippet "${e.snippetId}": ${t.message}`)}}function FN(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 VN(e,t){return e.string().optional().describe(t)}function GN(e,t){return e.string().optional().describe(t)}function qN(e){return e.string().describe('Snippet ID from the Babylon.js Snippet Server (e.g. "ABC123" or "ABC123#2")')}const E$="babylon-mcp-editor-session",JN="1.0",KN="127.0.0.1",C$="localhost",HN=3001,WN=10,YN=15e3,XN=15*6e4,oa="last-writer-wins",QN=["babylonjs.com"];function eE(e,t,r=C$){return`http://${r}:${t}/session/${e}`}function tE(){return la.createHash("sha256").update(process.cwd()).digest("hex")}function nE(){return`${process.pid}-${la.randomBytes(8).toString("hex")}`}class rE{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??HN,this._portRange=r.portRange??WN,this._host=r.host??KN,this._publicHostname=r.publicHostname??C$,this._protocolVersion=r.protocolVersion??JN,this._keepAliveIntervalMs=r.keepAliveIntervalMs??YN,this._idleTimeoutMs=r.idleTimeoutMs??XN,this._corsOrigin=r.corsOrigin,this._allowedOrigins=r.allowedOrigins?new Set(r.allowedOrigins):null,this._trustedOriginHostSuffixes=r.trustedOriginHostSuffixes??QN,this._legacyDocumentRoutes=new Set((r.legacyDocumentRoutes??[]).map(i=>i.replace(/^\//,""))),this._capabilities=["sse","document-get","document-post","session-close","session-list","diagnostics","idle-timeout",oa,...r.capabilities??[]],this._statusTitle=r.statusTitle??t.serverName,this._workspaceId=r.workspaceId??tE(),this._ownerId=r.ownerId??nE()}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
77
77
 
78
- `)},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:sa.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 JN(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
78
+ `)},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:la.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 eE(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
79
79
  data: ${JSON.stringify({reason:r})}
80
80
 
81
- `),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:T$,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:ta,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=L$.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: ${T$} ${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(`
81
+ `),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:E$,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:oa,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=W$.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: ${E$} ${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(`
82
82
  `))}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
83
83
 
84
- `);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:ta}),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}
84
+ `);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:oa}),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}
85
85
 
86
- `)}_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:ta,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 XN{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 WN({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 Wn={GeometryInputBlock:{className:"GeometryInputBlock",category:"Input",description:"Provides input values to the geometry graph. Can be configured as a contextual source (Positions, Normals, UV, VertexID, etc.) or a constant value (Float, Int, Vector2, Vector3, Vector4, Matrix).",inputs:[],outputs:[{name:"output",type:"AutoDetect"}],properties:{type:"NodeGeometryBlockConnectionPointTypes \u2014 the data type (Int, Float, Vector2, Vector3, Vector4, Matrix)",contextualValue:"NodeGeometryContextualSources \u2014 None, Positions, Normals, Tangents, UV, UV2, UV3, UV4, UV5, UV6, Colors, VertexID, FaceID, GeometryID, CollectionID, LoopID, InstanceID, LatticeID, LatticeControl",value:"The actual constant value (number, Vector2, Vector3, Vector4, Matrix)",min:"number \u2014 minimum value for inspector slider",max:"number \u2014 maximum value for inspector slider",groupInInspector:"string \u2014 group name in the inspector",displayInInspector:"boolean \u2014 whether to show in Inspector"}},GeometryOutputBlock:{className:"GeometryOutputBlock",category:"Output",description:"The final output block that produces the geometry. Every Node Geometry graph must have exactly one.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[]},BoxBlock:{className:"BoxBlock",category:"Source",description:"Generates box geometry with configurable size and subdivisions.",inputs:[{name:"size",type:"Float",isOptional:!0},{name:"width",type:"Float",isOptional:!0},{name:"height",type:"Float",isOptional:!0},{name:"depth",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"subdivisionsX",type:"Int",isOptional:!0},{name:"subdivisionsY",type:"Int",isOptional:!0},{name:"subdivisionsZ",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},SphereBlock:{className:"SphereBlock",category:"Source",description:"Generates sphere geometry with configurable segments, diameter, arc, and slice.",inputs:[{name:"segments",type:"Int",isOptional:!0},{name:"diameter",type:"Float",isOptional:!0},{name:"diameterX",type:"Float",isOptional:!0},{name:"diameterY",type:"Float",isOptional:!0},{name:"diameterZ",type:"Float",isOptional:!0},{name:"arc",type:"Float",isOptional:!0},{name:"slice",type:"Float",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},CylinderBlock:{className:"CylinderBlock",category:"Source",description:"Generates cylinder geometry with configurable height, diameter, subdivisions, tessellation, and arc.",inputs:[{name:"height",type:"Float",isOptional:!0},{name:"diameter",type:"Float",isOptional:!0},{name:"diameterTop",type:"Float",isOptional:!0},{name:"diameterBottom",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0},{name:"arc",type:"Float",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},PlaneBlock:{className:"PlaneBlock",category:"Source",description:"Generates plane geometry with configurable size and subdivisions.",inputs:[{name:"size",type:"Float",isOptional:!0},{name:"width",type:"Float",isOptional:!0},{name:"height",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"subdivisionsX",type:"Int",isOptional:!0},{name:"subdivisionsY",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},TorusBlock:{className:"TorusBlock",category:"Source",description:"Generates torus geometry with configurable diameter, thickness, and tessellation.",inputs:[{name:"diameter",type:"Float",isOptional:!0},{name:"thickness",type:"Float",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},DiscBlock:{className:"DiscBlock",category:"Source",description:"Generates disc geometry with configurable radius, tessellation, and arc.",inputs:[{name:"radius",type:"Float",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0},{name:"arc",type:"Float",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},CapsuleBlock:{className:"CapsuleBlock",category:"Source",description:"Generates capsule geometry with configurable height, radius, tessellation, and subdivisions.",inputs:[{name:"height",type:"Float",isOptional:!0},{name:"radius",type:"Float",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},IcoSphereBlock:{className:"IcoSphereBlock",category:"Source",description:"Generates icosphere geometry with configurable radius and subdivisions.",inputs:[{name:"radius",type:"Float",isOptional:!0},{name:"radiusX",type:"Float",isOptional:!0},{name:"radiusY",type:"Float",isOptional:!0},{name:"radiusZ",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},GridBlock:{className:"GridBlock",category:"Source",description:"Generates a flat grid geometry with configurable width, height, and subdivisions.",inputs:[{name:"width",type:"Float",isOptional:!0},{name:"height",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"subdivisionsX",type:"Int",isOptional:!0},{name:"subdivisionsY",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},NullBlock:{className:"NullBlock",category:"Source",description:"Outputs a null (empty) geometry and a zero vector. Useful as a placeholder.",inputs:[],outputs:[{name:"geometry",type:"Geometry"},{name:"vector",type:"Vector3"}]},MeshBlock:{className:"MeshBlock",category:"Source",description:"Provides geometry from an existing mesh. The mesh is set programmatically or via cached data.",inputs:[],outputs:[{name:"geometry",type:"Geometry"}],properties:{serializedCachedData:"boolean \u2014 whether cached mesh data is embedded (default: false)",reverseWindingOrder:"boolean \u2014 whether to reverse face winding (default: false)"},defaultSerializedProperties:{serializedCachedData:!1,reverseWindingOrder:!1}},PointListBlock:{className:"PointListBlock",category:"Source",description:"Generates geometry from an explicit list of points.",inputs:[],outputs:[{name:"geometry",type:"Geometry"}],properties:{points:"Vector3[] \u2014 array of 3D points, serialised as flat arrays"}},GeometryTransformBlock:{className:"GeometryTransformBlock",category:"Geometry",description:"Transforms geometry or a vector using a matrix, or individual translation/rotation/scaling vectors. When used per-vertex (evaluateContext=true), it transforms each vertex position.",inputs:[{name:"value",type:"AutoDetect"},{name:"matrix",type:"Matrix",isOptional:!0},{name:"translation",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0},{name:"pivot",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{evaluateContext:"boolean \u2014 re-evaluate per context/vertex (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},MergeGeometryBlock:{className:"MergeGeometryBlock",category:"Geometry",description:"Merges up to 5 geometry inputs into a single geometry.",inputs:[{name:"geometry0",type:"Geometry"},{name:"geometry1",type:"Geometry",isOptional:!0},{name:"geometry2",type:"Geometry",isOptional:!0},{name:"geometry3",type:"Geometry",isOptional:!0},{name:"geometry4",type:"Geometry",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},BooleanGeometryBlock:{className:"BooleanGeometryBlock",category:"Geometry",description:"Performs CSG boolean operations (Intersect, Subtract, Union) between two geometries.",inputs:[{name:"geometry0",type:"Geometry"},{name:"geometry1",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"}],properties:{operation:"BooleanGeometryOperations \u2014 Intersect (0), Subtract (1), Union (2). Default: Intersect",evaluateContext:"boolean (default: false)",useOldCSGEngine:"boolean \u2014 use legacy CSG engine (default: false)"},defaultSerializedProperties:{evaluateContext:!1,operation:0,useOldCSGEngine:!1}},ComputeNormalsBlock:{className:"ComputeNormalsBlock",category:"Geometry",description:"Recomputes normals for a geometry based on its face topology.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"}]},CleanGeometryBlock:{className:"CleanGeometryBlock",category:"Geometry",description:"Cleans geometry by removing degenerate triangles, duplicates, etc.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},ExtrudeGeometryBlock:{className:"ExtrudeGeometryBlock",category:"Geometry",description:"Extrudes a geometry along its average face normal by a given depth. Supports configurable cap modes (no cap, start, end, or both).",inputs:[{name:"geometry",type:"Geometry"},{name:"depth",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 re-evaluate per context/vertex (default: false)",cap:"ExtrudeGeometryCap \u2014 NoCap (0), CapStart (1), CapEnd (2), CapAll (3). Default: CapAll (3)"},defaultSerializedProperties:{evaluateContext:!1,cap:3}},BevelBlock:{className:"BevelBlock",category:"Geometry",description:"Bevels geometry edges by a configurable amount, segment count, and angle threshold.",inputs:[{name:"geometry",type:"Geometry"},{name:"amount",type:"Float",isOptional:!0},{name:"segments",type:"Int",isOptional:!0},{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},SubdivideBlock:{className:"SubdivideBlock",category:"Geometry",description:"Subdivides geometry faces. Supports flat and Loop subdivision.",inputs:[{name:"geometry",type:"Geometry"},{name:"level",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{flatOnly:"boolean \u2014 flat subdivision only (default: false)",loopWeight:"number \u2014 Loop subdivision weight 0-1 (default: 1.0)"},defaultSerializedProperties:{flatOnly:!1,loopWeight:1}},GeometryOptimizeBlock:{className:"GeometryOptimizeBlock",category:"Geometry",description:"Optimizes geometry by merging close vertices and optionally removing duplicate faces.",inputs:[{name:"geometry",type:"Geometry"},{name:"selector",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",epsilon:"number \u2014 merge distance threshold",optimizeFaces:"boolean \u2014 also optimize faces (default: false)"},defaultSerializedProperties:{evaluateContext:!0,optimizeFaces:!1}},BoundingBlock:{className:"BoundingBlock",category:"Geometry",description:"Computes the axis-aligned bounding box of a geometry, outputting min and max vectors.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"min",type:"Vector3"},{name:"max",type:"Vector3"}]},GeometryInfoBlock:{className:"GeometryInfoBlock",category:"Geometry",description:"Provides metadata about a geometry: vertex count, face count, geometry ID, collection ID.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"},{name:"id",type:"Int"},{name:"collectionId",type:"Int"},{name:"verticesCount",type:"Int"},{name:"facesCount",type:"Int"}]},GeometryCollectionBlock:{className:"GeometryCollectionBlock",category:"Geometry",description:"Collects up to 10 geometries into a collection, assigning each a unique collection ID.",inputs:[{name:"geometry0",type:"Geometry",isOptional:!0},{name:"geometry1",type:"Geometry",isOptional:!0},{name:"geometry2",type:"Geometry",isOptional:!0},{name:"geometry3",type:"Geometry",isOptional:!0},{name:"geometry4",type:"Geometry",isOptional:!0},{name:"geometry5",type:"Geometry",isOptional:!0},{name:"geometry6",type:"Geometry",isOptional:!0},{name:"geometry7",type:"Geometry",isOptional:!0},{name:"geometry8",type:"Geometry",isOptional:!0},{name:"geometry9",type:"Geometry",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetPositionsBlock:{className:"SetPositionsBlock",category:"Set",description:"Overrides vertex positions in a geometry. Runs per-vertex with contextual source access.",inputs:[{name:"geometry",type:"Geometry"},{name:"positions",type:"Vector3"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetNormalsBlock:{className:"SetNormalsBlock",category:"Set",description:"Overrides vertex normals in a geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"normals",type:"Vector3"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetColorsBlock:{className:"SetColorsBlock",category:"Set",description:"Overrides vertex colors in a geometry. Accepts Vector3 (RGB) or Vector4 (RGBA).",inputs:[{name:"geometry",type:"Geometry"},{name:"colors",type:"AutoDetect"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetUVsBlock:{className:"SetUVsBlock",category:"Set",description:"Overrides UV coordinates in a geometry. Can target UV1\u2013UV6.",inputs:[{name:"geometry",type:"Geometry"},{name:"uvs",type:"Vector2"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",textureCoordinateIndex:"number \u2014 UV channel 0\u20135 (UV1\u2013UV6). Default: 0"},defaultSerializedProperties:{evaluateContext:!0,textureCoordinateIndex:0}},SetTangentsBlock:{className:"SetTangentsBlock",category:"Set",description:"Overrides vertex tangents in a geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"tangents",type:"Vector4"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetMaterialIDBlock:{className:"SetMaterialIDBlock",category:"Set",description:"Assigns a material ID to each face in a geometry. Used for multi-material support.",inputs:[{name:"geometry",type:"Geometry"},{name:"id",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},AggregatorBlock:{className:"AggregatorBlock",category:"Set",description:"Aggregates values across geometry vertices using Max, Min, or Sum operations.",inputs:[{name:"geometry",type:"Geometry"},{name:"source",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{aggregation:"Aggregations \u2014 Max (0), Min (1), Sum (2). Default: Sum",evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0,aggregation:2}},LatticeBlock:{className:"LatticeBlock",category:"Set",description:"Applies a lattice deformation to geometry. Control points modify vertex positions.",inputs:[{name:"geometry",type:"Geometry"},{name:"controls",type:"Vector3"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",resolutionX:"number \u2014 lattice resolution X (default: 3, range: 1\u201310)",resolutionY:"number \u2014 lattice resolution Y (default: 3, range: 1\u201310)",resolutionZ:"number \u2014 lattice resolution Z (default: 3, range: 1\u201310)"},defaultSerializedProperties:{evaluateContext:!0,resolutionX:3,resolutionY:3,resolutionZ:3}},InstantiateBlock:{className:"InstantiateBlock",category:"Instance",description:"Creates instances of geometry at specified positions with custom transform per instance.",inputs:[{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"position",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateLinearBlock:{className:"InstantiateLinearBlock",category:"Instance",description:"Creates instances arranged in a line along a direction vector.",inputs:[{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"direction",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateRadialBlock:{className:"InstantiateRadialBlock",category:"Instance",description:"Creates instances arranged radially in a circle or arc.",inputs:[{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"radius",type:"Int",isOptional:!0},{name:"angleStart",type:"Float",isOptional:!0},{name:"angleEnd",type:"Float",isOptional:!0},{name:"transform",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateOnFacesBlock:{className:"InstantiateOnFacesBlock",category:"Instance",description:"Scatters instances randomly across the faces of a source geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"offset",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateOnVerticesBlock:{className:"InstantiateOnVerticesBlock",category:"Instance",description:"Places instances on the vertices of a source geometry with optional density filtering.",inputs:[{name:"geometry",type:"Geometry"},{name:"instance",type:"Geometry",isOptional:!0},{name:"density",type:"Float",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"offset",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",removeDuplicatedPositions:"boolean \u2014 deduplicate vertices before instancing (default: true)"},defaultSerializedProperties:{evaluateContext:!0,removeDuplicatedPositions:!0}},InstantiateOnVolumeBlock:{className:"InstantiateOnVolumeBlock",category:"Instance",description:"Scatters instances inside the volume of a source geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"offset",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0},{name:"gridSize",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",gridMode:"boolean \u2014 use grid-based placement (default: false)"},defaultSerializedProperties:{evaluateContext:!0,gridMode:!1}},TranslationBlock:{className:"TranslationBlock",category:"Matrix",description:"Creates a translation matrix from a Vector3 input.",inputs:[{name:"translation",type:"Vector3"}],outputs:[{name:"matrix",type:"Matrix"}]},ScalingBlock:{className:"ScalingBlock",category:"Matrix",description:"Creates a scaling matrix from a Vector3 input.",inputs:[{name:"scale",type:"Vector3"}],outputs:[{name:"matrix",type:"Matrix"}]},RotationXBlock:{className:"RotationXBlock",category:"Matrix",description:"Creates a rotation matrix around the X axis from an angle (in radians).",inputs:[{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},RotationYBlock:{className:"RotationYBlock",category:"Matrix",description:"Creates a rotation matrix around the Y axis from an angle (in radians).",inputs:[{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},RotationZBlock:{className:"RotationZBlock",category:"Matrix",description:"Creates a rotation matrix around the Z axis from an angle (in radians).",inputs:[{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},AlignBlock:{className:"AlignBlock",category:"Matrix",description:"Creates a rotation matrix that aligns a source direction to a target direction.",inputs:[{name:"source",type:"Vector3",isOptional:!0},{name:"target",type:"Vector3",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},MatrixComposeBlock:{className:"MatrixComposeBlock",category:"Matrix",description:"Multiplies two matrices together (matrix0 \xD7 matrix1).",inputs:[{name:"matrix0",type:"Matrix"},{name:"matrix1",type:"Matrix"}],outputs:[{name:"output",type:"Matrix"}]},MathBlock:{className:"MathBlock",category:"Math",description:"Performs basic math: Add, Subtract, Multiply, Divide, Max, Min. Works on scalars and vectors.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{operation:"MathBlockOperations \u2014 Add (0), Subtract (1), Multiply (2), Divide (3), Max (4), Min (5). Default: Add"},defaultSerializedProperties:{operation:0}},GeometryTrigonometryBlock:{className:"GeometryTrigonometryBlock",category:"Math",description:"Applies a trigonometric or unary math function: Cos, Sin, Abs, Exp, Round, Floor, Ceiling, Sqrt, Log, Tan, ArcTan, ArcCos, ArcSin, Sign, Negate, OneMinus, Reciprocal, ToDegrees, ToRadians, Fract, Exp2.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{operation:"GeometryTrigonometryBlockOperations \u2014 Cos (0), Sin (1), Abs (2), Exp (3), Round (4), Floor (5), Ceiling (6), Sqrt (7), Log (8), Tan (9), ArcTan (10), ArcCos (11), ArcSin (12), Sign (13), Negate (14), OneMinus (15), Reciprocal (16), ToDegrees (17), ToRadians (18), Fract (19), Exp2 (20). Default: Cos"},defaultSerializedProperties:{operation:0}},ConditionBlock:{className:"ConditionBlock",category:"Math",description:"Conditional block: if left <test> right then ifTrue else ifFalse.",inputs:[{name:"left",type:"Float"},{name:"right",type:"Float",isOptional:!0},{name:"ifTrue",type:"AutoDetect",isOptional:!0},{name:"ifFalse",type:"AutoDetect",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{test:"ConditionBlockTests \u2014 Equal (0), NotEqual (1), LessThan (2), GreaterThan (3), LessOrEqual (4), GreaterOrEqual (5), Xor (6), Or (7), And (8). Default: Equal",epsilon:"number \u2014 comparison epsilon (default: 0)"},defaultSerializedProperties:{test:0,epsilon:0}},RandomBlock:{className:"RandomBlock",category:"Math",description:"Generates random values between min and max. Supports scalars and vectors.",inputs:[{name:"min",type:"AutoDetect"},{name:"max",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{lockMode:"RandomBlockLocks \u2014 None (0), LoopID (1), InstanceID (2), Once (3). Default: None"},defaultSerializedProperties:{lockMode:0}},NoiseBlock:{className:"NoiseBlock",category:"Math",description:"Generates Perlin-like noise with configurable offset, scale, octaves, and roughness.",inputs:[{name:"offset",type:"Vector3",isOptional:!0},{name:"scale",type:"Float",isOptional:!0},{name:"octaves",type:"Float",isOptional:!0},{name:"roughness",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Float"}]},GeometryClampBlock:{className:"GeometryClampBlock",category:"Math",description:"Clamps a value between min and max bounds.",inputs:[{name:"value",type:"AutoDetect"},{name:"min",type:"Float",isOptional:!0},{name:"max",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryLerpBlock:{className:"GeometryLerpBlock",category:"Math",description:"Linear interpolation between left and right using a gradient (0\u20131).",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"},{name:"gradient",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryNLerpBlock:{className:"GeometryNLerpBlock",category:"Math",description:"Normalised linear interpolation \u2014 same as lerp but normalizes the result (useful for vectors).",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"},{name:"gradient",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometrySmoothStepBlock:{className:"GeometrySmoothStepBlock",category:"Math",description:"Hermite smooth interpolation between edge0 and edge1.",inputs:[{name:"value",type:"AutoDetect"},{name:"edge0",type:"Float",isOptional:!0},{name:"edge1",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryStepBlock:{className:"GeometryStepBlock",category:"Math",description:"Step function: returns 0 if value < edge, else 1.",inputs:[{name:"value",type:"AutoDetect"},{name:"edge",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryDotBlock:{className:"GeometryDotBlock",category:"Vector",description:"Computes the dot product of two vectors.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"Float"}]},GeometryCrossBlock:{className:"GeometryCrossBlock",category:"Vector",description:"Computes the cross product of two Vector3s.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"Vector3"}]},GeometryLengthBlock:{className:"GeometryLengthBlock",category:"Vector",description:"Computes the length (magnitude) of a vector.",inputs:[{name:"value",type:"AutoDetect"}],outputs:[{name:"output",type:"Float"}]},GeometryDistanceBlock:{className:"GeometryDistanceBlock",category:"Vector",description:"Computes the distance between two vectors.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"Float"}]},NormalizeVectorBlock:{className:"NormalizeVectorBlock",category:"Vector",description:"Normalizes a vector to unit length.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryModBlock:{className:"GeometryModBlock",category:"Math",description:"Modulo operation (left % right).",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryPowBlock:{className:"GeometryPowBlock",category:"Math",description:"Power function (value ^ power).",inputs:[{name:"value",type:"AutoDetect"},{name:"power",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryArcTan2Block:{className:"GeometryArcTan2Block",category:"Math",description:"Computes atan2(x, y) \u2014 the two-argument arctangent.",inputs:[{name:"x",type:"AutoDetect"},{name:"y",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryReplaceColorBlock:{className:"GeometryReplaceColorBlock",category:"Color",description:"Replaces values near a reference color with a replacement color.",inputs:[{name:"value",type:"AutoDetect"},{name:"reference",type:"AutoDetect"},{name:"distance",type:"Float",isOptional:!0},{name:"replacement",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryPosterizeBlock:{className:"GeometryPosterizeBlock",category:"Color",description:"Reduces color to a set number of discrete steps (posterization effect).",inputs:[{name:"value",type:"AutoDetect"},{name:"steps",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryDesaturateBlock:{className:"GeometryDesaturateBlock",category:"Color",description:"Desaturates a color by mixing it towards its luminance value.",inputs:[{name:"color",type:"Vector3"},{name:"level",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Vector3"}]},MappingBlock:{className:"MappingBlock",category:"Mapping",description:"Generates UV coordinates from position and normal using Spherical, Cylindrical, or Cubic projection.",inputs:[{name:"position",type:"Vector3"},{name:"normal",type:"Vector3"},{name:"center",type:"Vector3",isOptional:!0}],outputs:[{name:"uv",type:"Vector2"}],properties:{mapping:"MappingTypes \u2014 Spherical (0), Cylindrical (1), Cubic (2). Default: Spherical"},defaultSerializedProperties:{mapping:0}},MapRangeBlock:{className:"MapRangeBlock",category:"Math",description:"Remaps a value from one range [fromMin, fromMax] to another [toMin, toMax].",inputs:[{name:"value",type:"AutoDetect"},{name:"fromMin",type:"Float",isOptional:!0},{name:"fromMax",type:"Float",isOptional:!0},{name:"toMin",type:"Float",isOptional:!0},{name:"toMax",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryRotate2dBlock:{className:"GeometryRotate2dBlock",category:"Math",description:"Rotates a Vector2 by an angle (in radians).",inputs:[{name:"input",type:"Vector2"},{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Vector2"}]},GeometryEaseBlock:{className:"GeometryEaseBlock",category:"Math",description:"Applies an easing function to the input. Supports Sine, Quad, Cubic, Quart, Quint, Expo, Circ, Back, Elastic variants (In/Out/InOut).",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{type:"GeometryEaseBlockTypes \u2014 EaseInSine (0), EaseOutSine (1), EaseInOutSine (2), EaseInQuad (3), EaseOutQuad (4), EaseInOutQuad (5), EaseInCubic (6), EaseOutCubic (7), EaseInOutCubic (8), EaseInQuart (9), EaseOutQuart (10), EaseInOutQuart (11), EaseInQuint (12), EaseOutQuint (13), EaseInOutQuint (14), EaseInExpo (15), EaseOutExpo (16), EaseInOutExpo (17), EaseInCirc (18), EaseOutCirc (19), EaseInOutCirc (20), EaseInBack (21), EaseOutBack (22), EaseInOutBack (23), EaseInElastic (24), EaseOutElastic (25), EaseInOutElastic (26). Default: EaseInOutSine"},defaultSerializedProperties:{type:2}},VectorConverterBlock:{className:"VectorConverterBlock",category:"Converter",description:"Splits vectors into components and/or assembles components into vectors.",inputs:[{name:"xyzw ",type:"Vector4",isOptional:!0},{name:"xyz ",type:"Vector3",isOptional:!0},{name:"xy ",type:"Vector2",isOptional:!0},{name:"zw ",type:"Vector2",isOptional:!0},{name:"x ",type:"Float",isOptional:!0},{name:"y ",type:"Float",isOptional:!0},{name:"z ",type:"Float",isOptional:!0},{name:"w ",type:"Float",isOptional:!0}],outputs:[{name:"xyzw",type:"Vector4"},{name:"xyz",type:"Vector3"},{name:"xy",type:"Vector2"},{name:"zw",type:"Vector2"},{name:"x",type:"Float"},{name:"y",type:"Float"},{name:"z",type:"Float"},{name:"w",type:"Float"}]},IntFloatConverterBlock:{className:"IntFloatConverterBlock",category:"Converter",description:"Converts between Int and Float types.",inputs:[{name:"float ",type:"Float",isOptional:!0},{name:"int ",type:"Int",isOptional:!0}],outputs:[{name:"float",type:"Float"},{name:"int",type:"Int"}]},DebugBlock:{className:"DebugBlock",category:"Utility",description:"Pass-through block that logs values during graph evaluation. Useful for debugging.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryElbowBlock:{className:"GeometryElbowBlock",category:"Utility",description:"Simple pass-through (reroute) block. Useful for organizing graph layout.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryInterceptorBlock:{className:"GeometryInterceptorBlock",category:"Utility",description:"Pass-through that triggers an observable when traversed. Useful for runtime interception.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},TeleportInBlock:{className:"TeleportInBlock",category:"Teleport",description:"Teleport entry \u2014 sends data to linked TeleportOutBlock endpoints without visible wires.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[]},TeleportOutBlock:{className:"TeleportOutBlock",category:"Teleport",description:"Teleport exit \u2014 receives data from a linked TeleportInBlock.",inputs:[],outputs:[{name:"output",type:"BasedOnInput"}],properties:{entryPoint:"number \u2014 block ID of the linked TeleportInBlock"}},GeometryTextureBlock:{className:"GeometryTextureBlock",category:"Texture",description:"Provides texture data for use with GeometryTextureFetchBlock. The texture is loaded programmatically.",inputs:[],outputs:[{name:"texture",type:"Texture"}],properties:{serializedCachedData:"boolean \u2014 whether to embed cached pixel data (default: false)"},defaultSerializedProperties:{serializedCachedData:!1}},GeometryCurveBlock:{className:"GeometryCurveBlock",category:"Math",description:"Applies an easing/curve function to the input. Same curves as GeometryEaseBlock but serialised as curveType.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{curveType:"GeometryCurveBlockTypes \u2014 EaseInSine (0), EaseOutSine (1), EaseInOutSine (2), EaseInQuad (3), EaseOutQuad (4), EaseInOutQuad (5), EaseInCubic (6), EaseOutCubic (7), EaseInOutCubic (8), EaseInQuart (9), EaseOutQuart (10), EaseInOutQuart (11), EaseInQuint (12), EaseOutQuint (13), EaseInOutQuint (14), EaseInExpo (15), EaseOutExpo (16), EaseInOutExpo (17), EaseInCirc (18), EaseOutCirc (19), EaseInOutCirc (20), EaseInBack (21), EaseOutBack (22), EaseInOutBack (23), EaseInElastic (24), EaseOutElastic (25), EaseInOutElastic (26). Default: EaseInOutSine"},defaultSerializedProperties:{curveType:2}},GeometryTextureFetchBlock:{className:"GeometryTextureFetchBlock",category:"Texture",description:"Samples a texture at given UV coordinates, outputting RGBA components.",inputs:[{name:"texture",type:"Texture"},{name:"coordinates",type:"Vector2"}],outputs:[{name:"rgba",type:"Vector4"},{name:"rgb",type:"Vector3"},{name:"r",type:"Float"},{name:"g",type:"Float"},{name:"b",type:"Float"},{name:"a",type:"Float"}],properties:{clampCoordinates:"boolean \u2014 clamp UV to 0-1 range (default: true)",interpolation:"boolean \u2014 bilinear interpolation (default: true)"},defaultSerializedProperties:{clampCoordinates:!0,interpolation:!0}}};function N$(){const e=new Map;for(const[r,i]of Object.entries(Wn)){const n=i.category;e.has(n)||e.set(n,[]),e.get(n).push(` ${r}: ${i.description.split(".")[0]}`)}const t=[];for(const[r,i]of e)t.push(`## ${r}`),t.push(...i),t.push("");return t.join(`
87
- `)}function YN(e){return Wn[e]}const he={Int:1,Float:2,Vector2:4,Vector3:8,Vector4:16,Matrix:32,Geometry:64,Texture:128,AutoDetect:1024,BasedOnInput:2048,Undefined:4096},Te={None:0,Positions:1,Normals:2,Tangents:3,UV:4,UV2:5,UV3:6,UV4:7,UV5:8,UV6:9,Colors:10,VertexID:11,FaceID:12,GeometryID:13,CollectionID:14,LoopID:15,InstanceID:16,LatticeID:17,LatticeControl:18},na={[Te.None]:he.AutoDetect,[Te.Positions]:he.Vector3,[Te.Normals]:he.Vector3,[Te.Tangents]:he.Vector3,[Te.UV]:he.Vector2,[Te.UV2]:he.Vector2,[Te.UV3]:he.Vector2,[Te.UV4]:he.Vector2,[Te.UV5]:he.Vector2,[Te.UV6]:he.Vector2,[Te.Colors]:he.Vector4,[Te.VertexID]:he.Int,[Te.FaceID]:he.Int,[Te.GeometryID]:he.Int,[Te.CollectionID]:he.Int,[Te.LoopID]:he.Int,[Te.InstanceID]:he.Int,[Te.LatticeID]:he.Int,[Te.LatticeControl]:he.Vector3},QN={Add:0,Subtract:1,Multiply:2,Divide:3,Max:4,Min:5},eE={Cos:0,Sin:1,Abs:2,Exp:3,Round:4,Floor:5,Ceiling:6,Sqrt:7,Log:8,Tan:9,ArcTan:10,ArcCos:11,ArcSin:12,Sign:13,Negate:14,OneMinus:15,Reciprocal:16,ToDegrees:17,ToRadians:18,Fract:19,Exp2:20},tE={Equal:0,NotEqual:1,LessThan:2,GreaterThan:3,LessOrEqual:4,GreaterOrEqual:5,Xor:6,Or:7,And:8},nE={Intersect:0,Subtract:1,Union:2},rE={None:0,LoopID:1,InstanceID:2,Once:3},iE={Max:0,Min:1,Sum:2},oE={Spherical:0,Cylindrical:1,Cubic:2},E$={EaseInSine:0,EaseOutSine:1,EaseInOutSine:2,EaseInQuad:3,EaseOutQuad:4,EaseInOutQuad:5,EaseInCubic:6,EaseOutCubic:7,EaseInOutCubic:8,EaseInQuart:9,EaseOutQuart:10,EaseInOutQuart:11,EaseInQuint:12,EaseOutQuint:13,EaseInOutQuint:14,EaseInExpo:15,EaseOutExpo:16,EaseInOutExpo:17,EaseInCirc:18,EaseOutCirc:19,EaseInOutCirc:20,EaseInBack:21,EaseOutBack:22,EaseInOutBack:23,EaseInElastic:24,EaseOutElastic:25,EaseInOutElastic:26},ni={MathBlock:{operation:QN},GeometryTrigonometryBlock:{operation:eE},ConditionBlock:{test:tE},BooleanGeometryBlock:{operation:nE},RandomBlock:{lockMode:rE},AggregatorBlock:{aggregation:iE},MappingBlock:{mapping:oE},GeometryEaseBlock:{type:E$},GeometryCurveBlock:{curveType:E$}};class ra{_geometries=new Map;_nextId=new Map;_nextX=new Map;createGeometry(t,r){const i={customType:"BABYLON.NodeGeometry",outputNodeId:-1,blocks:[],comment:r};return this._geometries.set(t,i),this._nextId.set(t,1),this._nextX.set(t,0),i}getGeometry(t){return this._geometries.get(t)}listGeometries(){return Array.from(this._geometries.keys())}deleteGeometry(t){return this._nextId.delete(t),this._nextX.delete(t),this._geometries.delete(t)}clearAll(){this._geometries.clear(),this._nextId.clear(),this._nextX.clear()}addBlock(t,r,i,n){const o=this._geometries.get(t);if(!o)return`Geometry "${t}" not found. Create it first.`;const a=Wn[r];if(!a)return`Unknown block type "${r}". Use list_block_types to see available blocks.`;const s=[],c=this._nextId.get(t);this._nextId.set(t,c+1);const u=i??`${r}_${c}`,l={customType:`BABYLON.${a.className}`,id:c,name:u,inputs:a.inputs.map(m=>({name:m.name,displayName:m.name})),outputs:a.outputs.map(m=>({name:m.name,displayName:m.name}))};if(r==="GeometryInputBlock"&&(l.type=he.Float,l.contextualValue=Te.None,l.min=0,l.max=0,l.groupInInspector="",l.displayInInspector=!0),a.defaultSerializedProperties)for(const[m,f]of Object.entries(a.defaultSerializedProperties))l[m]=f;if(n)for(const[m,f]of Object.entries(n))if(r==="GeometryInputBlock"&&m==="type"&&typeof f=="string")l.type=he[f]??f;else if(r==="GeometryInputBlock"&&m==="contextualValue"&&typeof f=="string"){const p=Te[f]??f;l.contextualValue=p,typeof p=="number"&&p!==Te.None&&na[p]!==void 0&&(l.type=na[p])}else typeof f=="string"&&ni[r]?.[m]?l[m]=ni[r][m][f]??f:l[m]=f;r==="GeometryInputBlock"&&(this._normaliseInputBlockValue(l),this._ensureDefaultValue(l)),r==="GeometryOutputBlock"&&(o.outputNodeId=c);const d=this._nextX.get(t);if(this._nextX.set(t,d+280),o.editorData||(o.editorData={locations:[]}),o.editorData.locations.push({blockId:c,x:d,y:0}),r==="GeometryInputBlock"){const m=l.contextualValue,f=l.value!==void 0;m===Te.None&&!f&&s.push(`\u26A0 GeometryInputBlock "${l.name}" has contextualValue=None and no value. Set either a contextualValue (e.g. 'Positions', 'Normals', 'UV', 'VertexID') or provide a constant value.`)}return o.blocks.push(l),{block:l,warnings:s.length>0?s:void 0}}_normaliseInputBlockValue(t){const r=t.value;if(r==null)return;const i=t.type;if(typeof r=="number"){if(i===he.Matrix){t.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t.valueType="BABYLON.Matrix";return}t.valueType="number";return}if(Array.isArray(r)){t.valueType||(t.valueType=this._inferValueType(i,r.length));return}if(typeof r=="object"){const n=r;"x"in n&&("w"in n?(t.value=[n.x,n.y,n.z,n.w],t.valueType="BABYLON.Vector4"):"z"in n?(t.value=[n.x,n.y,n.z],t.valueType="BABYLON.Vector3"):(t.value=[n.x,n.y],t.valueType="BABYLON.Vector2"))}}_inferValueType(t,r){const i={[he.Vector2]:"BABYLON.Vector2",[he.Vector3]:"BABYLON.Vector3",[he.Vector4]:"BABYLON.Vector4",[he.Matrix]:"BABYLON.Matrix"};return t!==void 0&&i[t]?i[t]:{2:"BABYLON.Vector2",3:"BABYLON.Vector3",4:"BABYLON.Vector4",16:"BABYLON.Matrix"}[r]??"BABYLON.Vector3"}_ensureDefaultValue(t){if(t.value!==void 0&&t.value!==null)return;const r=t.contextualValue;if(r!==void 0&&r!==Te.None)return;const i=t.type;if(i===void 0)return;const o={[he.Float]:{value:0,valueType:"number"},[he.Int]:{value:0,valueType:"number"},[he.Vector2]:{value:[0,0],valueType:"BABYLON.Vector2"},[he.Vector3]:{value:[0,0,0],valueType:"BABYLON.Vector3"},[he.Vector4]:{value:[0,0,0,0],valueType:"BABYLON.Vector4"},[he.Matrix]:{value:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],valueType:"BABYLON.Matrix"}}[i];o&&(t.value=o.value,t.valueType=o.valueType)}removeBlock(t,r){const i=this._geometries.get(t);if(!i)return`Geometry "${t}" not found.`;const n=i.blocks.findIndex(o=>o.id===r);if(n===-1)return`Block ${r} not found.`;for(const o of i.blocks)for(const a of o.inputs)a.targetBlockId===r&&(delete a.targetBlockId,delete a.targetConnectionName);return i.blocks.splice(n,1),i.outputNodeId===r&&(i.outputNodeId=-1),i.editorData&&(i.editorData.locations=i.editorData.locations.filter(o=>o.blockId!==r)),"OK"}connectBlocks(t,r,i,n,o){const a=this._geometries.get(t);if(!a)return`Geometry "${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.`;if(!s.outputs.find(d=>d.name===i)){const d=s.outputs.map(m=>m.name).join(", ");return`Output "${i}" not found on block ${r} ("${s.name}"). Available: ${d}`}const l=c.inputs.find(d=>d.name===o);if(!l){const d=c.inputs.map(m=>m.name).join(", ");return`Input "${o}" not found on block ${n} ("${c.name}"). Available: ${d}`}return l.inputName=l.name,l.targetBlockId=r,l.targetConnectionName=i,"OK"}disconnectInput(t,r,i){const n=this._geometries.get(t);if(!n)return`Geometry "${t}" not found.`;const o=n.blocks.find(s=>s.id===r);if(!o)return`Block ${r} not found.`;const a=o.inputs.find(s=>s.name===i);return a?(delete a.inputName,delete a.targetBlockId,delete a.targetConnectionName,"OK"):`Input "${i}" not found.`}describeGeometry(t){const r=this._geometries.get(t);if(!r)return`Geometry "${t}" not found.`;const i=[];i.push(`Geometry: ${t}`),i.push(`Blocks (${r.blocks.length}):`);for(const n of r.blocks){const o=n.customType.replace("BABYLON.","");if(i.push(` [${n.id}] ${n.name} (${o})`),n.inputs.length>0){for(const a of n.inputs)if(a.targetBlockId!==void 0){const s=r.blocks.find(c=>c.id===a.targetBlockId);i.push(` \u2190 ${a.name} \u2190 [${a.targetBlockId}] ${s?.name??"?"}.${a.targetConnectionName}`)}}}return i.push(`Output node: ${r.outputNodeId>=0?`[${r.outputNodeId}]`:"(not set)"}`),r.comment&&i.push(`Comment: ${r.comment}`),i.join(`
86
+ `)}_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:oa,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 iE{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 rE({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 Ae={NodeGeometryBlockConnectionPointTypes:{heading:"NodeGeometryBlockConnectionPointTypes",valueFormat:"hex4",values:{Int:1,Float:2,Vector2:4,Vector3:8,Vector4:16,Matrix:32,Geometry:64,Texture:128,AutoDetect:1024,BasedOnInput:2048,Undefined:4096}},NodeGeometryContextualSources:{heading:"NodeGeometryContextualSources (for GeometryInputBlock)",values:{None:0,Positions:1,Normals:2,Tangents:3,UV:4,UV2:5,UV3:6,UV4:7,UV5:8,UV6:9,Colors:10,VertexID:11,FaceID:12,GeometryID:13,CollectionID:14,LoopID:15,InstanceID:16,LatticeID:17,LatticeControl:18}},MathBlockOperations:{heading:"MathBlockOperations (for MathBlock)",values:{Add:0,Subtract:1,Multiply:2,Divide:3,Max:4,Min:5}},GeometryTrigonometryBlockOperations:{heading:"GeometryTrigonometryBlockOperations (for GeometryTrigonometryBlock)",values:{Cos:0,Sin:1,Abs:2,Exp:3,Round:4,Floor:5,Ceiling:6,Sqrt:7,Log:8,Tan:9,ArcTan:10,ArcCos:11,ArcSin:12,Sign:13,Negate:14,OneMinus:15,Reciprocal:16,ToDegrees:17,ToRadians:18,Fract:19,Exp2:20}},ConditionBlockTests:{heading:"ConditionBlockTests (for ConditionBlock)",values:{Equal:0,NotEqual:1,LessThan:2,GreaterThan:3,LessOrEqual:4,GreaterOrEqual:5,Xor:6,Or:7,And:8}},BooleanGeometryOperations:{heading:"BooleanGeometryOperations (for BooleanGeometryBlock)",values:{Intersect:0,Subtract:1,Union:2}},RandomBlockLocks:{heading:"RandomBlockLocks (for RandomBlock)",values:{None:0,LoopID:1,InstanceID:2,Once:3}},Aggregations:{heading:"Aggregations (for AggregatorBlock) \u2014 property name: aggregation",values:{Max:0,Min:1,Sum:2},summarySuffix:". Default: Sum"},GeometryEaseBlockTypes:{heading:"GeometryEaseBlockTypes (for GeometryEaseBlock) \u2014 property name: type",values:{EaseInSine:0,EaseOutSine:1,EaseInOutSine:2,EaseInQuad:3,EaseOutQuad:4,EaseInOutQuad:5,EaseInCubic:6,EaseOutCubic:7,EaseInOutCubic:8,EaseInQuart:9,EaseOutQuart:10,EaseInOutQuart:11,EaseInQuint:12,EaseOutQuint:13,EaseInOutQuint:14,EaseInExpo:15,EaseOutExpo:16,EaseInOutExpo:17,EaseInCirc:18,EaseOutCirc:19,EaseInOutCirc:20,EaseInBack:21,EaseOutBack:22,EaseInOutBack:23,EaseInElastic:24,EaseOutElastic:25,EaseInOutElastic:26},summaryValueCount:5,summarySuffix:", ..."},MappingTypes:{heading:"MappingTypes (for MappingBlock) \u2014 property name: mapping",values:{Spherical:0,Cylindrical:1,Cubic:2}}};function oE(){const e=["# NGE Enumerations Reference"];for(const t of Object.values(Ae)){const n=Object.entries(t.values).slice(0,t.summaryValueCount).map(([o,a])=>{const s=t.valueFormat==="hex4"?`0x${a.toString(16).padStart(4,"0")}`:a;return`${o} (${s})`}).join(", ");e.push("",`## ${t.heading}`,`${n}${t.summarySuffix??""}`)}return e.join(`
87
+ `)}const aE=["# Node Geometry Concepts","","## What is a Node Geometry?","A Node Geometry is a visual, graph-based procedural geometry builder in Babylon.js.","Instead of creating meshes from code, you connect typed blocks that represent geometry","operations. The graph evaluates at runtime to produce mesh vertex data.","","## Graph Structure \u2014 One Required Output","Every Node Geometry graph MUST have exactly one output block:"," \u2022 **GeometryOutputBlock** \u2014 receives the final Geometry output","Without this block, the geometry cannot be built.","","## GeometryInputBlock \u2014 Contextual Sources & Constants","GeometryInputBlock is the source of all external data entering the graph. It has two modes:","","### Mode 1: Contextual Source","Reads per-vertex/per-face data from the geometry being processed."," \u2022 Set `contextualValue` to one of: Positions, Normals, Tangents, UV, UV2, UV3, UV4, UV5, UV6,"," Colors, VertexID, FaceID, GeometryID, CollectionID, LoopID, InstanceID, LatticeID, LatticeControl"," \u2022 The `type` is automatically derived from the contextual source:"," - Positions/Normals/Tangents/LatticeControl \u2192 Vector3"," - UV/UV2/UV3/UV4/UV5/UV6 \u2192 Vector2"," - Colors \u2192 Vector4"," - VertexID/FaceID/GeometryID/CollectionID/LoopID/InstanceID/LatticeID \u2192 Int","","### Mode 2: Constant Value","Provides a fixed value of a specific type."," \u2022 Set `type` to: Int, Float, Vector2, Vector3, Vector4, Matrix"," \u2022 Set `value` to the constant (number, or {x,y}, {x,y,z}, {x,y,z,w}, or flat array)","","## Source Blocks \u2014 Built-in Primitives","These blocks generate mesh geometry directly without needing inputs:"," \u2022 BoxBlock, SphereBlock, CylinderBlock, PlaneBlock, TorusBlock, DiscBlock"," \u2022 CapsuleBlock, IcoSphereBlock, GridBlock, NullBlock, MeshBlock, PointListBlock","All dimension inputs (size, width, height, diameter, segments, subdivisions, etc.) are OPTIONAL INPUT","PORTS with sensible defaults. To override them, add a GeometryInputBlock (type Float or Int) with","the desired constant value and connect it to that port:"," Example: connect GeometryInputBlock(Float, value=10) \u2192 PlaneBlock.size"," Example: connect GeometryInputBlock(Float, value=0.5) \u2192 SphereBlock.diameter","You do NOT need to add inputs for dimensions you want to keep at their defaults.","","## The Simplest Geometry Graph","```","BoxBlock.geometry \u2192 GeometryOutputBlock.geometry","```","That's it \u2014 one source block connected to the output. This generates a default box.","","## Transforming Geometry","Use GeometryTransformBlock to translate, rotate, or scale geometry.","It accepts geometry on 'value' and has built-in translation/rotation/scaling inputs:","```","BoxBlock.geometry \u2192 GeometryTransformBlock.value","GeometryInputBlock(Vector3, value={x:0,y:2,z:0}) \u2192 GeometryTransformBlock.translation","GeometryTransformBlock.output \u2192 GeometryOutputBlock.geometry","```","Alternatively, wire a TranslationBlock (or RotationXBlock/ScalingBlock) to the 'matrix' input","for more complex multi-step transforms:","```","GeometryInputBlock(Vector3, {x:0,y:2,z:0}) \u2192 TranslationBlock.translation","TranslationBlock.matrix \u2192 GeometryTransformBlock.matrix","```","","## Merging Geometries","Use MergeGeometryBlock to combine multiple geometries:","```","BoxBlock.geometry \u2192 MergeGeometryBlock.geometry0","SphereBlock.geometry \u2192 MergeGeometryBlock.geometry1","MergeGeometryBlock.output \u2192 GeometryOutputBlock.geometry","```","","## Boolean Operations","Use BooleanGeometryBlock for CSG operations (Intersect, Subtract, Union):","```","BoxBlock.geometry \u2192 BooleanGeometryBlock.geometry0","SphereBlock.geometry \u2192 BooleanGeometryBlock.geometry1","BooleanGeometryBlock.output \u2192 GeometryOutputBlock.geometry","```","","## Instancing / Scattering","Create copies of geometry arranged in patterns:"," \u2022 InstantiateLinearBlock \u2014 line of copies along a direction"," \u2022 InstantiateRadialBlock \u2014 copies arranged in a circle"," \u2022 InstantiateOnFacesBlock \u2014 scatter copies on faces of source geometry"," \u2022 InstantiateOnVerticesBlock \u2014 place copies at vertices of source geometry"," \u2022 InstantiateOnVolumeBlock \u2014 scatter copies inside a volume","","## Per-Vertex Modification","Use Set blocks (evaluateContext=true, the default) to modify vertices individually:","```","BoxBlock.geometry \u2192 SetPositionsBlock.geometry","GeometryInputBlock(contextualValue:'Positions') \u2192 MathBlock.left (positions, Vector3)","NoiseBlock.output \u2192 VectorConverterBlock['x '] \u2192 VectorConverterBlock.xyz \u2192 MathBlock.right","MathBlock.output \u2192 SetPositionsBlock.positions","SetPositionsBlock.output \u2192 GeometryOutputBlock.geometry","```","Notes:"," \u2022 SetPositionsBlock.positions is a REQUIRED input (must be connected)."," \u2022 NoiseBlock outputs a Float; use VectorConverterBlock to lift it to Vector3."," \u2022 The MathBlock operation should be set to Add (0) via properties: { operation: 0 }.","","## VectorConverterBlock \u2014 Important: Trailing-Space Input Names","VectorConverterBlock input port names have a TRAILING SPACE to disambiguate from outputs:"," Inputs: 'xyzw ' (Vector4), 'xyz ' (Vector3), 'xy ' (Vector2), 'zw ' (Vector2),"," 'x ' (Float), 'y ' (Float), 'z ' (Float), 'w ' (Float)"," Outputs: 'xyzw' (Vector4), 'xyz' (Vector3), 'xy' (Vector2), 'zw' (Vector2),"," 'x' (Float), 'y' (Float), 'z' (Float), 'w' (Float)","When calling connect_blocks to a VectorConverterBlock INPUT, you MUST include the trailing space:"," connect_blocks(sourceId, 'output', vectorConverterId, 'x ') \u2190 note the space"," connect_blocks(vectorConverterId, 'xyz', targetId, ...) \u2190 outputs have no space","","## IntFloatConverterBlock \u2014 Same Trailing-Space Pattern","Inputs: 'float ' (Float), 'int ' (Int)","Outputs: 'float' (Float), 'int' (Int)","","## Common Mistakes","1. Forgetting GeometryOutputBlock \u2192 geometry cannot be built","2. Creating GeometryInputBlock without contextualValue or value \u2192 no data provided","3. Setting evaluateContext=false on Set blocks when per-vertex behaviour is needed","4. Not connecting the geometry flow \u2014 every path must link back to GeometryOutputBlock","5. Omitting trailing space on VectorConverterBlock / IntFloatConverterBlock inputs","6. Leaving SetPositionsBlock.positions unconnected (required, not optional)"].join(`
88
+ `),zt={GeometryInputBlock:{className:"GeometryInputBlock",category:"Input",description:"Provides input values to the geometry graph. Can be configured as a contextual source (Positions, Normals, UV, VertexID, etc.) or a constant value (Float, Int, Vector2, Vector3, Vector4, Matrix).",inputs:[],outputs:[{name:"output",type:"AutoDetect"}],properties:{type:"NodeGeometryBlockConnectionPointTypes \u2014 the data type (Int, Float, Vector2, Vector3, Vector4, Matrix)",contextualValue:"NodeGeometryContextualSources \u2014 None, Positions, Normals, Tangents, UV, UV2, UV3, UV4, UV5, UV6, Colors, VertexID, FaceID, GeometryID, CollectionID, LoopID, InstanceID, LatticeID, LatticeControl",value:"The actual constant value (number, Vector2, Vector3, Vector4, Matrix)",min:"number \u2014 minimum value for inspector slider",max:"number \u2014 maximum value for inspector slider",groupInInspector:"string \u2014 group name in the inspector",displayInInspector:"boolean \u2014 whether to show in Inspector"}},GeometryOutputBlock:{className:"GeometryOutputBlock",category:"Output",description:"The final output block that produces the geometry. Every Node Geometry graph must have exactly one.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[]},BoxBlock:{className:"BoxBlock",category:"Source",description:"Generates box geometry with configurable size and subdivisions.",inputs:[{name:"size",type:"Float",isOptional:!0},{name:"width",type:"Float",isOptional:!0},{name:"height",type:"Float",isOptional:!0},{name:"depth",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"subdivisionsX",type:"Int",isOptional:!0},{name:"subdivisionsY",type:"Int",isOptional:!0},{name:"subdivisionsZ",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},SphereBlock:{className:"SphereBlock",category:"Source",description:"Generates sphere geometry with configurable segments, diameter, arc, and slice.",inputs:[{name:"segments",type:"Int",isOptional:!0},{name:"diameter",type:"Float",isOptional:!0},{name:"diameterX",type:"Float",isOptional:!0},{name:"diameterY",type:"Float",isOptional:!0},{name:"diameterZ",type:"Float",isOptional:!0},{name:"arc",type:"Float",isOptional:!0},{name:"slice",type:"Float",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},CylinderBlock:{className:"CylinderBlock",category:"Source",description:"Generates cylinder geometry with configurable height, diameter, subdivisions, tessellation, and arc.",inputs:[{name:"height",type:"Float",isOptional:!0},{name:"diameter",type:"Float",isOptional:!0},{name:"diameterTop",type:"Float",isOptional:!0},{name:"diameterBottom",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0},{name:"arc",type:"Float",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},PlaneBlock:{className:"PlaneBlock",category:"Source",description:"Generates plane geometry with configurable size and subdivisions.",inputs:[{name:"size",type:"Float",isOptional:!0},{name:"width",type:"Float",isOptional:!0},{name:"height",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"subdivisionsX",type:"Int",isOptional:!0},{name:"subdivisionsY",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},TorusBlock:{className:"TorusBlock",category:"Source",description:"Generates torus geometry with configurable diameter, thickness, and tessellation.",inputs:[{name:"diameter",type:"Float",isOptional:!0},{name:"thickness",type:"Float",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},DiscBlock:{className:"DiscBlock",category:"Source",description:"Generates disc geometry with configurable radius, tessellation, and arc.",inputs:[{name:"radius",type:"Float",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0},{name:"arc",type:"Float",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},CapsuleBlock:{className:"CapsuleBlock",category:"Source",description:"Generates capsule geometry with configurable height, radius, tessellation, and subdivisions.",inputs:[{name:"height",type:"Float",isOptional:!0},{name:"radius",type:"Float",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},IcoSphereBlock:{className:"IcoSphereBlock",category:"Source",description:"Generates icosphere geometry with configurable radius and subdivisions.",inputs:[{name:"radius",type:"Float",isOptional:!0},{name:"radiusX",type:"Float",isOptional:!0},{name:"radiusY",type:"Float",isOptional:!0},{name:"radiusZ",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},GridBlock:{className:"GridBlock",category:"Source",description:"Generates a flat grid geometry with configurable width, height, and subdivisions.",inputs:[{name:"width",type:"Float",isOptional:!0},{name:"height",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"subdivisionsX",type:"Int",isOptional:!0},{name:"subdivisionsY",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},NullBlock:{className:"NullBlock",category:"Source",description:"Outputs a null (empty) geometry and a zero vector. Useful as a placeholder.",inputs:[],outputs:[{name:"geometry",type:"Geometry"},{name:"vector",type:"Vector3"}]},MeshBlock:{className:"MeshBlock",category:"Source",description:"Provides geometry from an existing mesh. The mesh is set programmatically or via cached data.",inputs:[],outputs:[{name:"geometry",type:"Geometry"}],properties:{serializedCachedData:"boolean \u2014 whether cached mesh data is embedded (default: false)",reverseWindingOrder:"boolean \u2014 whether to reverse face winding (default: false)"},defaultSerializedProperties:{serializedCachedData:!1,reverseWindingOrder:!1}},PointListBlock:{className:"PointListBlock",category:"Source",description:"Generates geometry from an explicit list of points.",inputs:[],outputs:[{name:"geometry",type:"Geometry"}],properties:{points:"Vector3[] \u2014 array of 3D points, serialised as flat arrays"}},GeometryTransformBlock:{className:"GeometryTransformBlock",category:"Geometry",description:"Transforms geometry or a vector using a matrix, or individual translation/rotation/scaling vectors. When used per-vertex (evaluateContext=true), it transforms each vertex position.",inputs:[{name:"value",type:"AutoDetect"},{name:"matrix",type:"Matrix",isOptional:!0},{name:"translation",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0},{name:"pivot",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{evaluateContext:"boolean \u2014 re-evaluate per context/vertex (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},MergeGeometryBlock:{className:"MergeGeometryBlock",category:"Geometry",description:"Merges up to 5 geometry inputs into a single geometry.",inputs:[{name:"geometry0",type:"Geometry"},{name:"geometry1",type:"Geometry",isOptional:!0},{name:"geometry2",type:"Geometry",isOptional:!0},{name:"geometry3",type:"Geometry",isOptional:!0},{name:"geometry4",type:"Geometry",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},BooleanGeometryBlock:{className:"BooleanGeometryBlock",category:"Geometry",description:"Performs CSG boolean operations (Intersect, Subtract, Union) between two geometries.",inputs:[{name:"geometry0",type:"Geometry"},{name:"geometry1",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"}],properties:{operation:"BooleanGeometryOperations \u2014 Intersect (0), Subtract (1), Union (2). Default: Intersect",evaluateContext:"boolean (default: false)",useOldCSGEngine:"boolean \u2014 use legacy CSG engine (default: false)"},defaultSerializedProperties:{evaluateContext:!1,operation:0,useOldCSGEngine:!1}},ComputeNormalsBlock:{className:"ComputeNormalsBlock",category:"Geometry",description:"Recomputes normals for a geometry based on its face topology.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"}]},CleanGeometryBlock:{className:"CleanGeometryBlock",category:"Geometry",description:"Cleans geometry by removing degenerate triangles, duplicates, etc.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},ExtrudeGeometryBlock:{className:"ExtrudeGeometryBlock",category:"Geometry",description:"Extrudes a geometry along its average face normal by a given depth. Supports configurable cap modes (no cap, start, end, or both).",inputs:[{name:"geometry",type:"Geometry"},{name:"depth",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 re-evaluate per context/vertex (default: false)",cap:"ExtrudeGeometryCap \u2014 NoCap (0), CapStart (1), CapEnd (2), CapAll (3). Default: CapAll (3)"},defaultSerializedProperties:{evaluateContext:!1,cap:3}},BevelBlock:{className:"BevelBlock",category:"Geometry",description:"Bevels geometry edges by a configurable amount, segment count, and angle threshold.",inputs:[{name:"geometry",type:"Geometry"},{name:"amount",type:"Float",isOptional:!0},{name:"segments",type:"Int",isOptional:!0},{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},SubdivideBlock:{className:"SubdivideBlock",category:"Geometry",description:"Subdivides geometry faces. Supports flat and Loop subdivision.",inputs:[{name:"geometry",type:"Geometry"},{name:"level",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{flatOnly:"boolean \u2014 flat subdivision only (default: false)",loopWeight:"number \u2014 Loop subdivision weight 0-1 (default: 1.0)"},defaultSerializedProperties:{flatOnly:!1,loopWeight:1}},GeometryOptimizeBlock:{className:"GeometryOptimizeBlock",category:"Geometry",description:"Optimizes geometry by merging close vertices and optionally removing duplicate faces.",inputs:[{name:"geometry",type:"Geometry"},{name:"selector",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",epsilon:"number \u2014 merge distance threshold",optimizeFaces:"boolean \u2014 also optimize faces (default: false)"},defaultSerializedProperties:{evaluateContext:!0,optimizeFaces:!1}},BoundingBlock:{className:"BoundingBlock",category:"Geometry",description:"Computes the axis-aligned bounding box of a geometry, outputting min and max vectors.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"min",type:"Vector3"},{name:"max",type:"Vector3"}]},GeometryInfoBlock:{className:"GeometryInfoBlock",category:"Geometry",description:"Provides metadata about a geometry: vertex count, face count, geometry ID, collection ID.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"},{name:"id",type:"Int"},{name:"collectionId",type:"Int"},{name:"verticesCount",type:"Int"},{name:"facesCount",type:"Int"}]},GeometryCollectionBlock:{className:"GeometryCollectionBlock",category:"Geometry",description:"Collects up to 10 geometries into a collection, assigning each a unique collection ID.",inputs:[{name:"geometry0",type:"Geometry",isOptional:!0},{name:"geometry1",type:"Geometry",isOptional:!0},{name:"geometry2",type:"Geometry",isOptional:!0},{name:"geometry3",type:"Geometry",isOptional:!0},{name:"geometry4",type:"Geometry",isOptional:!0},{name:"geometry5",type:"Geometry",isOptional:!0},{name:"geometry6",type:"Geometry",isOptional:!0},{name:"geometry7",type:"Geometry",isOptional:!0},{name:"geometry8",type:"Geometry",isOptional:!0},{name:"geometry9",type:"Geometry",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetPositionsBlock:{className:"SetPositionsBlock",category:"Set",description:"Overrides vertex positions in a geometry. Runs per-vertex with contextual source access.",inputs:[{name:"geometry",type:"Geometry"},{name:"positions",type:"Vector3"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetNormalsBlock:{className:"SetNormalsBlock",category:"Set",description:"Overrides vertex normals in a geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"normals",type:"Vector3"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetColorsBlock:{className:"SetColorsBlock",category:"Set",description:"Overrides vertex colors in a geometry. Accepts Vector3 (RGB) or Vector4 (RGBA).",inputs:[{name:"geometry",type:"Geometry"},{name:"colors",type:"AutoDetect"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetUVsBlock:{className:"SetUVsBlock",category:"Set",description:"Overrides UV coordinates in a geometry. Can target UV1\u2013UV6.",inputs:[{name:"geometry",type:"Geometry"},{name:"uvs",type:"Vector2"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",textureCoordinateIndex:"number \u2014 UV channel 0\u20135 (UV1\u2013UV6). Default: 0"},defaultSerializedProperties:{evaluateContext:!0,textureCoordinateIndex:0}},SetTangentsBlock:{className:"SetTangentsBlock",category:"Set",description:"Overrides vertex tangents in a geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"tangents",type:"Vector4"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetMaterialIDBlock:{className:"SetMaterialIDBlock",category:"Set",description:"Assigns a material ID to each face in a geometry. Used for multi-material support.",inputs:[{name:"geometry",type:"Geometry"},{name:"id",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},AggregatorBlock:{className:"AggregatorBlock",category:"Set",description:"Aggregates values across geometry vertices using Max, Min, or Sum operations.",inputs:[{name:"geometry",type:"Geometry"},{name:"source",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{aggregation:"Aggregations \u2014 Max (0), Min (1), Sum (2). Default: Sum",evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0,aggregation:2}},LatticeBlock:{className:"LatticeBlock",category:"Set",description:"Applies a lattice deformation to geometry. Control points modify vertex positions.",inputs:[{name:"geometry",type:"Geometry"},{name:"controls",type:"Vector3"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",resolutionX:"number \u2014 lattice resolution X (default: 3, range: 1\u201310)",resolutionY:"number \u2014 lattice resolution Y (default: 3, range: 1\u201310)",resolutionZ:"number \u2014 lattice resolution Z (default: 3, range: 1\u201310)"},defaultSerializedProperties:{evaluateContext:!0,resolutionX:3,resolutionY:3,resolutionZ:3}},InstantiateBlock:{className:"InstantiateBlock",category:"Instance",description:"Creates instances of geometry at specified positions with custom transform per instance.",inputs:[{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"position",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateLinearBlock:{className:"InstantiateLinearBlock",category:"Instance",description:"Creates instances arranged in a line along a direction vector.",inputs:[{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"direction",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateRadialBlock:{className:"InstantiateRadialBlock",category:"Instance",description:"Creates instances arranged radially in a circle or arc.",inputs:[{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"radius",type:"Int",isOptional:!0},{name:"angleStart",type:"Float",isOptional:!0},{name:"angleEnd",type:"Float",isOptional:!0},{name:"transform",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateOnFacesBlock:{className:"InstantiateOnFacesBlock",category:"Instance",description:"Scatters instances randomly across the faces of a source geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"offset",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateOnVerticesBlock:{className:"InstantiateOnVerticesBlock",category:"Instance",description:"Places instances on the vertices of a source geometry with optional density filtering.",inputs:[{name:"geometry",type:"Geometry"},{name:"instance",type:"Geometry",isOptional:!0},{name:"density",type:"Float",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"offset",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",removeDuplicatedPositions:"boolean \u2014 deduplicate vertices before instancing (default: true)"},defaultSerializedProperties:{evaluateContext:!0,removeDuplicatedPositions:!0}},InstantiateOnVolumeBlock:{className:"InstantiateOnVolumeBlock",category:"Instance",description:"Scatters instances inside the volume of a source geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"offset",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0},{name:"gridSize",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",gridMode:"boolean \u2014 use grid-based placement (default: false)"},defaultSerializedProperties:{evaluateContext:!0,gridMode:!1}},TranslationBlock:{className:"TranslationBlock",category:"Matrix",description:"Creates a translation matrix from a Vector3 input.",inputs:[{name:"translation",type:"Vector3"}],outputs:[{name:"matrix",type:"Matrix"}]},ScalingBlock:{className:"ScalingBlock",category:"Matrix",description:"Creates a scaling matrix from a Vector3 input.",inputs:[{name:"scale",type:"Vector3"}],outputs:[{name:"matrix",type:"Matrix"}]},RotationXBlock:{className:"RotationXBlock",category:"Matrix",description:"Creates a rotation matrix around the X axis from an angle (in radians).",inputs:[{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},RotationYBlock:{className:"RotationYBlock",category:"Matrix",description:"Creates a rotation matrix around the Y axis from an angle (in radians).",inputs:[{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},RotationZBlock:{className:"RotationZBlock",category:"Matrix",description:"Creates a rotation matrix around the Z axis from an angle (in radians).",inputs:[{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},AlignBlock:{className:"AlignBlock",category:"Matrix",description:"Creates a rotation matrix that aligns a source direction to a target direction.",inputs:[{name:"source",type:"Vector3",isOptional:!0},{name:"target",type:"Vector3",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},MatrixComposeBlock:{className:"MatrixComposeBlock",category:"Matrix",description:"Multiplies two matrices together (matrix0 \xD7 matrix1).",inputs:[{name:"matrix0",type:"Matrix"},{name:"matrix1",type:"Matrix"}],outputs:[{name:"output",type:"Matrix"}]},MathBlock:{className:"MathBlock",category:"Math",description:"Performs basic math: Add, Subtract, Multiply, Divide, Max, Min. Works on scalars and vectors.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{operation:"MathBlockOperations \u2014 Add (0), Subtract (1), Multiply (2), Divide (3), Max (4), Min (5). Default: Add"},defaultSerializedProperties:{operation:0}},GeometryTrigonometryBlock:{className:"GeometryTrigonometryBlock",category:"Math",description:"Applies a trigonometric or unary math function: Cos, Sin, Abs, Exp, Round, Floor, Ceiling, Sqrt, Log, Tan, ArcTan, ArcCos, ArcSin, Sign, Negate, OneMinus, Reciprocal, ToDegrees, ToRadians, Fract, Exp2.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{operation:"GeometryTrigonometryBlockOperations \u2014 Cos (0), Sin (1), Abs (2), Exp (3), Round (4), Floor (5), Ceiling (6), Sqrt (7), Log (8), Tan (9), ArcTan (10), ArcCos (11), ArcSin (12), Sign (13), Negate (14), OneMinus (15), Reciprocal (16), ToDegrees (17), ToRadians (18), Fract (19), Exp2 (20). Default: Cos"},defaultSerializedProperties:{operation:0}},ConditionBlock:{className:"ConditionBlock",category:"Math",description:"Conditional block: if left <test> right then ifTrue else ifFalse.",inputs:[{name:"left",type:"Float"},{name:"right",type:"Float",isOptional:!0},{name:"ifTrue",type:"AutoDetect",isOptional:!0},{name:"ifFalse",type:"AutoDetect",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{test:"ConditionBlockTests \u2014 Equal (0), NotEqual (1), LessThan (2), GreaterThan (3), LessOrEqual (4), GreaterOrEqual (5), Xor (6), Or (7), And (8). Default: Equal",epsilon:"number \u2014 comparison epsilon (default: 0)"},defaultSerializedProperties:{test:0,epsilon:0}},RandomBlock:{className:"RandomBlock",category:"Math",description:"Generates random values between min and max. Supports scalars and vectors.",inputs:[{name:"min",type:"AutoDetect"},{name:"max",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{lockMode:"RandomBlockLocks \u2014 None (0), LoopID (1), InstanceID (2), Once (3). Default: None"},defaultSerializedProperties:{lockMode:0}},NoiseBlock:{className:"NoiseBlock",category:"Math",description:"Generates Perlin-like noise with configurable offset, scale, octaves, and roughness.",inputs:[{name:"offset",type:"Vector3",isOptional:!0},{name:"scale",type:"Float",isOptional:!0},{name:"octaves",type:"Float",isOptional:!0},{name:"roughness",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Float"}]},GeometryClampBlock:{className:"GeometryClampBlock",category:"Math",description:"Clamps a value between min and max bounds.",inputs:[{name:"value",type:"AutoDetect"},{name:"min",type:"Float",isOptional:!0},{name:"max",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryLerpBlock:{className:"GeometryLerpBlock",category:"Math",description:"Linear interpolation between left and right using a gradient (0\u20131).",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"},{name:"gradient",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryNLerpBlock:{className:"GeometryNLerpBlock",category:"Math",description:"Normalised linear interpolation \u2014 same as lerp but normalizes the result (useful for vectors).",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"},{name:"gradient",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometrySmoothStepBlock:{className:"GeometrySmoothStepBlock",category:"Math",description:"Hermite smooth interpolation between edge0 and edge1.",inputs:[{name:"value",type:"AutoDetect"},{name:"edge0",type:"Float",isOptional:!0},{name:"edge1",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryStepBlock:{className:"GeometryStepBlock",category:"Math",description:"Step function: returns 0 if value < edge, else 1.",inputs:[{name:"value",type:"AutoDetect"},{name:"edge",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryDotBlock:{className:"GeometryDotBlock",category:"Vector",description:"Computes the dot product of two vectors.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"Float"}]},GeometryCrossBlock:{className:"GeometryCrossBlock",category:"Vector",description:"Computes the cross product of two Vector3s.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"Vector3"}]},GeometryLengthBlock:{className:"GeometryLengthBlock",category:"Vector",description:"Computes the length (magnitude) of a vector.",inputs:[{name:"value",type:"AutoDetect"}],outputs:[{name:"output",type:"Float"}]},GeometryDistanceBlock:{className:"GeometryDistanceBlock",category:"Vector",description:"Computes the distance between two vectors.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"Float"}]},NormalizeVectorBlock:{className:"NormalizeVectorBlock",category:"Vector",description:"Normalizes a vector to unit length.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryModBlock:{className:"GeometryModBlock",category:"Math",description:"Modulo operation (left % right).",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryPowBlock:{className:"GeometryPowBlock",category:"Math",description:"Power function (value ^ power).",inputs:[{name:"value",type:"AutoDetect"},{name:"power",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryArcTan2Block:{className:"GeometryArcTan2Block",category:"Math",description:"Computes atan2(x, y) \u2014 the two-argument arctangent.",inputs:[{name:"x",type:"AutoDetect"},{name:"y",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryReplaceColorBlock:{className:"GeometryReplaceColorBlock",category:"Color",description:"Replaces values near a reference color with a replacement color.",inputs:[{name:"value",type:"AutoDetect"},{name:"reference",type:"AutoDetect"},{name:"distance",type:"Float",isOptional:!0},{name:"replacement",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryPosterizeBlock:{className:"GeometryPosterizeBlock",category:"Color",description:"Reduces color to a set number of discrete steps (posterization effect).",inputs:[{name:"value",type:"AutoDetect"},{name:"steps",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryDesaturateBlock:{className:"GeometryDesaturateBlock",category:"Color",description:"Desaturates a color by mixing it towards its luminance value.",inputs:[{name:"color",type:"Vector3"},{name:"level",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Vector3"}]},MappingBlock:{className:"MappingBlock",category:"Mapping",description:"Generates UV coordinates from position and normal using Spherical, Cylindrical, or Cubic projection.",inputs:[{name:"position",type:"Vector3"},{name:"normal",type:"Vector3"},{name:"center",type:"Vector3",isOptional:!0}],outputs:[{name:"uv",type:"Vector2"}],properties:{mapping:"MappingTypes \u2014 Spherical (0), Cylindrical (1), Cubic (2). Default: Spherical"},defaultSerializedProperties:{mapping:0}},MapRangeBlock:{className:"MapRangeBlock",category:"Math",description:"Remaps a value from one range [fromMin, fromMax] to another [toMin, toMax].",inputs:[{name:"value",type:"AutoDetect"},{name:"fromMin",type:"Float",isOptional:!0},{name:"fromMax",type:"Float",isOptional:!0},{name:"toMin",type:"Float",isOptional:!0},{name:"toMax",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryRotate2dBlock:{className:"GeometryRotate2dBlock",category:"Math",description:"Rotates a Vector2 by an angle (in radians).",inputs:[{name:"input",type:"Vector2"},{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Vector2"}]},GeometryEaseBlock:{className:"GeometryEaseBlock",category:"Math",description:"Applies an easing function to the input. Supports Sine, Quad, Cubic, Quart, Quint, Expo, Circ, Back, Elastic variants (In/Out/InOut).",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{type:"GeometryEaseBlockTypes \u2014 EaseInSine (0), EaseOutSine (1), EaseInOutSine (2), EaseInQuad (3), EaseOutQuad (4), EaseInOutQuad (5), EaseInCubic (6), EaseOutCubic (7), EaseInOutCubic (8), EaseInQuart (9), EaseOutQuart (10), EaseInOutQuart (11), EaseInQuint (12), EaseOutQuint (13), EaseInOutQuint (14), EaseInExpo (15), EaseOutExpo (16), EaseInOutExpo (17), EaseInCirc (18), EaseOutCirc (19), EaseInOutCirc (20), EaseInBack (21), EaseOutBack (22), EaseInOutBack (23), EaseInElastic (24), EaseOutElastic (25), EaseInOutElastic (26). Default: EaseInOutSine"},defaultSerializedProperties:{type:2}},VectorConverterBlock:{className:"VectorConverterBlock",category:"Converter",description:"Splits vectors into components and/or assembles components into vectors.",inputs:[{name:"xyzw ",type:"Vector4",isOptional:!0},{name:"xyz ",type:"Vector3",isOptional:!0},{name:"xy ",type:"Vector2",isOptional:!0},{name:"zw ",type:"Vector2",isOptional:!0},{name:"x ",type:"Float",isOptional:!0},{name:"y ",type:"Float",isOptional:!0},{name:"z ",type:"Float",isOptional:!0},{name:"w ",type:"Float",isOptional:!0}],outputs:[{name:"xyzw",type:"Vector4"},{name:"xyz",type:"Vector3"},{name:"xy",type:"Vector2"},{name:"zw",type:"Vector2"},{name:"x",type:"Float"},{name:"y",type:"Float"},{name:"z",type:"Float"},{name:"w",type:"Float"}]},IntFloatConverterBlock:{className:"IntFloatConverterBlock",category:"Converter",description:"Converts between Int and Float types.",inputs:[{name:"float ",type:"Float",isOptional:!0},{name:"int ",type:"Int",isOptional:!0}],outputs:[{name:"float",type:"Float"},{name:"int",type:"Int"}]},DebugBlock:{className:"DebugBlock",category:"Utility",description:"Pass-through block that logs values during graph evaluation. Useful for debugging.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryElbowBlock:{className:"GeometryElbowBlock",category:"Utility",description:"Simple pass-through (reroute) block. Useful for organizing graph layout.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryInterceptorBlock:{className:"GeometryInterceptorBlock",category:"Utility",description:"Pass-through that triggers an observable when traversed. Useful for runtime interception.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},TeleportInBlock:{className:"TeleportInBlock",category:"Teleport",description:"Teleport entry \u2014 sends data to linked TeleportOutBlock endpoints without visible wires.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[]},TeleportOutBlock:{className:"TeleportOutBlock",category:"Teleport",description:"Teleport exit \u2014 receives data from a linked TeleportInBlock.",inputs:[],outputs:[{name:"output",type:"BasedOnInput"}],properties:{entryPoint:"number \u2014 block ID of the linked TeleportInBlock"}},GeometryTextureBlock:{className:"GeometryTextureBlock",category:"Texture",description:"Provides texture data for use with GeometryTextureFetchBlock. The texture is loaded programmatically.",inputs:[],outputs:[{name:"texture",type:"Texture"}],properties:{serializedCachedData:"boolean \u2014 whether to embed cached pixel data (default: false)"},defaultSerializedProperties:{serializedCachedData:!1}},GeometryCurveBlock:{className:"GeometryCurveBlock",category:"Math",description:"Applies an easing/curve function to the input. Same curves as GeometryEaseBlock but serialised as curveType.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{curveType:"GeometryCurveBlockTypes \u2014 EaseInSine (0), EaseOutSine (1), EaseInOutSine (2), EaseInQuad (3), EaseOutQuad (4), EaseInOutQuad (5), EaseInCubic (6), EaseOutCubic (7), EaseInOutCubic (8), EaseInQuart (9), EaseOutQuart (10), EaseInOutQuart (11), EaseInQuint (12), EaseOutQuint (13), EaseInOutQuint (14), EaseInExpo (15), EaseOutExpo (16), EaseInOutExpo (17), EaseInCirc (18), EaseOutCirc (19), EaseInOutCirc (20), EaseInBack (21), EaseOutBack (22), EaseInOutBack (23), EaseInElastic (24), EaseOutElastic (25), EaseInOutElastic (26). Default: EaseInOutSine"},defaultSerializedProperties:{curveType:2}},GeometryTextureFetchBlock:{className:"GeometryTextureFetchBlock",category:"Texture",description:"Samples a texture at given UV coordinates, outputting RGBA components.",inputs:[{name:"texture",type:"Texture"},{name:"coordinates",type:"Vector2"}],outputs:[{name:"rgba",type:"Vector4"},{name:"rgb",type:"Vector3"},{name:"r",type:"Float"},{name:"g",type:"Float"},{name:"b",type:"Float"},{name:"a",type:"Float"}],properties:{clampCoordinates:"boolean \u2014 clamp UV to 0-1 range (default: true)",interpolation:"boolean \u2014 bilinear interpolation (default: true)"},defaultSerializedProperties:{clampCoordinates:!0,interpolation:!0}}},aa=["Matrix","Geometry","Texture"],D$=["Int","Float","Matrix"];function ue(e,t,r,i){const n=zt[e][t].find(o=>o.name===r);if(!n)throw new Error(`Invalid static connection metadata: ${e}.${r}`);Object.assign(n,i)}ue("GeometryTransformBlock","inputs","value",{excludedConnectionPointTypes:["Float","Matrix","Texture"]}),ue("GeometryTransformBlock","outputs","output",{typeConnectionSource:"value"}),ue("GeometryCollectionBlock","inputs","geometry0",{linkedConnectionSource:"geometry1"}),ue("GeometryCollectionBlock","inputs","geometry1",{linkedConnectionSource:"geometry0"}),ue("GeometryCollectionBlock","outputs","output",{typeConnectionSource:"geometry0"}),ue("SetColorsBlock","inputs","colors",{excludedConnectionPointTypes:["Int","Float","Vector2","Texture","Texture"]}),ue("SetMaterialIDBlock","inputs","id",{acceptedConnectionPointTypes:["Float"]}),ue("AggregatorBlock","outputs","output",{typeConnectionSource:"source"});for(const e of["InstantiateBlock","InstantiateLinearBlock","InstantiateRadialBlock","InstantiateOnFacesBlock","InstantiateOnVerticesBlock","InstantiateOnVolumeBlock"])ue(e,"inputs","scaling",{acceptedConnectionPointTypes:["Float"]});for(const[e,t]of[["GeometryTrigonometryBlock","input"],["GeometryClampBlock","value"],["GeometrySmoothStepBlock","value"],["GeometryStepBlock","value"],["NormalizeVectorBlock","input"],["GeometryEaseBlock","input"]])ue(e,"inputs",t,{excludedConnectionPointTypes:aa}),ue(e,"outputs","output",{typeConnectionSource:t});for(const[e,t,r]of[["MathBlock","left","right"],["RandomBlock","min","max"],["GeometryLerpBlock","left","right"],["GeometryNLerpBlock","left","right"],["GeometryModBlock","left","right"],["GeometryPowBlock","value","power"],["GeometryArcTan2Block","x","y"]])ue(e,"inputs",t,{excludedConnectionPointTypes:aa,linkedConnectionSource:r}),ue(e,"inputs",r,{linkedConnectionSource:t}),ue(e,"outputs","output",{typeConnectionSource:t});ue("MathBlock","inputs","right",{excludedConnectionPointTypes:aa}),ue("RandomBlock","inputs","max",{excludedConnectionPointTypes:aa}),ue("ConditionBlock","inputs","left",{acceptedConnectionPointTypes:["Int"]}),ue("ConditionBlock","inputs","right",{acceptedConnectionPointTypes:["Int"]}),ue("ConditionBlock","inputs","ifTrue",{linkedConnectionSource:"ifFalse"}),ue("ConditionBlock","inputs","ifFalse",{linkedConnectionSource:"ifTrue"}),ue("ConditionBlock","outputs","output",{typeConnectionSource:"ifTrue",defaultConnectionPointType:"Float"});for(const[e,t,r,i]of[["GeometryDotBlock","left","right",["Float","Matrix"]],["GeometryDistanceBlock","left","right",["Float","Matrix"]],["GeometryCrossBlock","left","right",["Int","Float","Matrix","Vector2"]]])ue(e,"inputs",t,{excludedConnectionPointTypes:e==="GeometryCrossBlock"?[...i]:D$,linkedConnectionSource:r}),ue(e,"inputs",r,{excludedConnectionPointTypes:[...i],linkedConnectionSource:t});ue("GeometryLengthBlock","inputs","value",{excludedConnectionPointTypes:D$}),ue("NormalizeVectorBlock","inputs","input",{excludedConnectionPointTypes:["Float","Matrix","Geometry","Texture"]}),ue("GeometryReplaceColorBlock","inputs","value",{excludedConnectionPointTypes:["Float","Matrix"],linkedConnectionSource:"replacement"}),ue("GeometryReplaceColorBlock","inputs","reference",{excludedConnectionPointTypes:["Float","Matrix"],linkedConnectionSource:"value"}),ue("GeometryReplaceColorBlock","inputs","replacement",{excludedConnectionPointTypes:["Float","Matrix"],linkedConnectionSource:"value"}),ue("GeometryReplaceColorBlock","outputs","output",{typeConnectionSource:"value"}),ue("GeometryPosterizeBlock","inputs","value",{excludedConnectionPointTypes:["Matrix"],linkedConnectionSource:"steps"}),ue("GeometryPosterizeBlock","inputs","steps",{acceptedConnectionPointTypes:["Float"],excludedConnectionPointTypes:["Matrix"],linkedConnectionSource:"value"}),ue("GeometryPosterizeBlock","outputs","output",{typeConnectionSource:"value"}),ue("MapRangeBlock","inputs","value",{excludedConnectionPointTypes:["Vector2","Vector3","Vector4","Matrix","Geometry","Texture"]}),ue("MapRangeBlock","outputs","output",{typeConnectionSource:"value"}),ue("DebugBlock","inputs","input",{excludedConnectionPointTypes:["Geometry","Texture"]}),ue("DebugBlock","outputs","output",{typeConnectionSource:"input"}),ue("GeometryCurveBlock","inputs","input",{excludedConnectionPointTypes:["Matrix","Int"]}),ue("GeometryCurveBlock","outputs","output",{typeConnectionSource:"input"});for(const e of["GeometryElbowBlock","GeometryInterceptorBlock"])ue(e,"outputs","output",{typeConnectionSource:"input"});for(const[e,t]of[["GeometryCollectionBlock","geometry0"],["MathBlock","left"],["RandomBlock","min"],["GeometryLerpBlock","left"],["GeometryNLerpBlock","left"],["GeometryModBlock","left"],["GeometryPowBlock","value"],["GeometryArcTan2Block","x"],["ConditionBlock","ifTrue"],["GeometryDotBlock","left"],["GeometryDistanceBlock","left"],["GeometryCrossBlock","left"],["GeometryReplaceColorBlock","value"],["GeometryPosterizeBlock","value"]])ue(e,"inputs",t,{isMainLinkSource:!0});const yt={type:"boolean"},j$={type:"number"},Ml={type:"string"};for(const e of Object.values(zt))e.propertyMetadata={name:Ml,comments:Ml,visibleOnFrame:yt},e.properties?.evaluateContext&&(e.propertyMetadata.evaluateContext=yt);function Ue(e,t){Object.assign(zt[e].propertyMetadata,t)}Ue("GeometryInputBlock",{type:{type:"enum",enumName:"NodeGeometryBlockConnectionPointTypes",enumValues:Object.fromEntries(Object.entries(Ae.NodeGeometryBlockConnectionPointTypes.values).filter(([e])=>["Int","Float","Vector2","Vector3","Vector4","Matrix"].includes(e)))},contextualValue:{type:"enum",enumName:"NodeGeometryContextualSources",enumValues:Ae.NodeGeometryContextualSources.values},value:{type:"geometryInputValue"},min:j$,max:j$,groupInInspector:Ml,displayInInspector:yt}),Ue("MeshBlock",{serializedCachedData:yt,reverseWindingOrder:yt}),Ue("PointListBlock",{points:{type:"vector3Array"}}),Ue("BooleanGeometryBlock",{operation:{type:"enum",enumName:"BooleanGeometryOperations",enumValues:Ae.BooleanGeometryOperations.values},useOldCSGEngine:yt}),Ue("ExtrudeGeometryBlock",{cap:{type:"enum",enumName:"ExtrudeGeometryCap",enumValues:{NoCap:0,CapStart:1,CapEnd:2,CapAll:3}}}),Ue("SubdivideBlock",{flatOnly:yt,loopWeight:{type:"number",minimum:0,maximum:1}}),Ue("GeometryOptimizeBlock",{epsilon:{type:"number",minimum:0},optimizeFaces:yt}),Ue("SetUVsBlock",{textureCoordinateIndex:{type:"integer",minimum:0,maximum:5}}),Ue("InstantiateOnVerticesBlock",{removeDuplicatedPositions:yt}),Ue("InstantiateOnVolumeBlock",{gridMode:yt}),Ue("MathBlock",{operation:{type:"enum",enumName:"MathBlockOperations",enumValues:Ae.MathBlockOperations.values}}),Ue("GeometryTrigonometryBlock",{operation:{type:"enum",enumName:"GeometryTrigonometryBlockOperations",enumValues:Ae.GeometryTrigonometryBlockOperations.values}}),Ue("ConditionBlock",{test:{type:"enum",enumName:"ConditionBlockTests",enumValues:Ae.ConditionBlockTests.values},epsilon:{type:"number",minimum:0}}),Ue("RandomBlock",{lockMode:{type:"enum",enumName:"RandomBlockLocks",enumValues:Ae.RandomBlockLocks.values}}),Ue("AggregatorBlock",{aggregation:{type:"enum",enumName:"Aggregations",enumValues:Ae.Aggregations.values}}),Ue("LatticeBlock",{resolutionX:{type:"integer",minimum:1,maximum:10},resolutionY:{type:"integer",minimum:1,maximum:10},resolutionZ:{type:"integer",minimum:1,maximum:10}}),Ue("MappingBlock",{mapping:{type:"enum",enumName:"MappingTypes",enumValues:Ae.MappingTypes.values}}),Ue("GeometryEaseBlock",{type:{type:"enum",enumName:"GeometryEaseBlockTypes",enumValues:Ae.GeometryEaseBlockTypes.values}}),Ue("TeleportOutBlock",{entryPoint:{type:"integer",minimum:0}}),Ue("GeometryTextureBlock",{serializedCachedData:yt}),Ue("GeometryCurveBlock",{curveType:{type:"enum",enumName:"GeometryCurveBlockTypes",enumValues:Ae.GeometryEaseBlockTypes.values}}),Ue("GeometryTextureFetchBlock",{clampCoordinates:yt,interpolation:yt});function A$(){const e=new Map;for(const[r,i]of Object.entries(zt)){const n=i.category;e.has(n)||e.set(n,[]),e.get(n).push(` ${r}: ${i.description.split(".")[0]}`)}const t=[];for(const[r,i]of e)t.push(`## ${r}`),t.push(...i),t.push("");return t.join(`
89
+ `)}function sE(e){return zt[e]}function cE(e){let t;try{t=typeof e=="string"?JSON.parse(e):e}catch(i){throw new Error("Invalid NGE JSON: parse error.",{cause:i})}if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Invalid NGE JSON: expected a JSON object.");const r=t;if(r.customType!=="BABYLON.NodeGeometry")throw new Error(`Invalid NGE JSON: customType must be "BABYLON.NodeGeometry" but got "${String(r.customType)}".`);if(!Array.isArray(r.blocks))throw new Error("Invalid NGE JSON: must contain a 'blocks' array.");return r}const me=Ae.NodeGeometryBlockConnectionPointTypes.values,Ce=Ae.NodeGeometryContextualSources.values,uE={[Ce.None]:me.AutoDetect,[Ce.Positions]:me.Vector3,[Ce.Normals]:me.Vector3,[Ce.Tangents]:me.Vector3,[Ce.UV]:me.Vector2,[Ce.UV2]:me.Vector2,[Ce.UV3]:me.Vector2,[Ce.UV4]:me.Vector2,[Ce.UV5]:me.Vector2,[Ce.UV6]:me.Vector2,[Ce.Colors]:me.Vector4,[Ce.VertexID]:me.Int,[Ce.FaceID]:me.Int,[Ce.GeometryID]:me.Int,[Ce.CollectionID]:me.Int,[Ce.LoopID]:me.Int,[Ce.InstanceID]:me.Int,[Ce.LatticeID]:me.Int,[Ce.LatticeControl]:me.Vector3},lE=Ae.MathBlockOperations.values,dE=Ae.GeometryTrigonometryBlockOperations.values,fE=Ae.ConditionBlockTests.values,mE=Ae.BooleanGeometryOperations.values,pE=Ae.RandomBlockLocks.values,hE=Ae.Aggregations.values,gE=Ae.MappingTypes.values,U$=Ae.GeometryEaseBlockTypes.values,yE={MathBlock:{operation:lE},GeometryTrigonometryBlock:{operation:dE},ConditionBlock:{test:fE},BooleanGeometryBlock:{operation:mE},RandomBlock:{lockMode:pE},AggregatorBlock:{aggregation:hE},MappingBlock:{mapping:gE},GeometryEaseBlock:{type:U$},GeometryCurveBlock:{curveType:U$}},vE=new Set(["customType","id","inputs","outputs"]),R$=new Map(Object.entries(me).map(([e,t])=>[t,e]));function B$(e){const t=JSON.stringify(e);return t===void 0?String(e):t}function $E(e){if(Array.isArray(e)&&e.length===3&&e.every(t=>typeof t=="number"&&Number.isFinite(t)))return[...e];if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e;if(["x","y","z"].every(r=>typeof t[r]=="number"&&Number.isFinite(t[r])))return[t.x,t.y,t.z]}}function _E(e,t){if(t===me.Int)return typeof e=="number"&&Number.isInteger(e)?e:void 0;if(t===me.Float)return typeof e=="number"&&Number.isFinite(e)?e:void 0;const r=new Map([[me.Vector2,2],[me.Vector3,3],[me.Vector4,4],[me.Matrix,16]]),i=typeof t=="number"?r.get(t):void 0;if(i){if(Array.isArray(e)&&e.length===i&&e.every(n=>typeof n=="number"&&Number.isFinite(n)))return[...e];if(i<=4&&e&&typeof e=="object"&&!Array.isArray(e)){const n=e,o=["x","y","z","w"].slice(0,i);if(o.every(a=>typeof n[a]=="number"&&Number.isFinite(n[a])))return o.map(a=>n[a])}}}function bE(e,t,r){if(r.type==="boolean"&&typeof t!="boolean")return`Property "${e}" must be a boolean.`;if(r.type==="string"&&typeof t!="string")return`Property "${e}" must be a string.`;if(r.type==="number"&&(typeof t!="number"||!Number.isFinite(t)))return`Property "${e}" must be a finite number.`;if(r.type==="integer"&&(typeof t!="number"||!Number.isInteger(t)))return`Property "${e}" must be an integer.`;if((r.type==="number"||r.type==="integer")&&typeof t=="number"){if(r.minimum!==void 0&&t<r.minimum)return`Property "${e}" must be at least ${r.minimum}.`;if(r.maximum!==void 0&&t>r.maximum)return`Property "${e}" must be at most ${r.maximum}.`}}function M$(e,t,r){const i=zt[e].propertyMetadata,n=Object.keys(r).find(s=>vE.has(s));if(n)return`Property "${n}" is structural and cannot be set.`;const o=Object.keys(r).find(s=>!i[s]);if(o)return`Property "${o}" is not configurable on ${e}.`;const a={};for(const[s,c]of Object.entries(r)){const u=i[s],l=bE(s,c,u);if(l)return l;if(u.type==="enum"){const d=u.enumValues;if(typeof c=="string"&&d[c]!==void 0)a[s]=d[c];else if(typeof c=="number"&&Number.isInteger(c)&&Object.values(d).includes(c))a[s]=c;else return`Property "${s}" must be a valid ${u.enumName} name or numeric value; got ${B$(c)}.`}else if(u.type==="vector3Array"){if(!Array.isArray(c))return`Property "${s}" must be an array of Vector3 values.`;const d=c.map($E);if(d.some(m=>m===void 0))return`Property "${s}" must contain only Vector3 arrays or objects with finite x, y, and z values.`;a[s]=d}else u.type!=="geometryInputValue"&&(a[s]=c)}if(e==="GeometryInputBlock"){const s=a.contextualValue??t.contextualValue;if(typeof s=="number"&&s!==Ce.None&&(a.type=uE[s]),(Object.prototype.hasOwnProperty.call(r,"value")||Object.prototype.hasOwnProperty.call(r,"type")||Object.prototype.hasOwnProperty.call(r,"contextualValue"))&&s===Ce.None){const d=a.type??t.type,m=Object.prototype.hasOwnProperty.call(r,"value")?r.value:t.value,f=_E(m,d);if(f===void 0)return`Property "value" is not valid for GeometryInputBlock type ${(typeof d=="number"?R$.get(d):void 0)??B$(d)}.`;a.value=f}const u=a.min??t.min,l=a.max??t.max;if(typeof u=="number"&&typeof l=="number"&&u>l)return'Property "min" cannot be greater than property "max".'}return a}class tr{constructor(){this._geometries=new Map,this._nextId=new Map,this._nextX=new Map}createGeometry(t,r){const i={customType:"BABYLON.NodeGeometry",outputNodeId:-1,blocks:[],comment:r};return this._geometries.set(t,i),this._nextId.set(t,1),this._nextX.set(t,0),i}getGeometry(t){return this._geometries.get(t)}listGeometries(){return Array.from(this._geometries.keys())}deleteGeometry(t){return this._nextId.delete(t),this._nextX.delete(t),this._geometries.delete(t)}clearAll(){this._geometries.clear(),this._nextId.clear(),this._nextX.clear()}addBlock(t,r,i,n){const o=this._geometries.get(t);if(!o)return`Geometry "${t}" not found. Create it first.`;const a=zt[r];if(!a)return`Unknown block type "${r}". Use list_block_types to see available blocks.`;const s=[],c=this._nextId.get(t),u=i??`${r}_${c}`,l={name:u,...a.defaultSerializedProperties??{}};r==="GeometryInputBlock"&&Object.assign(l,{type:me.Float,contextualValue:Ce.None,min:0,max:0,groupInInspector:"",displayInInspector:!0});const d=M$(r,l,n??{});if(typeof d=="string")return d;this._nextId.set(t,c+1);const m={customType:`BABYLON.${a.className}`,id:c,name:u,inputs:a.inputs.map(p=>({name:p.name,displayName:p.name})),outputs:a.outputs.map(p=>({name:p.name,displayName:p.name}))};Object.assign(m,l,d),r==="GeometryInputBlock"&&(this._normaliseInputBlockValue(m),this._ensureDefaultValue(m)),r==="GeometryOutputBlock"&&(o.outputNodeId=c);const f=this._nextX.get(t);if(this._nextX.set(t,f+280),o.editorData||(o.editorData={locations:[]}),o.editorData.locations.push({blockId:c,x:f,y:0}),r==="GeometryInputBlock"){const p=m.contextualValue,y=m.value!==void 0;p===Ce.None&&!y&&s.push(`\u26A0 GeometryInputBlock "${m.name}" has contextualValue=None and no value. Set either a contextualValue (e.g. 'Positions', 'Normals', 'UV', 'VertexID') or provide a constant value.`)}return o.blocks.push(m),{block:m,warnings:s.length>0?s:void 0}}_normaliseInputBlockValue(t){const r=t.value;if(r==null)return;const i=t.type;if(typeof r=="number"){if(i===me.Matrix){t.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t.valueType="BABYLON.Matrix";return}t.valueType="number";return}if(Array.isArray(r)){t.valueType=this._inferValueType(i,r.length);return}if(typeof r=="object"){const n=r;"x"in n&&("w"in n?(t.value=[n.x,n.y,n.z,n.w],t.valueType="BABYLON.Vector4"):"z"in n?(t.value=[n.x,n.y,n.z],t.valueType="BABYLON.Vector3"):(t.value=[n.x,n.y],t.valueType="BABYLON.Vector2"))}}_inferValueType(t,r){const i={[me.Vector2]:"BABYLON.Vector2",[me.Vector3]:"BABYLON.Vector3",[me.Vector4]:"BABYLON.Vector4",[me.Matrix]:"BABYLON.Matrix"};return t!==void 0&&i[t]?i[t]:{2:"BABYLON.Vector2",3:"BABYLON.Vector3",4:"BABYLON.Vector4",16:"BABYLON.Matrix"}[r]??"BABYLON.Vector3"}_ensureDefaultValue(t){if(t.value!==void 0&&t.value!==null)return;const r=t.contextualValue;if(r!==void 0&&r!==Ce.None)return;const i=t.type;if(i===void 0)return;const o={[me.Float]:{value:0,valueType:"number"},[me.Int]:{value:0,valueType:"number"},[me.Vector2]:{value:[0,0],valueType:"BABYLON.Vector2"},[me.Vector3]:{value:[0,0,0],valueType:"BABYLON.Vector3"},[me.Vector4]:{value:[0,0,0,0],valueType:"BABYLON.Vector4"},[me.Matrix]:{value:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],valueType:"BABYLON.Matrix"}}[i];o&&(t.value=o.value,t.valueType=o.valueType)}removeBlock(t,r){const i=this._geometries.get(t);if(!i)return`Geometry "${t}" not found.`;const n=i.blocks.findIndex(c=>c.id===r);if(n===-1)return`Block ${r} not found.`;const o=new Map;for(const c of i.blocks){if(c.customType!=="BABYLON.TeleportOutBlock"||typeof c.entryPoint!="number")continue;const u=o.get(c.entryPoint)??[];u.push(c.id),o.set(c.entryPoint,u),c.entryPoint===r&&delete c.entryPoint}const a=[r,...o.get(r)??[]],s=new Set;for(;a.length>0;){const c=a.pop();if(!s.has(c)){s.add(c);for(const u of i.blocks)for(const l of u.inputs)l.targetBlockId===c&&(delete l.targetBlockId,delete l.targetConnectionName,u.customType==="BABYLON.TeleportInBlock"&&l.name==="input"&&a.push(...o.get(u.id)??[]))}}if(i.blocks.splice(n,1),this._disconnectIncompatibleInputs(i),i.outputNodeId===r&&(i.outputNodeId=-1),i.editorData){i.editorData.locations=i.editorData.locations.filter(c=>c.blockId!==r);for(const c of i.editorData.frames??[])c.blocks=c.blocks.filter(u=>u!==r)}return"OK"}_wouldCreateCycle(t,r,i){const n=[i],o=new Set;for(;n.length>0;){const a=n.pop();if(a===r)return!0;if(!o.has(a)){o.add(a);for(const s of t.blocks)s.inputs.some(c=>c.targetBlockId===a)&&n.push(s.id)}}return!1}_getBlockTypeInfo(t){const r=t.customType.replace("BABYLON.","");return Object.values(zt).find(i=>i.className===r)}_resolveConnectedInputType(t,r,i,n,o=!0){const a=`${r.id}:input:${i}`;if(n.has(a))return;n.add(a);const s=r.inputs.find(d=>d.name===i);if(s?.targetBlockId===void 0||!s.targetConnectionName){const d=this._getBlockTypeInfo(r)?.inputs.find(m=>m.name===i);return o&&d?.type==="AutoDetect"&&d.linkedConnectionSource?this._resolveConnectedInputType(t,r,d.linkedConnectionSource,n):void 0}const c=t.blocks.find(d=>d.id===s.targetBlockId);if(!c)return;const l=this._getBlockTypeInfo(c)?.outputs.find(d=>d.name===s.targetConnectionName);return l?this._resolveOutputType(t,c,l,n):void 0}_resolveOutputType(t,r,i,n=new Set){const o=`${r.id}:${i.name}`;if(!n.has(o)){if(n.add(o),i.type==="AutoDetect")return r.customType==="BABYLON.GeometryInputBlock"&&typeof r.type=="number"?R$.get(r.type):void 0;if(i.type==="BasedOnInput"){if(r.customType==="BABYLON.TeleportOutBlock"&&typeof r.entryPoint=="number"){const a=t.blocks.find(s=>s.id===r.entryPoint&&s.customType==="BABYLON.TeleportInBlock");if(a)return this._resolveConnectedInputType(t,a,"input",n)??i.type}if(r.customType==="BABYLON.MathBlock"){const a=this._resolveConnectedInputType(t,r,"left",n),s=this._resolveConnectedInputType(t,r,"right",n);return a?s&&(a==="Int"||a==="Float"&&s!=="Int")?s:a:s??i.defaultConnectionPointType??i.type}if(i.typeConnectionSource){const a=this._resolveConnectedInputType(t,r,i.typeConnectionSource,new Set(n),!1);return a||(i.defaultConnectionPointType?i.defaultConnectionPointType:this._resolveConnectedInputType(t,r,i.typeConnectionSource,n)??i.type)}return i.defaultConnectionPointType??i.type}return i.type}}_getConnectionTypeError(t,r,i,n,o){const a=this._getBlockTypeInfo(r),s=this._getBlockTypeInfo(n),c=a?.outputs.find(h=>h.name===i),u=s?.inputs.find(h=>h.name===o);if(!c||!u)return`Cannot validate connection metadata for ${r.name}.${i} -> ${n.name}.${o}.`;const l=this._resolveOutputType(t,r,c),d=this._resolveInputType(t,n,u);if(!l)return;const m=[...u.acceptedConnectionPointTypes??[]];n.customType==="BABYLON.MathBlock"&&d&&(m.push("Int","Float",d),(d==="Int"||d==="Float")&&m.push("Vector2","Vector3","Vector4"));const f=u.excludedConnectionPointTypes??[],p=d!==void 0&&l!==d&&!m.includes(l),y=!p&&f.includes(l);return p||y?`Incompatible connection: ${r.name}.${i} (${l}) cannot connect to ${n.name}.${o} (${d??u.type}).`:void 0}_disconnectIncompatibleInputs(t){let r;do{r=!1;for(const i of t.blocks)for(const n of i.inputs){if(n.targetBlockId===void 0||!n.targetConnectionName)continue;const o=t.blocks.find(a=>a.id===n.targetBlockId);(!o||this._getConnectionTypeError(t,o,n.targetConnectionName,i,n.name)!==void 0)&&(delete n.targetBlockId,delete n.targetConnectionName,r=!0)}}while(r)}_resolveInputType(t,r,i){return i.type!=="AutoDetect"?i.type==="BasedOnInput"?void 0:i.type:i.linkedConnectionSource&&!i.isMainLinkSource?this._resolveConnectedInputType(t,r,i.linkedConnectionSource,new Set):void 0}connectBlocks(t,r,i,n,o){const a=this._geometries.get(t);if(!a)return`Geometry "${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.`;if(!s.outputs.find(m=>m.name===i)){const m=s.outputs.map(f=>f.name).join(", ");return`Output "${i}" not found on block ${r} ("${s.name}"). Available: ${m}`}const l=c.inputs.find(m=>m.name===o);if(!l){const m=c.inputs.map(f=>f.name).join(", ");return`Input "${o}" not found on block ${n} ("${c.name}"). Available: ${m}`}const d=this._getConnectionTypeError(a,s,i,c,o);return d||(this._wouldCreateCycle(a,r,n)?`Connection from block ${r} to block ${n} would create a cycle.`:(l.inputName=l.name,l.targetBlockId=r,l.targetConnectionName=i,"OK"))}disconnectInput(t,r,i){const n=this._geometries.get(t);if(!n)return`Geometry "${t}" not found.`;const o=n.blocks.find(s=>s.id===r);if(!o)return`Block ${r} not found.`;const a=o.inputs.find(s=>s.name===i);return a?(delete a.inputName,delete a.targetBlockId,delete a.targetConnectionName,"OK"):`Input "${i}" not found.`}describeGeometry(t){const r=this._geometries.get(t);if(!r)return`Geometry "${t}" not found.`;const i=[];i.push(`Geometry: ${t}`),i.push(`Blocks (${r.blocks.length}):`);for(const n of r.blocks){const o=n.customType.replace("BABYLON.","");if(i.push(` [${n.id}] ${n.name} (${o})`),n.inputs.length>0){for(const a of n.inputs)if(a.targetBlockId!==void 0){const s=r.blocks.find(c=>c.id===a.targetBlockId);i.push(` \u2190 ${a.name} \u2190 [${a.targetBlockId}] ${s?.name??"?"}.${a.targetConnectionName}`)}}}return i.push(`Output node: ${r.outputNodeId>=0?`[${r.outputNodeId}]`:"(not set)"}`),r.comment&&i.push(`Comment: ${r.comment}`),i.join(`
88
90
  `)}describeBlock(t,r){const i=this._geometries.get(t);if(!i)return`Geometry "${t}" not found.`;const n=i.blocks.find(u=>u.id===r);if(!n)return`Block ${r} not found.`;const o=n.customType.replace("BABYLON.",""),a=[];a.push(`Block [${n.id}]: "${n.name}" \u2014 type ${o}`),a.push(`
89
91
  Inputs:`);for(const u of n.inputs){const l=u.targetBlockId!==void 0?` \u2190 connected to [${u.targetBlockId}].${u.targetConnectionName}`:" (unconnected)";a.push(` \u2022 ${u.name}${l}`)}a.push(`
90
92
  Outputs:`);for(const u of n.outputs){const l=[];for(const m of i.blocks)for(const f of m.inputs)f.targetBlockId===r&&f.targetConnectionName===u.name&&l.push(`[${m.id}] ${m.name}.${f.name}`);const d=l.length>0?` \u2192 ${l.join(", ")}`:" (unconnected)";a.push(` \u2022 ${u.name}${d}`)}const s=new Set(["customType","id","name","inputs","outputs"]),c=Object.entries(n).filter(([u])=>!s.has(u));if(c.length>0){a.push(`
91
93
  Properties:`);for(const[u,l]of c)a.push(` ${u}: ${JSON.stringify(l)}`)}return a.join(`
92
- `)}exportJSON(t){const r=this._geometries.get(t);if(r){for(const i of r.blocks){i.customType==="BABYLON.GeometryInputBlock"&&(this._normaliseInputBlockValue(i),this._ensureDefaultValue(i));const n=i.customType.replace("BABYLON.",""),o=Wn[n];if(o?.defaultSerializedProperties)for(const[s,c]of Object.entries(o.defaultSerializedProperties))i[s]===void 0&&(i[s]=c);const a=ni[n];if(a)for(const[s,c]of Object.entries(a))typeof i[s]=="string"&&(i[s]=c[i[s]]??i[s])}return this._layoutGraph(r),JSON.stringify(r,null,2)}}static COL_WIDTH=340;static ROW_HEIGHT=180;_layoutGraph(t){const r=t.blocks;if(r.length===0)return;const i=new Map;for(const h of r)i.set(h.id,h);const n=new Map,o=new Map;for(const h of r)n.set(h.id,new Set),o.set(h.id,new Set);for(const h of r)for(const $ of h.inputs)$.targetBlockId!==void 0&&(n.get(h.id).add($.targetBlockId),o.get($.targetBlockId)?.add(h.id));const a=new Map,s=[];if(t.outputNodeId>=0&&i.has(t.outputNodeId))a.set(t.outputNodeId,0),s.push(t.outputNodeId);else for(const h of r)h.customType==="BABYLON.GeometryOutputBlock"&&(a.set(h.id,0),s.push(h.id));s.length===0&&r.length>0&&(a.set(r[r.length-1].id,0),s.push(r[r.length-1].id));let c=0;for(;c<s.length;){const h=s[c++],$=a.get(h);for(const g of n.get(h)??[]){const _=a.get(g);(_===void 0||$+1>_)&&(a.set(g,$+1),s.push(g))}}const u=Math.max(0,...a.values());for(const h of r)a.has(h.id)||a.set(h.id,u+1);const l=Math.max(0,...a.values()),d=new Map;for(const[h,$]of a)d.set(h,l-$);const m=new Map;for(const h of r){const $=d.get(h.id);m.has($)||m.set($,[]),m.get($).push(h.id)}const f=[...m.keys()].sort((h,$)=>$-h),p=new Map;for(const h of f){const $=m.get(h);if(h===f[0])$.forEach((g,_)=>p.set(g,_));else{const g=new Map;for(const _ of $){const I=o.get(_),T=[];for(const C of I){const M=p.get(C);M!==void 0&&T.push(M)}T.length>0?g.set(_,T.reduce((C,M)=>C+M,0)/T.length):g.set(_,9999)}$.sort((_,I)=>g.get(_)-g.get(I)),$.forEach((_,I)=>p.set(_,I))}}const y=[];for(const h of r){const $=d.get(h.id),g=p.get(h.id);y.push({blockId:h.id,x:$*ra.COL_WIDTH,y:g*ra.ROW_HEIGHT})}t.editorData?t.editorData.locations=y:t.editorData={locations:y}}importJSON(t,r){try{const i=ZN(r);this._geometries.set(t,i);const n=i.blocks.reduce((o,a)=>Math.max(o,a.id),0);return this._nextId.set(t,n+1),this._nextX.set(t,i.blocks.length*280),"OK"}catch(i){return i.message}}setBlockProperties(t,r,i){const n=this._geometries.get(t);if(!n)return`Geometry "${t}" not found.`;const o=n.blocks.find(s=>s.id===r);if(!o)return`Block ${r} not found.`;const a=o.customType.replace("BABYLON.","");for(const[s,c]of Object.entries(i))if(a==="GeometryInputBlock"&&s==="type"&&typeof c=="string")o.type=he[c]??c;else if(a==="GeometryInputBlock"&&s==="contextualValue"&&typeof c=="string"){const u=Te[c]??c;o.contextualValue=u,typeof u=="number"&&u!==Te.None&&na[u]!==void 0&&(o.type=na[u])}else typeof c=="string"&&ni[a]?.[s]?o[s]=ni[a][s][c]??c:o[s]=c;return a==="GeometryInputBlock"&&(this._normaliseInputBlockValue(o),this._ensureDefaultValue(o)),"OK"}validateGeometry(t){const r=this._geometries.get(t);if(!r)return[`Geometry "${t}" not found.`];const i=[];r.blocks.some(o=>o.customType==="BABYLON.GeometryOutputBlock")||i.push("ERROR: Missing GeometryOutputBlock \u2014 every geometry graph needs exactly one."),r.outputNodeId<0?i.push("ERROR: outputNodeId is not set. There should be a GeometryOutputBlock."):r.blocks.find(o=>o.id===r.outputNodeId)||i.push(`ERROR: outputNodeId references block ${r.outputNodeId} which does not exist.`);for(const o of r.blocks){const a=o.customType.replace("BABYLON.",""),s=Object.values(Wn).find(c=>c.className===a);if(s)for(const c of o.inputs){const u=s.inputs.find(l=>l.name===c.name);c.targetBlockId===void 0&&u&&!u.isOptional&&i.push(`WARNING: Block [${o.id}] "${o.name}" has required input "${c.name}" that is not connected.`)}}for(const o of r.blocks)for(const a of o.inputs)if(a.targetBlockId!==void 0){const s=r.blocks.find(c=>c.id===a.targetBlockId);s?s.outputs.find(c=>c.name===a.targetConnectionName)||i.push(`WARNING: Block [${o.id}] "${o.name}" input "${a.name}" references output "${a.targetConnectionName}" which doesn't exist on block [${s.id}].`):i.push(`ERROR: Block [${o.id}] "${o.name}" input "${a.name}" references non-existent block ${a.targetBlockId}.`)}for(const o of r.blocks){if(o.customType!=="BABYLON.GeometryInputBlock")continue;const a=o.contextualValue,s=o.value!==void 0;(a===void 0||a===Te.None)&&!s&&i.push(`WARNING: GeometryInputBlock [${o.id}] "${o.name}" has no contextual value and no constant value \u2014 it provides no data.`)}for(const o of r.blocks){if(o.customType==="BABYLON.GeometryOutputBlock"||o.customType==="BABYLON.GeometryInputBlock")continue;const a=o.inputs.some(c=>c.targetBlockId!==void 0),s=r.blocks.some(c=>c.inputs.some(u=>u.targetBlockId===o.id));!a&&!s&&i.push(`WARNING: Block [${o.id}] "${o.name}" (${o.customType.replace("BABYLON.","")}) has no connections \u2014 it is an orphan and does nothing.`)}return i.length===0&&i.push("No issues found \u2014 graph looks valid."),i}}const aE="https://cdn.babylonjs.com",sE={havok:"havok/HavokPhysics_umd.js",ammo:"ammo/ammo.js",recast:"recast.js"},Ul="https://snippet.babylonjs.com";async function cE(e,t=Ul){let r=e.replace(/#/g,"/");r.includes("/")||(r+="/0");const i=`${t}/${r}`,n=await fetch(i);if(!n.ok)throw new Error(`Failed to fetch snippet "${e}": ${n.status} ${n.statusText}`);return await n.json()}const uE=[["nodeMaterial","nodeMaterial"],["nodeGeometry","nodeGeometry"],["nodeRenderGraph","nodeRenderGraph"],["nodeParticle","nodeParticle"],["gui","gui"],["encodedGui","gui"],["animations","animation"],["animation","animation"],["particleSystem","particleSystem"],["spriteManager","spriteManager"],["shaderMaterial","shaderMaterial"]];function lE(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.buffer}function D$(e){const t=new Uint8Array(lE(e));return new TextDecoder("utf-8").decode(t)}function dE(e){if(e.files&&typeof e.files=="object"&&e.v!==void 0||typeof e.code=="string")return"playground";for(const[t,r]of uE)if(t in e)return r;return"unknown"}function fE(e,t,r,i){let n;switch(t){case"gui":{typeof e.encodedGui=="string"?n=JSON.parse(D$(e.encodedGui)):n=typeof e.gui=="string"?JSON.parse(e.gui):e.gui;break}case"animation":{typeof e.animations=="string"?n=JSON.parse(e.animations):e.animations!==void 0?n=e.animations:typeof e.animation=="string"?n=JSON.parse(e.animation):n=e.animation;break}default:{const a=e[t];n=typeof a=="string"?JSON.parse(a):a;break}}return{snippetId:r,type:t,metadata:i,data:n,load:o=>o?o(n):n}}let Rl=null;async function mE(){return await import("monaco-editor/languages/features/typescript/lib/typescriptServices")}async function pE(){return Rl||(Rl=mE().then(e=>e.typescript)),await Rl}async function hE(e,t){const r=await pE();return r.transpileModule(e,{compilerOptions:{target:r.ScriptTarget.ESNext,module:r.ModuleKind.ESNext,jsx:t.endsWith(".tsx")?r.JsxEmit.ReactJSX:void 0,esModuleInterop:!1,allowJs:!0,sourceMap:!1,isolatedModules:!0,strict:!1,allowUmdGlobalAccess:!0},fileName:t}).outputText}async function gE(e,t){const r={},i=[];for(const[n,o]of Object.entries(e))if(/\.tsx?$/i.test(n)){const a=n.replace(/\.tsx?$/i,".js");i.push((async()=>{r[a]=await Promise.resolve(t(o,n))})())}else r[n]=o;return await Promise.all(i),r}const j$=["delayCreateScene","delayLoadScene","createScene","CreateScene","createscene"];function yE(e){if(e.includes("class Playground"))return"TS";if(j$.some(i=>e.includes(i))||!e)return"JS";const t=[/\binterface\s+[A-Za-z_]\w*/m,/\benum\s+[A-Za-z_]\w*/m,/\btype\s+[A-Za-z_]\w*\s*=/m,/\bimplements\s+[A-Za-z_]/m,/\breadonly\b/m,/\bpublic\b|\bprivate\b|\bprotected\b/m,/\babstract\s+class\b/m,/\bas\s+const\b/m,/\bimport\s+type\s+/m],r=/[:]\s*[A-Za-z_$][\w$.<>,\s?\\[\]|&]*\b(?![:=])/m.test(e);return t.some(i=>i.test(e))||r?"TS":"JS"}function vE(e,t){let r=e;if(t==="JS"){const n=r.search(/(?:var|let|const|function)\s+(?:createScene|delayCreateScene|delayLoadScene|createEngine|CreateScene)\b/),o=n>0?r.slice(0,n):"";o&&(r=o.replace(/^[^\S\n]*(?:var|let|const)\s+canvas\s*=\s*document\.getElementById\s*\([^)]*\)\s*;?[^\S\n]*$/gm,"// [snippet-loader] canvas provided by host").replace(/^[^\S\n]*(?:var|let|const)\s+engine\s*=\s*new\s+BABYLON\.\w*Engine\b[^;]*;?[^\S\n]*$/gm,"// [snippet-loader] engine provided by host")+r.slice(n))}const i=t==="TS"?"Playground":j$.find(n=>r.includes(n))??"createScene";return r+=`
94
+ `)}exportJSON(t){const r=this._geometries.get(t);if(r){for(const i of r.blocks){i.customType==="BABYLON.GeometryInputBlock"&&(this._normaliseInputBlockValue(i),this._ensureDefaultValue(i));const n=i.customType.replace("BABYLON.",""),o=zt[n];if(o?.defaultSerializedProperties)for(const[s,c]of Object.entries(o.defaultSerializedProperties))i[s]===void 0&&(i[s]=c);const a=yE[n];if(a)for(const[s,c]of Object.entries(a))typeof i[s]=="string"&&(i[s]=c[i[s]]??i[s])}return this._layoutGraph(r),JSON.stringify(r,null,2)}}_layoutGraph(t){const r=t.blocks;if(r.length===0)return;const i=new Map;for(const h of r)i.set(h.id,h);const n=new Map,o=new Map;for(const h of r)n.set(h.id,new Set),o.set(h.id,new Set);for(const h of r)for(const $ of h.inputs)$.targetBlockId!==void 0&&(n.get(h.id).add($.targetBlockId),o.get($.targetBlockId)?.add(h.id));const a=new Map,s=[];if(t.outputNodeId>=0&&i.has(t.outputNodeId))a.set(t.outputNodeId,0),s.push(t.outputNodeId);else for(const h of r)h.customType==="BABYLON.GeometryOutputBlock"&&(a.set(h.id,0),s.push(h.id));s.length===0&&r.length>0&&(a.set(r[r.length-1].id,0),s.push(r[r.length-1].id));let c=0;for(;c<s.length;){const h=s[c++],$=a.get(h);for(const g of n.get(h)??[]){const _=a.get(g),I=$+1;I<r.length&&(_===void 0||I>_)&&(a.set(g,I),s.push(g))}}const u=Math.max(0,...a.values());for(const h of r)a.has(h.id)||a.set(h.id,u+1);const l=Math.max(0,...a.values()),d=new Map;for(const[h,$]of a)d.set(h,l-$);const m=new Map;for(const h of r){const $=d.get(h.id);m.has($)||m.set($,[]),m.get($).push(h.id)}const f=[...m.keys()].sort((h,$)=>$-h),p=new Map;for(const h of f){const $=m.get(h);if(h===f[0])$.forEach((g,_)=>p.set(g,_));else{const g=new Map;for(const _ of $){const I=o.get(_),P=[];for(const j of I){const M=p.get(j);M!==void 0&&P.push(M)}P.length>0?g.set(_,P.reduce((j,M)=>j+M,0)/P.length):g.set(_,9999)}$.sort((_,I)=>g.get(_)-g.get(I)),$.forEach((_,I)=>p.set(_,I))}}const y=[];for(const h of r){const $=d.get(h.id),g=p.get(h.id);y.push({blockId:h.id,x:$*tr.COL_WIDTH,y:g*tr.ROW_HEIGHT})}t.editorData?t.editorData.locations=y:t.editorData={locations:y}}importJSON(t,r,i=1){try{const n=cE(r);this._geometries.set(t,n);const o=n.blocks.reduce((a,s)=>Math.max(a,s.id),0);return this._nextId.set(t,Math.max(o+1,i)),this._nextX.set(t,n.blocks.length*280),"OK"}catch(n){return n.message}}setBlockProperties(t,r,i){const n=this._geometries.get(t);if(!n)return`Geometry "${t}" not found.`;const o=n.blocks.find(l=>l.id===r);if(!o)return`Block ${r} not found.`;const a=o.customType.replace("BABYLON.",""),s=Object.entries(zt).find(([,l])=>l.className===a)?.[0];if(!s)return`Block ${r} has unsupported type "${a}".`;const c=M$(s,o,i);if(typeof c=="string")return c;const u={...o,...c};return a==="GeometryInputBlock"&&((Object.prototype.hasOwnProperty.call(i,"type")||Object.prototype.hasOwnProperty.call(i,"contextualValue"))&&!Object.prototype.hasOwnProperty.call(i,"value")&&(delete u.value,delete u.valueType),this._normaliseInputBlockValue(u),this._ensureDefaultValue(u)),Object.assign(o,u),"OK"}validateGeometry(t){const r=this._geometries.get(t);if(!r)return[`Geometry "${t}" not found.`];const i=[],n=r.blocks.filter(o=>o.customType==="BABYLON.GeometryOutputBlock");if(n.length===0?i.push("ERROR: Missing GeometryOutputBlock \u2014 every geometry graph needs exactly one."):n.length>1&&i.push(`ERROR: Found ${n.length} GeometryOutputBlocks \u2014 every geometry graph needs exactly one.`),r.outputNodeId<0)i.push("ERROR: outputNodeId is not set. There should be a GeometryOutputBlock.");else{const o=r.blocks.find(a=>a.id===r.outputNodeId);o?o.customType!=="BABYLON.GeometryOutputBlock"&&i.push(`ERROR: outputNodeId references block ${r.outputNodeId}, which is not a GeometryOutputBlock.`):i.push(`ERROR: outputNodeId references block ${r.outputNodeId} which does not exist.`)}for(const o of r.blocks){const a=o.customType.replace("BABYLON.",""),s=Object.values(zt).find(c=>c.className===a);if(s)for(const c of o.inputs){const u=s.inputs.find(l=>l.name===c.name);c.targetBlockId===void 0&&u&&!u.isOptional&&i.push(`WARNING: Block [${o.id}] "${o.name}" has required input "${c.name}" that is not connected.`)}}for(const o of r.blocks)for(const a of o.inputs)if(a.targetBlockId!==void 0){const s=r.blocks.find(c=>c.id===a.targetBlockId);s?s.outputs.find(c=>c.name===a.targetConnectionName)||i.push(`WARNING: Block [${o.id}] "${o.name}" input "${a.name}" references output "${a.targetConnectionName}" which doesn't exist on block [${s.id}].`):i.push(`ERROR: Block [${o.id}] "${o.name}" input "${a.name}" references non-existent block ${a.targetBlockId}.`)}for(const o of r.blocks){if(o.customType!=="BABYLON.GeometryInputBlock")continue;const a=o.contextualValue,s=o.value!==void 0;(a===void 0||a===Ce.None)&&!s&&i.push(`WARNING: GeometryInputBlock [${o.id}] "${o.name}" has no contextual value and no constant value \u2014 it provides no data.`)}for(const o of r.blocks){if(o.customType==="BABYLON.GeometryOutputBlock"||o.customType==="BABYLON.GeometryInputBlock")continue;const a=o.inputs.some(c=>c.targetBlockId!==void 0),s=r.blocks.some(c=>c.inputs.some(u=>u.targetBlockId===o.id));!a&&!s&&i.push(`WARNING: Block [${o.id}] "${o.name}" (${o.customType.replace("BABYLON.","")}) has no connections \u2014 it is an orphan and does nothing.`)}return i.length===0&&i.push("No issues found \u2014 graph looks valid."),i}}tr.COL_WIDTH=340,tr.ROW_HEIGHT=180;const kE="https://cdn.babylonjs.com",SE={havok:"havok/HavokPhysics_umd.js",ammo:"ammo/ammo.js",recast:"recast.js"},Zl="https://snippet.babylonjs.com";async function wE(e,t=Zl){let r=e.replace(/#/g,"/");r.includes("/")||(r+="/0");const i=`${t}/${r}`,n=await fetch(i);if(!n.ok)throw new Error(`Failed to fetch snippet "${e}": ${n.status} ${n.statusText}`);return await n.json()}const IE=[["nodeMaterial","nodeMaterial"],["nodeGeometry","nodeGeometry"],["nodeRenderGraph","nodeRenderGraph"],["nodeParticle","nodeParticle"],["gui","gui"],["encodedGui","gui"],["animations","animation"],["animation","animation"],["particleSystem","particleSystem"],["spriteManager","spriteManager"],["shaderMaterial","shaderMaterial"]];function OE(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.buffer}function Z$(e){const t=new Uint8Array(OE(e));return new TextDecoder("utf-8").decode(t)}function TE(e){if(e.files&&typeof e.files=="object"&&e.v!==void 0||typeof e.code=="string")return"playground";for(const[t,r]of IE)if(t in e)return r;return"unknown"}function xE(e,t,r,i){let n;switch(t){case"gui":{typeof e.encodedGui=="string"?n=JSON.parse(Z$(e.encodedGui)):n=typeof e.gui=="string"?JSON.parse(e.gui):e.gui;break}case"animation":{typeof e.animations=="string"?n=JSON.parse(e.animations):e.animations!==void 0?n=e.animations:typeof e.animation=="string"?n=JSON.parse(e.animation):n=e.animation;break}default:{const a=e[t];n=typeof a=="string"?JSON.parse(a):a;break}}return{snippetId:r,type:t,metadata:i,data:n,load:o=>o?o(n):n}}let Ll=null;async function PE(){return await import("monaco-editor/languages/features/typescript/lib/typescriptServices")}async function zE(){return Ll||(Ll=PE().then(e=>e.typescript)),await Ll}async function NE(e,t){const r=await zE();return r.transpileModule(e,{compilerOptions:{target:r.ScriptTarget.ESNext,module:r.ModuleKind.ESNext,jsx:t.endsWith(".tsx")?r.JsxEmit.ReactJSX:void 0,esModuleInterop:!1,allowJs:!0,sourceMap:!1,isolatedModules:!0,strict:!1,allowUmdGlobalAccess:!0},fileName:t}).outputText}async function EE(e,t){const r={},i=[];for(const[n,o]of Object.entries(e))if(/\.tsx?$/i.test(n)){const a=n.replace(/\.tsx?$/i,".js");i.push((async()=>{r[a]=await Promise.resolve(t(o,n))})())}else r[n]=o;return await Promise.all(i),r}const L$=["delayCreateScene","delayLoadScene","createScene","CreateScene","createscene"];function CE(e){if(e.includes("class Playground"))return"TS";if(L$.some(i=>e.includes(i))||!e)return"JS";const t=[/\binterface\s+[A-Za-z_]\w*/m,/\benum\s+[A-Za-z_]\w*/m,/\btype\s+[A-Za-z_]\w*\s*=/m,/\bimplements\s+[A-Za-z_]/m,/\breadonly\b/m,/\bpublic\b|\bprivate\b|\bprotected\b/m,/\babstract\s+class\b/m,/\bas\s+const\b/m,/\bimport\s+type\s+/m],r=/[:]\s*[A-Za-z_$][\w$.<>,\s?\\[\]|&]*\b(?![:=])/m.test(e);return t.some(i=>i.test(e))||r?"TS":"JS"}function DE(e,t){let r=e;if(t==="JS"){const n=r.search(/(?:var|let|const|function)\s+(?:createScene|delayCreateScene|delayLoadScene|createEngine|CreateScene)\b/),o=n>0?r.slice(0,n):"";o&&(r=o.replace(/^[^\S\n]*(?:var|let|const)\s+canvas\s*=\s*document\.getElementById\s*\([^)]*\)\s*;?[^\S\n]*$/gm,"// [snippet-loader] canvas provided by host").replace(/^[^\S\n]*(?:var|let|const)\s+engine\s*=\s*new\s+BABYLON\.\w*Engine\b[^;]*;?[^\S\n]*$/gm,"// [snippet-loader] engine provided by host")+r.slice(n))}const i=t==="TS"?"Playground":L$.find(n=>r.includes(n))??"createScene";return r+=`
93
95
  export default ${i}
94
96
  `,t==="JS"&&/\bfunction\s+createEngine\b|\bvar\s+createEngine\s*=|\bconst\s+createEngine\s*=|\blet\s+createEngine\s*=/.test(r)&&(r+=`
95
97
  export { createEngine }
96
- `),r}function $E(e,t,r){if(e.files&&typeof e.files=="object"&&e.v!==void 0){const c=e,u=c.entry||(c.language==="JS"?"index.js":"index.ts");return{snippetId:t,type:"playground",metadata:r,language:c.language??"JS",engineType:void 0,isMultiFile:!0,manifest:{...c,entry:u},code:c.files[u]??"",files:{...c.files}}}const i=e;let n=String(i.code??"");i.unicode&&(n=D$(i.unicode));try{const c=JSON.parse(n);if(c&&c.files&&typeof c.files=="object"){const u=c,l=u.entry||(u.language==="JS"?"index.js":"index.ts");return{snippetId:t,type:"playground",metadata:r,language:u.language??"JS",engineType:i.engine,isMultiFile:!0,manifest:{...u,entry:l},code:u.files[l]??"",files:{...u.files}}}}catch{}const o=yE(n),a=o==="TS"?"index.ts":"index.js",s=vE(n,o);return{snippetId:t,type:"playground",metadata:r,language:o,engineType:i.engine,isMultiFile:!1,manifest:null,code:s,files:{[a]:s}}}function C$(e,t){const r=e.split("/");r.pop();for(const i of t.split("/"))!i||i==="."||(i===".."?r.pop():r.push(i));return r.join("/")}function A$(e,t){const r=[e,`./${e}`,`${e}.js`,`./${e}.js`,`${e}/index.js`,`./${e}/index.js`];for(const i of r)if(i in t)return i}async function _E(e,t,r){const i={},n=new Set,o={};function a(){if(o.__babylonProxy__)return o.__babylonProxy__;const f=globalThis.BABYLON,p=["const B = globalThis.BABYLON || {};","export default B;"];if(f&&typeof f=="object")for(const h of Object.keys(f))/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(h)&&p.push(`export const ${h} = B[${JSON.stringify(h)}];`);const y=URL.createObjectURL(new Blob([p.join(`
98
+ `),r}function jE(e,t,r){if(e.files&&typeof e.files=="object"&&e.v!==void 0){const c=e,u=c.entry||(c.language==="JS"?"index.js":"index.ts");return{snippetId:t,type:"playground",metadata:r,language:c.language??"JS",engineType:void 0,isMultiFile:!0,manifest:{...c,entry:u},code:c.files[u]??"",files:{...c.files}}}const i=e;let n=String(i.code??"");i.unicode&&(n=Z$(i.unicode));try{const c=JSON.parse(n);if(c&&c.files&&typeof c.files=="object"){const u=c,l=u.entry||(u.language==="JS"?"index.js":"index.ts");return{snippetId:t,type:"playground",metadata:r,language:u.language??"JS",engineType:i.engine,isMultiFile:!0,manifest:{...u,entry:l},code:u.files[l]??"",files:{...u.files}}}}catch{}const o=CE(n),a=o==="TS"?"index.ts":"index.js",s=DE(n,o);return{snippetId:t,type:"playground",metadata:r,language:o,engineType:i.engine,isMultiFile:!1,manifest:null,code:s,files:{[a]:s}}}function F$(e,t){const r=e.split("/");r.pop();for(const i of t.split("/"))!i||i==="."||(i===".."?r.pop():r.push(i));return r.join("/")}function V$(e,t){const r=[e,`./${e}`,`${e}.js`,`./${e}.js`,`${e}/index.js`,`./${e}/index.js`];for(const i of r)if(i in t)return i}async function AE(e,t,r){const i={},n=new Set,o={};function a(){if(o.__babylonProxy__)return o.__babylonProxy__;const f=globalThis.BABYLON,p=["const B = globalThis.BABYLON || {};","export default B;"];if(f&&typeof f=="object")for(const h of Object.keys(f))/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(h)&&p.push(`export const ${h} = B[${JSON.stringify(h)}];`);const y=URL.createObjectURL(new Blob([p.join(`
97
99
  `)],{type:"text/javascript"}));return o.__babylonProxy__=y,y}function s(f){if(o[f])return o[f];if(f.startsWith("@babylonjs/")){const p=a();return o[f]=p,p}if(r&&f in r)return r[f]}function c(f){return/\.m?jsx?$/i.test(f)}function u(f){return`export default ${JSON.stringify(f)};
98
- `}function l(f){if(i[f])return i[f];if(!(f in e))throw new Error(`Snippet file "${f}" not found in the file map. Check that the manifest entry and import specifiers reference existing files.`);if(!c(f)){const g=URL.createObjectURL(new Blob([u(e[f])],{type:"text/javascript"}));return i[f]=g,g}if(n.has(f)){const g=URL.createObjectURL(new Blob([e[f]],{type:"text/javascript"}));return i[f]=g,g}n.add(f);const p=(g,_,I,T)=>{const C=C$(f,I),M=A$(C,e);if(M){const ue=l(M);return`${_}${ue}${T}`}return`${_}${I}${T}`},y=(g,_,I,T)=>{const C=s(I);return C?`${_}${C}${T}`:`${_}${I}${T}`};let h=e[f];h=h.replace(/((?:from|import)\s*["'])(\.[^"']+)(["'])/g,p).replace(/(import\s*\(\s*["'])(\.[^"']+)(["']\s*\))/g,p),h=h.replace(/((?:from|import)\s*["'])([^"'./][^"']*)(["'])/g,y).replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g,y);const $=URL.createObjectURL(new Blob([h],{type:"text/javascript"}));return i[f]=$,n.delete(f),$}l(t);for(const f of Object.keys(e))!i[f]&&c(f)&&l(f);const m=await import(i[t]??Object.values(i)[0]);for(const f of Object.values(i))URL.revokeObjectURL(f);for(const f of Object.values(o))URL.revokeObjectURL(f);return m}function bE(e){let t=e,r=0;const i=[],n=a=>a.split(",").map(s=>s.trim()).filter(Boolean).map(s=>{const c=/^(\w+)\s+as\s+(\w+)$/.exec(s);return c?`${c[1]}: ${c[2]}`:s}).join(", "),o=(a,s)=>{const c=JSON.stringify(s),u=a.trim();if(u.startsWith("{")){const m=u.slice(1,-1);return`const { ${n(m)} } = require(${c});`}const l=/^\*\s+as\s+(\w+)$/.exec(u);if(l)return`const ${l[1]} = require(${c});`;if(u.includes(",")){const[m,f]=u.split(/,(.+)/).map(h=>h.trim()),p=`__mod_${r++}`,y=[`const ${p} = require(${c});`,`const ${m} = (${p} && Object.prototype.hasOwnProperty.call(${p}, "default")) ? ${p}.default : ${p};`];if(f?.startsWith("{")){const h=f.slice(1,-1),$=n(h);y.push(`const { ${$} } = ${p};`)}else{const h=/^\*\s+as\s+(\w+)$/.exec(f??"");h&&y.push(`const ${h[1]} = ${p};`)}return y.join(`
100
+ `}function l(f){if(i[f])return i[f];if(!(f in e))throw new Error(`Snippet file "${f}" not found in the file map. Check that the manifest entry and import specifiers reference existing files.`);if(!c(f)){const g=URL.createObjectURL(new Blob([u(e[f])],{type:"text/javascript"}));return i[f]=g,g}if(n.has(f)){const g=URL.createObjectURL(new Blob([e[f]],{type:"text/javascript"}));return i[f]=g,g}n.add(f);const p=(g,_,I,P)=>{const j=F$(f,I),M=V$(j,e);if(M){const le=l(M);return`${_}${le}${P}`}return`${_}${I}${P}`},y=(g,_,I,P)=>{const j=s(I);return j?`${_}${j}${P}`:`${_}${I}${P}`};let h=e[f];h=h.replace(/((?:from|import)\s*["'])(\.[^"']+)(["'])/g,p).replace(/(import\s*\(\s*["'])(\.[^"']+)(["']\s*\))/g,p),h=h.replace(/((?:from|import)\s*["'])([^"'./][^"']*)(["'])/g,y).replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g,y);const $=URL.createObjectURL(new Blob([h],{type:"text/javascript"}));return i[f]=$,n.delete(f),$}l(t);for(const f of Object.keys(e))!i[f]&&c(f)&&l(f);const m=await import(i[t]??Object.values(i)[0]);for(const f of Object.values(i))URL.revokeObjectURL(f);for(const f of Object.values(o))URL.revokeObjectURL(f);return m}function UE(e){let t=e,r=0;const i=[],n=a=>a.split(",").map(s=>s.trim()).filter(Boolean).map(s=>{const c=/^(\w+)\s+as\s+(\w+)$/.exec(s);return c?`${c[1]}: ${c[2]}`:s}).join(", "),o=(a,s)=>{const c=JSON.stringify(s),u=a.trim();if(u.startsWith("{")){const m=u.slice(1,-1);return`const { ${n(m)} } = require(${c});`}const l=/^\*\s+as\s+(\w+)$/.exec(u);if(l)return`const ${l[1]} = require(${c});`;if(u.includes(",")){const[m,f]=u.split(/,(.+)/).map(h=>h.trim()),p=`__mod_${r++}`,y=[`const ${p} = require(${c});`,`const ${m} = (${p} && Object.prototype.hasOwnProperty.call(${p}, "default")) ? ${p}.default : ${p};`];if(f?.startsWith("{")){const h=f.slice(1,-1),$=n(h);y.push(`const { ${$} } = ${p};`)}else{const h=/^\*\s+as\s+(\w+)$/.exec(f??"");h&&y.push(`const ${h[1]} = ${p};`)}return y.join(`
99
101
  `)}const d=`__mod_${r++}`;return`const ${d} = require(${c});
100
102
  const ${u} = (${d} && Object.prototype.hasOwnProperty.call(${d}, "default")) ? ${d}.default : ${d};`};if(t=t.replace(/^\s*import\s+([^"'\n;]+?)\s+from\s+["']([^"']+)["']\s*;?\s*$/gm,(a,s,c)=>o(s,c)),t=t.replace(/^\s*import\s+["']([^"']+)["']\s*;?\s*$/gm,(a,s)=>`require(${JSON.stringify(s)});`),t=t.replace(/^\s*export\s+\*\s+from\s+["']([^"']+)["']\s*;?\s*$/gm,(a,s)=>`Object.assign(exports, require(${JSON.stringify(s)}));`),t=t.replace(/^\s*export\s*\{([^}]+)\}\s*from\s*["']([^"']+)["']\s*;?\s*$/gm,(a,s,c)=>{const u=`__reexp_${r++}`,l=[`const ${u} = require(${JSON.stringify(c)});`];for(const d of s.split(",")){const m=d.trim();if(!m)continue;const f=/^(\w+)\s+as\s+(\w+)$/.exec(m),p=f?f[1]:m,y=f?f[2]:m;l.push(`exports.${y} = ${u}.${p};`)}return l.join(`
101
103
  `)}),t=t.replace(/^\s*export\s*\{([^}]+)\}\s*;?\s*$/gm,(a,s)=>{const c=[];for(const u of s.split(",")){const l=u.trim();if(!l)continue;const d=/^(\w+)\s+as\s+(\w+)$/.exec(l),m=d?d[1]:l,f=d?d[2]:l;f==="default"?c.push(`exports.default = ${m};`):c.push(`exports.${f} = ${m};`)}return c.join(`
102
104
  `)}),t=t.replace(/\bimport\s*\(\s*(["'][^"']+["'])\s*\)/g,"Promise.resolve(require($1))"),t=t.replace(/^\s*export\s+default\s+/gm,"exports.default = "),t=t.replace(/^\s*export\s+(async\s+)?function\s+(\w+)/gm,(a,s,c)=>(i.push(c),`${s??""}function ${c}`)),t=t.replace(/^\s*export\s+class\s+(\w+)/gm,(a,s)=>(i.push(s),`class ${s}`)),t=t.replace(/^\s*export\s+(const|let|var)\s+(\w+)/gm,(a,s,c)=>(i.push(c),`${s} ${c}`)),i.length){const a=[...new Set(i)];t+=`
103
105
  ${a.map(s=>`exports.${s} = ${s};`).join(`
104
106
  `)}
105
- `}return t}function U$(e,t,r){const i=Object.keys(e).filter(l=>/\.m?jsx?$/i.test(l)),n={},o={};for(const l of i)n[l]=bE(e[l]);const a=l=>{if(o[l])return o[l].exports;if(!/\.m?jsx?$/i.test(l))return o[l]={exports:e[l]},e[l];const d={exports:{}};o[l]=d;const m=p=>{if(p.startsWith(".")||p.startsWith("/")){const y=C$(l,p),h=A$(y,e);if(h)return a(h);throw new Error(`Unable to resolve script-mode module "${p}" from "${l}"`)}if(p.startsWith("@babylonjs/"))return globalThis.BABYLON??{};if(r&&p in r)throw new Error(`Script mode cannot execute external import "${p}" (${r[p]}). Use moduleFormat: "esm" or pre-bundle dependencies.`);return globalThis[p]};return new Function("require","exports","module",n[l])(m,d.exports,d),d.exports},s=a(t);for(const l of i)l in o||a(l);const c={...s??{}},u=["createScene","CreateScene","createscene","delayCreateScene","delayLoadScene","DelayCreateScene","createEngine","Playground"];for(const l of u)c[l]===void 0&&typeof globalThis[l]<"u"&&(c[l]=globalThis[l]);return c}function kE(e){let t="";/\bexport\s+default\s+class\s+Playground\b/.test(e)?t="default.CreateScene":/\bexport\s+(const|let|var|function)\s+delayCreateScene\b/.test(e)?t="delayCreateScene":/\bexport\s+(const|let|var|function)\s+delayLoadScene\b/.test(e)?t="delayLoadScene":/\bexport\s+(const|let|var|function)\s+createScene\b/.test(e)?t="createScene":/\bexport\s+(const|let|var|function)\s+CreateScene\b/.test(e)?t="CreateScene":/\bexport\s+(const|let|var|function)\s+createscene\b/.test(e)?t="createscene":/\bexport\s+default\b/.test(e)&&(t="default");const r=/\bexport\s+(const|let|var|function)\s+createEngine\b/.test(e)||/\bexport\s*\{[^}]*\bcreateEngine\b[^}]*\}\s*;?/.test(e);return{sceneFunctionName:t,createEngineFn:r?i=>{}:null,createEngineSource:r?"snippet":"default"}}function R$(e){let t=null,r="";const i=[[()=>e.default?.CreateScene,"default.CreateScene"],[()=>e.default?.DelayCreateScene,"default.DelayCreateScene"],[()=>e.Playground?.CreateScene,"Playground.CreateScene"],[()=>e.Playground?.DelayCreateScene,"Playground.DelayCreateScene"],[()=>typeof e.delayCreateScene=="function"?e.delayCreateScene:null,"delayCreateScene"],[()=>typeof e.delayLoadScene=="function"?e.delayLoadScene:null,"delayLoadScene"],[()=>typeof e.createScene=="function"?e.createScene:null,"createScene"],[()=>typeof e.CreateScene=="function"?e.CreateScene:null,"CreateScene"],[()=>typeof e.createscene=="function"?e.createscene:null,"createscene"],[()=>typeof e.default=="function"?e.default:null,"default"]];for(const[o,a]of i){const s=o();if(s){t=s,r=a;break}}let n=null;return typeof e.createEngine=="function"&&(n=e.createEngine),{createSceneFn:t,sceneFunctionName:r,createEngineFn:n}}function wE(e){return async(t,r)=>{const i=r?.antialias??!0,n=r?.engineOptions??{preserveDrawingBuffer:!0,stencil:!0},o=globalThis.BABYLON;if(!o)throw new Error("BABYLON is not available on globalThis. Ensure Babylon.js is loaded before calling createEngine.");if(e==="WebGPU"&&o.WebGPUEngine){const a=new o.WebGPUEngine(t,{antialias:i,enableAllFeatures:!0,setMaximumLimits:!0,...n});return await a.initAsync(),a}return new o.Engine(t,i,n)}}function SE(e){const t=Object.values(e).join(`
106
- `);return{havok:/\bHavokPlugin\b/.test(t),ammo:/\bAmmoJSPlugin\b/.test(t),recast:/\bRecastJSPlugin\b/.test(t)}}const Zl=(()=>{const e=new Set;return async t=>await new Promise((r,i)=>{if(e.has(t))return r();const n=document.createElement("script");n.src=t,n.async=!0,n.onload=()=>{e.add(t),r()},n.onerror=()=>i(new Error(`Failed to load script: ${t}`)),document.head.appendChild(n)})})();async function IE(e,t){const r=globalThis,i=t?.loadScripts===!0,n=t?.scriptUrls??{},o=(t?.baseUrl??aE).replace(/\/+$/,""),a=s=>n[s]??`${o}/${sE[s]}`;if(e.ammo){if(typeof r.Ammo!="function"&&i)try{await Zl(a("ammo"))}catch{}if(typeof r.Ammo=="function")try{await r.Ammo()}catch{}}if(e.recast){if(typeof r.Recast!="function"&&i)try{await Zl(a("recast"))}catch{}if(typeof r.Recast=="function")try{await r.Recast()}catch{}}if(e.havok){if(typeof r.HavokPhysics!="function"&&i)try{await Zl(a("havok"))}catch{}if(typeof r.HavokPhysics=="function"&&typeof r.HK>"u")try{r.HK=await r.HavokPhysics()}catch{}}}function OE(e,t,r,i,n,o){let a=null,s;const c=e[t]??"",u=kE(c),l=async()=>(s||(r==="esm"?a=await _E(e,t,n):a=U$(e,t,n),s=R$(a),d=s.createEngineFn?"snippet":"default",m=s.sceneFunctionName),s);let d=u.createEngineSource,m=u.sceneFunctionName;const f=async(y,h)=>{const{createEngineFn:$}=await l();return $?await $(y,h):await wE(i)(y,h)},p=async(y,h)=>{const{createSceneFn:$}=await l();if(!$)throw new Error("No createScene export found in snippet (tried: default.CreateScene, Playground.CreateScene, createScene, delayCreateScene, default).");const g=globalThis,_=g.engine,I=g.canvas,T=g.BABYLON,C=T?.Tools?.BaseUrl,M=T?.Tools?.PreprocessUrl;r==="script"&&(g.engine=y,g.canvas=h);const ue=void 0;try{let fe;const L=await $.bind(new Proxy({},{get(Q,Y){return Y==="scene"?fe:Y==="engine"?y:Y==="canvas"?h:globalThis[Y]},set(Q,Y,W){return Y==="scene"?(fe=W,!0):(globalThis[Y]=W,!0)}}))(y,h);return L!=null&&(fe=L),ue?.(),fe}finally{r==="script"&&(g.engine=_,g.canvas=I),T?.Tools&&(T.Tools.BaseUrl=C,T.Tools.PreprocessUrl=M)}};return r==="script"&&(a=U$(e,t,n),s=R$(a),m=s.sceneFunctionName,d=s.createEngineFn?"snippet":"default"),{createEngine:f,createScene:p,getCreateEngineSource:()=>d,getSceneFunctionName:()=>m,initializeMetadataAsync:async()=>{r==="script"&&await l()}}}async function zE(e,t){const r=await cE(e,Ul);return await xE(r,e,t)}async function xE(e,t,r){const i={name:e.name??"",description:e.description??"",tags:e.tags??""},n=e.jsonPayload??e.payload??"{}";let o;try{o=JSON.parse(n)}catch{return{snippetId:t,type:"unknown",metadata:i,rawPayload:n}}const a=dE(o),s=r?.moduleFormat??"esm";switch(a){case"playground":{const c=$E(o,t,i),u=c.manifest?.entry?.replace(/\.tsx?$/i,".js")??"index.js",l=Object.keys(c.files).some(y=>/\.tsx?$/i.test(y));let d;if(l){const y=(async(h,$)=>await hE(h,$));d=await gE(c.files,y)}else d={...c.files};const m=OE(d,u,s,c.engineType,c.manifest?.imports);await m.initializeMetadataAsync();const f=SE(c.files);return{...c,jsFiles:d,executedCode:d[u]??"",moduleFormat:s,createEngine:m.createEngine,createScene:m.createScene,createEngineSource:m.getCreateEngineSource(),sceneFunctionName:m.getSceneFunctionName(),runtimeFeatures:f,initializeRuntimeAsync:async y=>await IE(f,y)}}case"unknown":return{snippetId:t,type:"unknown",metadata:i,rawPayload:o};default:return fE(o,a,t,i)}}function TE(e,t){return JSON.stringify({payload:e,name:t?.metadata?.name??"",description:t?.metadata?.description??"",tags:t?.metadata?.tags??""})}function PE(e){const t=e.type,r=typeof e.data=="string"?e.data:JSON.stringify(e.data);return JSON.stringify({[t]:r})}function NE(e){const t=e.indexOf("#");return t>=0?e.slice(0,t):e}async function EE(e,t){let r;r=PE(e);const i=TE(r,t),n=(t?.snippetUrl??Ul).replace(/\/+$/,""),o=t?.snippetId?NE(t.snippetId):"",a=o?`${n}/${o}`:n,s=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:i});if(!s.ok)throw new Error(`Failed to save snippet: ${s.status} ${s.statusText}`);const c=await s.json(),u=c.id,l=String(c.version??"0");let d=u;return l&&l!=="0"&&(d+="#"+l),{snippetId:d,id:u,version:l}}const Pe=new ra,Ye=new XN({serverName:"NGE MCP Session Server",documentKind:"node-geometry",managerUnavailableMessage:"Geometry graph manager is not available",getDocument:(e,t)=>e.exportJSON(t.name),setDocument:(e,t,r)=>{const i=e.importJSON(t.name,r);return i&&i!=="OK"?i:void 0}},{defaultPort:3001,statusTitle:"NGE MCP Session Server"});function rn(e){const t=Ye.getSessionIdForName(e);t&&Ye.notifySessionUpdate(t)}function Z$(e,t){const r=Pe.importJSON(e,t);return r==="OK"&&rn(e),r}const ge=new vN({name:"babylonjs-node-geometry",version:"1.0.0"},{instructions:["You build Babylon.js procedural geometry via Node Geometry graphs. Workflow: create_geometry \u2192 add blocks (source geometry blocks like BoxBlock, then transform/math blocks, then GeometryOutputBlock) \u2192 connect ports \u2192 validate_geometry \u2192 export_geometry_json.","Every geometry needs a GeometryOutputBlock. Use get_block_type_info to discover ports before connecting.","Output JSON can be consumed by the Scene MCP via add_node_geometry_mesh."].join(" ")});ge.registerResource("block-catalog","nge://block-catalog",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:`# NGE Block Catalog
107
- ${N$()}`}]})),ge.registerResource("enums","nge://enums",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:["# NGE Enumerations Reference","","## NodeGeometryBlockConnectionPointTypes","Int (0x0001), Float (0x0002), Vector2 (0x0004), Vector3 (0x0008), Vector4 (0x0010), Matrix (0x0020), Geometry (0x0040), Texture (0x0080), AutoDetect (0x0400), BasedOnInput (0x0800), Undefined (0x1000)","","## NodeGeometryContextualSources (for GeometryInputBlock)","None (0), Positions (1), Normals (2), Tangents (3), UV (4), UV2 (5), UV3 (6), UV4 (7), UV5 (8), UV6 (9), Colors (10), VertexID (11), FaceID (12), GeometryID (13), CollectionID (14), LoopID (15), InstanceID (16), LatticeID (17), LatticeControl (18)","","## MathBlockOperations (for MathBlock)","Add (0), Subtract (1), Multiply (2), Divide (3), Max (4), Min (5)","","## GeometryTrigonometryBlockOperations (for GeometryTrigonometryBlock)","Cos (0), Sin (1), Abs (2), Exp (3), Round (4), Floor (5), Ceiling (6), Sqrt (7), Log (8), Tan (9), ArcTan (10), ArcCos (11), ArcSin (12), Sign (13), Negate (14), OneMinus (15), Reciprocal (16), ToDegrees (17), ToRadians (18), Fract (19), Exp2 (20)","","## ConditionBlockTests (for ConditionBlock)","Equal (0), NotEqual (1), LessThan (2), GreaterThan (3), LessOrEqual (4), GreaterOrEqual (5), Xor (6), Or (7), And (8)","","## BooleanGeometryOperations (for BooleanGeometryBlock)","Intersect (0), Subtract (1), Union (2)","","## RandomBlockLocks (for RandomBlock)","None (0), LoopID (1), InstanceID (2), Once (3)","","## Aggregations (for AggregatorBlock) \u2014 property name: aggregation","Max (0), Min (1), Sum (2). Default: Sum","","## GeometryEaseBlockTypes (for GeometryEaseBlock) \u2014 property name: type","EaseInSine (0), EaseOutSine (1), EaseInOutSine (2), EaseInQuad (3), EaseOutQuad (4), ...","","## MappingTypes (for MappingBlock) \u2014 property name: mapping","Spherical (0), Cylindrical (1), Cubic (2)"].join(`
108
- `)}]})),ge.registerResource("concepts","nge://concepts",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:["# Node Geometry Concepts","","## What is a Node Geometry?","A Node Geometry is a visual, graph-based procedural geometry builder in Babylon.js.","Instead of creating meshes from code, you connect typed blocks that represent geometry","operations. The graph evaluates at runtime to produce mesh vertex data.","","## Graph Structure \u2014 One Required Output","Every Node Geometry graph MUST have exactly one output block:"," \u2022 **GeometryOutputBlock** \u2014 receives the final Geometry output","Without this block, the geometry cannot be built.","","## GeometryInputBlock \u2014 Contextual Sources & Constants","GeometryInputBlock is the source of all external data entering the graph. It has two modes:","","### Mode 1: Contextual Source","Reads per-vertex/per-face data from the geometry being processed."," \u2022 Set `contextualValue` to one of: Positions, Normals, Tangents, UV, UV2, UV3, UV4, UV5, UV6,"," Colors, VertexID, FaceID, GeometryID, CollectionID, LoopID, InstanceID, LatticeID, LatticeControl"," \u2022 The `type` is automatically derived from the contextual source:"," - Positions/Normals/Tangents/LatticeControl \u2192 Vector3"," - UV/UV2/UV3/UV4/UV5/UV6 \u2192 Vector2"," - Colors \u2192 Vector4"," - VertexID/FaceID/GeometryID/CollectionID/LoopID/InstanceID/LatticeID \u2192 Int","","### Mode 2: Constant Value","Provides a fixed value of a specific type."," \u2022 Set `type` to: Int, Float, Vector2, Vector3, Vector4, Matrix"," \u2022 Set `value` to the constant (number, or {x,y}, {x,y,z}, {x,y,z,w}, or flat array)","","## Source Blocks \u2014 Built-in Primitives","These blocks generate mesh geometry directly without needing inputs:"," \u2022 BoxBlock, SphereBlock, CylinderBlock, PlaneBlock, TorusBlock, DiscBlock"," \u2022 CapsuleBlock, IcoSphereBlock, GridBlock, NullBlock, MeshBlock, PointListBlock","All dimension inputs (size, width, height, diameter, segments, subdivisions, etc.) are OPTIONAL INPUT","PORTS with sensible defaults. To override them, add a GeometryInputBlock (type Float or Int) with","the desired constant value and connect it to that port:"," Example: connect GeometryInputBlock(Float, value=10) \u2192 PlaneBlock.size"," Example: connect GeometryInputBlock(Float, value=0.5) \u2192 SphereBlock.diameter","You do NOT need to add inputs for dimensions you want to keep at their defaults.","","## The Simplest Geometry Graph","```","BoxBlock.geometry \u2192 GeometryOutputBlock.geometry","```","That's it \u2014 one source block connected to the output. This generates a default box.","","## Transforming Geometry","Use GeometryTransformBlock to translate, rotate, or scale geometry.","It accepts geometry on 'value' and has built-in translation/rotation/scaling inputs:","```","BoxBlock.geometry \u2192 GeometryTransformBlock.value","GeometryInputBlock(Vector3, value={x:0,y:2,z:0}) \u2192 GeometryTransformBlock.translation","GeometryTransformBlock.output \u2192 GeometryOutputBlock.geometry","```","Alternatively, wire a TranslationBlock (or RotationXBlock/ScalingBlock) to the 'matrix' input","for more complex multi-step transforms:","```","GeometryInputBlock(Vector3, {x:0,y:2,z:0}) \u2192 TranslationBlock.translation","TranslationBlock.matrix \u2192 GeometryTransformBlock.matrix","```","","## Merging Geometries","Use MergeGeometryBlock to combine multiple geometries:","```","BoxBlock.geometry \u2192 MergeGeometryBlock.geometry0","SphereBlock.geometry \u2192 MergeGeometryBlock.geometry1","MergeGeometryBlock.output \u2192 GeometryOutputBlock.geometry","```","","## Boolean Operations","Use BooleanGeometryBlock for CSG operations (Intersect, Subtract, Union):","```","BoxBlock.geometry \u2192 BooleanGeometryBlock.geometry0","SphereBlock.geometry \u2192 BooleanGeometryBlock.geometry1","BooleanGeometryBlock.output \u2192 GeometryOutputBlock.geometry","```","","## Instancing / Scattering","Create copies of geometry arranged in patterns:"," \u2022 InstantiateLinearBlock \u2014 line of copies along a direction"," \u2022 InstantiateRadialBlock \u2014 copies arranged in a circle"," \u2022 InstantiateOnFacesBlock \u2014 scatter copies on faces of source geometry"," \u2022 InstantiateOnVerticesBlock \u2014 place copies at vertices of source geometry"," \u2022 InstantiateOnVolumeBlock \u2014 scatter copies inside a volume","","## Per-Vertex Modification","Use Set blocks (evaluateContext=true, the default) to modify vertices individually:","```","BoxBlock.geometry \u2192 SetPositionsBlock.geometry","GeometryInputBlock(contextualValue:'Positions') \u2192 MathBlock.left (positions, Vector3)","NoiseBlock.output \u2192 VectorConverterBlock['x '] \u2192 VectorConverterBlock.xyz \u2192 MathBlock.right","MathBlock.output \u2192 SetPositionsBlock.positions","SetPositionsBlock.output \u2192 GeometryOutputBlock.geometry","```","Notes:"," \u2022 SetPositionsBlock.positions is a REQUIRED input (must be connected)."," \u2022 NoiseBlock outputs a Float; use VectorConverterBlock to lift it to Vector3."," \u2022 The MathBlock operation should be set to Add (0) via properties: { operation: 0 }.","","## VectorConverterBlock \u2014 Important: Trailing-Space Input Names","VectorConverterBlock input port names have a TRAILING SPACE to disambiguate from outputs:"," Inputs: 'xyzw ' (Vector4), 'xyz ' (Vector3), 'xy ' (Vector2), 'zw ' (Vector2),"," 'x ' (Float), 'y ' (Float), 'z ' (Float), 'w ' (Float)"," Outputs: 'xyzw' (Vector4), 'xyz' (Vector3), 'xy' (Vector2), 'zw' (Vector2),"," 'x' (Float), 'y' (Float), 'z' (Float), 'w' (Float)","When calling connect_blocks to a VectorConverterBlock INPUT, you MUST include the trailing space:"," connect_blocks(sourceId, 'output', vectorConverterId, 'x ') \u2190 note the space"," connect_blocks(vectorConverterId, 'xyz', targetId, ...) \u2190 outputs have no space","","## IntFloatConverterBlock \u2014 Same Trailing-Space Pattern","Inputs: 'float ' (Float), 'int ' (Int)","Outputs: 'float' (Float), 'int' (Int)","","## Common Mistakes","1. Forgetting GeometryOutputBlock \u2192 geometry cannot be built","2. Creating GeometryInputBlock without contextualValue or value \u2192 no data provided","3. Setting evaluateContext=false on Set blocks when per-vertex behaviour is needed","4. Not connecting the geometry flow \u2014 every path must link back to GeometryOutputBlock","5. Omitting trailing space on VectorConverterBlock / IntFloatConverterBlock inputs","6. Leaving SetPositionsBlock.positions unconnected (required, not optional)"].join(`
109
- `)}]})),ge.registerPrompt("create-box-geometry",{description:"Step-by-step instructions for building a simple box geometry"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a simple box geometry. Steps:","1. create_geometry with name 'MyBox'","2. Add BoxBlock named 'box'","3. Add GeometryOutputBlock named 'output'","4. Connect box.geometry \u2192 output.geometry","5. validate_geometry, then export_geometry_json"].join(`
110
- `)}}]})),ge.registerPrompt("create-scattered-instances",{description:"Step-by-step instructions for scattering instances of a geometry on the faces of another"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a geometry that scatters small spheres on the faces of a plane.","NOTE: PlaneBlock and SphereBlock inputs (size, diameter) are INPUT PORTS, not scalar properties.","To set them, add a GeometryInputBlock (type Float) with the desired value and connect it.","","Steps:","1. create_geometry with name 'ScatteredSpheres'","2. Add PlaneBlock named 'basePlane'","3. Add GeometryInputBlock named 'planeSize' with type 'Float', value 10","4. Connect planeSize.output \u2192 basePlane.size","5. Add SphereBlock named 'smallSphere'","6. Add GeometryInputBlock named 'sphereDiam' with type 'Float', value 0.2","7. Connect sphereDiam.output \u2192 smallSphere.diameter","8. Add GeometryInputBlock named 'count' with type 'Int', value 100","9. Add InstantiateOnFacesBlock named 'scatter'","10. Connect basePlane.geometry \u2192 scatter.geometry","11. Connect smallSphere.geometry \u2192 scatter.instance","12. Connect count.output \u2192 scatter.count","13. Add GeometryOutputBlock named 'output'","14. Connect scatter.output \u2192 output.geometry","15. validate_geometry, then export_geometry_json"].join(`
111
- `)}}]})),ge.registerPrompt("create-deformed-terrain",{description:"Create a subdivided plane deformed by noise to produce terrain-like geometry"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a terrain by deforming a subdivided grid with noise.","NOTE: Input values (subdivisions, scale) are INPUT PORTS fed by GeometryInputBlocks.","","Steps:","1. create_geometry 'Terrain'","2. Add GridBlock named 'grid'","3. Add GeometryInputBlock 'gridSize' type Float, value 20 \u2192 connect to grid.size","4. Add GeometryInputBlock 'subdivs' type Int, value 64 \u2192 connect to grid.subdivisions","5. Add SetPositionsBlock named 'setPos'","6. Connect grid.geometry \u2192 setPos.geometry","7. Add Positions contextual input: GeometryInputBlock 'positions' contextualValue 'Positions' (Vector3)","8. Add NoiseSampleBlock named 'noise'","9. Connect positions.output \u2192 noise.position","10. Add GeometryInputBlock 'noiseScale' type Float, value 0.15 \u2192 noise.amplitude","11. Add VectorConverterBlock (or compose) to turn noise.output (Float) into a Y-offset Vector3:"," a. Add GeometryInputBlock 'zero' type Float, value 0"," b. Add CreateVector3Block 'offset' \u2014 connect zero\u2192x, noise.output\u2192y, zero\u2192z","12. Add AddBlock 'displaced' \u2014 connect positions\u2192left, offset\u2192right","13. Connect displaced.output \u2192 setPos.positions","14. Add ComputeNormalsBlock 'normals' \u2014 connect setPos.output \u2192 normals.geometry","15. Add GeometryOutputBlock 'output' \u2014 connect normals.output \u2192 output.geometry","16. validate_geometry, then export_geometry_json"].join(`
112
- `)}}]})),ge.registerTool("create_geometry",{description:"Create a new empty Node Geometry graph in memory. This is always the first step.",inputSchema:{name:k().describe("Unique name for the geometry (e.g. 'MyTerrain', 'TreeGenerator')"),comment:k().optional().describe("An optional description of what this geometry does")}},async({name:e,comment:t})=>{Pe.createGeometry(e,t);const r=await Ye.startAsync(Pe),i=Ye.createSession(e),n=Ye.getSessionUrl(i,r);return{content:[{type:"text",text:`Created geometry "${e}". Now add blocks with add_block, connect them with connect_blocks, then export with export_geometry_json.
113
-
114
- MCP Session URL: ${n}`}]}}),ge.registerTool("get_session_url",{description:"Get or create a live-session URL for a geometry. The URL can be pasted into the Node Geometry Editor MCP session panel.",inputSchema:{geometryName:k().describe("Name of the geometry")}},async({geometryName:e})=>{if(!Pe.listGeometries().includes(e))return At(`Geometry "${e}" not found.`);const r=await Ye.startAsync(Pe),i=Ye.createSession(e),n=Ye.getSessionUrl(i,r);return qt(`MCP Session URL: ${n}`)}),ge.registerTool("start_session",{description:"Start a live session for an existing geometry. If a session already exists for this geometry, returns the existing URL.",inputSchema:{geometryName:k().describe("Name of the geometry")}},async({geometryName:e})=>{if(!Pe.listGeometries().includes(e))return At(`Geometry "${e}" not found.`);const r=await Ye.startAsync(Pe),i=Ye.createSession(e),n=Ye.getSessionUrl(i,r);return qt(`MCP Session URL: ${n}`)}),ge.registerTool("close_session",{description:"Close a live session for a geometry. Disconnects all SSE subscribers in the editor and removes the session. The geometry itself is NOT deleted.",inputSchema:{geometryName:k().describe("Name of the geometry whose session to close")}},async({geometryName:e})=>Ye.closeSessionForName(e)?qt(`Session for "${e}" closed. The editor will disconnect.`):qt(`No active session for "${e}".`)),ge.registerTool("stop_session_server",{description:"Stop the live MCP editor session server started by this MCP process. This closes all active sessions, disconnects editors, and releases the port."},async()=>(await Ye.stopAsync(),qt("MCP session server stopped. Any connected editors have been disconnected."))),ge.registerTool("delete_geometry",{description:"Delete a geometry graph from memory.",inputSchema:{name:k().describe("Name of the geometry to delete")}},async({name:e})=>(Ye.closeSessionForName(e),{content:[{type:"text",text:Pe.deleteGeometry(e)?`Deleted "${e}".`:`Geometry "${e}" not found.`}]})),ge.registerTool("clear_all",{description:"Remove all geometry graphs from memory, resetting the server to a clean state."},async()=>{const e=Pe.listGeometries();for(const t of e)Ye.closeSessionForName(t);return Pe.clearAll(),{content:[{type:"text",text:e.length>0?`Cleared ${e.length} geometry(s): ${e.join(", ")}`:"Nothing to clear \u2014 memory was already empty."}]}}),ge.registerTool("list_geometries",{description:"List all geometry graphs currently in memory."},async()=>{const e=Pe.listGeometries();return{content:[{type:"text",text:e.length>0?`Geometries in memory:
107
+ `}return t}function G$(e,t,r){const i=Object.keys(e).filter(l=>/\.m?jsx?$/i.test(l)),n={},o={};for(const l of i)n[l]=UE(e[l]);const a=l=>{if(o[l])return o[l].exports;if(!/\.m?jsx?$/i.test(l))return o[l]={exports:e[l]},e[l];const d={exports:{}};o[l]=d;const m=p=>{if(p.startsWith(".")||p.startsWith("/")){const y=F$(l,p),h=V$(y,e);if(h)return a(h);throw new Error(`Unable to resolve script-mode module "${p}" from "${l}"`)}if(p.startsWith("@babylonjs/"))return globalThis.BABYLON??{};if(r&&p in r)throw new Error(`Script mode cannot execute external import "${p}" (${r[p]}). Use moduleFormat: "esm" or pre-bundle dependencies.`);return globalThis[p]};return new Function("require","exports","module",n[l])(m,d.exports,d),d.exports},s=a(t);for(const l of i)l in o||a(l);const c={...s??{}},u=["createScene","CreateScene","createscene","delayCreateScene","delayLoadScene","DelayCreateScene","createEngine","Playground"];for(const l of u)c[l]===void 0&&typeof globalThis[l]<"u"&&(c[l]=globalThis[l]);return c}function RE(e){let t="";/\bexport\s+default\s+class\s+Playground\b/.test(e)?t="default.CreateScene":/\bexport\s+(const|let|var|function)\s+delayCreateScene\b/.test(e)?t="delayCreateScene":/\bexport\s+(const|let|var|function)\s+delayLoadScene\b/.test(e)?t="delayLoadScene":/\bexport\s+(const|let|var|function)\s+createScene\b/.test(e)?t="createScene":/\bexport\s+(const|let|var|function)\s+CreateScene\b/.test(e)?t="CreateScene":/\bexport\s+(const|let|var|function)\s+createscene\b/.test(e)?t="createscene":/\bexport\s+default\b/.test(e)&&(t="default");const r=/\bexport\s+(const|let|var|function)\s+createEngine\b/.test(e)||/\bexport\s*\{[^}]*\bcreateEngine\b[^}]*\}\s*;?/.test(e);return{sceneFunctionName:t,createEngineFn:r?i=>{}:null,createEngineSource:r?"snippet":"default"}}function q$(e){let t=null,r="";const i=[[()=>e.default?.CreateScene,"default.CreateScene"],[()=>e.default?.DelayCreateScene,"default.DelayCreateScene"],[()=>e.Playground?.CreateScene,"Playground.CreateScene"],[()=>e.Playground?.DelayCreateScene,"Playground.DelayCreateScene"],[()=>typeof e.delayCreateScene=="function"?e.delayCreateScene:null,"delayCreateScene"],[()=>typeof e.delayLoadScene=="function"?e.delayLoadScene:null,"delayLoadScene"],[()=>typeof e.createScene=="function"?e.createScene:null,"createScene"],[()=>typeof e.CreateScene=="function"?e.CreateScene:null,"CreateScene"],[()=>typeof e.createscene=="function"?e.createscene:null,"createscene"],[()=>typeof e.default=="function"?e.default:null,"default"]];for(const[o,a]of i){const s=o();if(s){t=s,r=a;break}}let n=null;return typeof e.createEngine=="function"&&(n=e.createEngine),{createSceneFn:t,sceneFunctionName:r,createEngineFn:n}}function BE(e){return async(t,r)=>{const i=r?.antialias??!0,n=r?.engineOptions??{preserveDrawingBuffer:!0,stencil:!0},o=globalThis.BABYLON;if(!o)throw new Error("BABYLON is not available on globalThis. Ensure Babylon.js is loaded before calling createEngine.");if(e==="WebGPU"&&o.WebGPUEngine){const a=new o.WebGPUEngine(t,{antialias:i,enableAllFeatures:!0,setMaximumLimits:!0,...n});return await a.initAsync(),a}return new o.Engine(t,i,n)}}function ME(e){const t=Object.values(e).join(`
108
+ `);return{havok:/\bHavokPlugin\b/.test(t),ammo:/\bAmmoJSPlugin\b/.test(t),recast:/\bRecastJSPlugin\b/.test(t)}}const Fl=(()=>{const e=new Set;return async t=>await new Promise((r,i)=>{if(e.has(t))return r();const n=document.createElement("script");n.src=t,n.async=!0,n.onload=()=>{e.add(t),r()},n.onerror=()=>i(new Error(`Failed to load script: ${t}`)),document.head.appendChild(n)})})();async function ZE(e,t){const r=globalThis,i=t?.loadScripts===!0,n=t?.scriptUrls??{},o=(t?.baseUrl??kE).replace(/\/+$/,""),a=s=>n[s]??`${o}/${SE[s]}`;if(e.ammo){if(typeof r.Ammo!="function"&&i)try{await Fl(a("ammo"))}catch{}if(typeof r.Ammo=="function")try{await r.Ammo()}catch{}}if(e.recast){if(typeof r.Recast!="function"&&i)try{await Fl(a("recast"))}catch{}if(typeof r.Recast=="function")try{await r.Recast()}catch{}}if(e.havok){if(typeof r.HavokPhysics!="function"&&i)try{await Fl(a("havok"))}catch{}if(typeof r.HavokPhysics=="function"&&typeof r.HK>"u")try{r.HK=await r.HavokPhysics()}catch{}}}function LE(e,t,r,i,n,o){let a=null,s;const c=e[t]??"",u=RE(c),l=async()=>(s||(r==="esm"?a=await AE(e,t,n):a=G$(e,t,n),s=q$(a),d=s.createEngineFn?"snippet":"default",m=s.sceneFunctionName),s);let d=u.createEngineSource,m=u.sceneFunctionName;const f=async(y,h)=>{const{createEngineFn:$}=await l();return $?await $(y,h):await BE(i)(y,h)},p=async(y,h)=>{const{createSceneFn:$}=await l();if(!$)throw new Error("No createScene export found in snippet (tried: default.CreateScene, Playground.CreateScene, createScene, delayCreateScene, default).");const g=globalThis,_=g.engine,I=g.canvas,P=g.BABYLON,j=P?.Tools?.BaseUrl,M=P?.Tools?.PreprocessUrl;r==="script"&&(g.engine=y,g.canvas=h);const le=void 0;try{let pe;const L=await $.bind(new Proxy({},{get(Q,X){return X==="scene"?pe:X==="engine"?y:X==="canvas"?h:globalThis[X]},set(Q,X,W){return X==="scene"?(pe=W,!0):(globalThis[X]=W,!0)}}))(y,h);return L!=null&&(pe=L),le?.(),pe}finally{r==="script"&&(g.engine=_,g.canvas=I),P?.Tools&&(P.Tools.BaseUrl=j,P.Tools.PreprocessUrl=M)}};return r==="script"&&(a=G$(e,t,n),s=q$(a),m=s.sceneFunctionName,d=s.createEngineFn?"snippet":"default"),{createEngine:f,createScene:p,getCreateEngineSource:()=>d,getSceneFunctionName:()=>m,initializeMetadataAsync:async()=>{r==="script"&&await l()}}}async function FE(e,t){const r=await wE(e,Zl);return await VE(r,e,t)}async function VE(e,t,r){const i={name:e.name??"",description:e.description??"",tags:e.tags??""},n=e.jsonPayload??e.payload??"{}";let o;try{o=JSON.parse(n)}catch{return{snippetId:t,type:"unknown",metadata:i,rawPayload:n}}const a=TE(o),s=r?.moduleFormat??"esm";switch(a){case"playground":{const c=jE(o,t,i),u=c.manifest?.entry?.replace(/\.tsx?$/i,".js")??"index.js",l=Object.keys(c.files).some(y=>/\.tsx?$/i.test(y));let d;if(l){const y=(async(h,$)=>await NE(h,$));d=await EE(c.files,y)}else d={...c.files};const m=LE(d,u,s,c.engineType,c.manifest?.imports);await m.initializeMetadataAsync();const f=ME(c.files);return{...c,jsFiles:d,executedCode:d[u]??"",moduleFormat:s,createEngine:m.createEngine,createScene:m.createScene,createEngineSource:m.getCreateEngineSource(),sceneFunctionName:m.getSceneFunctionName(),runtimeFeatures:f,initializeRuntimeAsync:async y=>await ZE(f,y)}}case"unknown":return{snippetId:t,type:"unknown",metadata:i,rawPayload:o};default:return xE(o,a,t,i)}}function GE(e,t){return JSON.stringify({payload:e,name:t?.metadata?.name??"",description:t?.metadata?.description??"",tags:t?.metadata?.tags??""})}function qE(e){const t=e.type,r=typeof e.data=="string"?e.data:JSON.stringify(e.data);return JSON.stringify({[t]:r})}function JE(e){const t=e.indexOf("#");return t>=0?e.slice(0,t):e}async function KE(e,t){let r;r=qE(e);const i=GE(r,t),n=(t?.snippetUrl??Zl).replace(/\/+$/,""),o=t?.snippetId?JE(t.snippetId):"",a=o?`${n}/${o}`:n,s=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:i});if(!s.ok)throw new Error(`Failed to save snippet: ${s.status} ${s.statusText}`);const c=await s.json(),u=c.id,l=String(c.version??"0");let d=u;return l&&l!=="0"&&(d+="#"+l),{snippetId:d,id:u,version:l}}const ze=new tr,tt=new iE({serverName:"NGE MCP Session Server",documentKind:"node-geometry",managerUnavailableMessage:"Geometry graph manager is not available",getDocument:(e,t)=>e.exportJSON(t.name),setDocument:(e,t,r)=>{const i=e.importJSON(t.name,r);return i&&i!=="OK"?i:void 0}},{defaultPort:3001,statusTitle:"NGE MCP Session Server"});function un(e){const t=tt.getSessionIdForName(e);t&&tt.notifySessionUpdate(t)}function J$(e,t){const r=ze.importJSON(e,t);return r==="OK"&&un(e),r}const ye=new ON({name:"babylonjs-node-geometry",version:"1.0.0"},{instructions:["You build Babylon.js procedural geometry via Node Geometry graphs. Workflow: create_geometry \u2192 add blocks (source geometry blocks like BoxBlock, then transform/math blocks, then GeometryOutputBlock) \u2192 connect ports \u2192 validate_geometry \u2192 export_geometry_json.","Every geometry needs a GeometryOutputBlock. Use get_block_type_info to discover ports before connecting.","Output JSON can be consumed by the Scene MCP via add_node_geometry_mesh."].join(" ")});ye.registerResource("block-catalog","nge://block-catalog",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:`# NGE Block Catalog
109
+ ${A$()}`}]})),ye.registerResource("enums","nge://enums",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:oE()}]})),ye.registerResource("concepts","nge://concepts",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:aE}]})),ye.registerPrompt("create-box-geometry",{description:"Step-by-step instructions for building a simple box geometry"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a simple box geometry. Steps:","1. create_geometry with name 'MyBox'","2. Add BoxBlock named 'box'","3. Add GeometryOutputBlock named 'output'","4. Connect box.geometry \u2192 output.geometry","5. validate_geometry, then export_geometry_json"].join(`
110
+ `)}}]})),ye.registerPrompt("create-scattered-instances",{description:"Step-by-step instructions for scattering instances of a geometry on the faces of another"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a geometry that scatters small spheres on the faces of a plane.","NOTE: PlaneBlock and SphereBlock inputs (size, diameter) are INPUT PORTS, not scalar properties.","To set them, add a GeometryInputBlock (type Float) with the desired value and connect it.","","Steps:","1. create_geometry with name 'ScatteredSpheres'","2. Add PlaneBlock named 'basePlane'","3. Add GeometryInputBlock named 'planeSize' with type 'Float', value 10","4. Connect planeSize.output \u2192 basePlane.size","5. Add SphereBlock named 'smallSphere'","6. Add GeometryInputBlock named 'sphereDiam' with type 'Float', value 0.2","7. Connect sphereDiam.output \u2192 smallSphere.diameter","8. Add GeometryInputBlock named 'count' with type 'Int', value 100","9. Add InstantiateOnFacesBlock named 'scatter'","10. Connect basePlane.geometry \u2192 scatter.geometry","11. Connect smallSphere.geometry \u2192 scatter.instance","12. Connect count.output \u2192 scatter.count","13. Add GeometryOutputBlock named 'output'","14. Connect scatter.output \u2192 output.geometry","15. validate_geometry, then export_geometry_json"].join(`
111
+ `)}}]})),ye.registerPrompt("create-deformed-terrain",{description:"Create a subdivided plane deformed by noise to produce terrain-like geometry"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a terrain by deforming a subdivided grid with noise.","NOTE: Input values (subdivisions, scale) are INPUT PORTS fed by GeometryInputBlocks.","","Steps:","1. create_geometry 'Terrain'","2. Add GridBlock named 'grid'","3. Add GeometryInputBlock 'gridSize' type Float, value 20 \u2192 connect to grid.size","4. Add GeometryInputBlock 'subdivs' type Int, value 64 \u2192 connect to grid.subdivisions","5. Add SetPositionsBlock named 'setPos'","6. Connect grid.geometry \u2192 setPos.geometry","7. Add Positions contextual input: GeometryInputBlock 'positions' contextualValue 'Positions' (Vector3)","8. Add NoiseSampleBlock named 'noise'","9. Connect positions.output \u2192 noise.position","10. Add GeometryInputBlock 'noiseScale' type Float, value 0.15 \u2192 noise.amplitude","11. Add VectorConverterBlock (or compose) to turn noise.output (Float) into a Y-offset Vector3:"," a. Add GeometryInputBlock 'zero' type Float, value 0"," b. Add CreateVector3Block 'offset' \u2014 connect zero\u2192x, noise.output\u2192y, zero\u2192z","12. Add AddBlock 'displaced' \u2014 connect positions\u2192left, offset\u2192right","13. Connect displaced.output \u2192 setPos.positions","14. Add ComputeNormalsBlock 'normals' \u2014 connect setPos.output \u2192 normals.geometry","15. Add GeometryOutputBlock 'output' \u2014 connect normals.output \u2192 output.geometry","16. validate_geometry, then export_geometry_json"].join(`
112
+ `)}}]})),ye.registerTool("create_geometry",{description:"Create a new empty Node Geometry graph in memory. This is always the first step.",inputSchema:{name:k().describe("Unique name for the geometry (e.g. 'MyTerrain', 'TreeGenerator')"),comment:k().optional().describe("An optional description of what this geometry does")}},async({name:e,comment:t})=>{ze.createGeometry(e,t);const r=await tt.startAsync(ze),i=tt.createSession(e),n=tt.getSessionUrl(i,r);return{content:[{type:"text",text:`Created geometry "${e}". Now add blocks with add_block, connect them with connect_blocks, then export with export_geometry_json.
113
+
114
+ MCP Session URL: ${n}`}]}}),ye.registerTool("get_session_url",{description:"Get or create a live-session URL for a geometry. The URL can be pasted into the Node Geometry Editor MCP session panel.",inputSchema:{geometryName:k().describe("Name of the geometry")}},async({geometryName:e})=>{if(!ze.listGeometries().includes(e))return Zt(`Geometry "${e}" not found.`);const r=await tt.startAsync(ze),i=tt.createSession(e),n=tt.getSessionUrl(i,r);return Yt(`MCP Session URL: ${n}`)}),ye.registerTool("start_session",{description:"Start a live session for an existing geometry. If a session already exists for this geometry, returns the existing URL.",inputSchema:{geometryName:k().describe("Name of the geometry")}},async({geometryName:e})=>{if(!ze.listGeometries().includes(e))return Zt(`Geometry "${e}" not found.`);const r=await tt.startAsync(ze),i=tt.createSession(e),n=tt.getSessionUrl(i,r);return Yt(`MCP Session URL: ${n}`)}),ye.registerTool("close_session",{description:"Close a live session for a geometry. Disconnects all SSE subscribers in the editor and removes the session. The geometry itself is NOT deleted.",inputSchema:{geometryName:k().describe("Name of the geometry whose session to close")}},async({geometryName:e})=>tt.closeSessionForName(e)?Yt(`Session for "${e}" closed. The editor will disconnect.`):Yt(`No active session for "${e}".`)),ye.registerTool("stop_session_server",{description:"Stop the live MCP editor session server started by this MCP process. This closes all active sessions, disconnects editors, and releases the port."},async()=>(await tt.stopAsync(),Yt("MCP session server stopped. Any connected editors have been disconnected."))),ye.registerTool("delete_geometry",{description:"Delete a geometry graph from memory.",inputSchema:{name:k().describe("Name of the geometry to delete")}},async({name:e})=>(tt.closeSessionForName(e),{content:[{type:"text",text:ze.deleteGeometry(e)?`Deleted "${e}".`:`Geometry "${e}" not found.`}]})),ye.registerTool("clear_all",{description:"Remove all geometry graphs from memory, resetting the server to a clean state."},async()=>{const e=ze.listGeometries();for(const t of e)tt.closeSessionForName(t);return ze.clearAll(),{content:[{type:"text",text:e.length>0?`Cleared ${e.length} geometry(s): ${e.join(", ")}`:"Nothing to clear \u2014 memory was already empty."}]}}),ye.registerTool("list_geometries",{description:"List all geometry graphs currently in memory."},async()=>{const e=ze.listGeometries();return{content:[{type:"text",text:e.length>0?`Geometries in memory:
115
115
  ${e.map(t=>` \u2022 ${t}`).join(`
116
- `)}`:"No geometries in memory."}]}}),ge.registerTool("add_block",{description:"Add a new block to a geometry graph. Returns the block's id for use in connect_blocks.",inputSchema:{geometryName:k().describe("Name of the geometry to add the block to"),blockType:k().describe("The block type from the registry (e.g. 'BoxBlock', 'GeometryInputBlock', 'MergeGeometryBlock', 'SetPositionsBlock', 'InstantiateOnFacesBlock', etc.). Use list_block_types to see all."),name:k().optional().describe("Human-friendly name for this block instance (e.g. 'myBox', 'positions')"),properties:ve(k(),_e()).optional().describe("Key-value properties to set on the block. For GeometryInputBlock: type (Int/Float/Vector2/Vector3/Vector4/Matrix), contextualValue (None/Positions/Normals/UV/VertexID/FaceID/etc.), value (the constant value), min/max (number). For MathBlock: operation (MathBlockOperations: 0=Add/1=Subtract/2=Multiply/3=Divide/4=Max/5=Min). For BooleanGeometryBlock: operation (BooleanGeometryOperations: 0=Intersect/1=Subtract/2=Union). For GeometryTrigonometryBlock: operation (GeometryTrigonometryBlockOperations: 0=Cos/1=Sin/2=Abs/3=Exp/4=Round.../19=Fract/20=Exp2). For ConditionBlock: test (ConditionBlockTests: 0=Equal/1=NotEqual/2=LessThan...). Many blocks support evaluateContext (boolean) for per-vertex evaluation.")}},async({geometryName:e,blockType:t,name:r,properties:i})=>{const n=Pe.addBlock(e,t,r,i);if(typeof n=="string")return{content:[{type:"text",text:`Error: ${n}`}],isError:!0};rn(e);const o=[`Added block [${n.block.id}] "${n.block.name}" (${t}). Use this id (${n.block.id}) to connect it.`];return n.warnings&&o.push("","Warnings:",...n.warnings),{content:[{type:"text",text:o.join(`
117
- `)}]}}),ge.registerTool("add_blocks_batch",{description:"Add multiple blocks at once. More efficient than calling add_block repeatedly. Returns all created block ids.",inputSchema:{geometryName:k().describe("Name of the geometry"),blocks:se(R({blockType:k().describe("Block type name"),blockName:k().optional().describe("Instance name for the block"),name:k().optional().describe("Instance name (alias for blockName)"),properties:ve(k(),_e()).optional().describe("Block properties")})).describe("Array of blocks to add")}},async({geometryName:e,blocks:t})=>{const r=[];let i=!1;for(const n of t){const o=n.blockName??n.name,a=Pe.addBlock(e,n.blockType,o,n.properties);if(typeof a=="string")r.push(`Error adding ${n.blockType}: ${a}`);else{i=!0;let s=`[${a.block.id}] ${a.block.name} (${n.blockType})`;a.warnings&&(s+=`
116
+ `)}`:"No geometries in memory."}]}}),ye.registerTool("add_block",{description:"Add a new block to a geometry graph. Returns the block's id for use in connect_blocks.",inputSchema:{geometryName:k().describe("Name of the geometry to add the block to"),blockType:k().describe("The block type from the registry (e.g. 'BoxBlock', 'GeometryInputBlock', 'MergeGeometryBlock', 'SetPositionsBlock', 'InstantiateOnFacesBlock', etc.). Use list_block_types to see all."),name:k().optional().describe("Human-friendly name for this block instance (e.g. 'myBox', 'positions')"),properties:$e(k(),be()).optional().describe("Key-value properties to set on the block. For GeometryInputBlock: type (Int/Float/Vector2/Vector3/Vector4/Matrix), contextualValue (None/Positions/Normals/UV/VertexID/FaceID/etc.), value (the constant value), min/max (number). For MathBlock: operation (MathBlockOperations: 0=Add/1=Subtract/2=Multiply/3=Divide/4=Max/5=Min). For BooleanGeometryBlock: operation (BooleanGeometryOperations: 0=Intersect/1=Subtract/2=Union). For GeometryTrigonometryBlock: operation (GeometryTrigonometryBlockOperations: 0=Cos/1=Sin/2=Abs/3=Exp/4=Round.../19=Fract/20=Exp2). For ConditionBlock: test (ConditionBlockTests: 0=Equal/1=NotEqual/2=LessThan...). Many blocks support evaluateContext (boolean) for per-vertex evaluation.")}},async({geometryName:e,blockType:t,name:r,properties:i})=>{const n=ze.addBlock(e,t,r,i);if(typeof n=="string")return{content:[{type:"text",text:`Error: ${n}`}],isError:!0};un(e);const o=[`Added block [${n.block.id}] "${n.block.name}" (${t}). Use this id (${n.block.id}) to connect it.`];return n.warnings&&o.push("","Warnings:",...n.warnings),{content:[{type:"text",text:o.join(`
117
+ `)}]}}),ye.registerTool("add_blocks_batch",{description:"Add multiple blocks at once. More efficient than calling add_block repeatedly. Returns all created block ids.",inputSchema:{geometryName:k().describe("Name of the geometry"),blocks:se(R({blockType:k().describe("Block type name"),blockName:k().optional().describe("Instance name for the block"),name:k().optional().describe("Instance name (alias for blockName)"),properties:$e(k(),be()).optional().describe("Block properties")})).describe("Array of blocks to add")}},async({geometryName:e,blocks:t})=>{const r=[];let i=!1;for(const n of t){const o=n.blockName??n.name,a=ze.addBlock(e,n.blockType,o,n.properties);if(typeof a=="string")r.push(`Error adding ${n.blockType}: ${a}`);else{i=!0;let s=`[${a.block.id}] ${a.block.name} (${n.blockType})`;a.warnings&&(s+=`
118
118
  \u26A0 ${a.warnings.join(`
119
- \u26A0 `)}`),r.push(s)}}return i&&rn(e),{content:[{type:"text",text:`Added blocks:
119
+ \u26A0 `)}`),r.push(s)}}return i&&un(e),{content:[{type:"text",text:`Added blocks:
120
120
  ${r.join(`
121
- `)}`}]}}),ge.registerTool("remove_block",{description:"Remove a block from a geometry graph. Also removes any connections to/from it.",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ae().describe("The block id to remove")}},async({geometryName:e,blockId:t})=>{const r=Pe.removeBlock(e,t);return r==="OK"&&rn(e),{content:[{type:"text",text:r==="OK"?`Removed block ${t}.`:`Error: ${r}`}],isError:r!=="OK"}}),ge.registerTool("set_block_properties",{description:"Set or update properties on an existing block (e.g. change a GeometryInputBlock value, set a MathBlock operation, toggle evaluateContext).",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ae().describe("The block id to modify"),properties:ve(k(),_e()).describe("Key-value properties to set. Same keys as add_block's properties parameter.")}},async({geometryName:e,blockId:t,properties:r})=>{const i=Pe.setBlockProperties(e,t,r);return i==="OK"&&rn(e),{content:[{type:"text",text:i==="OK"?`Updated block ${t}.`:`Error: ${i}`}],isError:i!=="OK"}}),ge.registerTool("connect_blocks",{description:"Connect an output of one block to an input of another block. Data flows from source output \u2192 target input.",inputSchema:{geometryName:k().describe("Name of the geometry"),sourceBlockId:ae().describe("Block id to connect FROM (the one with the output)"),outputName:k().describe("Name of the output on the source block (e.g. 'output', 'geometry', 'matrix')"),targetBlockId:ae().describe("Block id to connect TO (the one with the input)"),inputName:k().describe("Name of the input on the target block (e.g. 'geometry', 'value', 'positions')")}},async({geometryName:e,sourceBlockId:t,outputName:r,targetBlockId:i,inputName:n})=>{const o=Pe.connectBlocks(e,t,r,i,n);return o==="OK"&&rn(e),{content:[{type:"text",text:o==="OK"?`Connected [${t}].${r} \u2192 [${i}].${n}`:`Error: ${o}`}],isError:o!=="OK"}}),ge.registerTool("connect_blocks_batch",{description:"Connect multiple block pairs at once. More efficient than calling connect_blocks repeatedly.",inputSchema:{geometryName:k().describe("Name of the geometry"),connections:se(R({sourceBlockId:ae(),outputName:k(),targetBlockId:ae(),inputName:k()})).describe("Array of connections to make")}},async({geometryName:e,connections:t})=>{const r=[];let i=!1;for(const n of t){const o=Pe.connectBlocks(e,n.sourceBlockId,n.outputName,n.targetBlockId,n.inputName);o==="OK"?(i=!0,r.push(`[${n.sourceBlockId}].${n.outputName} \u2192 [${n.targetBlockId}].${n.inputName}`)):r.push(`Error: ${o}`)}return i&&rn(e),{content:[{type:"text",text:`Connections:
121
+ `)}`}]}}),ye.registerTool("remove_block",{description:"Remove a block from a geometry graph. Also removes any connections to/from it.",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ae().describe("The block id to remove")}},async({geometryName:e,blockId:t})=>{const r=ze.removeBlock(e,t);return r==="OK"&&un(e),{content:[{type:"text",text:r==="OK"?`Removed block ${t}.`:`Error: ${r}`}],isError:r!=="OK"}}),ye.registerTool("set_block_properties",{description:"Set or update properties on an existing block (e.g. change a GeometryInputBlock value, set a MathBlock operation, toggle evaluateContext).",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ae().describe("The block id to modify"),properties:$e(k(),be()).describe("Key-value properties to set. Same keys as add_block's properties parameter.")}},async({geometryName:e,blockId:t,properties:r})=>{const i=ze.setBlockProperties(e,t,r);return i==="OK"&&un(e),{content:[{type:"text",text:i==="OK"?`Updated block ${t}.`:`Error: ${i}`}],isError:i!=="OK"}}),ye.registerTool("connect_blocks",{description:"Connect an output of one block to an input of another block. Data flows from source output \u2192 target input.",inputSchema:{geometryName:k().describe("Name of the geometry"),sourceBlockId:ae().describe("Block id to connect FROM (the one with the output)"),outputName:k().describe("Name of the output on the source block (e.g. 'output', 'geometry', 'matrix')"),targetBlockId:ae().describe("Block id to connect TO (the one with the input)"),inputName:k().describe("Name of the input on the target block (e.g. 'geometry', 'value', 'positions')")}},async({geometryName:e,sourceBlockId:t,outputName:r,targetBlockId:i,inputName:n})=>{const o=ze.connectBlocks(e,t,r,i,n);return o==="OK"&&un(e),{content:[{type:"text",text:o==="OK"?`Connected [${t}].${r} \u2192 [${i}].${n}`:`Error: ${o}`}],isError:o!=="OK"}}),ye.registerTool("connect_blocks_batch",{description:"Connect multiple block pairs at once. More efficient than calling connect_blocks repeatedly.",inputSchema:{geometryName:k().describe("Name of the geometry"),connections:se(R({sourceBlockId:ae(),outputName:k(),targetBlockId:ae(),inputName:k()})).describe("Array of connections to make")}},async({geometryName:e,connections:t})=>{const r=[];let i=!1;for(const n of t){const o=ze.connectBlocks(e,n.sourceBlockId,n.outputName,n.targetBlockId,n.inputName);o==="OK"?(i=!0,r.push(`[${n.sourceBlockId}].${n.outputName} \u2192 [${n.targetBlockId}].${n.inputName}`)):r.push(`Error: ${o}`)}return i&&un(e),{content:[{type:"text",text:`Connections:
122
122
  ${r.join(`
123
- `)}`}]}}),ge.registerTool("disconnect_input",{description:"Disconnect an input on a block (remove an existing connection).",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ae().describe("The block id whose input to disconnect"),inputName:k().describe("Name of the input to disconnect")}},async({geometryName:e,blockId:t,inputName:r})=>{const i=Pe.disconnectInput(e,t,r);return i==="OK"&&rn(e),{content:[{type:"text",text:i==="OK"?`Disconnected [${t}].${r}`:`Error: ${i}`}],isError:i!=="OK"}}),ge.registerTool("describe_geometry",{description:"Get a human-readable description of the current state of a geometry graph, including all blocks and their connections.",inputSchema:{geometryName:k().describe("Name of the geometry to describe")}},async({geometryName:e})=>({content:[{type:"text",text:Pe.describeGeometry(e)}]})),ge.registerTool("describe_block",{description:"Get detailed information about a specific block instance in a geometry, including its connections and properties.",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ae().describe("The block id to describe")}},async({geometryName:e,blockId:t})=>({content:[{type:"text",text:Pe.describeBlock(e,t)}]})),ge.registerTool("list_block_types",{description:"List all available NGE block types, grouped by category. Use this to discover which blocks you can add.",inputSchema:{category:k().optional().describe("Optionally filter by category (Source, Geometry, Set, Instance, Math, Vector, Color, Matrix, Converter, Texture, Utility, Teleport, Input, Output, Mapping)")}},async({category:e})=>{if(e){const t=Object.entries(Wn).filter(([,r])=>r.category.toLowerCase()===e.toLowerCase()).map(([r,i])=>` ${r}: ${i.description.split(".")[0]}`).join(`
123
+ `)}`}]}}),ye.registerTool("disconnect_input",{description:"Disconnect an input on a block (remove an existing connection).",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ae().describe("The block id whose input to disconnect"),inputName:k().describe("Name of the input to disconnect")}},async({geometryName:e,blockId:t,inputName:r})=>{const i=ze.disconnectInput(e,t,r);return i==="OK"&&un(e),{content:[{type:"text",text:i==="OK"?`Disconnected [${t}].${r}`:`Error: ${i}`}],isError:i!=="OK"}}),ye.registerTool("describe_geometry",{description:"Get a human-readable description of the current state of a geometry graph, including all blocks and their connections.",inputSchema:{geometryName:k().describe("Name of the geometry to describe")}},async({geometryName:e})=>({content:[{type:"text",text:ze.describeGeometry(e)}]})),ye.registerTool("describe_block",{description:"Get detailed information about a specific block instance in a geometry, including its connections and properties.",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ae().describe("The block id to describe")}},async({geometryName:e,blockId:t})=>({content:[{type:"text",text:ze.describeBlock(e,t)}]})),ye.registerTool("list_block_types",{description:"List all available NGE block types, grouped by category. Use this to discover which blocks you can add.",inputSchema:{category:k().optional().describe("Optionally filter by category (Source, Geometry, Set, Instance, Math, Vector, Color, Matrix, Converter, Texture, Utility, Teleport, Input, Output, Mapping)")}},async({category:e})=>{if(e){const t=Object.entries(zt).filter(([,r])=>r.category.toLowerCase()===e.toLowerCase()).map(([r,i])=>` ${r}: ${i.description.split(".")[0]}`).join(`
124
124
  `);return{content:[{type:"text",text:t.length>0?`## ${e} Blocks
125
- ${t}`:`No blocks found in category "${e}".`}]}}return{content:[{type:"text",text:N$()}]}}),ge.registerTool("get_block_type_info",{description:"Get detailed info about a specific block type \u2014 its inputs, outputs, properties, and description.",inputSchema:{blockType:k().describe("The block type name (e.g. 'BoxBlock', 'GeometryInputBlock', 'InstantiateOnFacesBlock')")}},async({blockType:e})=>{const t=YN(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}`),r.push(`Category: ${t.category}`),r.push(`Description: ${t.description}`),r.push(`
125
+ ${t}`:`No blocks found in category "${e}".`}]}}return{content:[{type:"text",text:A$()}]}}),ye.registerTool("get_block_type_info",{description:"Get detailed info about a specific block type \u2014 its inputs, outputs, properties, and description.",inputSchema:{blockType:k().describe("The block type name (e.g. 'BoxBlock', 'GeometryInputBlock', 'InstantiateOnFacesBlock')")}},async({blockType:e})=>{const t=sE(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}`),r.push(`Category: ${t.category}`),r.push(`Description: ${t.description}`),r.push(`
126
126
  ### Inputs:`),t.inputs.length===0&&r.push(" (none)");for(const i of t.inputs){const n=i.isOptional?" (optional)":" (required)";r.push(` \u2022 ${i.name}: ${i.type}${n}`)}r.push(`
127
127
  ### Outputs:`),t.outputs.length===0&&r.push(" (none)");for(const i of t.outputs)r.push(` \u2022 ${i.name}: ${i.type}`);if(t.properties){r.push(`
128
128
  ### Configurable Properties:`);for(const[i,n]of Object.entries(t.properties))r.push(` \u2022 ${i}: ${n}`)}return{content:[{type:"text",text:r.join(`
129
- `)}]}}),ge.registerTool("validate_geometry",{description:"Run validation checks on a geometry graph. Reports missing output block, unconnected required inputs, and broken references.",inputSchema:{geometryName:k().describe("Name of the geometry to validate")}},async({geometryName:e})=>{const t=Pe.validateGeometry(e);return{content:[{type:"text",text:t.join(`
130
- `)}],isError:t.some(r=>r.startsWith("ERROR"))}}),ge.registerTool("export_geometry_json",{description:"Export the geometry graph as NGE-compatible JSON. This JSON can be loaded in the Babylon.js Node Geometry Editor or via NodeGeometry.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:{geometryName:k().describe("Name of the geometry to export"),outputFile:jN(go)}},async({geometryName:e,outputFile:t})=>PN({jsonText:Pe.exportJSON(e),outputFile:t,missingMessage:`Geometry "${e}" not found.`,fileLabel:"NGE JSON"})),ge.registerTool("import_geometry_json",{description:"Import an existing NGE JSON into memory for editing. You can then modify blocks, connections, etc. Provide either the inline json string OR a jsonFile path (not both).",inputSchema:{geometryName:k().describe("Name to give the imported geometry"),json:CN(go,"The NGE JSON string to import"),jsonFile:AN(go,"Absolute path to a file containing the NGE JSON to import (alternative to inline json)")}},async({geometryName:e,json:t,jsonFile:r})=>NN({json:t,jsonFile:r,fileDescription:"NGE JSON file",importJson:i=>Z$(e,i),describeImported:()=>Pe.describeGeometry(e)})),ge.registerTool("import_from_snippet",{description:'Import a Node Geometry from the Babylon.js Snippet Server by its snippet ID. The snippet is fetched, validated as a nodeGeometry type, and loaded into memory for editing. Snippet IDs look like "ABC123" or "ABC123#2" (with revision).',inputSchema:{geometryName:k().describe("Name to give the imported geometry in memory"),snippetId:UN(go)}},async({geometryName:e,snippetId:t})=>await DN({snippetId:t,loadSnippet:async r=>await zE(r),createResponse:r=>EN({snippetId:t,snippetResult:r,expectedType:"nodeGeometry",importJson:i=>Z$(e,i),describeImported:()=>Pe.describeGeometry(e),successMessage:`Imported snippet "${t}" as "${e}" successfully.`})})),ge.registerTool("get_snippet_url",{description:"Generate a URL that opens the geometry in the online Babylon.js Node Geometry Editor. The JSON is encoded in the URL fragment.",inputSchema:{geometryName:k().describe("Name of the geometry")}},async({geometryName:e})=>{const t=Pe.exportJSON(e);return t?{content:[{type:"text",text:`Open this geometry in the NGE editor:
129
+ `)}]}}),ye.registerTool("validate_geometry",{description:"Run validation checks on a geometry graph. Reports missing output block, unconnected required inputs, and broken references.",inputSchema:{geometryName:k().describe("Name of the geometry to validate")}},async({geometryName:e})=>{const t=ze.validateGeometry(e);return{content:[{type:"text",text:t.join(`
130
+ `)}],isError:t.some(r=>r.startsWith("ERROR"))}}),ye.registerTool("export_geometry_json",{description:"Export the geometry graph as NGE-compatible JSON. This JSON can be loaded in the Babylon.js Node Geometry Editor or via NodeGeometry.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:{geometryName:k().describe("Name of the geometry to export"),outputFile:FN(_o)}},async({geometryName:e,outputFile:t})=>BN({jsonText:ze.exportJSON(e),outputFile:t,missingMessage:`Geometry "${e}" not found.`,fileLabel:"NGE JSON"})),ye.registerTool("import_geometry_json",{description:"Import an existing NGE JSON into memory for editing. You can then modify blocks, connections, etc. Provide either the inline json string OR a jsonFile path (not both).",inputSchema:{geometryName:k().describe("Name to give the imported geometry"),json:VN(_o,"The NGE JSON string to import"),jsonFile:GN(_o,"Absolute path to a file containing the NGE JSON to import (alternative to inline json)")}},async({geometryName:e,json:t,jsonFile:r})=>MN({json:t,jsonFile:r,fileDescription:"NGE JSON file",importJson:i=>J$(e,i),describeImported:()=>ze.describeGeometry(e)})),ye.registerTool("import_from_snippet",{description:'Import a Node Geometry from the Babylon.js Snippet Server by its snippet ID. The snippet is fetched, validated as a nodeGeometry type, and loaded into memory for editing. Snippet IDs look like "ABC123" or "ABC123#2" (with revision).',inputSchema:{geometryName:k().describe("Name to give the imported geometry in memory"),snippetId:qN(_o)}},async({geometryName:e,snippetId:t})=>await LN({snippetId:t,loadSnippet:async r=>await FE(r),createResponse:r=>ZN({snippetId:t,snippetResult:r,expectedType:"nodeGeometry",importJson:i=>J$(e,i),describeImported:()=>ze.describeGeometry(e),successMessage:`Imported snippet "${t}" as "${e}" successfully.`})})),ye.registerTool("get_snippet_url",{description:"Generate a URL that opens the geometry in the online Babylon.js Node Geometry Editor. The JSON is encoded in the URL fragment.",inputSchema:{geometryName:k().describe("Name of the geometry")}},async({geometryName:e})=>{const t=ze.exportJSON(e);return t?{content:[{type:"text",text:`Open this geometry in the NGE editor:
131
131
  ${`https://nge.babylonjs.com/#${Buffer.from(t).toString("base64")}`}
132
132
 
133
- Note: For very large geometries, use the snippet server instead.`}]}:{content:[{type:"text",text:`Geometry "${e}" not found.`}],isError:!0}}),ge.registerTool("save_snippet",{description:"Save the geometry to the Babylon.js Snippet Server and return the snippet ID and version. The snippet can later be loaded in the Node Geometry Editor via its snippet ID, or fetched with import_from_snippet. To create a new revision of an existing snippet, pass the previous snippetId.",inputSchema:{geometryName:k().describe("Name of the geometry to save"),snippetId:k().optional().describe('Optional existing snippet ID to create a new revision of (e.g. "ABC123" or "ABC123#1")'),name:k().optional().describe("Optional human-readable title for the snippet"),description:k().optional().describe("Optional description"),tags:k().optional().describe("Optional comma-separated tags")}},async({geometryName:e,snippetId:t,name:r,description:i,tags:n})=>{const o=Pe.exportJSON(e);if(!o)return{content:[{type:"text",text:`Geometry "${e}" not found.`}],isError:!0};try{const a=await EE({type:"nodeGeometry",data:z$({jsonText:o,jsonLabel:"NGE JSON"})},{snippetId:t,metadata:{name:r,description:i,tags:n}});return{content:[{type:"text",text:`Saved geometry "${e}" to snippet server.
133
+ Note: For very large geometries, use the snippet server instead.`}]}:{content:[{type:"text",text:`Geometry "${e}" not found.`}],isError:!0}}),ye.registerTool("save_snippet",{description:"Save the geometry to the Babylon.js Snippet Server and return the snippet ID and version. The snippet can later be loaded in the Node Geometry Editor via its snippet ID, or fetched with import_from_snippet. To create a new revision of an existing snippet, pass the previous snippetId.",inputSchema:{geometryName:k().describe("Name of the geometry to save"),snippetId:k().optional().describe('Optional existing snippet ID to create a new revision of (e.g. "ABC123" or "ABC123#1")'),name:k().optional().describe("Optional human-readable title for the snippet"),description:k().optional().describe("Optional description"),tags:k().optional().describe("Optional comma-separated tags")}},async({geometryName:e,snippetId:t,name:r,description:i,tags:n})=>{const o=ze.exportJSON(e);if(!o)return{content:[{type:"text",text:`Geometry "${e}" not found.`}],isError:!0};try{const a=await KE({type:"nodeGeometry",data:RN({jsonText:o,jsonLabel:"NGE JSON"})},{snippetId:t,metadata:{name:r,description:i,tags:n}});return{content:[{type:"text",text:`Saved geometry "${e}" to snippet server.
134
134
 
135
135
  Snippet ID: ${a.id}
136
136
  Version: ${a.version}
137
137
  Full ID: ${a.snippetId}
138
138
 
139
- Load in NGE editor: https://nge.babylonjs.com/#${a.snippetId}`}]}}catch(a){return{content:[{type:"text",text:`Error saving snippet: ${a.message}`}],isError:!0}}});async function DE(){const e=new IN;await ge.connect(e),console.error("Babylon.js Node Geometry Editor MCP Server running on stdio")}try{await DE()}catch(e){console.error("Fatal error:",e),process.exit(1)}const M$=()=>{Ye.stopAsync(),process.exit(0)};process.on("SIGINT",M$),process.on("SIGTERM",M$);
139
+ Load in NGE editor: https://nge.babylonjs.com/#${a.snippetId}`}]}}catch(a){return{content:[{type:"text",text:`Error saving snippet: ${a.message}`}],isError:!0}}});async function HE(){const e=new CN;await ye.connect(e),console.error("Babylon.js Node Geometry Editor MCP Server running on stdio")}try{await HE()}catch(e){console.error("Fatal error:",e),process.exit(1)}const K$=()=>{tt.stopAsync(),process.exit(0)};process.on("SIGINT",K$),process.on("SIGTERM",K$);
140
140
  //# sourceMappingURL=nge-mcp-server.js.map