anilist-mcp-server 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- var J$=Object.defineProperty;var qt=(e,t)=>{for(var n in t)J$(e,n,{get:t[n],enumerable:!0})};var G$=Object.create,Sa=Object.defineProperty,B$=Object.getOwnPropertyDescriptor,K$=Object.getOwnPropertyNames,W$=Object.getPrototypeOf,Y$=Object.prototype.hasOwnProperty,K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Hg=(e,t)=>{let n={};for(var o in e)Sa(n,o,{get:e[o],enumerable:!0});return t&&Sa(n,Symbol.toStringTag,{value:"Module"}),n},X$=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=K$(t),i=0,a=r.length,s;i<a;i++)s=r[i],!Y$.call(e,s)&&s!==n&&Sa(e,s,{get:(c=>t[c]).bind(null,s),enumerable:!(o=B$(t,s))||o.enumerable});return e},ba=(e,t,n)=>(n=e!=null?G$(W$(e)):{},X$(t||!e||!e.__esModule?Sa(n,"default",{value:e,enumerable:!0}):n,e));var l={};qt(l,{$brand:()=>Pu,$input:()=>Wm,$output:()=>Km,NEVER:()=>Lo,TimePrecision:()=>ep,ZodAny:()=>Df,ZodArray:()=>Ff,ZodBase64:()=>Bs,ZodBase64URL:()=>Ks,ZodBigInt:()=>Ln,ZodBigIntFormat:()=>Xs,ZodBoolean:()=>qn,ZodCIDRv4:()=>Js,ZodCIDRv6:()=>Gs,ZodCUID:()=>Ms,ZodCUID2:()=>Ds,ZodCatch:()=>uh,ZodCodec:()=>fi,ZodCustom:()=>hi,ZodCustomStringFormat:()=>An,ZodDate:()=>ui,ZodDefault:()=>oh,ZodDiscriminatedUnion:()=>Jf,ZodE164:()=>Ws,ZodEmail:()=>As,ZodEmoji:()=>qs,ZodEnum:()=>jn,ZodError:()=>PR,ZodExactOptional:()=>th,ZodFile:()=>Qf,ZodFirstPartyTypeKind:()=>$h,ZodFunction:()=>_h,ZodGUID:()=>ai,ZodIPv4:()=>Fs,ZodIPv6:()=>Hs,ZodISODate:()=>Ps,ZodISODateTime:()=>Ts,ZodISODuration:()=>xs,ZodISOTime:()=>Es,ZodIntersection:()=>Gf,ZodIssueCode:()=>zh,ZodJWT:()=>Ys,ZodKSUID:()=>Zs,ZodLazy:()=>vh,ZodLiteral:()=>Xf,ZodMAC:()=>Cf,ZodMap:()=>Wf,ZodNaN:()=>mh,ZodNanoID:()=>Ls,ZodNever:()=>Vf,ZodNonOptional:()=>nc,ZodNull:()=>Mf,ZodNullable:()=>nh,ZodNumber:()=>Cn,ZodNumberFormat:()=>Mr,ZodObject:()=>di,ZodOptional:()=>rc,ZodPipe:()=>pi,ZodPrefault:()=>ah,ZodPreprocess:()=>ph,ZodPromise:()=>yh,ZodReadonly:()=>fh,ZodRealError:()=>ut,ZodRecord:()=>xn,ZodSet:()=>Yf,ZodString:()=>Nn,ZodStringFormat:()=>Ee,ZodSuccess:()=>lh,ZodSymbol:()=>qf,ZodTemplateLiteral:()=>gh,ZodTransform:()=>eh,ZodTuple:()=>Bf,ZodType:()=>be,ZodULID:()=>Us,ZodURL:()=>li,ZodUUID:()=>Nt,ZodUndefined:()=>Lf,ZodUnion:()=>mi,ZodUnknown:()=>Uf,ZodVoid:()=>Zf,ZodXID:()=>Vs,ZodXor:()=>Hf,_ZodString:()=>Os,_default:()=>ih,_function:()=>I_,any:()=>Qs,array:()=>O,base64:()=>Hy,base64url:()=>Jy,bigint:()=>n_,boolean:()=>te,catch:()=>dh,check:()=>k_,cidrv4:()=>Zy,cidrv6:()=>Fy,clone:()=>ot,codec:()=>$_,coerce:()=>gi,config:()=>Ce,core:()=>Dt,cuid:()=>Ay,cuid2:()=>Cy,custom:()=>T_,date:()=>l_,decode:()=>Pf,decodeAsync:()=>xf,describe:()=>P_,discriminatedUnion:()=>sr,e164:()=>Gy,email:()=>Cs,emoji:()=>Ny,encode:()=>Tf,encodeAsync:()=>Ef,endsWith:()=>$n,enum:()=>he,exactOptional:()=>rh,file:()=>y_,flattenError:()=>Jo,float32:()=>Qy,float64:()=>e_,formatError:()=>Go,fromJSONSchema:()=>A_,function:()=>I_,getErrorMap:()=>jR,globalRegistry:()=>Ye,gt:()=>xt,gte:()=>at,guid:()=>ky,hash:()=>Xy,hex:()=>Yy,hostname:()=>Wy,httpUrl:()=>jy,includes:()=>Sn,instanceof:()=>x_,int:()=>js,int32:()=>t_,int64:()=>o_,intersection:()=>Rt,invertCodec:()=>z_,ipv4:()=>Dy,ipv6:()=>Vy,iso:()=>ht,json:()=>N_,jwt:()=>By,keyof:()=>u_,ksuid:()=>My,lazy:()=>cr,length:()=>qr,literal:()=>A,locales:()=>ti,looseObject:()=>ce,looseRecord:()=>f_,lowercase:()=>yn,lt:()=>Et,lte:()=>ft,mac:()=>Uy,map:()=>h_,maxLength:()=>Cr,maxSize:()=>nr,meta:()=>E_,mime:()=>zn,minLength:()=>Mt,minSize:()=>jt,multipleOf:()=>rr,nan:()=>b_,nanoid:()=>Oy,nativeEnum:()=>v_,negative:()=>_s,never:()=>ec,nonnegative:()=>bs,nonoptional:()=>ch,nonpositive:()=>Ss,normalize:()=>wn,null:()=>Ot,nullable:()=>si,nullish:()=>__,number:()=>F,object:()=>T,optional:()=>ae,overwrite:()=>wt,parse:()=>Rf,parseAsync:()=>If,partialRecord:()=>p_,pipe:()=>Ns,positive:()=>ys,prefault:()=>sh,preprocess:()=>Ut,prettifyError:()=>Vu,promise:()=>R_,property:()=>$s,readonly:()=>hh,record:()=>Q,refine:()=>Sh,regex:()=>vn,regexes:()=>pt,registry:()=>Ya,safeDecode:()=>Nf,safeDecodeAsync:()=>Af,safeEncode:()=>jf,safeEncodeAsync:()=>Of,safeParse:()=>ii,safeParseAsync:()=>kf,set:()=>g_,setErrorMap:()=>xR,size:()=>Ar,slugify:()=>Tn,startsWith:()=>bn,strictObject:()=>d_,string:()=>m,stringFormat:()=>Ky,stringbool:()=>j_,success:()=>S_,superRefine:()=>bh,symbol:()=>a_,templateLiteral:()=>w_,toJSONSchema:()=>Lr,toLowerCase:()=>In,toUpperCase:()=>kn,transform:()=>tc,treeifyError:()=>Uu,trim:()=>Rn,tuple:()=>Kf,uint32:()=>r_,uint64:()=>i_,ulid:()=>qy,undefined:()=>s_,union:()=>oe,unknown:()=>ie,uppercase:()=>_n,url:()=>On,util:()=>B,uuid:()=>Ty,uuidv4:()=>Py,uuidv6:()=>Ey,uuidv7:()=>xy,void:()=>c_,xid:()=>Ly,xor:()=>m_});var Dt={};qt(Dt,{$ZodAny:()=>vm,$ZodArray:()=>$m,$ZodAsyncError:()=>zt,$ZodBase64:()=>sm,$ZodBase64URL:()=>cm,$ZodBigInt:()=>Za,$ZodBigIntFormat:()=>pm,$ZodBoolean:()=>Yo,$ZodCIDRv4:()=>om,$ZodCIDRv6:()=>im,$ZodCUID:()=>Jd,$ZodCUID2:()=>Gd,$ZodCatch:()=>Dm,$ZodCheck:()=>xe,$ZodCheckBigIntFormat:()=>$d,$ZodCheckEndsWith:()=>Od,$ZodCheckGreaterThan:()=>qa,$ZodCheckIncludes:()=>jd,$ZodCheckLengthEquals:()=>Td,$ZodCheckLessThan:()=>Ca,$ZodCheckLowerCase:()=>Ed,$ZodCheckMaxLength:()=>Id,$ZodCheckMaxSize:()=>zd,$ZodCheckMimeType:()=>Cd,$ZodCheckMinLength:()=>kd,$ZodCheckMinSize:()=>wd,$ZodCheckMultipleOf:()=>Sd,$ZodCheckNumberFormat:()=>bd,$ZodCheckOverwrite:()=>qd,$ZodCheckProperty:()=>Ad,$ZodCheckRegex:()=>Pd,$ZodCheckSizeEquals:()=>Rd,$ZodCheckStartsWith:()=>Nd,$ZodCheckStringFormat:()=>hn,$ZodCheckUpperCase:()=>xd,$ZodCodec:()=>Qo,$ZodCustom:()=>Bm,$ZodCustomStringFormat:()=>dm,$ZodDate:()=>bm,$ZodDefault:()=>Cm,$ZodDiscriminatedUnion:()=>Rm,$ZodE164:()=>lm,$ZodEmail:()=>Vd,$ZodEmoji:()=>Fd,$ZodEncodeError:()=>Yt,$ZodEnum:()=>Em,$ZodError:()=>Ho,$ZodExactOptional:()=>Om,$ZodFile:()=>jm,$ZodFunction:()=>Hm,$ZodGUID:()=>Dd,$ZodIPv4:()=>tm,$ZodIPv6:()=>rm,$ZodISODate:()=>Xd,$ZodISODateTime:()=>Yd,$ZodISODuration:()=>em,$ZodISOTime:()=>Qd,$ZodIntersection:()=>Im,$ZodJWT:()=>um,$ZodKSUID:()=>Wd,$ZodLazy:()=>Gm,$ZodLiteral:()=>xm,$ZodMAC:()=>nm,$ZodMap:()=>Tm,$ZodNaN:()=>Um,$ZodNanoID:()=>Hd,$ZodNever:()=>_m,$ZodNonOptional:()=>Lm,$ZodNull:()=>gm,$ZodNullable:()=>Am,$ZodNumber:()=>Va,$ZodNumberFormat:()=>mm,$ZodObject:()=>$v,$ZodObjectJIT:()=>zm,$ZodOptional:()=>Ha,$ZodPipe:()=>Ja,$ZodPrefault:()=>qm,$ZodPreprocess:()=>Vm,$ZodPromise:()=>Jm,$ZodReadonly:()=>Zm,$ZodRealError:()=>lt,$ZodRecord:()=>km,$ZodRegistry:()=>Wa,$ZodSet:()=>Pm,$ZodString:()=>Or,$ZodStringFormat:()=>Pe,$ZodSuccess:()=>Mm,$ZodSymbol:()=>fm,$ZodTemplateLiteral:()=>Fm,$ZodTransform:()=>Nm,$ZodTuple:()=>Fa,$ZodType:()=>ge,$ZodULID:()=>Bd,$ZodURL:()=>Zd,$ZodUUID:()=>Ud,$ZodUndefined:()=>hm,$ZodUnion:()=>Xo,$ZodUnknown:()=>ym,$ZodVoid:()=>Sm,$ZodXID:()=>Kd,$ZodXor:()=>wm,$brand:()=>Pu,$constructor:()=>N,$input:()=>Wm,$output:()=>Km,Doc:()=>Wo,JSONSchema:()=>wy,JSONSchemaGenerator:()=>Is,NEVER:()=>Lo,TimePrecision:()=>ep,_any:()=>bp,_array:()=>Tp,_base64:()=>fs,_base64url:()=>hs,_bigint:()=>fp,_boolean:()=>mp,_catch:()=>bR,_check:()=>zy,_cidrv4:()=>ms,_cidrv6:()=>ps,_coercedBigint:()=>hp,_coercedBoolean:()=>pp,_coercedDate:()=>Ip,_coercedNumber:()=>ap,_coercedString:()=>Xm,_cuid:()=>is,_cuid2:()=>as,_custom:()=>Ep,_date:()=>Rp,_decode:()=>ka,_decodeAsync:()=>Pa,_default:()=>yR,_discriminatedUnion:()=>aR,_e164:()=>gs,_email:()=>Xa,_emoji:()=>ns,_encode:()=>Ia,_encodeAsync:()=>Ta,_endsWith:()=>$n,_enum:()=>mR,_file:()=>Pp,_float32:()=>cp,_float64:()=>lp,_gt:()=>xt,_gte:()=>at,_guid:()=>ri,_includes:()=>Sn,_int:()=>sp,_int32:()=>up,_int64:()=>gp,_intersection:()=>sR,_ipv4:()=>us,_ipv6:()=>ds,_isoDate:()=>rp,_isoDateTime:()=>tp,_isoDuration:()=>op,_isoTime:()=>np,_jwt:()=>vs,_ksuid:()=>ls,_lazy:()=>RR,_length:()=>qr,_literal:()=>fR,_lowercase:()=>yn,_lt:()=>Et,_lte:()=>ft,_mac:()=>Qm,_map:()=>uR,_max:()=>ft,_maxLength:()=>Cr,_maxSize:()=>nr,_mime:()=>zn,_min:()=>at,_minLength:()=>Mt,_minSize:()=>jt,_multipleOf:()=>rr,_nan:()=>kp,_nanoid:()=>os,_nativeEnum:()=>pR,_negative:()=>_s,_never:()=>zp,_nonnegative:()=>bs,_nonoptional:()=>_R,_nonpositive:()=>Ss,_normalize:()=>wn,_null:()=>Sp,_nullable:()=>vR,_number:()=>ip,_optional:()=>gR,_overwrite:()=>wt,_parse:()=>dn,_parseAsync:()=>mn,_pipe:()=>$R,_positive:()=>ys,_promise:()=>IR,_property:()=>$s,_readonly:()=>zR,_record:()=>lR,_refine:()=>xp,_regex:()=>vn,_safeDecode:()=>xa,_safeDecodeAsync:()=>Na,_safeEncode:()=>Ea,_safeEncodeAsync:()=>ja,_safeParse:()=>pn,_safeParseAsync:()=>fn,_set:()=>dR,_size:()=>Ar,_slugify:()=>Tn,_startsWith:()=>bn,_string:()=>Ym,_stringFormat:()=>Pn,_stringbool:()=>Ap,_success:()=>SR,_superRefine:()=>jp,_symbol:()=>yp,_templateLiteral:()=>wR,_toLowerCase:()=>In,_toUpperCase:()=>kn,_transform:()=>hR,_trim:()=>Rn,_tuple:()=>cR,_uint32:()=>dp,_uint64:()=>vp,_ulid:()=>ss,_undefined:()=>_p,_union:()=>oR,_unknown:()=>$p,_uppercase:()=>_n,_url:()=>ni,_uuid:()=>Qa,_uuidv4:()=>es,_uuidv6:()=>ts,_uuidv7:()=>rs,_void:()=>wp,_xid:()=>cs,_xor:()=>iR,clone:()=>ot,config:()=>Ce,createStandardJSONSchemaMethod:()=>En,createToJSONSchemaMethod:()=>Cp,decode:()=>Iz,decodeAsync:()=>Tz,describe:()=>Np,encode:()=>Rz,encodeAsync:()=>kz,extractDefs:()=>ir,finalize:()=>ar,flattenError:()=>Jo,formatError:()=>Go,globalConfig:()=>xr,globalRegistry:()=>Ye,initializeContext:()=>or,isValidBase64:()=>am,isValidBase64URL:()=>yv,isValidJWT:()=>_v,locales:()=>ti,meta:()=>Op,parse:()=>wa,parseAsync:()=>Ra,prettifyError:()=>Vu,process:()=>Te,regexes:()=>pt,registry:()=>Ya,safeDecode:()=>Ez,safeDecodeAsync:()=>jz,safeEncode:()=>Pz,safeEncodeAsync:()=>xz,safeParse:()=>Zu,safeParseAsync:()=>Fu,toDotPath:()=>Yg,toJSONSchema:()=>Lr,treeifyError:()=>Uu,util:()=>B,version:()=>Ld});var Jg,Lo=Object.freeze({status:"aborted"});function N(e,t,n){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let h=d[p];h in s||(s[h]=u[h].bind(s))}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let u=n?.Parent?new i:this;o(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Pu=Symbol("zod_brand"),zt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Yt=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Jg=globalThis).__zod_globalConfig??(Jg.__zod_globalConfig={});var xr=globalThis.__zod_globalConfig;function Ce(e){return e&&Object.assign(xr,e),xr}var B={};qt(B,{BIGINT_FORMAT_RANGES:()=>Mu,Class:()=>xu,NUMBER_FORMAT_RANGES:()=>Lu,aborted:()=>tr,allowsEval:()=>Ou,assert:()=>nz,assertEqual:()=>Q$,assertIs:()=>tz,assertNever:()=>rz,assertNotEqual:()=>ez,assignProp:()=>Qt,base64ToUint8Array:()=>Bg,base64urlToUint8Array:()=>Sz,cached:()=>ln,captureStackTrace:()=>za,cleanEnum:()=>_z,cleanRegex:()=>Uo,clone:()=>ot,cloneDef:()=>iz,createTransparentProxy:()=>dz,defineLazy:()=>we,esc:()=>$a,escapeRegex:()=>_t,explicitlyAborted:()=>Du,extend:()=>fz,finalizeIssue:()=>it,floatSafeRemainder:()=>ju,getElementAtPath:()=>az,getEnumValues:()=>Do,getLengthableOrigin:()=>Fo,getParsedType:()=>uz,getSizableOrigin:()=>Zo,hexToUint8Array:()=>$z,isObject:()=>jr,isPlainObject:()=>er,issue:()=>un,joinValues:()=>L,jsonStringifyReplacer:()=>cn,merge:()=>gz,mergeDefs:()=>Lt,normalizeParams:()=>W,nullish:()=>Xt,numKeys:()=>lz,objectClone:()=>oz,omit:()=>pz,optionalKeys:()=>qu,parsedType:()=>G,partial:()=>vz,pick:()=>mz,prefixIssues:()=>ct,primitiveTypes:()=>Cu,promiseAllObject:()=>sz,propertyKeyTypes:()=>Vo,randomString:()=>cz,required:()=>yz,safeExtend:()=>hz,shallowClone:()=>Au,slugify:()=>Nu,stringifyPrimitive:()=>J,uint8ArrayToBase64:()=>Kg,uint8ArrayToBase64url:()=>bz,uint8ArrayToHex:()=>zz,unwrapMessage:()=>Mo});function Q$(e){return e}function ez(e){return e}function tz(e){}function rz(e){throw new Error("Unexpected value in exhaustive check")}function nz(e){}function Do(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function L(e,t="|"){return e.map(n=>J(n)).join(t)}function cn(e,t){return typeof t=="bigint"?t.toString():t}function ln(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Xt(e){return e==null}function Uo(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function ju(e,t){let n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o)<r?0:n-o}var Gg=Symbol("evaluating");function we(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==Gg)return o===void 0&&(o=Gg,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function oz(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Qt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Lt(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function iz(e){return Lt(e._zod.def)}function az(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}function sz(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function cz(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}function $a(e){return JSON.stringify(e)}function Nu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var za="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ou=ln(()=>{if(xr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function er(e){if(jr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(jr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Au(e){return er(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function lz(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var uz=e=>{let 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}`)}},Vo=new Set(["string","number","symbol"]),Cu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function _t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ot(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function W(e){let 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 dz(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function J(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function qu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Lu={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]},Mu={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function mz(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Lt(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=n.shape[s])}return Qt(this,"shape",a),a},checks:[]});return ot(e,i)}function pz(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Lt(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return Qt(this,"shape",a),a},checks:[]});return ot(e,i)}function fz(e,t){if(!er(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Lt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Qt(this,"shape",i),i}});return ot(e,r)}function hz(e,t){if(!er(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Lt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Qt(this,"shape",o),o}});return ot(e,n)}function gz(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=Lt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Qt(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ot(e,n)}function vz(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Lt(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(n)for(let u in n){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)c[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return Qt(this,"shape",c),c},checks:[]});return ot(t,a)}function yz(e,t,n){let o=Lt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)i[a]=new e({type:"nonoptional",innerType:r[a]});return Qt(this,"shape",i),i}});return ot(t,o)}function tr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Du(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ct(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Mo(e){return typeof e=="string"?e:e?.message}function it(e,t,n){let o=e.message?e.message:Mo(e.inst?._zod.def?.error?.(e))??Mo(t?.error?.(e))??Mo(n.customError?.(e))??Mo(n.localeError?.(e))??"Invalid input",{inst:r,continue:i,input:a,...s}=e;return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=a),s}function Zo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Fo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function G(e){let 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";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function un(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}function _z(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Bg(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function Kg(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Sz(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Bg(t+n)}function bz(e){return Kg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $z(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function zz(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var xu=class{constructor(...t){}};var Wg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,cn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ho=N("$ZodError",Wg),lt=N("$ZodError",Wg,{Parent:Error});function Jo(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function Go(e,t=n=>n.message){let n={_errors:[]},o=(r,i=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)n._errors.push(t(a));else{let c=n,u=0;for(;u<s.length;){let d=s[u];u===s.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(a))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}}};return o(e),n}function Uu(e,t=n=>n.message){let n={errors:[]},o=(r,i=[])=>{var a,s;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{let u=[...i,...c.path];if(u.length===0){n.errors.push(t(c));continue}let d=n,p=0;for(;p<u.length;){let h=u[p],S=p===u.length-1;typeof h=="string"?(d.properties??(d.properties={}),(a=d.properties)[h]??(a[h]={errors:[]}),d=d.properties[h]):(d.items??(d.items=[]),(s=d.items)[h]??(s[h]={errors:[]}),d=d.items[h]),S&&d.errors.push(t(c)),p++}}};return o(e),n}function Yg(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Vu(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Yg(o.path)}`);return t.join(`
3
- `)}var dn=e=>(t,n,o,r)=>{let i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new zt;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>it(c,i,Ce())));throw za(s,r?.callee),s}return a.value},wa=dn(lt),mn=e=>async(t,n,o,r)=>{let i=o?{...o,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>it(c,i,Ce())));throw za(s,r?.callee),s}return a.value},Ra=mn(lt),pn=e=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new zt;return i.issues.length?{success:!1,error:new(e??Ho)(i.issues.map(a=>it(a,r,Ce())))}:{success:!0,data:i.value}},Zu=pn(lt),fn=e=>async(t,n,o)=>{let r=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>it(a,r,Ce())))}:{success:!0,data:i.value}},Fu=fn(lt),Ia=e=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return dn(e)(t,n,r)},Rz=Ia(lt),ka=e=>(t,n,o)=>dn(e)(t,n,o),Iz=ka(lt),Ta=e=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return mn(e)(t,n,r)},kz=Ta(lt),Pa=e=>async(t,n,o)=>mn(e)(t,n,o),Tz=Pa(lt),Ea=e=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return pn(e)(t,n,r)},Pz=Ea(lt),xa=e=>(t,n,o)=>pn(e)(t,n,o),Ez=xa(lt),ja=e=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return fn(e)(t,n,r)},xz=ja(lt),Na=e=>async(t,n,o)=>fn(e)(t,n,o),jz=Na(lt);var pt={};qt(pt,{base64:()=>ad,base64url:()=>Oa,bigint:()=>pd,boolean:()=>hd,browserEmail:()=>Dz,cidrv4:()=>od,cidrv6:()=>id,cuid:()=>Hu,cuid2:()=>Ju,date:()=>ld,datetime:()=>dd,domain:()=>Zz,duration:()=>Yu,e164:()=>cd,email:()=>Qu,emoji:()=>ed,extendedDuration:()=>Nz,guid:()=>Xu,hex:()=>Fz,hostname:()=>Vz,html5Email:()=>qz,httpProtocol:()=>sd,idnEmail:()=>Mz,integer:()=>fd,ipv4:()=>td,ipv6:()=>rd,ksuid:()=>Ku,lowercase:()=>yd,mac:()=>nd,md5_base64:()=>Jz,md5_base64url:()=>Gz,md5_hex:()=>Hz,nanoid:()=>Wu,null:()=>gd,number:()=>Aa,rfc5322Email:()=>Lz,sha1_base64:()=>Kz,sha1_base64url:()=>Wz,sha1_hex:()=>Bz,sha256_base64:()=>Xz,sha256_base64url:()=>Qz,sha256_hex:()=>Yz,sha384_base64:()=>tw,sha384_base64url:()=>rw,sha384_hex:()=>ew,sha512_base64:()=>ow,sha512_base64url:()=>iw,sha512_hex:()=>nw,string:()=>md,time:()=>ud,ulid:()=>Gu,undefined:()=>vd,unicodeEmail:()=>Xg,uppercase:()=>_d,uuid:()=>Nr,uuid4:()=>Oz,uuid6:()=>Az,uuid7:()=>Cz,xid:()=>Bu});var Hu=/^[cC][0-9a-z]{6,}$/,Ju=/^[0-9a-z]+$/,Gu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Bu=/^[0-9a-vA-V]{20}$/,Ku=/^[A-Za-z0-9]{27}$/,Wu=/^[a-zA-Z0-9_-]{21}$/,Yu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Nz=/^[-+]?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)?)??$/,Xu=/^([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})$/,Nr=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)$/,Oz=Nr(4),Az=Nr(6),Cz=Nr(7),Qu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qz=/^[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])?)*$/,Lz=/^(([^<>()\[\]\\.,;:\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,}))$/,Xg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Mz=Xg,Dz=/^[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])?)*$/,Uz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ed(){return new RegExp(Uz,"u")}var td=/^(?:(?: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])$/,rd=/^(([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}|:))$/,nd=e=>{let t=_t(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},od=/^((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])$/,id=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ad=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Oa=/^[A-Za-z0-9_-]*$/,Vz=/^(?=.{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])?)*\.?$/,Zz=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,sd=/^https?$/,cd=/^\+[1-9]\d{6,14}$/,Qg="(?:(?:\\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])))",ld=new RegExp(`^${Qg}$`);function ev(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ud(e){return new RegExp(`^${ev(e)}$`)}function dd(e){let t=ev({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Qg}T(?:${o})$`)}var md=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pd=/^-?\d+n?$/,fd=/^-?\d+$/,Aa=/^-?\d+(?:\.\d+)?$/,hd=/^(?:true|false)$/i,gd=/^null$/i;var vd=/^undefined$/i;var yd=/^[^A-Z]*$/,_d=/^[^a-z]*$/,Fz=/^[0-9a-fA-F]*$/;function Bo(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ko(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Hz=/^[0-9a-fA-F]{32}$/,Jz=Bo(22,"=="),Gz=Ko(22),Bz=/^[0-9a-fA-F]{40}$/,Kz=Bo(27,"="),Wz=Ko(27),Yz=/^[0-9a-fA-F]{64}$/,Xz=Bo(43,"="),Qz=Ko(43),ew=/^[0-9a-fA-F]{96}$/,tw=Bo(64,""),rw=Ko(64),nw=/^[0-9a-fA-F]{128}$/,ow=Bo(86,"=="),iw=Ko(86);var xe=N("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),rv={number:"number",bigint:"bigint",object:"date"},Ca=N("$ZodCheckLessThan",(e,t)=>{xe.init(e,t);let n=rv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qa=N("$ZodCheckGreaterThan",(e,t)=>{xe.init(e,t);let n=rv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Sd=N("$ZodCheckMultipleOf",(e,t)=>{xe.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):ju(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),bd=N("$ZodCheckNumberFormat",(e,t)=>{xe.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=Lu[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=i,n&&(s.pattern=fd)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,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:o,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:o,inclusive:!0,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),$d=N("$ZodCheckBigIntFormat",(e,t)=>{xe.init(e,t);let[n,o]=Mu[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),zd=N("$ZodCheckMaxSize",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Xt(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:Zo(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wd=N("$ZodCheckMinSize",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Xt(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:Zo(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Rd=N("$ZodCheckSizeEquals",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Xt(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:Zo(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Id=N("$ZodCheckMaxLength",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Xt(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let a=Fo(r);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),kd=N("$ZodCheckMinLength",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Xt(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let a=Fo(r);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Td=N("$ZodCheckLengthEquals",(e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Xt(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let a=Fo(r),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),hn=N("$ZodCheckStringFormat",(e,t)=>{var n,o;xe.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Pd=N("$ZodCheckRegex",(e,t)=>{hn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ed=N("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=yd),hn.init(e,t)}),xd=N("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_d),hn.init(e,t)}),jd=N("$ZodCheckIncludes",(e,t)=>{xe.init(e,t);let n=_t(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Nd=N("$ZodCheckStartsWith",(e,t)=>{xe.init(e,t);let n=new RegExp(`^${_t(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Od=N("$ZodCheckEndsWith",(e,t)=>{xe.init(e,t);let n=new RegExp(`.*${_t(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function tv(e,t,n){e.issues.length&&t.issues.push(...ct(n,e.issues))}var Ad=N("$ZodCheckProperty",(e,t)=>{xe.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>tv(r,n,t.property));tv(o,n,t.property)}}),Cd=N("$ZodCheckMimeType",(e,t)=>{xe.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),qd=N("$ZodCheckOverwrite",(e,t)=>{xe.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var Wo=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
2
+ var G$=Object.defineProperty;var Lt=(e,t)=>{for(var n in t)G$(e,n,{get:t[n],enumerable:!0})};var B$=Object.create,ba=Object.defineProperty,K$=Object.getOwnPropertyDescriptor,W$=Object.getOwnPropertyNames,Y$=Object.getPrototypeOf,X$=Object.prototype.hasOwnProperty,K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jg=(e,t)=>{let n={};for(var o in e)ba(n,o,{get:e[o],enumerable:!0});return t&&ba(n,Symbol.toStringTag,{value:"Module"}),n},Q$=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=W$(t),i=0,a=r.length,s;i<a;i++)s=r[i],!X$.call(e,s)&&s!==n&&ba(e,s,{get:(c=>t[c]).bind(null,s),enumerable:!(o=K$(t,s))||o.enumerable});return e},$a=(e,t,n)=>(n=e!=null?B$(Y$(e)):{},Q$(t||!e||!e.__esModule?ba(n,"default",{value:e,enumerable:!0}):n,e));var u={};Lt(u,{$brand:()=>Eu,$input:()=>Ym,$output:()=>Wm,NEVER:()=>Mo,TimePrecision:()=>tp,ZodAny:()=>Uf,ZodArray:()=>Hf,ZodBase64:()=>Ks,ZodBase64URL:()=>Ws,ZodBigInt:()=>Mn,ZodBigIntFormat:()=>Qs,ZodBoolean:()=>Ln,ZodCIDRv4:()=>Gs,ZodCIDRv6:()=>Bs,ZodCUID:()=>Ds,ZodCUID2:()=>Us,ZodCatch:()=>dh,ZodCodec:()=>hi,ZodCustom:()=>gi,ZodCustomStringFormat:()=>Cn,ZodDate:()=>di,ZodDefault:()=>ih,ZodDiscriminatedUnion:()=>Gf,ZodE164:()=>Ys,ZodEmail:()=>Cs,ZodEmoji:()=>Ls,ZodEnum:()=>Nn,ZodError:()=>ER,ZodExactOptional:()=>rh,ZodFile:()=>eh,ZodFirstPartyTypeKind:()=>zh,ZodFunction:()=>Sh,ZodGUID:()=>si,ZodIPv4:()=>Hs,ZodIPv6:()=>Js,ZodISODate:()=>Es,ZodISODateTime:()=>Ps,ZodISODuration:()=>js,ZodISOTime:()=>xs,ZodIntersection:()=>Bf,ZodIssueCode:()=>wh,ZodJWT:()=>Xs,ZodKSUID:()=>Fs,ZodLazy:()=>yh,ZodLiteral:()=>Qf,ZodMAC:()=>qf,ZodMap:()=>Yf,ZodNaN:()=>ph,ZodNanoID:()=>Ms,ZodNever:()=>Zf,ZodNonOptional:()=>oc,ZodNull:()=>Df,ZodNullable:()=>oh,ZodNumber:()=>qn,ZodNumberFormat:()=>Dr,ZodObject:()=>mi,ZodOptional:()=>nc,ZodPipe:()=>fi,ZodPrefault:()=>sh,ZodPreprocess:()=>fh,ZodPromise:()=>_h,ZodReadonly:()=>hh,ZodRealError:()=>dt,ZodRecord:()=>jn,ZodSet:()=>Xf,ZodString:()=>On,ZodStringFormat:()=>xe,ZodSuccess:()=>uh,ZodSymbol:()=>Lf,ZodTemplateLiteral:()=>vh,ZodTransform:()=>th,ZodTuple:()=>Kf,ZodType:()=>be,ZodULID:()=>Vs,ZodURL:()=>ui,ZodUUID:()=>Ot,ZodUndefined:()=>Mf,ZodUnion:()=>pi,ZodUnknown:()=>Vf,ZodVoid:()=>Ff,ZodXID:()=>Zs,ZodXor:()=>Jf,_ZodString:()=>As,_default:()=>ah,_function:()=>k_,any:()=>ec,array:()=>O,base64:()=>Jy,base64url:()=>Gy,bigint:()=>o_,boolean:()=>te,catch:()=>mh,check:()=>T_,cidrv4:()=>Fy,cidrv6:()=>Hy,clone:()=>it,codec:()=>z_,coerce:()=>vi,config:()=>qe,core:()=>Ut,cuid:()=>Cy,cuid2:()=>qy,custom:()=>P_,date:()=>u_,decode:()=>Ef,decodeAsync:()=>jf,describe:()=>E_,discriminatedUnion:()=>cr,e164:()=>By,email:()=>qs,emoji:()=>Oy,encode:()=>Pf,encodeAsync:()=>xf,endsWith:()=>zn,enum:()=>he,exactOptional:()=>nh,file:()=>__,flattenError:()=>Go,float32:()=>e_,float64:()=>t_,formatError:()=>Bo,fromJSONSchema:()=>C_,function:()=>k_,getErrorMap:()=>NR,globalRegistry:()=>Xe,gt:()=>jt,gte:()=>st,guid:()=>Ty,hash:()=>Qy,hex:()=>Xy,hostname:()=>Yy,httpUrl:()=>Ny,includes:()=>bn,instanceof:()=>j_,int:()=>Ns,int32:()=>r_,int64:()=>i_,intersection:()=>It,invertCodec:()=>w_,ipv4:()=>Uy,ipv6:()=>Zy,iso:()=>gt,json:()=>O_,jwt:()=>Ky,keyof:()=>d_,ksuid:()=>Dy,lazy:()=>lr,length:()=>Lr,literal:()=>A,locales:()=>ri,looseObject:()=>ce,looseRecord:()=>h_,lowercase:()=>_n,lt:()=>xt,lte:()=>ht,mac:()=>Vy,map:()=>g_,maxLength:()=>qr,maxSize:()=>or,meta:()=>x_,mime:()=>wn,minLength:()=>Dt,minSize:()=>Nt,multipleOf:()=>nr,nan:()=>$_,nanoid:()=>Ay,nativeEnum:()=>y_,negative:()=>Ss,never:()=>tc,nonnegative:()=>$s,nonoptional:()=>lh,nonpositive:()=>bs,normalize:()=>Rn,null:()=>At,nullable:()=>ci,nullish:()=>S_,number:()=>F,object:()=>T,optional:()=>ae,overwrite:()=>Rt,parse:()=>If,parseAsync:()=>kf,partialRecord:()=>f_,pipe:()=>Os,positive:()=>_s,prefault:()=>ch,preprocess:()=>Vt,prettifyError:()=>Zu,promise:()=>I_,property:()=>zs,readonly:()=>gh,record:()=>Q,refine:()=>bh,regex:()=>yn,regexes:()=>ft,registry:()=>Xa,safeDecode:()=>Of,safeDecodeAsync:()=>Cf,safeEncode:()=>Nf,safeEncodeAsync:()=>Af,safeParse:()=>ai,safeParseAsync:()=>Tf,set:()=>v_,setErrorMap:()=>jR,size:()=>Cr,slugify:()=>Pn,startsWith:()=>$n,strictObject:()=>m_,string:()=>m,stringFormat:()=>Wy,stringbool:()=>N_,success:()=>b_,superRefine:()=>$h,symbol:()=>s_,templateLiteral:()=>R_,toJSONSchema:()=>Mr,toLowerCase:()=>kn,toUpperCase:()=>Tn,transform:()=>rc,treeifyError:()=>Vu,trim:()=>In,tuple:()=>Wf,uint32:()=>n_,uint64:()=>a_,ulid:()=>Ly,undefined:()=>c_,union:()=>oe,unknown:()=>ie,uppercase:()=>Sn,url:()=>An,util:()=>B,uuid:()=>Py,uuidv4:()=>Ey,uuidv6:()=>xy,uuidv7:()=>jy,void:()=>l_,xid:()=>My,xor:()=>p_});var Ut={};Lt(Ut,{$ZodAny:()=>ym,$ZodArray:()=>zm,$ZodAsyncError:()=>wt,$ZodBase64:()=>cm,$ZodBase64URL:()=>lm,$ZodBigInt:()=>Fa,$ZodBigIntFormat:()=>fm,$ZodBoolean:()=>Xo,$ZodCIDRv4:()=>im,$ZodCIDRv6:()=>am,$ZodCUID:()=>Gd,$ZodCUID2:()=>Bd,$ZodCatch:()=>Um,$ZodCheck:()=>je,$ZodCheckBigIntFormat:()=>zd,$ZodCheckEndsWith:()=>Ad,$ZodCheckGreaterThan:()=>La,$ZodCheckIncludes:()=>Nd,$ZodCheckLengthEquals:()=>Pd,$ZodCheckLessThan:()=>qa,$ZodCheckLowerCase:()=>xd,$ZodCheckMaxLength:()=>kd,$ZodCheckMaxSize:()=>wd,$ZodCheckMimeType:()=>qd,$ZodCheckMinLength:()=>Td,$ZodCheckMinSize:()=>Rd,$ZodCheckMultipleOf:()=>bd,$ZodCheckNumberFormat:()=>$d,$ZodCheckOverwrite:()=>Ld,$ZodCheckProperty:()=>Cd,$ZodCheckRegex:()=>Ed,$ZodCheckSizeEquals:()=>Id,$ZodCheckStartsWith:()=>Od,$ZodCheckStringFormat:()=>gn,$ZodCheckUpperCase:()=>jd,$ZodCodec:()=>ei,$ZodCustom:()=>Km,$ZodCustomStringFormat:()=>mm,$ZodDate:()=>$m,$ZodDefault:()=>qm,$ZodDiscriminatedUnion:()=>Im,$ZodE164:()=>um,$ZodEmail:()=>Zd,$ZodEmoji:()=>Hd,$ZodEncodeError:()=>Xt,$ZodEnum:()=>xm,$ZodError:()=>Jo,$ZodExactOptional:()=>Am,$ZodFile:()=>Nm,$ZodFunction:()=>Jm,$ZodGUID:()=>Ud,$ZodIPv4:()=>rm,$ZodIPv6:()=>nm,$ZodISODate:()=>Qd,$ZodISODateTime:()=>Xd,$ZodISODuration:()=>tm,$ZodISOTime:()=>em,$ZodIntersection:()=>km,$ZodJWT:()=>dm,$ZodKSUID:()=>Yd,$ZodLazy:()=>Bm,$ZodLiteral:()=>jm,$ZodMAC:()=>om,$ZodMap:()=>Pm,$ZodNaN:()=>Vm,$ZodNanoID:()=>Jd,$ZodNever:()=>Sm,$ZodNonOptional:()=>Mm,$ZodNull:()=>vm,$ZodNullable:()=>Cm,$ZodNumber:()=>Za,$ZodNumberFormat:()=>pm,$ZodObject:()=>zv,$ZodObjectJIT:()=>wm,$ZodOptional:()=>Ja,$ZodPipe:()=>Ga,$ZodPrefault:()=>Lm,$ZodPreprocess:()=>Zm,$ZodPromise:()=>Gm,$ZodReadonly:()=>Fm,$ZodRealError:()=>ut,$ZodRecord:()=>Tm,$ZodRegistry:()=>Ya,$ZodSet:()=>Em,$ZodString:()=>Ar,$ZodStringFormat:()=>Ee,$ZodSuccess:()=>Dm,$ZodSymbol:()=>hm,$ZodTemplateLiteral:()=>Hm,$ZodTransform:()=>Om,$ZodTuple:()=>Ha,$ZodType:()=>ge,$ZodULID:()=>Kd,$ZodURL:()=>Fd,$ZodUUID:()=>Vd,$ZodUndefined:()=>gm,$ZodUnion:()=>Qo,$ZodUnknown:()=>_m,$ZodVoid:()=>bm,$ZodXID:()=>Wd,$ZodXor:()=>Rm,$brand:()=>Eu,$constructor:()=>N,$input:()=>Ym,$output:()=>Wm,Doc:()=>Yo,JSONSchema:()=>Ry,JSONSchemaGenerator:()=>ks,NEVER:()=>Mo,TimePrecision:()=>tp,_any:()=>$p,_array:()=>Pp,_base64:()=>hs,_base64url:()=>gs,_bigint:()=>hp,_boolean:()=>pp,_catch:()=>$R,_check:()=>wy,_cidrv4:()=>ps,_cidrv6:()=>fs,_coercedBigint:()=>gp,_coercedBoolean:()=>fp,_coercedDate:()=>kp,_coercedNumber:()=>sp,_coercedString:()=>Qm,_cuid:()=>as,_cuid2:()=>ss,_custom:()=>xp,_date:()=>Ip,_decode:()=>Ta,_decodeAsync:()=>Ea,_default:()=>_R,_discriminatedUnion:()=>sR,_e164:()=>vs,_email:()=>Qa,_emoji:()=>os,_encode:()=>ka,_encodeAsync:()=>Pa,_endsWith:()=>zn,_enum:()=>pR,_file:()=>Ep,_float32:()=>lp,_float64:()=>up,_gt:()=>jt,_gte:()=>st,_guid:()=>ni,_includes:()=>bn,_int:()=>cp,_int32:()=>dp,_int64:()=>vp,_intersection:()=>cR,_ipv4:()=>ds,_ipv6:()=>ms,_isoDate:()=>np,_isoDateTime:()=>rp,_isoDuration:()=>ip,_isoTime:()=>op,_jwt:()=>ys,_ksuid:()=>us,_lazy:()=>IR,_length:()=>Lr,_literal:()=>hR,_lowercase:()=>_n,_lt:()=>xt,_lte:()=>ht,_mac:()=>ep,_map:()=>dR,_max:()=>ht,_maxLength:()=>qr,_maxSize:()=>or,_mime:()=>wn,_min:()=>st,_minLength:()=>Dt,_minSize:()=>Nt,_multipleOf:()=>nr,_nan:()=>Tp,_nanoid:()=>is,_nativeEnum:()=>fR,_negative:()=>Ss,_never:()=>wp,_nonnegative:()=>$s,_nonoptional:()=>SR,_nonpositive:()=>bs,_normalize:()=>Rn,_null:()=>bp,_nullable:()=>yR,_number:()=>ap,_optional:()=>vR,_overwrite:()=>Rt,_parse:()=>mn,_parseAsync:()=>pn,_pipe:()=>zR,_positive:()=>_s,_promise:()=>kR,_property:()=>zs,_readonly:()=>wR,_record:()=>uR,_refine:()=>jp,_regex:()=>yn,_safeDecode:()=>ja,_safeDecodeAsync:()=>Oa,_safeEncode:()=>xa,_safeEncodeAsync:()=>Na,_safeParse:()=>fn,_safeParseAsync:()=>hn,_set:()=>mR,_size:()=>Cr,_slugify:()=>Pn,_startsWith:()=>$n,_string:()=>Xm,_stringFormat:()=>En,_stringbool:()=>Cp,_success:()=>bR,_superRefine:()=>Np,_symbol:()=>_p,_templateLiteral:()=>RR,_toLowerCase:()=>kn,_toUpperCase:()=>Tn,_transform:()=>gR,_trim:()=>In,_tuple:()=>lR,_uint32:()=>mp,_uint64:()=>yp,_ulid:()=>cs,_undefined:()=>Sp,_union:()=>iR,_unknown:()=>zp,_uppercase:()=>Sn,_url:()=>oi,_uuid:()=>es,_uuidv4:()=>ts,_uuidv6:()=>rs,_uuidv7:()=>ns,_void:()=>Rp,_xid:()=>ls,_xor:()=>aR,clone:()=>it,config:()=>qe,createStandardJSONSchemaMethod:()=>xn,createToJSONSchemaMethod:()=>qp,decode:()=>kz,decodeAsync:()=>Pz,describe:()=>Op,encode:()=>Iz,encodeAsync:()=>Tz,extractDefs:()=>ar,finalize:()=>sr,flattenError:()=>Go,formatError:()=>Bo,globalConfig:()=>jr,globalRegistry:()=>Xe,initializeContext:()=>ir,isValidBase64:()=>sm,isValidBase64URL:()=>_v,isValidJWT:()=>Sv,locales:()=>ri,meta:()=>Ap,parse:()=>Ra,parseAsync:()=>Ia,prettifyError:()=>Zu,process:()=>Pe,regexes:()=>ft,registry:()=>Xa,safeDecode:()=>xz,safeDecodeAsync:()=>Nz,safeEncode:()=>Ez,safeEncodeAsync:()=>jz,safeParse:()=>Fu,safeParseAsync:()=>Hu,toDotPath:()=>Xg,toJSONSchema:()=>Mr,treeifyError:()=>Vu,util:()=>B,version:()=>Md});var Gg,Mo=Object.freeze({status:"aborted"});function N(e,t,n){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let l=a.prototype,d=Object.keys(l);for(let p=0;p<d.length;p++){let h=d[p];h in s||(s[h]=l[h].bind(s))}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=n?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Eu=Symbol("zod_brand"),wt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Xt=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Gg=globalThis).__zod_globalConfig??(Gg.__zod_globalConfig={});var jr=globalThis.__zod_globalConfig;function qe(e){return e&&Object.assign(jr,e),jr}var B={};Lt(B,{BIGINT_FORMAT_RANGES:()=>Du,Class:()=>ju,NUMBER_FORMAT_RANGES:()=>Mu,aborted:()=>rr,allowsEval:()=>Au,assert:()=>oz,assertEqual:()=>ez,assertIs:()=>rz,assertNever:()=>nz,assertNotEqual:()=>tz,assignProp:()=>er,base64ToUint8Array:()=>Kg,base64urlToUint8Array:()=>bz,cached:()=>un,captureStackTrace:()=>wa,cleanEnum:()=>Sz,cleanRegex:()=>Vo,clone:()=>it,cloneDef:()=>az,createTransparentProxy:()=>mz,defineLazy:()=>we,esc:()=>za,escapeRegex:()=>St,explicitlyAborted:()=>Uu,extend:()=>hz,finalizeIssue:()=>at,floatSafeRemainder:()=>Nu,getElementAtPath:()=>sz,getEnumValues:()=>Uo,getLengthableOrigin:()=>Ho,getParsedType:()=>dz,getSizableOrigin:()=>Fo,hexToUint8Array:()=>zz,isObject:()=>Nr,isPlainObject:()=>tr,issue:()=>dn,joinValues:()=>L,jsonStringifyReplacer:()=>ln,merge:()=>vz,mergeDefs:()=>Mt,normalizeParams:()=>W,nullish:()=>Qt,numKeys:()=>uz,objectClone:()=>iz,omit:()=>fz,optionalKeys:()=>Lu,parsedType:()=>G,partial:()=>yz,pick:()=>pz,prefixIssues:()=>lt,primitiveTypes:()=>qu,promiseAllObject:()=>cz,propertyKeyTypes:()=>Zo,randomString:()=>lz,required:()=>_z,safeExtend:()=>gz,shallowClone:()=>Cu,slugify:()=>Ou,stringifyPrimitive:()=>J,uint8ArrayToBase64:()=>Wg,uint8ArrayToBase64url:()=>$z,uint8ArrayToHex:()=>wz,unwrapMessage:()=>Do});function ez(e){return e}function tz(e){return e}function rz(e){}function nz(e){throw new Error("Unexpected value in exhaustive check")}function oz(e){}function Uo(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function L(e,t="|"){return e.map(n=>J(n)).join(t)}function ln(e,t){return typeof t=="bigint"?t.toString():t}function un(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Qt(e){return e==null}function Vo(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Nu(e,t){let n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o)<r?0:n-o}var Bg=Symbol("evaluating");function we(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==Bg)return o===void 0&&(o=Bg,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function iz(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function er(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Mt(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function az(e){return Mt(e._zod.def)}function sz(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}function cz(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function lz(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}function za(e){return JSON.stringify(e)}function Ou(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var wa="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Nr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Au=un(()=>{if(jr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function tr(e){if(Nr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Nr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Cu(e){return tr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function uz(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var dz=e=>{let 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}`)}},Zo=new Set(["string","number","symbol"]),qu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function St(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function it(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function W(e){let 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 mz(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function J(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Lu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Mu={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]},Du={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function pz(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Mt(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=n.shape[s])}return er(this,"shape",a),a},checks:[]});return it(e,i)}function fz(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Mt(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return er(this,"shape",a),a},checks:[]});return it(e,i)}function hz(e,t){if(!tr(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Mt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return er(this,"shape",i),i}});return it(e,r)}function gz(e,t){if(!tr(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Mt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return er(this,"shape",o),o}});return it(e,n)}function vz(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=Mt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return er(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return it(e,n)}function yz(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Mt(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(n)for(let l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(let l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return er(this,"shape",c),c},checks:[]});return it(t,a)}function _z(e,t,n){let o=Mt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)i[a]=new e({type:"nonoptional",innerType:r[a]});return er(this,"shape",i),i}});return it(t,o)}function rr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Uu(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function lt(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Do(e){return typeof e=="string"?e:e?.message}function at(e,t,n){let o=e.message?e.message:Do(e.inst?._zod.def?.error?.(e))??Do(t?.error?.(e))??Do(n.customError?.(e))??Do(n.localeError?.(e))??"Invalid input",{inst:r,continue:i,input:a,...s}=e;return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=a),s}function Fo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ho(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function G(e){let 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";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function dn(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}function Sz(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Kg(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function Wg(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function bz(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Kg(t+n)}function $z(e){return Wg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function zz(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function wz(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var ju=class{constructor(...t){}};var Yg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ln,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Jo=N("$ZodError",Yg),ut=N("$ZodError",Yg,{Parent:Error});function Go(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function Bo(e,t=n=>n.message){let n={_errors:[]},o=(r,i=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)n._errors.push(t(a));else{let c=n,l=0;for(;l<s.length;){let d=s[l];l===s.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(a))):c[d]=c[d]||{_errors:[]},c=c[d],l++}}}};return o(e),n}function Vu(e,t=n=>n.message){let n={errors:[]},o=(r,i=[])=>{var a,s;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>o({issues:l},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{let l=[...i,...c.path];if(l.length===0){n.errors.push(t(c));continue}let d=n,p=0;for(;p<l.length;){let h=l[p],S=p===l.length-1;typeof h=="string"?(d.properties??(d.properties={}),(a=d.properties)[h]??(a[h]={errors:[]}),d=d.properties[h]):(d.items??(d.items=[]),(s=d.items)[h]??(s[h]={errors:[]}),d=d.items[h]),S&&d.errors.push(t(c)),p++}}};return o(e),n}function Xg(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Zu(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Xg(o.path)}`);return t.join(`
3
+ `)}var mn=e=>(t,n,o,r)=>{let i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new wt;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>at(c,i,qe())));throw wa(s,r?.callee),s}return a.value},Ra=mn(ut),pn=e=>async(t,n,o,r)=>{let i=o?{...o,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>at(c,i,qe())));throw wa(s,r?.callee),s}return a.value},Ia=pn(ut),fn=e=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new wt;return i.issues.length?{success:!1,error:new(e??Jo)(i.issues.map(a=>at(a,r,qe())))}:{success:!0,data:i.value}},Fu=fn(ut),hn=e=>async(t,n,o)=>{let r=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>at(a,r,qe())))}:{success:!0,data:i.value}},Hu=hn(ut),ka=e=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return mn(e)(t,n,r)},Iz=ka(ut),Ta=e=>(t,n,o)=>mn(e)(t,n,o),kz=Ta(ut),Pa=e=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return pn(e)(t,n,r)},Tz=Pa(ut),Ea=e=>async(t,n,o)=>pn(e)(t,n,o),Pz=Ea(ut),xa=e=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return fn(e)(t,n,r)},Ez=xa(ut),ja=e=>(t,n,o)=>fn(e)(t,n,o),xz=ja(ut),Na=e=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return hn(e)(t,n,r)},jz=Na(ut),Oa=e=>async(t,n,o)=>hn(e)(t,n,o),Nz=Oa(ut);var ft={};Lt(ft,{base64:()=>sd,base64url:()=>Aa,bigint:()=>fd,boolean:()=>gd,browserEmail:()=>Uz,cidrv4:()=>id,cidrv6:()=>ad,cuid:()=>Ju,cuid2:()=>Gu,date:()=>ud,datetime:()=>md,domain:()=>Fz,duration:()=>Xu,e164:()=>ld,email:()=>ed,emoji:()=>td,extendedDuration:()=>Oz,guid:()=>Qu,hex:()=>Hz,hostname:()=>Zz,html5Email:()=>Lz,httpProtocol:()=>cd,idnEmail:()=>Dz,integer:()=>hd,ipv4:()=>rd,ipv6:()=>nd,ksuid:()=>Wu,lowercase:()=>_d,mac:()=>od,md5_base64:()=>Gz,md5_base64url:()=>Bz,md5_hex:()=>Jz,nanoid:()=>Yu,null:()=>vd,number:()=>Ca,rfc5322Email:()=>Mz,sha1_base64:()=>Wz,sha1_base64url:()=>Yz,sha1_hex:()=>Kz,sha256_base64:()=>Qz,sha256_base64url:()=>ew,sha256_hex:()=>Xz,sha384_base64:()=>rw,sha384_base64url:()=>nw,sha384_hex:()=>tw,sha512_base64:()=>iw,sha512_base64url:()=>aw,sha512_hex:()=>ow,string:()=>pd,time:()=>dd,ulid:()=>Bu,undefined:()=>yd,unicodeEmail:()=>Qg,uppercase:()=>Sd,uuid:()=>Or,uuid4:()=>Az,uuid6:()=>Cz,uuid7:()=>qz,xid:()=>Ku});var Ju=/^[cC][0-9a-z]{6,}$/,Gu=/^[0-9a-z]+$/,Bu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ku=/^[0-9a-vA-V]{20}$/,Wu=/^[A-Za-z0-9]{27}$/,Yu=/^[a-zA-Z0-9_-]{21}$/,Xu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Oz=/^[-+]?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)?)??$/,Qu=/^([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})$/,Or=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)$/,Az=Or(4),Cz=Or(6),qz=Or(7),ed=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Lz=/^[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])?)*$/,Mz=/^(([^<>()\[\]\\.,;:\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,}))$/,Qg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Dz=Qg,Uz=/^[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])?)*$/,Vz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function td(){return new RegExp(Vz,"u")}var 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])$/,nd=/^(([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}|:))$/,od=e=>{let t=St(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},id=/^((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])$/,ad=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,sd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Aa=/^[A-Za-z0-9_-]*$/,Zz=/^(?=.{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])?)*\.?$/,Fz=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,cd=/^https?$/,ld=/^\+[1-9]\d{6,14}$/,ev="(?:(?:\\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])))",ud=new RegExp(`^${ev}$`);function tv(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function dd(e){return new RegExp(`^${tv(e)}$`)}function md(e){let t=tv({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${ev}T(?:${o})$`)}var pd=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},fd=/^-?\d+n?$/,hd=/^-?\d+$/,Ca=/^-?\d+(?:\.\d+)?$/,gd=/^(?:true|false)$/i,vd=/^null$/i;var yd=/^undefined$/i;var _d=/^[^A-Z]*$/,Sd=/^[^a-z]*$/,Hz=/^[0-9a-fA-F]*$/;function Ko(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Wo(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Jz=/^[0-9a-fA-F]{32}$/,Gz=Ko(22,"=="),Bz=Wo(22),Kz=/^[0-9a-fA-F]{40}$/,Wz=Ko(27,"="),Yz=Wo(27),Xz=/^[0-9a-fA-F]{64}$/,Qz=Ko(43,"="),ew=Wo(43),tw=/^[0-9a-fA-F]{96}$/,rw=Ko(64,""),nw=Wo(64),ow=/^[0-9a-fA-F]{128}$/,iw=Ko(86,"=="),aw=Wo(86);var je=N("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nv={number:"number",bigint:"bigint",object:"date"},qa=N("$ZodCheckLessThan",(e,t)=>{je.init(e,t);let n=nv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),La=N("$ZodCheckGreaterThan",(e,t)=>{je.init(e,t);let n=nv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bd=N("$ZodCheckMultipleOf",(e,t)=>{je.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Nu(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$d=N("$ZodCheckNumberFormat",(e,t)=>{je.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=Mu[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=i,n&&(s.pattern=hd)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,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:o,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:o,inclusive:!0,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),zd=N("$ZodCheckBigIntFormat",(e,t)=>{je.init(e,t);let[n,o]=Du[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),wd=N("$ZodCheckMaxSize",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Qt(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:Fo(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Rd=N("$ZodCheckMinSize",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Qt(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:Fo(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Id=N("$ZodCheckSizeEquals",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Qt(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:Fo(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),kd=N("$ZodCheckMaxLength",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Qt(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let a=Ho(r);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Td=N("$ZodCheckMinLength",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Qt(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let a=Ho(r);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Pd=N("$ZodCheckLengthEquals",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!Qt(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let a=Ho(r),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),gn=N("$ZodCheckStringFormat",(e,t)=>{var n,o;je.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Ed=N("$ZodCheckRegex",(e,t)=>{gn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),xd=N("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=_d),gn.init(e,t)}),jd=N("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Sd),gn.init(e,t)}),Nd=N("$ZodCheckIncludes",(e,t)=>{je.init(e,t);let n=St(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Od=N("$ZodCheckStartsWith",(e,t)=>{je.init(e,t);let n=new RegExp(`^${St(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Ad=N("$ZodCheckEndsWith",(e,t)=>{je.init(e,t);let n=new RegExp(`.*${St(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function rv(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues))}var Cd=N("$ZodCheckProperty",(e,t)=>{je.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>rv(r,n,t.property));rv(o,n,t.property)}}),qd=N("$ZodCheckMimeType",(e,t)=>{je.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Ld=N("$ZodCheckOverwrite",(e,t)=>{je.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var Yo=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
4
4
  `).filter(a=>a),r=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,r.join(`
5
- `))}};var Ld={major:4,minor:4,patch:3};var ge=N("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ld;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let u=tr(a),d;for(let p of s){if(p._zod.def.when){if(Du(a)||!p._zod.def.when(a))continue}else if(u)continue;let h=a.issues.length,S=p._zod.check(a);if(S instanceof Promise&&c?.async===!1)throw new zt;if(d||S instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await S,a.issues.length!==h&&(u||(u=tr(a,h)))});else{if(a.issues.length===h)continue;u||(u=tr(a,h))}}return d?d.then(()=>a):a},i=(a,s,c)=>{if(tr(a))return a.aborted=!0,a;let u=r(s,o,c);if(u instanceof Promise){if(c.async===!1)throw new zt;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(d=>i(d,a,s)):i(u,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new zt;return c.then(u=>r(u,o,s))}return r(c,o,s)}}we(e,"~standard",()=>({validate:r=>{try{let i=Zu(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Fu(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Or=N("$ZodString",(e,t)=>{ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??md(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Pe=N("$ZodStringFormat",(e,t)=>{hn.init(e,t),Or.init(e,t)}),Dd=N("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xu),Pe.init(e,t)}),Ud=N("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Nr(o))}else t.pattern??(t.pattern=Nr());Pe.init(e,t)}),Vd=N("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qu),Pe.init(e,t)}),Zd=N("$ZodURL",(e,t)=>{Pe.init(e,t),e._zod.check=n=>{try{let o=n.value.trim();if(!t.normalize&&t.protocol?.source===sd.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Fd=N("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ed()),Pe.init(e,t)}),Hd=N("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Wu),Pe.init(e,t)}),Jd=N("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Hu),Pe.init(e,t)}),Gd=N("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ju),Pe.init(e,t)}),Bd=N("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Gu),Pe.init(e,t)}),Kd=N("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Bu),Pe.init(e,t)}),Wd=N("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ku),Pe.init(e,t)}),Yd=N("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dd(t)),Pe.init(e,t)}),Xd=N("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ld),Pe.init(e,t)}),Qd=N("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ud(t)),Pe.init(e,t)}),em=N("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Yu),Pe.init(e,t)}),tm=N("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=td),Pe.init(e,t),e._zod.bag.format="ipv4"}),rm=N("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=rd),Pe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),nm=N("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=nd(t.delimiter)),Pe.init(e,t),e._zod.bag.format="mac"}),om=N("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=od),Pe.init(e,t)}),im=N("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=id),Pe.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function am(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var sm=N("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ad),Pe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{am(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function yv(e){if(!Oa.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return am(n)}var cm=N("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Oa),Pe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{yv(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),lm=N("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cd),Pe.init(e,t)});function _v(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var um=N("$ZodJWT",(e,t)=>{Pe.init(e,t),e._zod.check=n=>{_v(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),dm=N("$ZodCustomStringFormat",(e,t)=>{Pe.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Va=N("$ZodNumber",(e,t)=>{ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??Aa,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),mm=N("$ZodNumberFormat",(e,t)=>{bd.init(e,t),Va.init(e,t)}),Yo=N("$ZodBoolean",(e,t)=>{ge.init(e,t),e._zod.pattern=hd,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Za=N("$ZodBigInt",(e,t)=>{ge.init(e,t),e._zod.pattern=pd,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),pm=N("$ZodBigIntFormat",(e,t)=>{$d.init(e,t),Za.init(e,t)}),fm=N("$ZodSymbol",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),hm=N("$ZodUndefined",(e,t)=>{ge.init(e,t),e._zod.pattern=vd,e._zod.values=new Set([void 0]),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),gm=N("$ZodNull",(e,t)=>{ge.init(e,t),e._zod.pattern=gd,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),vm=N("$ZodAny",(e,t)=>{ge.init(e,t),e._zod.parse=n=>n}),ym=N("$ZodUnknown",(e,t)=>{ge.init(e,t),e._zod.parse=n=>n}),_m=N("$ZodNever",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Sm=N("$ZodVoid",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),bm=N("$ZodDate",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function ov(e,t,n){e.issues.length&&t.issues.push(...ct(n,e.issues)),t.value[n]=e.value}var $m=N("$ZodArray",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>ov(u,n,a))):ov(c,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function Ua(e,t,n,o,r,i){let a=n in o;if(e.issues.length){if(r&&i&&!a)return;t.issues.push(...ct(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function Sv(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=qu(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function bv(e,t,n,o,r,i){let a=[],s=r.keySet,c=r.catchall._zod,u=c.def.type,d=c.optin==="optional",p=c.optout==="optional";for(let h in t){if(h==="__proto__"||s.has(h))continue;if(u==="never"){a.push(h);continue}let S=c.run({value:t[h],issues:[]},o);S instanceof Promise?e.push(S.then(v=>Ua(v,n,h,t,d,p))):Ua(S,n,h,t,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}var $v=N("$ZodObject",(e,t)=>{if(ge.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=ln(()=>Sv(t));we(e._zod,"propValues",()=>{let s=t.shape,c={};for(let u in s){let d=s[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(let p of d.values)c[u].add(p)}}return c});let r=jr,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let u=s.value;if(!r(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};let d=[],p=a.shape;for(let h of a.keys){let S=p[h],v=S._zod.optin==="optional",$=S._zod.optout==="optional",y=S._zod.run({value:u[h],issues:[]},c);y instanceof Promise?d.push(y.then(f=>Ua(f,s,h,u,v,$))):Ua(y,s,h,u,v,$)}return i?bv(d,u,s,c,o.value,e):d.length?Promise.all(d).then(()=>s):s}}),zm=N("$ZodObjectJIT",(e,t)=>{$v.init(e,t);let n=e._zod.parse,o=ln(()=>Sv(t)),r=h=>{let S=new Wo(["shape","payload","ctx"]),v=o.value,$=g=>{let b=$a(g);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};S.write("const input = payload.value;");let y=Object.create(null),f=0;for(let g of v.keys)y[g]=`key_${f++}`;S.write("const newResult = {};");for(let g of v.keys){let b=y[g],k=$a(g),z=h[g],_=z?._zod?.optin==="optional",R=z?._zod?.optout==="optional";S.write(`const ${b} = ${$(g)};`),_&&R?S.write(`
5
+ `))}};var Md={major:4,minor:4,patch:3};var ge=N("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Md;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let l=rr(a),d;for(let p of s){if(p._zod.def.when){if(Uu(a)||!p._zod.def.when(a))continue}else if(l)continue;let h=a.issues.length,S=p._zod.check(a);if(S instanceof Promise&&c?.async===!1)throw new wt;if(d||S instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await S,a.issues.length!==h&&(l||(l=rr(a,h)))});else{if(a.issues.length===h)continue;l||(l=rr(a,h))}}return d?d.then(()=>a):a},i=(a,s,c)=>{if(rr(a))return a.aborted=!0,a;let l=r(s,o,c);if(l instanceof Promise){if(c.async===!1)throw new wt;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,a,s)):i(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new wt;return c.then(l=>r(l,o,s))}return r(c,o,s)}}we(e,"~standard",()=>({validate:r=>{try{let i=Fu(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Hu(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Ar=N("$ZodString",(e,t)=>{ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pd(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ee=N("$ZodStringFormat",(e,t)=>{gn.init(e,t),Ar.init(e,t)}),Ud=N("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Qu),Ee.init(e,t)}),Vd=N("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Or(o))}else t.pattern??(t.pattern=Or());Ee.init(e,t)}),Zd=N("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ed),Ee.init(e,t)}),Fd=N("$ZodURL",(e,t)=>{Ee.init(e,t),e._zod.check=n=>{try{let o=n.value.trim();if(!t.normalize&&t.protocol?.source===cd.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Hd=N("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=td()),Ee.init(e,t)}),Jd=N("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Yu),Ee.init(e,t)}),Gd=N("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ju),Ee.init(e,t)}),Bd=N("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gu),Ee.init(e,t)}),Kd=N("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Bu),Ee.init(e,t)}),Wd=N("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ku),Ee.init(e,t)}),Yd=N("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Wu),Ee.init(e,t)}),Xd=N("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=md(t)),Ee.init(e,t)}),Qd=N("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ud),Ee.init(e,t)}),em=N("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=dd(t)),Ee.init(e,t)}),tm=N("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xu),Ee.init(e,t)}),rm=N("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=rd),Ee.init(e,t),e._zod.bag.format="ipv4"}),nm=N("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=nd),Ee.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),om=N("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=od(t.delimiter)),Ee.init(e,t),e._zod.bag.format="mac"}),im=N("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=id),Ee.init(e,t)}),am=N("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ad),Ee.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function sm(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var cm=N("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=sd),Ee.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{sm(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function _v(e){if(!Aa.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return sm(n)}var lm=N("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Aa),Ee.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{_v(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),um=N("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ld),Ee.init(e,t)});function Sv(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var dm=N("$ZodJWT",(e,t)=>{Ee.init(e,t),e._zod.check=n=>{Sv(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),mm=N("$ZodCustomStringFormat",(e,t)=>{Ee.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Za=N("$ZodNumber",(e,t)=>{ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ca,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),pm=N("$ZodNumberFormat",(e,t)=>{$d.init(e,t),Za.init(e,t)}),Xo=N("$ZodBoolean",(e,t)=>{ge.init(e,t),e._zod.pattern=gd,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Fa=N("$ZodBigInt",(e,t)=>{ge.init(e,t),e._zod.pattern=fd,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),fm=N("$ZodBigIntFormat",(e,t)=>{zd.init(e,t),Fa.init(e,t)}),hm=N("$ZodSymbol",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),gm=N("$ZodUndefined",(e,t)=>{ge.init(e,t),e._zod.pattern=yd,e._zod.values=new Set([void 0]),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),vm=N("$ZodNull",(e,t)=>{ge.init(e,t),e._zod.pattern=vd,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),ym=N("$ZodAny",(e,t)=>{ge.init(e,t),e._zod.parse=n=>n}),_m=N("$ZodUnknown",(e,t)=>{ge.init(e,t),e._zod.parse=n=>n}),Sm=N("$ZodNever",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),bm=N("$ZodVoid",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),$m=N("$ZodDate",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function iv(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}var zm=N("$ZodArray",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(l=>iv(l,n,a))):iv(c,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function Va(e,t,n,o,r,i){let a=n in o;if(e.issues.length){if(r&&i&&!a)return;t.issues.push(...lt(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function bv(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Lu(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function $v(e,t,n,o,r,i){let a=[],s=r.keySet,c=r.catchall._zod,l=c.def.type,d=c.optin==="optional",p=c.optout==="optional";for(let h in t){if(h==="__proto__"||s.has(h))continue;if(l==="never"){a.push(h);continue}let S=c.run({value:t[h],issues:[]},o);S instanceof Promise?e.push(S.then(v=>Va(v,n,h,t,d,p))):Va(S,n,h,t,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}var zv=N("$ZodObject",(e,t)=>{if(ge.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=un(()=>bv(t));we(e._zod,"propValues",()=>{let s=t.shape,c={};for(let l in s){let d=s[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(let p of d.values)c[l].add(p)}}return c});let r=Nr,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let l=s.value;if(!r(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let d=[],p=a.shape;for(let h of a.keys){let S=p[h],v=S._zod.optin==="optional",$=S._zod.optout==="optional",y=S._zod.run({value:l[h],issues:[]},c);y instanceof Promise?d.push(y.then(f=>Va(f,s,h,l,v,$))):Va(y,s,h,l,v,$)}return i?$v(d,l,s,c,o.value,e):d.length?Promise.all(d).then(()=>s):s}}),wm=N("$ZodObjectJIT",(e,t)=>{zv.init(e,t);let n=e._zod.parse,o=un(()=>bv(t)),r=h=>{let S=new Yo(["shape","payload","ctx"]),v=o.value,$=g=>{let b=za(g);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};S.write("const input = payload.value;");let y=Object.create(null),f=0;for(let g of v.keys)y[g]=`key_${f++}`;S.write("const newResult = {};");for(let g of v.keys){let b=y[g],k=za(g),z=h[g],_=z?._zod?.optin==="optional",R=z?._zod?.optout==="optional";S.write(`const ${b} = ${$(g)};`),_&&R?S.write(`
6
6
  if (${b}.issues.length) {
7
7
  if (${k} in input) {
8
8
  payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
@@ -61,18 +61,18 @@ var J$=Object.defineProperty;var qt=(e,t)=>{for(var n in t)J$(e,n,{get:t[n],enum
61
61
  }
62
62
  }
63
63
 
64
- `)}S.write("payload.value = newResult;"),S.write("return payload;");let w=S.compile();return(g,b)=>w(h,g,b)},i,a=jr,s=!xr.jitless,u=s&&Ou.value,d=t.catchall,p;e._zod.parse=(h,S)=>{p??(p=o.value);let v=h.value;return a(v)?s&&u&&S?.async===!1&&S.jitless!==!0?(i||(i=r(t.shape)),h=i(h,S),d?bv([],v,h,S,p,e):h):n(h,S):(h.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),h)}});function iv(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!tr(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>it(a,o,Ce())))}),t)}var Xo=N("$ZodUnion",(e,t)=>{ge.init(e,t),we(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),we(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),we(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),we(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${o.map(r=>Uo(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}return i?Promise.all(a).then(s=>iv(s,o,e,r)):iv(a,o,e,r)}});function av(e,t,n,o){let r=e.filter(i=>i.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>it(a,o,Ce())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var wm=N("$ZodXor",(e,t)=>{Xo.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},r);c instanceof Promise?(a.push(c),i=!0):a.push(c)}return i?Promise.all(a).then(s=>av(s,o,e,r)):av(a,o,e,r)}}),Rm=N("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Xo.init(e,t);let n=e._zod.parse;we(e._zod,"propValues",()=>{let r={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){r[s]||(r[s]=new Set);for(let u of c)r[s].add(u)}}return r});let o=ln(()=>{let r=t.options,i=new Map;for(let a of r){let 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(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(r,i)=>{let a=r.value;if(!jr(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback||i.direction==="backward"?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}}),Im=N("$ZodIntersection",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),a=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,u])=>sv(n,c,u)):sv(n,i,a)}});function Md(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(er(e)&&er(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let a=Md(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r[i]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],a=Md(r,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function sv(e,t,n){let o=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&r&&e.issues.push({...r,keys:i}),tr(e))return e;let a=Md(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Fa=N("$ZodTuple",(e,t)=>{ge.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=cv(n,"optin"),c=cv(n,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>n.length&&o.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}let u=new Array(n.length);for(let d=0;d<n.length;d++){let p=n[d]._zod.run({value:i[d],issues:[]},r);p instanceof Promise?a.push(p.then(h=>{u[d]=h})):u[d]=p}if(t.rest){let d=n.length-1,p=i.slice(n.length);for(let h of p){d++;let S=t.rest._zod.run({value:h,issues:[]},r);S instanceof Promise?a.push(S.then(v=>lv(v,o,d))):lv(S,o,d)}}return a.length?Promise.all(a).then(()=>uv(u,o,n,i,c)):uv(u,o,n,i,c)}});function cv(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function lv(e,t,n){e.issues.length&&t.issues.push(...ct(n,e.issues)),t.value[n]=e.value}function uv(e,t,n,o,r){for(let i=0;i<n.length;i++){let a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=r){t.value.length=i;break}t.issues.push(...ct(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=o.length&&(n[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var km=N("$ZodRecord",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!er(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let d=t.keyType._zod.run({value:u,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(S=>it(S,o,Ce())),input:u,path:[u],inst:e});continue}let p=d.value,h=t.valueType._zod.run({value:r[u],issues:[]},o);h instanceof Promise?i.push(h.then(S=>{S.issues.length&&n.issues.push(...ct(u,S.issues)),n.value[p]=S.value})):(h.issues.length&&n.issues.push(...ct(u,h.issues)),n.value[p]=h.value)}let c;for(let u in r)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Aa.test(s)&&c.issues.length){let p=t.keyType._zod.run({value:Number(s),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>it(p,o,Ce())),input:s,path:[s],inst:e});continue}let d=t.valueType._zod.run({value:r[s],issues:[]},o);d instanceof Promise?i.push(d.then(p=>{p.issues.length&&n.issues.push(...ct(s,p.issues)),n.value[c.value]=p.value})):(d.issues.length&&n.issues.push(...ct(s,d.issues)),n.value[c.value]=d.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Tm=N("$ZodMap",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of r){let c=t.keyType._zod.run({value:a,issues:[]},o),u=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([d,p])=>{dv(d,p,n,a,r,e,o)})):dv(c,u,n,a,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function dv(e,t,n,o,r,i,a){e.issues.length&&(Vo.has(typeof o)?n.issues.push(...ct(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(s=>it(s,a,Ce()))})),t.issues.length&&(Vo.has(typeof o)?n.issues.push(...ct(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(s=>it(s,a,Ce()))})),n.value.set(e.value,t.value)}var Pm=N("$ZodSet",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>mv(c,n))):mv(s,n)}return i.length?Promise.all(i).then(()=>n):n}});function mv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Em=N("$ZodEnum",(e,t)=>{ge.init(e,t);let n=Do(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>Vo.has(typeof r)).map(r=>typeof r=="string"?_t(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;return o.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),xm=N("$ZodLiteral",(e,t)=>{if(ge.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?_t(o):o?_t(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),jm=N("$ZodFile",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Nm=N("$ZodTransform",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Yt(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new zt;return n.value=r,n.fallback=!0,n}});function pv(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Ha=N("$ZodOptional",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.optout="optional",we(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),we(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Uo(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(a=>pv(a,r)):pv(i,r)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),Om=N("$ZodExactOptional",(e,t)=>{Ha.init(e,t),we(e._zod,"values",()=>t.innerType._zod.values),we(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Am=N("$ZodNullable",(e,t)=>{ge.init(e,t),we(e._zod,"optin",()=>t.innerType._zod.optin),we(e._zod,"optout",()=>t.innerType._zod.optout),we(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Uo(n.source)}|null)$`):void 0}),we(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),Cm=N("$ZodDefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",we(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>fv(i,t)):fv(r,t)}});function fv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var qm=N("$ZodPrefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",we(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),Lm=N("$ZodNonOptional",(e,t)=>{ge.init(e,t),we(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>hv(i,e)):hv(r,e)}});function hv(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Mm=N("$ZodSuccess",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Yt("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Dm=N("$ZodCatch",(e,t)=>{ge.init(e,t),e._zod.optin="optional",we(e._zod,"optout",()=>t.innerType._zod.optout),we(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>it(a,o,Ce()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>it(i,o,Ce()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Um=N("$ZodNaN",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Ja=N("$ZodPipe",(e,t)=>{ge.init(e,t),we(e._zod,"values",()=>t.in._zod.values),we(e._zod,"optin",()=>t.in._zod.optin),we(e._zod,"optout",()=>t.out._zod.optout),we(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>La(a,t.in,o)):La(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>La(i,t.out,o)):La(r,t.out,o)}});function La(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Qo=N("$ZodCodec",(e,t)=>{ge.init(e,t),we(e._zod,"values",()=>t.in._zod.values),we(e._zod,"optin",()=>t.in._zod.optin),we(e._zod,"optout",()=>t.out._zod.optout),we(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(a=>Ma(a,t,o)):Ma(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>Ma(a,t,o)):Ma(i,t,o)}}});function Ma(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>Da(e,i,t.out,n)):Da(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>Da(e,i,t.in,n)):Da(e,r,t.in,n)}}function Da(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}var Vm=N("$ZodPreprocess",(e,t)=>{Ja.init(e,t)}),Zm=N("$ZodReadonly",(e,t)=>{ge.init(e,t),we(e._zod,"propValues",()=>t.innerType._zod.propValues),we(e._zod,"values",()=>t.innerType._zod.values),we(e._zod,"optin",()=>t.innerType?._zod?.optin),we(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(gv):gv(r)}});function gv(e){return e.value=Object.freeze(e.value),e}var Fm=N("$ZodTemplateLiteral",(e,t)=>{ge.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,a))}else if(o===null||Cu.has(typeof o))n.push(_t(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Hm=N("$ZodFunction",(e,t)=>(ge.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?wa(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?wa(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Ra(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Ra(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new Fa({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),Jm=N("$ZodPromise",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),Gm=N("$ZodLazy",(e,t)=>{ge.init(e,t),we(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),we(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),we(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),we(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),we(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),Bm=N("$ZodCustom",(e,t)=>{xe.init(e,t),ge.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>vv(i,n,o,e));vv(r,n,o,e)}});function vv(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(un(r))}}var ti={};qt(ti,{ar:()=>zv,az:()=>wv,be:()=>Iv,bg:()=>kv,ca:()=>Tv,cs:()=>Pv,da:()=>Ev,de:()=>xv,el:()=>jv,en:()=>Ga,eo:()=>Nv,es:()=>Ov,fa:()=>Av,fi:()=>Cv,fr:()=>qv,frCA:()=>Lv,he:()=>Mv,hr:()=>Dv,hu:()=>Uv,hy:()=>Zv,id:()=>Fv,is:()=>Hv,it:()=>Jv,ja:()=>Gv,ka:()=>Bv,kh:()=>Kv,km:()=>Ba,ko:()=>Wv,lt:()=>Xv,mk:()=>Qv,ms:()=>ey,nl:()=>ty,no:()=>ry,ota:()=>ny,pl:()=>iy,ps:()=>oy,pt:()=>ay,ro:()=>sy,ru:()=>ly,sl:()=>uy,sv:()=>dy,ta:()=>my,th:()=>py,tr:()=>fy,ua:()=>hy,uk:()=>Ka,ur:()=>gy,uz:()=>vy,vi:()=>yy,yo:()=>by,zhCN:()=>_y,zhTW:()=>Sy});var sw=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${J(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`${n[i.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function zv(){return{localeError:sw()}}var cw=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${J(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function wv(){return{localeError:cw()}}function Rv(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var lw=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${J(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Rv(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Rv(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Iv(){return{localeError:lw()}}var uw=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${J(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.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 "${i.prefix}"`;if(i.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 "${i.suffix}"`;if(i.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 "${i.includes}"`;if(i.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 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function kv(){return{localeError:uw()}}var dw=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${J(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${L(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function Tv(){return{localeError:dw()}}var mw=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${J(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${L(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function Pv(){return{localeError:mw()}}var pw=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${J(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function Ev(){return{localeError:pw()}}var fw=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${J(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function xv(){return{localeError:fw()}}var hw=()=>{let 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(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[i.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function jv(){return{localeError:hw()}}var gw=()=>{let 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(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${J(r.values[0])}`:`Invalid option: expected one of ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Ga(){return{localeError:gw()}}var vw=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${J(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function Nv(){return{localeError:vw()}}var yw=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${J(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function Ov(){return{localeError:yw()}}var _w=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${J(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${L(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${L(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Av(){return{localeError:_w()}}var Sw=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${J(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${L(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Cv(){return{localeError:Sw()}}var bw=()=>{let 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(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${J(r.values[0])} attendu`:`Option invalide : une valeur parmi ${L(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function qv(){return{localeError:bw()}}var $w=()=>{let 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(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${J(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Lv(){return{localeError:$w()}}var zw=()=>{let 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"}},n=u=>u?e[u]:void 0,o=u=>{let d=n(u);return d?d.label:u??e.unknown.label},r=u=>`\u05D4${o(u)}`,i=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=u=>u?t[u]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let d=u.expected,p=c[d??""]??o(d),h=G(u.input),S=c[h]??e[h]?.label??h;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 ${S}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${S}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${J(u.values[0])}`;let d=u.values.map(S=>J(S));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 ${d[0]} \u05D0\u05D5 ${d[1]}`;let p=d[d.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 ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let d=a(u.origin),p=r(u.origin??"value");if(u.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let v=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: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(u.origin==="array"||u.origin==="set"){let v=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",$=u.inclusive?`${u.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let h=u.inclusive?"<=":"<",S=i(u.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${S} ${h}${u.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${S} ${h}${u.maximum.toString()}`}case"too_small":{let d=a(u.origin),p=r(u.origin??"value");if(u.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let v=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: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(u.origin==="array"||u.origin==="set"){let v=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let y=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let $=u.inclusive?`${u.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let h=u.inclusive?">=":">",S=i(u.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${S} ${h}${u.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${S} ${h}${u.minimum.toString()}`}case"invalid_format":{let d=u;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.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 ${d.pattern}`;let p=s[d.format],h=p?.label??d.format,v=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${h} \u05DC\u05D0 ${v}`}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"}: ${L(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Mv(){return{localeError:zw()}}var ww=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${J(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${n[i.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${L(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function Dv(){return{localeError:ww()}}var Rw=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${J(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Uv(){return{localeError:Rw()}}function Vv(e,t,n){return Math.abs(e)===1?t:n}function gn(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var Iw=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${J(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Vv(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 ${gn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${gn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Vv(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 ${gn(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${gn(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.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 ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${L(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${gn(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${gn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Zv(){return{localeError:Iw()}}var kw=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${J(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function Fv(){return{localeError:kw()}}var Tw=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${J(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${L(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function Hv(){return{localeError:Tw()}}var Pw=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${J(r.values[0])}`:`Opzione non valida: atteso uno tra ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${n[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${L(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function Jv(){return{localeError:Pw()}}var Ew=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${J(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${L(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Gv(){return{localeError:Ew()}}var xw=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${L(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"-\u10D8\u10D7`:i.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 "${i.suffix}"-\u10D8\u10D7`:i.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 "${i.includes}"-\u10E1`:i.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 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Bv(){return{localeError:xw()}}var jw=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${L(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Ba(){return{localeError:jw()}}function Kv(){return Ba()}var Nw=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${J(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${L(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${a}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${L(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Wv(){return{localeError:Nw()}}var ei=e=>e.charAt(0).toUpperCase()+e.slice(1);function Yv(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}var Ow=()=>{let 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(r,i,a,s){let c=e[r]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${J(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${L(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,a=t(r.origin,Yv(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${ei(i??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${ei(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,a=t(r.origin,Yv(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${ei(i??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${ei(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${L(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${ei(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Xv(){return{localeError:Ow()}}var Aw=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${J(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Qv(){return{localeError:Aw()}}var Cw=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${J(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function ey(){return{localeError:Cw()}}var qw=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${J(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function ty(){return{localeError:qw()}}var Lw=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${J(r.values[0])}`:`Ugyldig valg: forventet en av ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function ry(){return{localeError:Lw()}}var Mw=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${J(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function ny(){return{localeError:Mw()}}var Dw=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${J(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${L(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function oy(){return{localeError:Dw()}}var Uw=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${J(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function iy(){return{localeError:Uw()}}var Vw=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${J(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function ay(){return{localeError:Vw()}}var Zw=()=>{let 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(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${J(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${n[i.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${L(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function sy(){return{localeError:Zw()}}function cy(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var Fw=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${J(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=cy(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=cy(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function ly(){return{localeError:Fw()}}var Hw=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${J(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${L(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function uy(){return{localeError:Hw()}}var Jw=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${J(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function dy(){return{localeError:Jw()}}var Gw=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${L(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function my(){return{localeError:Gw()}}var Bw=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${J(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.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 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${L(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function py(){return{localeError:Bw()}}var Kw=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${J(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function fy(){return{localeError:Kw()}}var Ww=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${J(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Ka(){return{localeError:Ww()}}function hy(){return Ka()}var Yw=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${J(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${L(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function gy(){return{localeError:Yw()}}var Xw=()=>{let 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(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${J(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function vy(){return{localeError:Xw()}}var Qw=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${J(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${L(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function yy(){return{localeError:Qw()}}var eR=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${J(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function _y(){return{localeError:eR()}}var tR=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${J(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Sy(){return{localeError:tR()}}var rR=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${J(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${i}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${i}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${L(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function by(){return{localeError:rR()}}var $y,Km=Symbol("ZodOutput"),Wm=Symbol("ZodInput"),Wa=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Ya(){return new Wa}($y=globalThis).__zod_globalRegistry??($y.__zod_globalRegistry=Ya());var Ye=globalThis.__zod_globalRegistry;function Ym(e,t){return new e({type:"string",...W(t)})}function Xm(e,t){return new e({type:"string",coerce:!0,...W(t)})}function Xa(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...W(t)})}function ri(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...W(t)})}function Qa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...W(t)})}function es(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...W(t)})}function ts(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...W(t)})}function rs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...W(t)})}function ni(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...W(t)})}function ns(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...W(t)})}function os(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...W(t)})}function is(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...W(t)})}function as(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...W(t)})}function ss(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...W(t)})}function cs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...W(t)})}function ls(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...W(t)})}function us(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...W(t)})}function ds(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...W(t)})}function Qm(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...W(t)})}function ms(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...W(t)})}function ps(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...W(t)})}function fs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...W(t)})}function hs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...W(t)})}function gs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...W(t)})}function vs(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...W(t)})}var ep={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function tp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...W(t)})}function rp(e,t){return new e({type:"string",format:"date",check:"string_format",...W(t)})}function np(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...W(t)})}function op(e,t){return new e({type:"string",format:"duration",check:"string_format",...W(t)})}function ip(e,t){return new e({type:"number",checks:[],...W(t)})}function ap(e,t){return new e({type:"number",coerce:!0,checks:[],...W(t)})}function sp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...W(t)})}function cp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...W(t)})}function lp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...W(t)})}function up(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...W(t)})}function dp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...W(t)})}function mp(e,t){return new e({type:"boolean",...W(t)})}function pp(e,t){return new e({type:"boolean",coerce:!0,...W(t)})}function fp(e,t){return new e({type:"bigint",...W(t)})}function hp(e,t){return new e({type:"bigint",coerce:!0,...W(t)})}function gp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...W(t)})}function vp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...W(t)})}function yp(e,t){return new e({type:"symbol",...W(t)})}function _p(e,t){return new e({type:"undefined",...W(t)})}function Sp(e,t){return new e({type:"null",...W(t)})}function bp(e){return new e({type:"any"})}function $p(e){return new e({type:"unknown"})}function zp(e,t){return new e({type:"never",...W(t)})}function wp(e,t){return new e({type:"void",...W(t)})}function Rp(e,t){return new e({type:"date",...W(t)})}function Ip(e,t){return new e({type:"date",coerce:!0,...W(t)})}function kp(e,t){return new e({type:"nan",...W(t)})}function Et(e,t){return new Ca({check:"less_than",...W(t),value:e,inclusive:!1})}function ft(e,t){return new Ca({check:"less_than",...W(t),value:e,inclusive:!0})}function xt(e,t){return new qa({check:"greater_than",...W(t),value:e,inclusive:!1})}function at(e,t){return new qa({check:"greater_than",...W(t),value:e,inclusive:!0})}function ys(e){return xt(0,e)}function _s(e){return Et(0,e)}function Ss(e){return ft(0,e)}function bs(e){return at(0,e)}function rr(e,t){return new Sd({check:"multiple_of",...W(t),value:e})}function nr(e,t){return new zd({check:"max_size",...W(t),maximum:e})}function jt(e,t){return new wd({check:"min_size",...W(t),minimum:e})}function Ar(e,t){return new Rd({check:"size_equals",...W(t),size:e})}function Cr(e,t){return new Id({check:"max_length",...W(t),maximum:e})}function Mt(e,t){return new kd({check:"min_length",...W(t),minimum:e})}function qr(e,t){return new Td({check:"length_equals",...W(t),length:e})}function vn(e,t){return new Pd({check:"string_format",format:"regex",...W(t),pattern:e})}function yn(e){return new Ed({check:"string_format",format:"lowercase",...W(e)})}function _n(e){return new xd({check:"string_format",format:"uppercase",...W(e)})}function Sn(e,t){return new jd({check:"string_format",format:"includes",...W(t),includes:e})}function bn(e,t){return new Nd({check:"string_format",format:"starts_with",...W(t),prefix:e})}function $n(e,t){return new Od({check:"string_format",format:"ends_with",...W(t),suffix:e})}function $s(e,t,n){return new Ad({check:"property",property:e,schema:t,...W(n)})}function zn(e,t){return new Cd({check:"mime_type",mime:e,...W(t)})}function wt(e){return new qd({check:"overwrite",tx:e})}function wn(e){return wt(t=>t.normalize(e))}function Rn(){return wt(e=>e.trim())}function In(){return wt(e=>e.toLowerCase())}function kn(){return wt(e=>e.toUpperCase())}function Tn(){return wt(e=>Nu(e))}function Tp(e,t,n){return new e({type:"array",element:t,...W(n)})}function oR(e,t,n){return new e({type:"union",options:t,...W(n)})}function iR(e,t,n){return new e({type:"union",options:t,inclusive:!1,...W(n)})}function aR(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...W(o)})}function sR(e,t,n){return new e({type:"intersection",left:t,right:n})}function cR(e,t,n,o){let r=n instanceof ge,i=r?o:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...W(i)})}function lR(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...W(o)})}function uR(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...W(o)})}function dR(e,t,n){return new e({type:"set",valueType:t,...W(n)})}function mR(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...W(n)})}function pR(e,t,n){return new e({type:"enum",entries:t,...W(n)})}function fR(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...W(n)})}function Pp(e,t){return new e({type:"file",...W(t)})}function hR(e,t){return new e({type:"transform",transform:t})}function gR(e,t){return new e({type:"optional",innerType:t})}function vR(e,t){return new e({type:"nullable",innerType:t})}function yR(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Au(n)}})}function _R(e,t,n){return new e({type:"nonoptional",innerType:t,...W(n)})}function SR(e,t){return new e({type:"success",innerType:t})}function bR(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function $R(e,t,n){return new e({type:"pipe",in:t,out:n})}function zR(e,t){return new e({type:"readonly",innerType:t})}function wR(e,t,n){return new e({type:"template_literal",parts:t,...W(n)})}function RR(e,t){return new e({type:"lazy",getter:t})}function IR(e,t){return new e({type:"promise",innerType:t})}function Ep(e,t,n){let o=W(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function xp(e,t,n){return new e({type:"custom",check:"custom",fn:t,...W(n)})}function jp(e,t){let n=zy(o=>(o.addIssue=r=>{if(typeof r=="string")o.issues.push(un(r,o.value,n._zod.def));else{let i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(un(i))}},e(o.value,o)),t);return n}function zy(e,t){let n=new xe({check:"custom",...W(t)});return n._zod.check=e,n}function Np(e){let t=new xe({check:"describe"});return t._zod.onattach=[n=>{let o=Ye.get(n)??{};Ye.add(n,{...o,description:e})}],t._zod.check=()=>{},t}function Op(e){let t=new xe({check:"meta"});return t._zod.onattach=[n=>{let o=Ye.get(n)??{};Ye.add(n,{...o,...e})}],t._zod.check=()=>{},t}function Ap(e,t){let n=W(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(S=>typeof S=="string"?S.toLowerCase():S),r=r.map(S=>typeof S=="string"?S.toLowerCase():S));let i=new Set(o),a=new Set(r),s=e.Codec??Qo,c=e.Boolean??Yo,u=e.String??Or,d=new u({type:"string",error:n.error}),p=new c({type:"boolean",error:n.error}),h=new s({type:"pipe",in:d,out:p,transform:((S,v)=>{let $=S;return n.case!=="sensitive"&&($=$.toLowerCase()),i.has($)?!0:a.has($)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:v.value,inst:h,continue:!1}),{})}),reverseTransform:((S,v)=>S===!0?o[0]||"true":r[0]||"false"),error:n.error});return h}function Pn(e,t,n,o={}){let r=W(o),i={...W(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}function or(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??Ye,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Te(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let h=a.schema,S=t.processors[r.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);S(e,t,h,d)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Te(p,t,d),t.seen.get(p).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&st(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function ir(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.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.`);o.set(s,a[0])}}let r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,h=e.external.uri??(v=>v);if(p)return{ref:h(p)};let S=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=S,{defId:S,ref:`${h("__shared")}#/${s}/${S}`}}if(a[1]===n)return{ref:"#"};let u=`#/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:u}=r(a);s.def={...s.schema},u&&(s.defId=u);let d=s.schema;for(let p in d)delete d[p];d.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
64
+ `)}S.write("payload.value = newResult;"),S.write("return payload;");let w=S.compile();return(g,b)=>w(h,g,b)},i,a=Nr,s=!jr.jitless,l=s&&Au.value,d=t.catchall,p;e._zod.parse=(h,S)=>{p??(p=o.value);let v=h.value;return a(v)?s&&l&&S?.async===!1&&S.jitless!==!0?(i||(i=r(t.shape)),h=i(h,S),d?$v([],v,h,S,p,e):h):n(h,S):(h.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),h)}});function av(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!rr(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>at(a,o,qe())))}),t)}var Qo=N("$ZodUnion",(e,t)=>{ge.init(e,t),we(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),we(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),we(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),we(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${o.map(r=>Vo(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}return i?Promise.all(a).then(s=>av(s,o,e,r)):av(a,o,e,r)}});function sv(e,t,n,o){let r=e.filter(i=>i.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>at(a,o,qe())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var Rm=N("$ZodXor",(e,t)=>{Qo.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},r);c instanceof Promise?(a.push(c),i=!0):a.push(c)}return i?Promise.all(a).then(s=>sv(s,o,e,r)):sv(a,o,e,r)}}),Im=N("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Qo.init(e,t);let n=e._zod.parse;we(e._zod,"propValues",()=>{let r={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){r[s]||(r[s]=new Set);for(let l of c)r[s].add(l)}}return r});let o=un(()=>{let r=t.options,i=new Map;for(let a of r){let 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(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(r,i)=>{let a=r.value;if(!Nr(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback||i.direction==="backward"?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}}),km=N("$ZodIntersection",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),a=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>cv(n,c,l)):cv(n,i,a)}});function Dd(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(tr(e)&&tr(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let a=Dd(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r[i]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],a=Dd(r,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function cv(e,t,n){let o=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&r&&e.issues.push({...r,keys:i}),rr(e))return e;let a=Dd(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Ha=N("$ZodTuple",(e,t)=>{ge.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=lv(n,"optin"),c=lv(n,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>n.length&&o.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=new Array(n.length);for(let d=0;d<n.length;d++){let p=n[d]._zod.run({value:i[d],issues:[]},r);p instanceof Promise?a.push(p.then(h=>{l[d]=h})):l[d]=p}if(t.rest){let d=n.length-1,p=i.slice(n.length);for(let h of p){d++;let S=t.rest._zod.run({value:h,issues:[]},r);S instanceof Promise?a.push(S.then(v=>uv(v,o,d))):uv(S,o,d)}}return a.length?Promise.all(a).then(()=>dv(l,o,n,i,c)):dv(l,o,n,i,c)}});function lv(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function uv(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}function dv(e,t,n,o,r){for(let i=0;i<n.length;i++){let a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=r){t.value.length=i;break}t.issues.push(...lt(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=o.length&&(n[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var Tm=N("$ZodRecord",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!tr(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.add(typeof l=="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(S=>at(S,o,qe())),input:l,path:[l],inst:e});continue}let p=d.value,h=t.valueType._zod.run({value:r[l],issues:[]},o);h instanceof Promise?i.push(h.then(S=>{S.issues.length&&n.issues.push(...lt(l,S.issues)),n.value[p]=S.value})):(h.issues.length&&n.issues.push(...lt(l,h.issues)),n.value[p]=h.value)}let c;for(let l in r)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Ca.test(s)&&c.issues.length){let p=t.keyType._zod.run({value:Number(s),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>at(p,o,qe())),input:s,path:[s],inst:e});continue}let d=t.valueType._zod.run({value:r[s],issues:[]},o);d instanceof Promise?i.push(d.then(p=>{p.issues.length&&n.issues.push(...lt(s,p.issues)),n.value[c.value]=p.value})):(d.issues.length&&n.issues.push(...lt(s,d.issues)),n.value[c.value]=d.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Pm=N("$ZodMap",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of r){let c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([d,p])=>{mv(d,p,n,a,r,e,o)})):mv(c,l,n,a,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function mv(e,t,n,o,r,i,a){e.issues.length&&(Zo.has(typeof o)?n.issues.push(...lt(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(s=>at(s,a,qe()))})),t.issues.length&&(Zo.has(typeof o)?n.issues.push(...lt(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(s=>at(s,a,qe()))})),n.value.set(e.value,t.value)}var Em=N("$ZodSet",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>pv(c,n))):pv(s,n)}return i.length?Promise.all(i).then(()=>n):n}});function pv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var xm=N("$ZodEnum",(e,t)=>{ge.init(e,t);let n=Uo(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>Zo.has(typeof r)).map(r=>typeof r=="string"?St(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;return o.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),jm=N("$ZodLiteral",(e,t)=>{if(ge.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?St(o):o?St(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Nm=N("$ZodFile",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Om=N("$ZodTransform",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Xt(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new wt;return n.value=r,n.fallback=!0,n}});function fv(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Ja=N("$ZodOptional",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.optout="optional",we(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),we(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vo(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(a=>fv(a,r)):fv(i,r)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),Am=N("$ZodExactOptional",(e,t)=>{Ja.init(e,t),we(e._zod,"values",()=>t.innerType._zod.values),we(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Cm=N("$ZodNullable",(e,t)=>{ge.init(e,t),we(e._zod,"optin",()=>t.innerType._zod.optin),we(e._zod,"optout",()=>t.innerType._zod.optout),we(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vo(n.source)}|null)$`):void 0}),we(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),qm=N("$ZodDefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",we(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>hv(i,t)):hv(r,t)}});function hv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Lm=N("$ZodPrefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",we(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),Mm=N("$ZodNonOptional",(e,t)=>{ge.init(e,t),we(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>gv(i,e)):gv(r,e)}});function gv(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Dm=N("$ZodSuccess",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Xt("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Um=N("$ZodCatch",(e,t)=>{ge.init(e,t),e._zod.optin="optional",we(e._zod,"optout",()=>t.innerType._zod.optout),we(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>at(a,o,qe()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>at(i,o,qe()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Vm=N("$ZodNaN",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Ga=N("$ZodPipe",(e,t)=>{ge.init(e,t),we(e._zod,"values",()=>t.in._zod.values),we(e._zod,"optin",()=>t.in._zod.optin),we(e._zod,"optout",()=>t.out._zod.optout),we(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>Ma(a,t.in,o)):Ma(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>Ma(i,t.out,o)):Ma(r,t.out,o)}});function Ma(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var ei=N("$ZodCodec",(e,t)=>{ge.init(e,t),we(e._zod,"values",()=>t.in._zod.values),we(e._zod,"optin",()=>t.in._zod.optin),we(e._zod,"optout",()=>t.out._zod.optout),we(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(a=>Da(a,t,o)):Da(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>Da(a,t,o)):Da(i,t,o)}}});function Da(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>Ua(e,i,t.out,n)):Ua(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>Ua(e,i,t.in,n)):Ua(e,r,t.in,n)}}function Ua(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}var Zm=N("$ZodPreprocess",(e,t)=>{Ga.init(e,t)}),Fm=N("$ZodReadonly",(e,t)=>{ge.init(e,t),we(e._zod,"propValues",()=>t.innerType._zod.propValues),we(e._zod,"values",()=>t.innerType._zod.values),we(e._zod,"optin",()=>t.innerType?._zod?.optin),we(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(vv):vv(r)}});function vv(e){return e.value=Object.freeze(e.value),e}var Hm=N("$ZodTemplateLiteral",(e,t)=>{ge.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,a))}else if(o===null||qu.has(typeof o))n.push(St(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Jm=N("$ZodFunction",(e,t)=>(ge.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?Ra(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Ra(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Ia(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Ia(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new Ha({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),Gm=N("$ZodPromise",(e,t)=>{ge.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),Bm=N("$ZodLazy",(e,t)=>{ge.init(e,t),we(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),we(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),we(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),we(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),we(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),Km=N("$ZodCustom",(e,t)=>{je.init(e,t),ge.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>yv(i,n,o,e));yv(r,n,o,e)}});function yv(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(dn(r))}}var ri={};Lt(ri,{ar:()=>wv,az:()=>Rv,be:()=>kv,bg:()=>Tv,ca:()=>Pv,cs:()=>Ev,da:()=>xv,de:()=>jv,el:()=>Nv,en:()=>Ba,eo:()=>Ov,es:()=>Av,fa:()=>Cv,fi:()=>qv,fr:()=>Lv,frCA:()=>Mv,he:()=>Dv,hr:()=>Uv,hu:()=>Vv,hy:()=>Fv,id:()=>Hv,is:()=>Jv,it:()=>Gv,ja:()=>Bv,ka:()=>Kv,kh:()=>Wv,km:()=>Ka,ko:()=>Yv,lt:()=>Qv,mk:()=>ey,ms:()=>ty,nl:()=>ry,no:()=>ny,ota:()=>oy,pl:()=>ay,ps:()=>iy,pt:()=>sy,ro:()=>cy,ru:()=>uy,sl:()=>dy,sv:()=>my,ta:()=>py,th:()=>fy,tr:()=>hy,ua:()=>gy,uk:()=>Wa,ur:()=>vy,uz:()=>yy,vi:()=>_y,yo:()=>$y,zhCN:()=>Sy,zhTW:()=>by});var cw=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${J(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`${n[i.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function wv(){return{localeError:cw()}}var lw=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${J(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Rv(){return{localeError:lw()}}function Iv(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var uw=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${J(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Iv(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Iv(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function kv(){return{localeError:uw()}}var dw=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${J(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.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 "${i.prefix}"`;if(i.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 "${i.suffix}"`;if(i.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 "${i.includes}"`;if(i.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 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Tv(){return{localeError:dw()}}var mw=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${J(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${L(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function Pv(){return{localeError:mw()}}var pw=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${J(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${L(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function Ev(){return{localeError:pw()}}var fw=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${J(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function xv(){return{localeError:fw()}}var hw=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${J(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function jv(){return{localeError:hw()}}var gw=()=>{let 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(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[i.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Nv(){return{localeError:gw()}}var vw=()=>{let 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(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${J(r.values[0])}`:`Invalid option: expected one of ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Ba(){return{localeError:vw()}}var yw=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${J(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function Ov(){return{localeError:yw()}}var _w=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${J(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function Av(){return{localeError:_w()}}var Sw=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${J(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${L(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${L(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Cv(){return{localeError:Sw()}}var bw=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${J(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${L(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function qv(){return{localeError:bw()}}var $w=()=>{let 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(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${J(r.values[0])} attendu`:`Option invalide : une valeur parmi ${L(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Lv(){return{localeError:$w()}}var zw=()=>{let 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(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${J(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Mv(){return{localeError:zw()}}var ww=()=>{let 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"}},n=l=>l?e[l]:void 0,o=l=>{let d=n(l);return d?d.label:l??e.unknown.label},r=l=>`\u05D4${o(l)}`,i=l=>(n(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=l=>l?t[l]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,p=c[d??""]??o(d),h=G(l.input),S=c[h]??e[h]?.label??h;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${S}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${S}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${J(l.values[0])}`;let d=l.values.map(S=>J(S));if(l.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 ${d[0]} \u05D0\u05D5 ${d[1]}`;let p=d[d.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 ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let d=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let v=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",$=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let h=l.inclusive?"<=":"<",S=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${S} ${h}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${S} ${h}${l.maximum.toString()}`}case"too_small":{let d=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let v=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let y=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let $=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let h=l.inclusive?">=":">",S=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${S} ${h}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${S} ${h}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.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 ${d.pattern}`;let p=s[d.format],h=p?.label??d.format,v=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${h} \u05DC\u05D0 ${v}`}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 ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${L(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Dv(){return{localeError:ww()}}var Rw=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${J(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${n[i.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${L(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function Uv(){return{localeError:Rw()}}var Iw=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${J(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Vv(){return{localeError:Iw()}}function Zv(e,t,n){return Math.abs(e)===1?t:n}function vn(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var kw=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${J(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Zv(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 ${vn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${vn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Zv(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 ${vn(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${vn(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.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 ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${L(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${vn(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${vn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Fv(){return{localeError:kw()}}var Tw=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${J(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function Hv(){return{localeError:Tw()}}var Pw=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${J(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${L(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function Jv(){return{localeError:Pw()}}var Ew=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${J(r.values[0])}`:`Opzione non valida: atteso uno tra ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${n[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${L(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function Gv(){return{localeError:Ew()}}var xw=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${J(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${L(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Bv(){return{localeError:xw()}}var jw=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${L(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"-\u10D8\u10D7`:i.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 "${i.suffix}"-\u10D8\u10D7`:i.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 "${i.includes}"-\u10E1`:i.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 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Kv(){return{localeError:jw()}}var Nw=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${L(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Ka(){return{localeError:Nw()}}function Wv(){return Ka()}var Ow=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${J(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${L(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${a}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${L(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Yv(){return{localeError:Ow()}}var ti=e=>e.charAt(0).toUpperCase()+e.slice(1);function Xv(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}var Aw=()=>{let 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(r,i,a,s){let c=e[r]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${J(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${L(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,a=t(r.origin,Xv(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${ti(i??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${ti(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,a=t(r.origin,Xv(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${ti(i??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${ti(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${L(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${ti(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Qv(){return{localeError:Aw()}}var Cw=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${J(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function ey(){return{localeError:Cw()}}var qw=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${J(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function ty(){return{localeError:qw()}}var Lw=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${J(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function ry(){return{localeError:Lw()}}var Mw=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${J(r.values[0])}`:`Ugyldig valg: forventet en av ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function ny(){return{localeError:Mw()}}var Dw=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${J(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function oy(){return{localeError:Dw()}}var Uw=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${J(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${L(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function iy(){return{localeError:Uw()}}var Vw=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${J(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function ay(){return{localeError:Vw()}}var Zw=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${J(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function sy(){return{localeError:Zw()}}var Fw=()=>{let 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(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${J(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${n[i.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${L(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function cy(){return{localeError:Fw()}}function ly(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var Hw=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${J(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=ly(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=ly(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function uy(){return{localeError:Hw()}}var Jw=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${J(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${L(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function dy(){return{localeError:Jw()}}var Gw=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${J(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function my(){return{localeError:Gw()}}var Bw=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${L(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function py(){return{localeError:Bw()}}var Kw=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${J(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.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 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${L(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function fy(){return{localeError:Kw()}}var Ww=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${J(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function hy(){return{localeError:Ww()}}var Yw=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${J(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Wa(){return{localeError:Yw()}}function gy(){return Wa()}var Xw=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${J(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${L(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function vy(){return{localeError:Xw()}}var Qw=()=>{let 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(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${J(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function yy(){return{localeError:Qw()}}var eR=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${J(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${L(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function _y(){return{localeError:eR()}}var tR=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${J(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Sy(){return{localeError:tR()}}var rR=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${J(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function by(){return{localeError:rR()}}var nR=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=G(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${J(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${L(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${i}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${i}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${L(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function $y(){return{localeError:nR()}}var zy,Wm=Symbol("ZodOutput"),Ym=Symbol("ZodInput"),Ya=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Xa(){return new Ya}(zy=globalThis).__zod_globalRegistry??(zy.__zod_globalRegistry=Xa());var Xe=globalThis.__zod_globalRegistry;function Xm(e,t){return new e({type:"string",...W(t)})}function Qm(e,t){return new e({type:"string",coerce:!0,...W(t)})}function Qa(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...W(t)})}function ni(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...W(t)})}function es(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...W(t)})}function ts(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...W(t)})}function rs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...W(t)})}function ns(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...W(t)})}function oi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...W(t)})}function os(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...W(t)})}function is(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...W(t)})}function as(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...W(t)})}function ss(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...W(t)})}function cs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...W(t)})}function ls(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...W(t)})}function us(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...W(t)})}function ds(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...W(t)})}function ms(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...W(t)})}function ep(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...W(t)})}function ps(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...W(t)})}function fs(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...W(t)})}function hs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...W(t)})}function gs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...W(t)})}function vs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...W(t)})}function ys(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...W(t)})}var tp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function rp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...W(t)})}function np(e,t){return new e({type:"string",format:"date",check:"string_format",...W(t)})}function op(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...W(t)})}function ip(e,t){return new e({type:"string",format:"duration",check:"string_format",...W(t)})}function ap(e,t){return new e({type:"number",checks:[],...W(t)})}function sp(e,t){return new e({type:"number",coerce:!0,checks:[],...W(t)})}function cp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...W(t)})}function lp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...W(t)})}function up(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...W(t)})}function dp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...W(t)})}function mp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...W(t)})}function pp(e,t){return new e({type:"boolean",...W(t)})}function fp(e,t){return new e({type:"boolean",coerce:!0,...W(t)})}function hp(e,t){return new e({type:"bigint",...W(t)})}function gp(e,t){return new e({type:"bigint",coerce:!0,...W(t)})}function vp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...W(t)})}function yp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...W(t)})}function _p(e,t){return new e({type:"symbol",...W(t)})}function Sp(e,t){return new e({type:"undefined",...W(t)})}function bp(e,t){return new e({type:"null",...W(t)})}function $p(e){return new e({type:"any"})}function zp(e){return new e({type:"unknown"})}function wp(e,t){return new e({type:"never",...W(t)})}function Rp(e,t){return new e({type:"void",...W(t)})}function Ip(e,t){return new e({type:"date",...W(t)})}function kp(e,t){return new e({type:"date",coerce:!0,...W(t)})}function Tp(e,t){return new e({type:"nan",...W(t)})}function xt(e,t){return new qa({check:"less_than",...W(t),value:e,inclusive:!1})}function ht(e,t){return new qa({check:"less_than",...W(t),value:e,inclusive:!0})}function jt(e,t){return new La({check:"greater_than",...W(t),value:e,inclusive:!1})}function st(e,t){return new La({check:"greater_than",...W(t),value:e,inclusive:!0})}function _s(e){return jt(0,e)}function Ss(e){return xt(0,e)}function bs(e){return ht(0,e)}function $s(e){return st(0,e)}function nr(e,t){return new bd({check:"multiple_of",...W(t),value:e})}function or(e,t){return new wd({check:"max_size",...W(t),maximum:e})}function Nt(e,t){return new Rd({check:"min_size",...W(t),minimum:e})}function Cr(e,t){return new Id({check:"size_equals",...W(t),size:e})}function qr(e,t){return new kd({check:"max_length",...W(t),maximum:e})}function Dt(e,t){return new Td({check:"min_length",...W(t),minimum:e})}function Lr(e,t){return new Pd({check:"length_equals",...W(t),length:e})}function yn(e,t){return new Ed({check:"string_format",format:"regex",...W(t),pattern:e})}function _n(e){return new xd({check:"string_format",format:"lowercase",...W(e)})}function Sn(e){return new jd({check:"string_format",format:"uppercase",...W(e)})}function bn(e,t){return new Nd({check:"string_format",format:"includes",...W(t),includes:e})}function $n(e,t){return new Od({check:"string_format",format:"starts_with",...W(t),prefix:e})}function zn(e,t){return new Ad({check:"string_format",format:"ends_with",...W(t),suffix:e})}function zs(e,t,n){return new Cd({check:"property",property:e,schema:t,...W(n)})}function wn(e,t){return new qd({check:"mime_type",mime:e,...W(t)})}function Rt(e){return new Ld({check:"overwrite",tx:e})}function Rn(e){return Rt(t=>t.normalize(e))}function In(){return Rt(e=>e.trim())}function kn(){return Rt(e=>e.toLowerCase())}function Tn(){return Rt(e=>e.toUpperCase())}function Pn(){return Rt(e=>Ou(e))}function Pp(e,t,n){return new e({type:"array",element:t,...W(n)})}function iR(e,t,n){return new e({type:"union",options:t,...W(n)})}function aR(e,t,n){return new e({type:"union",options:t,inclusive:!1,...W(n)})}function sR(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...W(o)})}function cR(e,t,n){return new e({type:"intersection",left:t,right:n})}function lR(e,t,n,o){let r=n instanceof ge,i=r?o:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...W(i)})}function uR(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...W(o)})}function dR(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...W(o)})}function mR(e,t,n){return new e({type:"set",valueType:t,...W(n)})}function pR(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...W(n)})}function fR(e,t,n){return new e({type:"enum",entries:t,...W(n)})}function hR(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...W(n)})}function Ep(e,t){return new e({type:"file",...W(t)})}function gR(e,t){return new e({type:"transform",transform:t})}function vR(e,t){return new e({type:"optional",innerType:t})}function yR(e,t){return new e({type:"nullable",innerType:t})}function _R(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Cu(n)}})}function SR(e,t,n){return new e({type:"nonoptional",innerType:t,...W(n)})}function bR(e,t){return new e({type:"success",innerType:t})}function $R(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function zR(e,t,n){return new e({type:"pipe",in:t,out:n})}function wR(e,t){return new e({type:"readonly",innerType:t})}function RR(e,t,n){return new e({type:"template_literal",parts:t,...W(n)})}function IR(e,t){return new e({type:"lazy",getter:t})}function kR(e,t){return new e({type:"promise",innerType:t})}function xp(e,t,n){let o=W(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function jp(e,t,n){return new e({type:"custom",check:"custom",fn:t,...W(n)})}function Np(e,t){let n=wy(o=>(o.addIssue=r=>{if(typeof r=="string")o.issues.push(dn(r,o.value,n._zod.def));else{let i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(dn(i))}},e(o.value,o)),t);return n}function wy(e,t){let n=new je({check:"custom",...W(t)});return n._zod.check=e,n}function Op(e){let t=new je({check:"describe"});return t._zod.onattach=[n=>{let o=Xe.get(n)??{};Xe.add(n,{...o,description:e})}],t._zod.check=()=>{},t}function Ap(e){let t=new je({check:"meta"});return t._zod.onattach=[n=>{let o=Xe.get(n)??{};Xe.add(n,{...o,...e})}],t._zod.check=()=>{},t}function Cp(e,t){let n=W(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(S=>typeof S=="string"?S.toLowerCase():S),r=r.map(S=>typeof S=="string"?S.toLowerCase():S));let i=new Set(o),a=new Set(r),s=e.Codec??ei,c=e.Boolean??Xo,l=e.String??Ar,d=new l({type:"string",error:n.error}),p=new c({type:"boolean",error:n.error}),h=new s({type:"pipe",in:d,out:p,transform:((S,v)=>{let $=S;return n.case!=="sensitive"&&($=$.toLowerCase()),i.has($)?!0:a.has($)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:v.value,inst:h,continue:!1}),{})}),reverseTransform:((S,v)=>S===!0?o[0]||"true":r[0]||"false"),error:n.error});return h}function En(e,t,n,o={}){let r=W(o),i={...W(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}function ir(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??Xe,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Pe(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let h=a.schema,S=t.processors[r.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);S(e,t,h,d)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Pe(p,t,d),t.seen.get(p).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&ct(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function ar(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.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.`);o.set(s,a[0])}}let r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,h=e.external.uri??(v=>v);if(p)return{ref:h(p)};let S=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=S,{defId:S,ref:`${h("__shared")}#/${s}/${S}`}}if(a[1]===n)return{ref:"#"};let l=`#/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=r(a);s.def={...s.schema},l&&(s.defId=l);let d=s.schema;for(let p in d)delete d[p];d.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
65
65
 
66
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function ar(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let c=e.seen.get(s);if(c.ref===null)return;let u=c.def??c.schema,d={...u},p=c.ref;if(c.ref=null,p){o(p);let S=e.seen.get(p),v=S.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(v)):Object.assign(u,v),Object.assign(u,d),s._zod.parent===p)for(let y in u)y==="$ref"||y==="allOf"||y in d||delete u[y];if(v.$ref&&S.def)for(let y in u)y==="$ref"||y==="allOf"||y in S.def&&JSON.stringify(u[y])===JSON.stringify(S.def[y])&&delete u[y]}let h=s._zod.parent;if(h&&h!==p){o(h);let S=e.seen.get(h);if(S?.schema.$ref&&(u.$ref=S.schema.$ref,S.def))for(let v in u)v==="$ref"||v==="allOf"||v in S.def&&JSON.stringify(u[v])===JSON.stringify(S.def[v])&&delete u[v]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&r.id===i&&delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:En(t,"input",e.processors),output:En(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function st(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return st(o.element,n);if(o.type==="set")return st(o.valueType,n);if(o.type==="lazy")return st(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return st(o.innerType,n);if(o.type==="intersection")return st(o.left,n)||st(o.right,n);if(o.type==="record"||o.type==="map")return st(o.keyType,n)||st(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:st(o.in,n)||st(o.out,n);if(o.type==="object"){for(let r in o.shape)if(st(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(st(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(st(r,n))return!0;return!!(o.rest&&st(o.rest,n))}return!1}var Cp=(e,t={})=>n=>{let o=or({...n,processors:t});return Te(e,o),ir(o,e),ar(o,e)},En=(e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},a=or({...r??{},target:i,io:t,processors:n});return Te(e,a),ir(a,e),ar(a,e)};var kR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qp=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof a=="number"&&(r.maxLength=a),s&&(r.format=kR[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let d=[...c];d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Lp=(e,t,n,o)=>{let r=n,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let p=typeof d=="number"&&d>=(i??Number.NEGATIVE_INFINITY),h=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),S=t.target==="draft-04"||t.target==="openapi-3.0";p?S?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:typeof i=="number"&&(r.minimum=i),h?S?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u:typeof a=="number"&&(r.maximum=a),typeof c=="number"&&(r.multipleOf=c)},Mp=(e,t,n,o)=>{n.type="boolean"},Dp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Up=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Vp=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Zp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Fp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Hp=(e,t,n,o)=>{n.not={}},Jp=(e,t,n,o)=>{},Gp=(e,t,n,o)=>{},Bp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Kp=(e,t,n,o)=>{let r=e._zod.def,i=Do(r.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Wp=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},Yp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Xp=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},Qp=(e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(r,i)},ef=(e,t,n,o)=>{n.type="boolean"},tf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},rf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},nf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},of=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},af=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},sf=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=Te(i.element,t,{...o,path:[...o.path,"items"]})},cf=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let u in a)r.properties[u]=Te(a[u],t,{...o,path:[...o.path,"properties",u]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(u=>{let d=i.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(r.required=Array.from(c)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=Te(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},ws=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,a=r.options.map((s,c)=>Te(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=a:n.anyOf=a},lf=(e,t,n,o)=>{let r=e._zod.def,i=Te(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=Te(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=c},uf=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((h,S)=>Te(h,t,{...o,path:[...o.path,a,S]})),u=i.rest?Te(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=c,u&&(r.items=u)):t.target==="openapi-3.0"?(r.items={anyOf:c},u&&r.items.anyOf.push(u),r.minItems=c.length,u||(r.maxItems=c.length)):(r.items=c,u&&(r.additionalItems=u));let{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(r.minItems=d),typeof p=="number"&&(r.maxItems=p)},df=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=Te(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let p of c)r.patternProperties[p.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Te(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=Te(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let u=a._zod.values;if(u){let d=[...u].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(r.required=d)}},mf=(e,t,n,o)=>{let r=e._zod.def,i=Te(r.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},pf=(e,t,n,o)=>{let r=e._zod.def;Te(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},ff=(e,t,n,o)=>{let r=e._zod.def;Te(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},hf=(e,t,n,o)=>{let r=e._zod.def;Te(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},gf=(e,t,n,o)=>{let r=e._zod.def;Te(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},vf=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?r.out:r.in:r.out;Te(a,t,o);let s=t.seen.get(e);s.ref=a},yf=(e,t,n,o)=>{let r=e._zod.def;Te(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},_f=(e,t,n,o)=>{let r=e._zod.def;Te(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Rs=(e,t,n,o)=>{let r=e._zod.def;Te(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Sf=(e,t,n,o)=>{let r=e._zod.innerType;Te(r,t,o);let i=t.seen.get(e);i.ref=r},zs={string:qp,number:Lp,boolean:Mp,bigint:Dp,symbol:Up,null:Vp,undefined:Zp,void:Fp,never:Hp,any:Jp,unknown:Gp,date:Bp,enum:Kp,literal:Wp,nan:Yp,template_literal:Xp,file:Qp,success:ef,custom:tf,function:rf,transform:nf,map:of,set:af,array:sf,object:cf,union:ws,intersection:lf,tuple:uf,record:df,nullable:mf,nonoptional:pf,default:ff,prefault:hf,catch:gf,pipe:vf,readonly:yf,promise:_f,optional:Rs,lazy:Sf};function Lr(e,t){if("_idmap"in e){let o=e,r=or({...t,processors:zs}),i={};for(let c of o._idmap.entries()){let[u,d]=c;Te(d,r)}let a={},s={registry:o,uri:t?.uri,defs:i};r.external=s;for(let c of o._idmap.entries()){let[u,d]=c;ir(r,d),a[u]=ar(r,d)}if(Object.keys(i).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let n=or({...t,processors:zs});return Te(e,n),ir(n,e),ar(n,e)}var Is=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=or({processors:zs,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Te(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),ir(this.ctx,t);let o=ar(this.ctx,t),{"~standard":r,...i}=o;return i}};var wy={};var oi={};qt(oi,{ZodAny:()=>Df,ZodArray:()=>Ff,ZodBase64:()=>Bs,ZodBase64URL:()=>Ks,ZodBigInt:()=>Ln,ZodBigIntFormat:()=>Xs,ZodBoolean:()=>qn,ZodCIDRv4:()=>Js,ZodCIDRv6:()=>Gs,ZodCUID:()=>Ms,ZodCUID2:()=>Ds,ZodCatch:()=>uh,ZodCodec:()=>fi,ZodCustom:()=>hi,ZodCustomStringFormat:()=>An,ZodDate:()=>ui,ZodDefault:()=>oh,ZodDiscriminatedUnion:()=>Jf,ZodE164:()=>Ws,ZodEmail:()=>As,ZodEmoji:()=>qs,ZodEnum:()=>jn,ZodExactOptional:()=>th,ZodFile:()=>Qf,ZodFunction:()=>_h,ZodGUID:()=>ai,ZodIPv4:()=>Fs,ZodIPv6:()=>Hs,ZodIntersection:()=>Gf,ZodJWT:()=>Ys,ZodKSUID:()=>Zs,ZodLazy:()=>vh,ZodLiteral:()=>Xf,ZodMAC:()=>Cf,ZodMap:()=>Wf,ZodNaN:()=>mh,ZodNanoID:()=>Ls,ZodNever:()=>Vf,ZodNonOptional:()=>nc,ZodNull:()=>Mf,ZodNullable:()=>nh,ZodNumber:()=>Cn,ZodNumberFormat:()=>Mr,ZodObject:()=>di,ZodOptional:()=>rc,ZodPipe:()=>pi,ZodPrefault:()=>ah,ZodPreprocess:()=>ph,ZodPromise:()=>yh,ZodReadonly:()=>fh,ZodRecord:()=>xn,ZodSet:()=>Yf,ZodString:()=>Nn,ZodStringFormat:()=>Ee,ZodSuccess:()=>lh,ZodSymbol:()=>qf,ZodTemplateLiteral:()=>gh,ZodTransform:()=>eh,ZodTuple:()=>Bf,ZodType:()=>be,ZodULID:()=>Us,ZodURL:()=>li,ZodUUID:()=>Nt,ZodUndefined:()=>Lf,ZodUnion:()=>mi,ZodUnknown:()=>Uf,ZodVoid:()=>Zf,ZodXID:()=>Vs,ZodXor:()=>Hf,_ZodString:()=>Os,_default:()=>ih,_function:()=>I_,any:()=>Qs,array:()=>O,base64:()=>Hy,base64url:()=>Jy,bigint:()=>n_,boolean:()=>te,catch:()=>dh,check:()=>k_,cidrv4:()=>Zy,cidrv6:()=>Fy,codec:()=>$_,cuid:()=>Ay,cuid2:()=>Cy,custom:()=>T_,date:()=>l_,describe:()=>P_,discriminatedUnion:()=>sr,e164:()=>Gy,email:()=>Cs,emoji:()=>Ny,enum:()=>he,exactOptional:()=>rh,file:()=>y_,float32:()=>Qy,float64:()=>e_,function:()=>I_,guid:()=>ky,hash:()=>Xy,hex:()=>Yy,hostname:()=>Wy,httpUrl:()=>jy,instanceof:()=>x_,int:()=>js,int32:()=>t_,int64:()=>o_,intersection:()=>Rt,invertCodec:()=>z_,ipv4:()=>Dy,ipv6:()=>Vy,json:()=>N_,jwt:()=>By,keyof:()=>u_,ksuid:()=>My,lazy:()=>cr,literal:()=>A,looseObject:()=>ce,looseRecord:()=>f_,mac:()=>Uy,map:()=>h_,meta:()=>E_,nan:()=>b_,nanoid:()=>Oy,nativeEnum:()=>v_,never:()=>ec,nonoptional:()=>ch,null:()=>Ot,nullable:()=>si,nullish:()=>__,number:()=>F,object:()=>T,optional:()=>ae,partialRecord:()=>p_,pipe:()=>Ns,prefault:()=>sh,preprocess:()=>Ut,promise:()=>R_,readonly:()=>hh,record:()=>Q,refine:()=>Sh,set:()=>g_,strictObject:()=>d_,string:()=>m,stringFormat:()=>Ky,stringbool:()=>j_,success:()=>S_,superRefine:()=>bh,symbol:()=>a_,templateLiteral:()=>w_,transform:()=>tc,tuple:()=>Kf,uint32:()=>r_,uint64:()=>i_,ulid:()=>qy,undefined:()=>s_,union:()=>oe,unknown:()=>ie,url:()=>On,uuid:()=>Ty,uuidv4:()=>Py,uuidv6:()=>Ey,uuidv7:()=>xy,void:()=>c_,xid:()=>Ly,xor:()=>m_});var ks={};qt(ks,{endsWith:()=>$n,gt:()=>xt,gte:()=>at,includes:()=>Sn,length:()=>qr,lowercase:()=>yn,lt:()=>Et,lte:()=>ft,maxLength:()=>Cr,maxSize:()=>nr,mime:()=>zn,minLength:()=>Mt,minSize:()=>jt,multipleOf:()=>rr,negative:()=>_s,nonnegative:()=>bs,nonpositive:()=>Ss,normalize:()=>wn,overwrite:()=>wt,positive:()=>ys,property:()=>$s,regex:()=>vn,size:()=>Ar,slugify:()=>Tn,startsWith:()=>bn,toLowerCase:()=>In,toUpperCase:()=>kn,trim:()=>Rn,uppercase:()=>_n});var ht={};qt(ht,{ZodISODate:()=>Ps,ZodISODateTime:()=>Ts,ZodISODuration:()=>xs,ZodISOTime:()=>Es,date:()=>$f,datetime:()=>bf,duration:()=>wf,time:()=>zf});var Ts=N("ZodISODateTime",(e,t)=>{Yd.init(e,t),Ee.init(e,t)});function bf(e){return tp(Ts,e)}var Ps=N("ZodISODate",(e,t)=>{Xd.init(e,t),Ee.init(e,t)});function $f(e){return rp(Ps,e)}var Es=N("ZodISOTime",(e,t)=>{Qd.init(e,t),Ee.init(e,t)});function zf(e){return np(Es,e)}var xs=N("ZodISODuration",(e,t)=>{em.init(e,t),Ee.init(e,t)});function wf(e){return op(xs,e)}var Ry=(e,t)=>{Ho.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Go(e,n)},flatten:{value:n=>Jo(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,cn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,cn,2)}},isEmpty:{get(){return e.issues.length===0}}})},PR=N("ZodError",Ry),ut=N("ZodError",Ry,{Parent:Error});var Rf=dn(ut),If=mn(ut),ii=pn(ut),kf=fn(ut),Tf=Ia(ut),Pf=ka(ut),Ef=Ta(ut),xf=Pa(ut),jf=Ea(ut),Nf=xa(ut),Of=ja(ut),Af=Na(ut);var Iy=new WeakMap;function ci(e,t,n){let o=Object.getPrototypeOf(e),r=Iy.get(o);if(r||(r=new Set,Iy.set(o,r)),!r.has(t)){r.add(t);for(let i in n){let a=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var be=N("ZodType",(e,t)=>(ge.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:En(e,"input"),output:En(e,"output")}}),e.toJSONSchema=Cp(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>Rf(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>ii(e,n,o),e.parseAsync=async(n,o)=>If(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>kf(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Tf(e,n,o),e.decode=(n,o)=>Pf(e,n,o),e.encodeAsync=async(n,o)=>Ef(e,n,o),e.decodeAsync=async(n,o)=>xf(e,n,o),e.safeEncode=(n,o)=>jf(e,n,o),e.safeDecode=(n,o)=>Nf(e,n,o),e.safeEncodeAsync=async(n,o)=>Of(e,n,o),e.safeDecodeAsync=async(n,o)=>Af(e,n,o),ci(e,"ZodType",{check(...n){let o=this.def;return this.clone(B.mergeDefs(o,{checks:[...o.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return ot(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(Sh(n,o))},superRefine(n,o){return this.check(bh(n,o))},overwrite(n){return this.check(wt(n))},optional(){return ae(this)},exactOptional(){return rh(this)},nullable(){return si(this)},nullish(){return ae(si(this))},nonoptional(n){return ch(this,n)},array(){return O(this)},or(n){return oe([this,n])},and(n){return Rt(this,n)},transform(n){return Ns(this,tc(n))},default(n){return ih(this,n)},prefault(n){return sh(this,n)},catch(n){return dh(this,n)},pipe(n){return Ns(this,n)},readonly(){return hh(this)},describe(n){let o=this.clone();return Ye.add(o,{description:n}),o},meta(...n){if(n.length===0)return Ye.get(this);let o=this.clone();return Ye.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Ye.get(e)?.description},configurable:!0}),e)),Os=N("_ZodString",(e,t)=>{Or.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>qp(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ci(e,"_ZodString",{regex(...o){return this.check(vn(...o))},includes(...o){return this.check(Sn(...o))},startsWith(...o){return this.check(bn(...o))},endsWith(...o){return this.check($n(...o))},min(...o){return this.check(Mt(...o))},max(...o){return this.check(Cr(...o))},length(...o){return this.check(qr(...o))},nonempty(...o){return this.check(Mt(1,...o))},lowercase(o){return this.check(yn(o))},uppercase(o){return this.check(_n(o))},trim(){return this.check(Rn())},normalize(...o){return this.check(wn(...o))},toLowerCase(){return this.check(In())},toUpperCase(){return this.check(kn())},slugify(){return this.check(Tn())}})}),Nn=N("ZodString",(e,t)=>{Or.init(e,t),Os.init(e,t),e.email=n=>e.check(Xa(As,n)),e.url=n=>e.check(ni(li,n)),e.jwt=n=>e.check(vs(Ys,n)),e.emoji=n=>e.check(ns(qs,n)),e.guid=n=>e.check(ri(ai,n)),e.uuid=n=>e.check(Qa(Nt,n)),e.uuidv4=n=>e.check(es(Nt,n)),e.uuidv6=n=>e.check(ts(Nt,n)),e.uuidv7=n=>e.check(rs(Nt,n)),e.nanoid=n=>e.check(os(Ls,n)),e.guid=n=>e.check(ri(ai,n)),e.cuid=n=>e.check(is(Ms,n)),e.cuid2=n=>e.check(as(Ds,n)),e.ulid=n=>e.check(ss(Us,n)),e.base64=n=>e.check(fs(Bs,n)),e.base64url=n=>e.check(hs(Ks,n)),e.xid=n=>e.check(cs(Vs,n)),e.ksuid=n=>e.check(ls(Zs,n)),e.ipv4=n=>e.check(us(Fs,n)),e.ipv6=n=>e.check(ds(Hs,n)),e.cidrv4=n=>e.check(ms(Js,n)),e.cidrv6=n=>e.check(ps(Gs,n)),e.e164=n=>e.check(gs(Ws,n)),e.datetime=n=>e.check(bf(n)),e.date=n=>e.check($f(n)),e.time=n=>e.check(zf(n)),e.duration=n=>e.check(wf(n))});function m(e){return Ym(Nn,e)}var Ee=N("ZodStringFormat",(e,t)=>{Pe.init(e,t),Os.init(e,t)}),As=N("ZodEmail",(e,t)=>{Vd.init(e,t),Ee.init(e,t)});function Cs(e){return Xa(As,e)}var ai=N("ZodGUID",(e,t)=>{Dd.init(e,t),Ee.init(e,t)});function ky(e){return ri(ai,e)}var Nt=N("ZodUUID",(e,t)=>{Ud.init(e,t),Ee.init(e,t)});function Ty(e){return Qa(Nt,e)}function Py(e){return es(Nt,e)}function Ey(e){return ts(Nt,e)}function xy(e){return rs(Nt,e)}var li=N("ZodURL",(e,t)=>{Zd.init(e,t),Ee.init(e,t)});function On(e){return ni(li,e)}function jy(e){return ni(li,{protocol:pt.httpProtocol,hostname:pt.domain,...B.normalizeParams(e)})}var qs=N("ZodEmoji",(e,t)=>{Fd.init(e,t),Ee.init(e,t)});function Ny(e){return ns(qs,e)}var Ls=N("ZodNanoID",(e,t)=>{Hd.init(e,t),Ee.init(e,t)});function Oy(e){return os(Ls,e)}var Ms=N("ZodCUID",(e,t)=>{Jd.init(e,t),Ee.init(e,t)});function Ay(e){return is(Ms,e)}var Ds=N("ZodCUID2",(e,t)=>{Gd.init(e,t),Ee.init(e,t)});function Cy(e){return as(Ds,e)}var Us=N("ZodULID",(e,t)=>{Bd.init(e,t),Ee.init(e,t)});function qy(e){return ss(Us,e)}var Vs=N("ZodXID",(e,t)=>{Kd.init(e,t),Ee.init(e,t)});function Ly(e){return cs(Vs,e)}var Zs=N("ZodKSUID",(e,t)=>{Wd.init(e,t),Ee.init(e,t)});function My(e){return ls(Zs,e)}var Fs=N("ZodIPv4",(e,t)=>{tm.init(e,t),Ee.init(e,t)});function Dy(e){return us(Fs,e)}var Cf=N("ZodMAC",(e,t)=>{nm.init(e,t),Ee.init(e,t)});function Uy(e){return Qm(Cf,e)}var Hs=N("ZodIPv6",(e,t)=>{rm.init(e,t),Ee.init(e,t)});function Vy(e){return ds(Hs,e)}var Js=N("ZodCIDRv4",(e,t)=>{om.init(e,t),Ee.init(e,t)});function Zy(e){return ms(Js,e)}var Gs=N("ZodCIDRv6",(e,t)=>{im.init(e,t),Ee.init(e,t)});function Fy(e){return ps(Gs,e)}var Bs=N("ZodBase64",(e,t)=>{sm.init(e,t),Ee.init(e,t)});function Hy(e){return fs(Bs,e)}var Ks=N("ZodBase64URL",(e,t)=>{cm.init(e,t),Ee.init(e,t)});function Jy(e){return hs(Ks,e)}var Ws=N("ZodE164",(e,t)=>{lm.init(e,t),Ee.init(e,t)});function Gy(e){return gs(Ws,e)}var Ys=N("ZodJWT",(e,t)=>{um.init(e,t),Ee.init(e,t)});function By(e){return vs(Ys,e)}var An=N("ZodCustomStringFormat",(e,t)=>{dm.init(e,t),Ee.init(e,t)});function Ky(e,t,n={}){return Pn(An,e,t,n)}function Wy(e){return Pn(An,"hostname",pt.hostname,e)}function Yy(e){return Pn(An,"hex",pt.hex,e)}function Xy(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=pt[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return Pn(An,o,r,t)}var Cn=N("ZodNumber",(e,t)=>{Va.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Lp(e,o,r,i),ci(e,"ZodNumber",{gt(o,r){return this.check(xt(o,r))},gte(o,r){return this.check(at(o,r))},min(o,r){return this.check(at(o,r))},lt(o,r){return this.check(Et(o,r))},lte(o,r){return this.check(ft(o,r))},max(o,r){return this.check(ft(o,r))},int(o){return this.check(js(o))},safe(o){return this.check(js(o))},positive(o){return this.check(xt(0,o))},nonnegative(o){return this.check(at(0,o))},negative(o){return this.check(Et(0,o))},nonpositive(o){return this.check(ft(0,o))},multipleOf(o,r){return this.check(rr(o,r))},step(o,r){return this.check(rr(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function F(e){return ip(Cn,e)}var Mr=N("ZodNumberFormat",(e,t)=>{mm.init(e,t),Cn.init(e,t)});function js(e){return sp(Mr,e)}function Qy(e){return cp(Mr,e)}function e_(e){return lp(Mr,e)}function t_(e){return up(Mr,e)}function r_(e){return dp(Mr,e)}var qn=N("ZodBoolean",(e,t)=>{Yo.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Mp(e,n,o,r)});function te(e){return mp(qn,e)}var Ln=N("ZodBigInt",(e,t)=>{Za.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Dp(e,o,r,i),e.gte=(o,r)=>e.check(at(o,r)),e.min=(o,r)=>e.check(at(o,r)),e.gt=(o,r)=>e.check(xt(o,r)),e.gte=(o,r)=>e.check(at(o,r)),e.min=(o,r)=>e.check(at(o,r)),e.lt=(o,r)=>e.check(Et(o,r)),e.lte=(o,r)=>e.check(ft(o,r)),e.max=(o,r)=>e.check(ft(o,r)),e.positive=o=>e.check(xt(BigInt(0),o)),e.negative=o=>e.check(Et(BigInt(0),o)),e.nonpositive=o=>e.check(ft(BigInt(0),o)),e.nonnegative=o=>e.check(at(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(rr(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function n_(e){return fp(Ln,e)}var Xs=N("ZodBigIntFormat",(e,t)=>{pm.init(e,t),Ln.init(e,t)});function o_(e){return gp(Xs,e)}function i_(e){return vp(Xs,e)}var qf=N("ZodSymbol",(e,t)=>{fm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Up(e,n,o,r)});function a_(e){return yp(qf,e)}var Lf=N("ZodUndefined",(e,t)=>{hm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zp(e,n,o,r)});function s_(e){return _p(Lf,e)}var Mf=N("ZodNull",(e,t)=>{gm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vp(e,n,o,r)});function Ot(e){return Sp(Mf,e)}var Df=N("ZodAny",(e,t)=>{vm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jp(e,n,o,r)});function Qs(){return bp(Df)}var Uf=N("ZodUnknown",(e,t)=>{ym.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gp(e,n,o,r)});function ie(){return $p(Uf)}var Vf=N("ZodNever",(e,t)=>{_m.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hp(e,n,o,r)});function ec(e){return zp(Vf,e)}var Zf=N("ZodVoid",(e,t)=>{Sm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fp(e,n,o,r)});function c_(e){return wp(Zf,e)}var ui=N("ZodDate",(e,t)=>{bm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Bp(e,o,r,i),e.min=(o,r)=>e.check(at(o,r)),e.max=(o,r)=>e.check(ft(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function l_(e){return Rp(ui,e)}var Ff=N("ZodArray",(e,t)=>{$m.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sf(e,n,o,r),e.element=t.element,ci(e,"ZodArray",{min(n,o){return this.check(Mt(n,o))},nonempty(n){return this.check(Mt(1,n))},max(n,o){return this.check(Cr(n,o))},length(n,o){return this.check(qr(n,o))},unwrap(){return this.element}})});function O(e,t){return Tp(Ff,e,t)}function u_(e){let t=e._zod.def.shape;return he(Object.keys(t))}var di=N("ZodObject",(e,t)=>{zm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cf(e,n,o,r),B.defineLazy(e,"shape",()=>t.shape),ci(e,"ZodObject",{keyof(){return he(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:ie()})},loose(){return this.clone({...this._zod.def,catchall:ie()})},strict(){return this.clone({...this._zod.def,catchall:ec()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return B.extend(this,n)},safeExtend(n){return B.safeExtend(this,n)},merge(n){return B.merge(this,n)},pick(n){return B.pick(this,n)},omit(n){return B.omit(this,n)},partial(...n){return B.partial(rc,this,n[0])},required(...n){return B.required(nc,this,n[0])}})});function T(e,t){let n={type:"object",shape:e??{},...B.normalizeParams(t)};return new di(n)}function d_(e,t){return new di({type:"object",shape:e,catchall:ec(),...B.normalizeParams(t)})}function ce(e,t){return new di({type:"object",shape:e,catchall:ie(),...B.normalizeParams(t)})}var mi=N("ZodUnion",(e,t)=>{Xo.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ws(e,n,o,r),e.options=t.options});function oe(e,t){return new mi({type:"union",options:e,...B.normalizeParams(t)})}var Hf=N("ZodXor",(e,t)=>{mi.init(e,t),wm.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ws(e,n,o,r),e.options=t.options});function m_(e,t){return new Hf({type:"union",options:e,inclusive:!1,...B.normalizeParams(t)})}var Jf=N("ZodDiscriminatedUnion",(e,t)=>{mi.init(e,t),Rm.init(e,t)});function sr(e,t,n){return new Jf({type:"union",options:t,discriminator:e,...B.normalizeParams(n)})}var Gf=N("ZodIntersection",(e,t)=>{Im.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lf(e,n,o,r)});function Rt(e,t){return new Gf({type:"intersection",left:e,right:t})}var Bf=N("ZodTuple",(e,t)=>{Fa.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uf(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Kf(e,t,n){let o=t instanceof ge,r=o?n:t,i=o?t:null;return new Bf({type:"tuple",items:e,rest:i,...B.normalizeParams(r)})}var xn=N("ZodRecord",(e,t)=>{km.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>df(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function Q(e,t,n){return!t||!t._zod?new xn({type:"record",keyType:m(),valueType:e,...B.normalizeParams(t)}):new xn({type:"record",keyType:e,valueType:t,...B.normalizeParams(n)})}function p_(e,t,n){let o=ot(e);return o._zod.values=void 0,new xn({type:"record",keyType:o,valueType:t,...B.normalizeParams(n)})}function f_(e,t,n){return new xn({type:"record",keyType:e,valueType:t,mode:"loose",...B.normalizeParams(n)})}var Wf=N("ZodMap",(e,t)=>{Tm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>of(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(jt(...n)),e.nonempty=n=>e.check(jt(1,n)),e.max=(...n)=>e.check(nr(...n)),e.size=(...n)=>e.check(Ar(...n))});function h_(e,t,n){return new Wf({type:"map",keyType:e,valueType:t,...B.normalizeParams(n)})}var Yf=N("ZodSet",(e,t)=>{Pm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>af(e,n,o,r),e.min=(...n)=>e.check(jt(...n)),e.nonempty=n=>e.check(jt(1,n)),e.max=(...n)=>e.check(nr(...n)),e.size=(...n)=>e.check(Ar(...n))});function g_(e,t){return new Yf({type:"set",valueType:e,...B.normalizeParams(t)})}var jn=N("ZodEnum",(e,t)=>{Em.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Kp(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new jn({...t,checks:[],...B.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new jn({...t,checks:[],...B.normalizeParams(r),entries:i})}});function he(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new jn({type:"enum",entries:n,...B.normalizeParams(t)})}function v_(e,t){return new jn({type:"enum",entries:e,...B.normalizeParams(t)})}var Xf=N("ZodLiteral",(e,t)=>{xm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wp(e,n,o,r),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 A(e,t){return new Xf({type:"literal",values:Array.isArray(e)?e:[e],...B.normalizeParams(t)})}var Qf=N("ZodFile",(e,t)=>{jm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qp(e,n,o,r),e.min=(n,o)=>e.check(jt(n,o)),e.max=(n,o)=>e.check(nr(n,o)),e.mime=(n,o)=>e.check(zn(Array.isArray(n)?n:[n],o))});function y_(e){return Pp(Qf,e)}var eh=N("ZodTransform",(e,t)=>{Nm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>nf(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Yt(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(B.issue(i,n.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(B.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function tc(e){return new eh({type:"transform",transform:e})}var rc=N("ZodOptional",(e,t)=>{Ha.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rs(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function ae(e){return new rc({type:"optional",innerType:e})}var th=N("ZodExactOptional",(e,t)=>{Om.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rs(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function rh(e){return new th({type:"optional",innerType:e})}var nh=N("ZodNullable",(e,t)=>{Am.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function si(e){return new nh({type:"nullable",innerType:e})}function __(e){return ae(si(e))}var oh=N("ZodDefault",(e,t)=>{Cm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ff(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ih(e,t){return new oh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():B.shallowClone(t)}})}var ah=N("ZodPrefault",(e,t)=>{qm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function sh(e,t){return new ah({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():B.shallowClone(t)}})}var nc=N("ZodNonOptional",(e,t)=>{Lm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function ch(e,t){return new nc({type:"nonoptional",innerType:e,...B.normalizeParams(t)})}var lh=N("ZodSuccess",(e,t)=>{Mm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ef(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function S_(e){return new lh({type:"success",innerType:e})}var uh=N("ZodCatch",(e,t)=>{Dm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dh(e,t){return new uh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var mh=N("ZodNaN",(e,t)=>{Um.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yp(e,n,o,r)});function b_(e){return kp(mh,e)}var pi=N("ZodPipe",(e,t)=>{Ja.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vf(e,n,o,r),e.in=t.in,e.out=t.out});function Ns(e,t){return new pi({type:"pipe",in:e,out:t})}var fi=N("ZodCodec",(e,t)=>{pi.init(e,t),Qo.init(e,t)});function $_(e,t,n){return new fi({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function z_(e){let t=e._zod.def;return new fi({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var ph=N("ZodPreprocess",(e,t)=>{pi.init(e,t),Vm.init(e,t)}),fh=N("ZodReadonly",(e,t)=>{Zm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function hh(e){return new fh({type:"readonly",innerType:e})}var gh=N("ZodTemplateLiteral",(e,t)=>{Fm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xp(e,n,o,r)});function w_(e,t){return new gh({type:"template_literal",parts:e,...B.normalizeParams(t)})}var vh=N("ZodLazy",(e,t)=>{Gm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sf(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function cr(e){return new vh({type:"lazy",getter:e})}var yh=N("ZodPromise",(e,t)=>{Jm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_f(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function R_(e){return new yh({type:"promise",innerType:e})}var _h=N("ZodFunction",(e,t)=>{Hm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rf(e,n,o,r)});function I_(e){return new _h({type:"function",input:Array.isArray(e?.input)?Kf(e?.input):e?.input??O(ie()),output:e?.output??ie()})}var hi=N("ZodCustom",(e,t)=>{Bm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tf(e,n,o,r)});function k_(e){let t=new xe({check:"custom"});return t._zod.check=e,t}function T_(e,t){return Ep(hi,e??(()=>!0),t)}function Sh(e,t={}){return xp(hi,e,t)}function bh(e,t){return jp(e,t)}var P_=Np,E_=Op;function x_(e,t={}){let n=new hi({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...B.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var j_=(...e)=>Ap({Codec:fi,Boolean:qn,String:Nn},...e);function N_(e){let t=cr(()=>oe([m(e),F(),te(),Ot(),O(t),Q(m(),t)]));return t}function Ut(e,t){return new ph({type:"pipe",in:tc(e),out:t})}var zh={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 xR(e){Ce({customError:e})}function jR(){return Ce().customError}var $h;$h||($h={});var re={...oi,...ks,iso:ht},NR=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 OR(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function AR(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function O_(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return re.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){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return re.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=AR(r,t),a=et(i,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return re.null();if(r.length===0)return re.never();if(r.length===1)return re.literal(r[0]);if(r.every(a=>typeof a=="string"))return re.enum(r);let i=r.map(a=>re.literal(a));return i.length<2?i[0]:re.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return re.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let a={...e,type:i};return O_(a,t)});return r.length===0?re.never():r.length===1?r[0]:re.union(r)}if(!n)return re.any();let o;switch(n){case"string":{let r=re.string();if(e.format){let i=e.format;i==="email"?r=r.check(re.email()):i==="uri"||i==="uri-reference"?r=r.check(re.url()):i==="uuid"||i==="guid"?r=r.check(re.uuid()):i==="date-time"?r=r.check(re.iso.datetime()):i==="date"?r=r.check(re.iso.date()):i==="time"?r=r.check(re.iso.time()):i==="duration"?r=r.check(re.iso.duration()):i==="ipv4"?r=r.check(re.ipv4()):i==="ipv6"?r=r.check(re.ipv6()):i==="mac"?r=r.check(re.mac()):i==="cidr"?r=r.check(re.cidrv4()):i==="cidr-v6"?r=r.check(re.cidrv6()):i==="base64"?r=r.check(re.base64()):i==="base64url"?r=r.check(re.base64url()):i==="e164"?r=r.check(re.e164()):i==="jwt"?r=r.check(re.jwt()):i==="emoji"?r=r.check(re.emoji()):i==="nanoid"?r=r.check(re.nanoid()):i==="cuid"?r=r.check(re.cuid()):i==="cuid2"?r=r.check(re.cuid2()):i==="ulid"?r=r.check(re.ulid()):i==="xid"?r=r.check(re.xid()):i==="ksuid"&&(r=r.check(re.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?re.number().int():re.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=re.boolean();break}case"null":{o=re.null();break}case"object":{let r={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,u]of Object.entries(i)){let d=et(u,t);r[c]=a.has(c)?d:d.optional()}if(e.propertyNames){let c=et(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?et(e.additionalProperties,t):re.any();if(Object.keys(r).length===0){o=re.record(c,u);break}let d=re.object(r).passthrough(),p=re.looseRecord(c,u);o=re.intersection(d,p);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),d=[];for(let h of u){let S=et(c[h],t),v=re.string().regex(new RegExp(h));d.push(re.looseRecord(v,S))}let p=[];if(Object.keys(r).length>0&&p.push(re.object(r).passthrough()),p.push(...d),p.length===0)o=re.object({}).passthrough();else if(p.length===1)o=p[0];else{let h=re.intersection(p[0],p[1]);for(let S=2;S<p.length;S++)h=re.intersection(h,p[S]);o=h}break}let s=re.object(r);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(et(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let a=r.map(c=>et(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?et(i,t):void 0;s?o=re.tuple(a).rest(s):o=re.tuple(a),typeof e.minItems=="number"&&(o=o.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(re.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>et(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?et(e.additionalItems,t):void 0;s?o=re.tuple(a).rest(s):o=re.tuple(a),typeof e.minItems=="number"&&(o=o.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(re.maxLength(e.maxItems)))}else if(i!==void 0){let a=et(i,t),s=re.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=re.array(re.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function et(e,t){if(typeof e=="boolean")return e?re.any():re.never();let n=O_(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(u=>et(u,t)),c=re.union(s);n=o?re.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(u=>et(u,t)),c=re.xor(s);n=o?re.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:re.any();else{let s=o?n:et(e.allOf[0],t),c=o?0:1;for(let u=c;u<e.allOf.length;u++)s=re.intersection(s,et(e.allOf[u],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=re.nullable(n)),e.readOnly===!0&&(n=re.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))NR.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function A_(e,t){if(typeof e=="boolean")return e?re.any():re.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=OR(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ye};return et(n,i)}var gi={};qt(gi,{bigint:()=>MR,boolean:()=>LR,date:()=>DR,number:()=>qR,string:()=>CR});function CR(e){return Xm(Nn,e)}function qR(e){return ap(Cn,e)}function LR(e){return pp(qn,e)}function MR(e){return hp(Ln,e)}function DR(e){return Ip(ui,e)}Ce(Ga());var Ur="2025-11-25";var oc=[Ur,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],ic="io.modelcontextprotocol/related-task",Zt="io.modelcontextprotocol/protocolVersion",Vr="io.modelcontextprotocol/clientInfo",Ft="io.modelcontextprotocol/clientCapabilities",Zr="io.modelcontextprotocol/subscriptionId",ur="io.modelcontextprotocol/logLevel";var Fr="2.0";var lr=cr(()=>oe([m(),F(),te(),Ot(),Q(m(),lr),O(lr)])),qe=Q(m(),lr),Rh=O(lr),vi=oe([m(),F().int()]),yi=m(),ac=T({ttl:F().optional()}),sc=T({taskId:m()}),Mn=ce({progressToken:vi.optional(),[ic]:sc.optional()}),Be=T({_meta:Mn.optional()}),Hr=Be.extend({task:ac.optional()}),Le=T({method:m(),params:Be.loose().optional()}),tt=T({_meta:Mn.optional()}),rt=T({method:m(),params:tt.loose().optional()}),Me=ce({_meta:Mn.optional()}),dr=oe([m(),F().int()]),_i=T({jsonrpc:A(Fr),id:dr,...Le.shape}).strict(),Si=T({jsonrpc:A(Fr),...rt.shape}).strict(),Dn=T({jsonrpc:A(Fr),id:dr,result:Me}).strict(),Un=T({jsonrpc:A(Fr),id:dr.optional(),error:T({code:F().int(),message:m(),data:ie().optional()})}).strict(),bi=oe([_i,Si,Dn,Un]),Ih=oe([Dn,Un]),$i=Me.strict(),cc=tt.extend({requestId:dr.optional(),reason:m().optional()}),zi=rt.extend({method:A("notifications/cancelled"),params:cc}),lc=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:he(["light","dark"]).optional()}),mr=T({icons:O(lc).optional()}),Vt=T({name:m(),title:m().optional()}),Vn=Vt.extend({...Vt.shape,...mr.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),VR=Rt(T({applyDefaults:te().optional()}),qe),ZR=Ut(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Rt(T({form:VR.optional(),url:qe.optional()}),qe.optional())),uc=ce({list:qe.optional(),cancel:qe.optional(),requests:ce({sampling:ce({createMessage:qe.optional()}).optional(),elicitation:ce({create:qe.optional()}).optional()}).optional()}),dc=ce({list:qe.optional(),cancel:qe.optional(),requests:ce({tools:ce({call:qe.optional()}).optional()}).optional()}),mc=T({experimental:Q(m(),qe).optional(),sampling:T({context:qe.optional(),tools:qe.optional()}).optional(),elicitation:ZR.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:uc.optional(),extensions:Q(m(),qe).optional()}),pc=Be.extend({protocolVersion:m(),capabilities:mc,clientInfo:Vn}),fc=Le.extend({method:A("initialize"),params:pc}),wi=T({experimental:Q(m(),qe).optional(),logging:qe.optional(),completions:qe.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:dc.optional(),extensions:Q(m(),qe).optional()}),hc=Me.extend({protocolVersion:m(),capabilities:wi,serverInfo:Vn,instructions:m().optional()}),gc=rt.extend({method:A("notifications/initialized"),params:tt.optional()}),vc=Le.extend({method:A("server/discover"),params:Be.optional()}),yc=Me.extend({supportedVersions:O(m()),capabilities:wi,serverInfo:Vn,instructions:m().optional()}),Ri=Le.extend({method:A("ping"),params:Be.optional()}),_c=T({progress:F(),total:ae(F()),message:ae(m())}),Sc=T({...tt.shape,..._c.shape,progressToken:vi}),Ii=rt.extend({method:A("notifications/progress"),params:Sc}),bc=Be.extend({cursor:yi.optional()}),pr=Le.extend({params:bc.optional()}),fr=Me.extend({nextCursor:yi.optional()}),ki=T({uri:m(),mimeType:ae(m()),_meta:Q(m(),ie()).optional()}),Ti=ki.extend({text:m()}),kh=m().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Pi=ki.extend({blob:kh}),hr=he(["user","assistant"]),Ht=T({audience:O(hr).optional(),priority:F().min(0).max(1).optional(),lastModified:ht.datetime({offset:!0}).optional()}),Ei=T({...Vt.shape,...mr.shape,uri:m(),description:ae(m()),mimeType:ae(m()),size:ae(F()),annotations:Ht.optional(),_meta:ae(ce({}))}),$c=T({...Vt.shape,...mr.shape,uriTemplate:m(),description:ae(m()),mimeType:ae(m()),annotations:Ht.optional(),_meta:ae(ce({}))}),zc=pr.extend({method:A("resources/list")}),wc=fr.extend({resources:O(Ei)}),Rc=pr.extend({method:A("resources/templates/list")}),Ic=fr.extend({resourceTemplates:O($c)}),Zn=Be.extend({uri:m()}),kc=Zn,Tc=Le.extend({method:A("resources/read"),params:kc}),Pc=Me.extend({contents:O(oe([Ti,Pi]))}),Ec=rt.extend({method:A("notifications/resources/list_changed"),params:tt.optional()}),xc=Zn,jc=Le.extend({method:A("resources/subscribe"),params:xc}),Nc=Zn,Oc=Le.extend({method:A("resources/unsubscribe"),params:Nc}),xi=T({toolsListChanged:te().optional(),promptsListChanged:te().optional(),resourcesListChanged:te().optional(),resourceSubscriptions:O(m()).optional()}),Ac=Be.extend({notifications:xi}),Cc=Le.extend({method:A("subscriptions/listen"),params:Ac}),qc=tt.extend({notifications:xi}),Lc=rt.extend({method:A("notifications/subscriptions/acknowledged"),params:qc}),Mc=ce({[Zr]:dr}),Dc=Me.extend({_meta:Mc}),Uc=tt.extend({uri:m()}),Vc=rt.extend({method:A("notifications/resources/updated"),params:Uc}),Zc=T({name:m(),description:ae(m()),required:ae(te())}),Fc=T({...Vt.shape,...mr.shape,description:ae(m()),arguments:ae(O(Zc)),_meta:ae(ce({}))}),Hc=pr.extend({method:A("prompts/list")}),Jc=fr.extend({prompts:O(Fc)}),Gc=Be.extend({name:m(),arguments:Q(m(),m()).optional()}),Bc=Le.extend({method:A("prompts/get"),params:Gc}),Fn=T({type:A("text"),text:m(),annotations:Ht.optional(),_meta:Q(m(),ie()).optional()}),Hn=T({type:A("image"),data:kh,mimeType:m(),annotations:Ht.optional(),_meta:Q(m(),ie()).optional()}),Jn=T({type:A("audio"),data:kh,mimeType:m(),annotations:Ht.optional(),_meta:Q(m(),ie()).optional()}),Kc=T({type:A("tool_use"),name:m(),id:m(),input:Q(m(),ie()),_meta:Q(m(),ie()).optional()}),Wc=T({type:A("resource"),resource:oe([Ti,Pi]),annotations:Ht.optional(),_meta:Q(m(),ie()).optional()}),Yc=Ei.extend({type:A("resource_link")}),Gn=oe([Fn,Hn,Jn,Yc,Wc]),Xc=T({role:hr,content:Gn}),Qc=Me.extend({description:m().optional(),messages:O(Xc)}),el=rt.extend({method:A("notifications/prompts/list_changed"),params:tt.optional()}),tl=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),rl=T({taskSupport:he(["required","optional","forbidden"]).optional()}),ji=T({...Vt.shape,...mr.shape,description:m().optional(),inputSchema:T({type:A("object"),properties:Q(m(),lr).optional(),required:O(m()).optional()}).catchall(ie()),outputSchema:ce({$schema:m().optional()}).optional(),annotations:tl.optional(),execution:rl.optional(),_meta:Q(m(),ie()).optional()}),nl=pr.extend({method:A("tools/list")}),ol=fr.extend({tools:O(ji)}),Ni=Me.extend({content:O(Gn).default([]),structuredContent:ie().optional(),isError:te().optional()}),Th=Ni.or(Me.extend({toolResult:ie()})),il=Hr.extend({name:m(),arguments:Q(m(),ie()).optional()}),al=Le.extend({method:A("tools/call"),params:il}),sl=rt.extend({method:A("notifications/tools/list_changed"),params:tt.optional()}),Ph=T({autoRefresh:te().default(!0),debounceMs:F().int().nonnegative().default(300)}),gr=he(["debug","info","notice","warning","error","critical","alert","emergency"]),cl=Be.extend({level:gr}),ll=Le.extend({method:A("logging/setLevel"),params:cl}),ul=tt.extend({level:gr,logger:m().optional(),data:ie()}),dl=rt.extend({method:A("notifications/message"),params:ul}),ml=T({name:m().optional()}),pl=T({hints:O(ml).optional(),costPriority:F().min(0).max(1).optional(),speedPriority:F().min(0).max(1).optional(),intelligencePriority:F().min(0).max(1).optional()}),fl=T({mode:he(["auto","required","none"]).optional()}),hl=T({type:A("tool_result"),toolUseId:m().describe("The unique identifier for the corresponding tool call."),content:O(Gn),structuredContent:ie().optional(),isError:te().optional(),_meta:Q(m(),ie()).optional()}),gl=sr("type",[Fn,Hn,Jn]),Dr=sr("type",[Fn,Hn,Jn,Kc,hl]),vl=T({role:hr,content:oe([Dr,O(Dr)]),_meta:Q(m(),ie()).optional()}),yl=Hr.extend({messages:O(vl),modelPreferences:pl.optional(),systemPrompt:m().optional(),includeContext:he(["none","thisServer","allServers"]).optional(),temperature:F().optional(),maxTokens:F().int(),stopSequences:O(m()).optional(),metadata:qe.optional(),tools:O(ji).optional(),toolChoice:fl.optional()}),_l=Le.extend({method:A("sampling/createMessage"),params:yl}),Sl=Me.extend({model:m(),stopReason:ae(he(["endTurn","stopSequence","maxTokens"]).or(m())),role:hr,content:gl}),bl=Me.extend({model:m(),stopReason:ae(he(["endTurn","stopSequence","maxTokens","toolUse"]).or(m())),role:hr,content:oe([Dr,O(Dr)])}),Oi=T({type:A("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),Bn=T({type:A("string"),title:m().optional(),description:m().optional(),minLength:F().optional(),maxLength:F().optional(),format:he(["email","uri","date","date-time"]).optional(),default:m().optional()}),Kn=T({type:he(["number","integer"]),title:m().optional(),description:m().optional(),minimum:F().optional(),maximum:F().optional(),default:F().optional()}),Ai=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),Ci=T({type:A("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),qi=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),$l=oe([Ai,Ci]),Li=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({type:A("string"),enum:O(m())}),default:O(m()).optional()}),Mi=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),zl=oe([Li,Mi]),wl=oe([qi,$l,zl]),Di=oe([wl,Oi,Bn,Kn]),Wn=Hr.extend({mode:A("form").optional(),message:m(),requestedSchema:T({type:A("object"),properties:Q(m(),Di),required:O(m()).optional()}).catchall(ie())}),Rl=Hr.extend({mode:A("url"),message:m(),elicitationId:m(),url:m().url()}),Il=oe([Wn,Rl]),kl=Le.extend({method:A("elicitation/create"),params:Il}),Tl=tt.extend({elicitationId:m()}),Pl=rt.extend({method:A("notifications/elicitation/complete"),params:Tl}),El=Me.extend({action:he(["accept","decline","cancel"]),content:Ut(e=>e===null?void 0:e,Q(m(),oe([m(),F(),te(),O(m())])).optional())}),xl=T({type:A("ref/resource"),uri:m()}),jl=T({type:A("ref/prompt"),name:m()}),Nl=Be.extend({ref:oe([jl,xl]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()}),Ol=Le.extend({method:A("completion/complete"),params:Nl}),Al=Me.extend({completion:ce({values:O(m()).max(100),total:ae(F().int()),hasMore:ae(te())})}),Cl=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),ie()).optional()}),ql=Le.extend({method:A("roots/list"),params:Be.optional()}),Ll=Me.extend({roots:O(Cl)}),Ml=rt.extend({method:A("notifications/roots/list_changed"),params:tt.optional()}),Eh=ce({ttl:F().optional(),pollInterval:F().optional()}),Dl=he(["working","input_required","completed","failed","cancelled"]),vr=T({taskId:m(),status:Dl,ttl:oe([F(),Ot()]),createdAt:m(),lastUpdatedAt:m(),pollInterval:ae(F()),statusMessage:ae(m())}),xh=Me.extend({task:vr}),Ul=tt.merge(vr),jh=rt.extend({method:A("notifications/tasks/status"),params:Ul}),Nh=Le.extend({method:A("tasks/get"),params:Be.extend({taskId:m()})}),Oh=Me.merge(vr),Ah=Le.extend({method:A("tasks/result"),params:Be.extend({taskId:m()})}),Ch=Me.loose(),qh=pr.extend({method:A("tasks/list")}),Lh=fr.extend({tasks:O(vr)}),Mh=Le.extend({method:A("tasks/cancel"),params:Be.extend({taskId:m()})}),Dh=Me.merge(vr),Uh=oe([Ri,fc,vc,Ol,ll,Bc,Hc,zc,Rc,Tc,jc,Oc,Cc,al,nl]),Vh=oe([zi,Ii,gc,Ml]),Zh=oe([$i,Sl,bl,El,Ll]),Fh=oe([Ri,_l,kl,ql]),Hh=oe([zi,Ii,dl,Vc,Ec,sl,el,Lc,Pl]),Jh=oe([$i,hc,yc,Al,Qc,Jc,wc,Ic,Pc,Ni,ol,Dc]),Ge=On().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:zh.custom,message:"URL must be parseable",fatal:!0}),Lo}).refine(e=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Gh=ce({resource:m().url(),authorization_servers:O(Ge).optional(),jwks_uri:m().url().optional(),scopes_supported:O(m()).optional(),bearer_methods_supported:O(m()).optional(),resource_signing_alg_values_supported:O(m()).optional(),resource_name:m().optional(),resource_documentation:m().optional(),resource_policy_uri:m().url().optional(),resource_tos_uri:m().url().optional(),tls_client_certificate_bound_access_tokens:te().optional(),authorization_details_types_supported:O(m()).optional(),dpop_signing_alg_values_supported:O(m()).optional(),dpop_bound_access_tokens_required:te().optional()}),Vl=ce({issuer:m(),authorization_endpoint:Ge,token_endpoint:Ge,registration_endpoint:Ge.optional(),scopes_supported:O(m()).optional(),response_types_supported:O(m()),response_modes_supported:O(m()).optional(),grant_types_supported:O(m()).optional(),token_endpoint_auth_methods_supported:O(m()).optional(),token_endpoint_auth_signing_alg_values_supported:O(m()).optional(),service_documentation:Ge.optional(),revocation_endpoint:Ge.optional(),revocation_endpoint_auth_methods_supported:O(m()).optional(),revocation_endpoint_auth_signing_alg_values_supported:O(m()).optional(),introspection_endpoint:m().optional(),introspection_endpoint_auth_methods_supported:O(m()).optional(),introspection_endpoint_auth_signing_alg_values_supported:O(m()).optional(),code_challenge_methods_supported:O(m()).optional(),client_id_metadata_document_supported:te().optional(),authorization_response_iss_parameter_supported:te().optional().catch(void 0)}),Zl=ce({issuer:m(),authorization_endpoint:Ge,token_endpoint:Ge,userinfo_endpoint:Ge.optional(),jwks_uri:Ge,registration_endpoint:Ge.optional(),scopes_supported:O(m()).optional(),response_types_supported:O(m()),response_modes_supported:O(m()).optional(),grant_types_supported:O(m()).optional(),acr_values_supported:O(m()).optional(),subject_types_supported:O(m()),id_token_signing_alg_values_supported:O(m()),id_token_encryption_alg_values_supported:O(m()).optional(),id_token_encryption_enc_values_supported:O(m()).optional(),userinfo_signing_alg_values_supported:O(m()).optional(),userinfo_encryption_alg_values_supported:O(m()).optional(),userinfo_encryption_enc_values_supported:O(m()).optional(),request_object_signing_alg_values_supported:O(m()).optional(),request_object_encryption_alg_values_supported:O(m()).optional(),request_object_encryption_enc_values_supported:O(m()).optional(),token_endpoint_auth_methods_supported:O(m()).optional(),token_endpoint_auth_signing_alg_values_supported:O(m()).optional(),display_values_supported:O(m()).optional(),claim_types_supported:O(m()).optional(),claims_supported:O(m()).optional(),service_documentation:m().optional(),claims_locales_supported:O(m()).optional(),ui_locales_supported:O(m()).optional(),claims_parameter_supported:te().optional(),request_parameter_supported:te().optional(),request_uri_parameter_supported:te().optional(),require_request_uri_registration:te().optional(),op_policy_uri:Ge.optional(),op_tos_uri:Ge.optional(),client_id_metadata_document_supported:te().optional(),authorization_response_iss_parameter_supported:te().optional().catch(void 0)}),Bh=T({...Zl.shape,...Vl.pick({code_challenge_methods_supported:!0}).shape}),Kh=T({access_token:m(),id_token:m().optional(),token_type:m(),expires_in:gi.number().optional(),scope:m().optional(),refresh_token:m().optional()}).strip(),Wh=T({issued_token_type:A("urn:ietf:params:oauth:token-type:id-jag"),access_token:m(),token_type:m().optional(),expires_in:F().optional(),scope:m().optional()}).strip(),Yh=T({error:m(),error_description:m().optional(),error_uri:m().optional()}),wh=Ge.optional().or(A("").transform(()=>{})),Fl=T({redirect_uris:O(Ge),token_endpoint_auth_method:m().optional(),grant_types:O(m()).optional(),response_types:O(m()).optional(),application_type:m().optional(),client_name:m().optional(),client_uri:Ge.optional(),logo_uri:wh,scope:m().optional(),contacts:O(m()).optional(),tos_uri:wh,policy_uri:m().optional(),jwks_uri:Ge.optional(),jwks:Qs().optional(),software_id:m().optional(),software_version:m().optional(),software_statement:m().optional()}).strip(),Hl=T({client_id:m(),client_secret:m().optional(),client_id_issued_at:F().optional(),client_secret_expires_at:F().optional()}).strip(),Xh=Fl.merge(Hl),Qh=T({error:m(),error_description:m().optional()}).strip(),eg=T({token:m(),token_type_hint:m().optional()}).strip();var og=Symbol.for("mcp.sdk.errorBrands");function cg(e,t){let n=new Set,o=t;for(;typeof o=="function";){let r=o.mcpBrand;Object.prototype.hasOwnProperty.call(o,"mcpBrand")&&typeof r=="string"&&n.add(r),o=Object.getPrototypeOf(o)}n.size!==0&&Object.defineProperty(e,og,{value:n,enumerable:!1,configurable:!0})}function Xn(e,t){try{if(typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand=="string"&&Object.prototype.hasOwnProperty.call(t,og)){let n=t[og];if(n&&typeof n.has=="function"&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var FR=class rS extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](t){return Xn(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Xn(this,t)}constructor(t,n,o){super(n),this.code=t,this.errorUri=o,this.name="OAuthError",cg(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}static fromResponse(t){return new rS(t.error,t.error_description??t.error,t.error_uri)}},ze=(function(e){return e.NotConnected="NOT_CONNECTED",e.AlreadyConnected="ALREADY_CONNECTED",e.NotInitialized="NOT_INITIALIZED",e.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",e.RequestTimeout="REQUEST_TIMEOUT",e.ConnectionClosed="CONNECTION_CLOSED",e.SendFailed="SEND_FAILED",e.InvalidResult="INVALID_RESULT",e.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",e.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",e.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",e.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",e.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",e.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",e.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",e.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",e.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",e.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",e.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",e})({}),ve=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return Xn(this,e)}static isInstance(e){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Xn(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name="SdkError",cg(this,new.target)}},HR=class extends ve{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,n){super(e,t,n),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function H_(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function JR(e,t,n){return e==="elicitation"&&t==="form"&&n.form===void 0&&n.url===void 0}function nS(e){switch(e.method){case"elicitation/create":return e.params?.mode==="url"?{elicitation:{url:{}}}:{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;return t!==void 0&&(t.tools!==void 0||t.toolChoice!==void 0)?{sampling:{tools:{}}}:{sampling:{}}}case"roots/list":return{roots:{}};default:return}}function Ql(e,t){let n={};for(let[o,r]of Object.entries(e)){if(r===void 0)continue;let i=t===void 0?void 0:t[o];if(i===void 0){n[o]=r;continue}if(H_(r)&&H_(i)){let a={};for(let[s,c]of Object.entries(r))c!==void 0&&i[s]===void 0&&!JR(o,s,i)&&(a[s]=c);Object.keys(a).length>0&&(n[o]=a)}}return Object.keys(n).length>0?n:void 0}var oS="2026-07-28",_r=[oS];function eo(e){return e>=oS}function iS(e){return e.filter(t=>!eo(t))}function lg(e){return e.filter(t=>eo(t))}function aS(e){let t=e.structuredContent;return t===void 0||!(typeof t!="object"||t===null||Array.isArray(t))||(e.content?.some(n=>n.type==="text")??!1)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var sS=["task","inputRequests","requestState"];function ug(e){return e===null||typeof e!="object"||Array.isArray(e)||e.content!==void 0||sS.some(t=>t in e)?e:{...e,content:[]}}function GR(){let e=cr(()=>oe([m(),F(),te(),Ot(),Q(m(),e),O(e)])),t=Q(m(),e),n=oe([m(),F().int()]),o=m(),r=T({ttl:F().optional()}),i=T({taskId:m()}),a=ce({progressToken:n.optional(),"io.modelcontextprotocol/related-task":i.optional()}),s=T({_meta:a.optional()}),c=s.extend({task:r.optional()}),u=T({method:m(),params:s.loose().optional()}),d=T({_meta:a.optional()}),p=T({method:m(),params:d.loose().optional()}),h=ce({_meta:a.optional()}),S=oe([m(),F().int()]),v=h.strict(),$=d.extend({requestId:S.optional(),reason:m().optional()}),y=p.extend({method:A("notifications/cancelled"),params:$}),f=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:he(["light","dark"]).optional()}),w=T({icons:O(f).optional()}),g=T({name:m(),title:m().optional()}),b=g.extend({...g.shape,...w.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),k=Rt(T({applyDefaults:te().optional()}),t),z=Ut(Qe=>Qe&&typeof Qe=="object"&&!Array.isArray(Qe)&&Object.keys(Qe).length===0?{form:{}}:Qe,Rt(T({form:k.optional(),url:t.optional()}),t.optional())),_=ce({list:t.optional(),cancel:t.optional(),requests:ce({sampling:ce({createMessage:t.optional()}).optional(),elicitation:ce({create:t.optional()}).optional()}).optional()}),R=ce({list:t.optional(),cancel:t.optional(),requests:ce({tools:ce({call:t.optional()}).optional()}).optional()}),j=T({experimental:Q(m(),t).optional(),sampling:T({context:t.optional(),tools:t.optional()}).optional(),elicitation:z.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:_.optional(),extensions:Q(m(),t).optional()}),U=s.extend({protocolVersion:m(),capabilities:j,clientInfo:b}),C=u.extend({method:A("initialize"),params:U}),V=T({experimental:Q(m(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:R.optional(),extensions:Q(m(),t).optional()}),ee=h.extend({protocolVersion:m(),capabilities:V,serverInfo:b,instructions:m().optional()}),ne=p.extend({method:A("notifications/initialized"),params:d.optional()}),$e=u.extend({method:A("ping"),params:s.optional()}),Oe=T({progress:F(),total:ae(F()),message:ae(m())}),je=T({...d.shape,...Oe.shape,progressToken:n}),Ve=p.extend({method:A("notifications/progress"),params:je}),Re=s.extend({cursor:o.optional()}),x=u.extend({params:Re.optional()}),M=h.extend({nextCursor:o.optional()}),H=T({uri:m(),mimeType:ae(m()),_meta:Q(m(),ie()).optional()}),I=H.extend({text:m()}),E=m().refine(Qe=>{try{return atob(Qe),!0}catch{return!1}},{message:"Invalid Base64 string"}),q=H.extend({blob:E}),Y=he(["user","assistant"]),se=T({audience:O(Y).optional(),priority:F().min(0).max(1).optional(),lastModified:ht.datetime({offset:!0}).optional()}),Se=T({...g.shape,...w.shape,uri:m(),description:ae(m()),mimeType:ae(m()),size:ae(F()),annotations:se.optional(),_meta:ae(ce({}))}),fe=T({...g.shape,...w.shape,uriTemplate:m(),description:ae(m()),mimeType:ae(m()),annotations:se.optional(),_meta:ae(ce({}))}),Ne=x.extend({method:A("resources/list")}),nt=M.extend({resources:O(Se)}),P=x.extend({method:A("resources/templates/list")}),D=M.extend({resourceTemplates:O(fe)}),Z=s.extend({uri:m()}),me=Z,pe=u.extend({method:A("resources/read"),params:me}),ye=h.extend({contents:O(oe([I,q]))}),De=p.extend({method:A("notifications/resources/list_changed"),params:d.optional()}),Fe=Z,Xe=u.extend({method:A("resources/subscribe"),params:Fe}),Ze=Z,Ae=u.extend({method:A("resources/unsubscribe"),params:Ze}),gt=d.extend({uri:m()}),Je=p.extend({method:A("notifications/resources/updated"),params:gt}),At=T({name:m(),description:ae(m()),required:ae(te())}),bt=T({...g.shape,...w.shape,description:ae(m()),arguments:ae(O(At)),_meta:ae(ce({}))}),Ct=x.extend({method:A("prompts/list")}),Gt=M.extend({prompts:O(bt)}),Bt=s.extend({name:m(),arguments:Q(m(),m()).optional()}),$r=u.extend({method:A("prompts/get"),params:Bt}),zr=T({type:A("text"),text:m(),annotations:se.optional(),_meta:Q(m(),ie()).optional()}),wr=T({type:A("image"),data:E,mimeType:m(),annotations:se.optional(),_meta:Q(m(),ie()).optional()}),Rr=T({type:A("audio"),data:E,mimeType:m(),annotations:se.optional(),_meta:Q(m(),ie()).optional()}),ao=T({type:A("tool_use"),name:m(),id:m(),input:Q(m(),ie()),_meta:Q(m(),ie()).optional()}),Kt=T({type:A("resource"),resource:oe([I,q]),annotations:se.optional(),_meta:Q(m(),ie()).optional()}),so=Se.extend({type:A("resource_link")}),vt=oe([zr,wr,Rr,so,Kt]),Yr=T({role:Y,content:vt}),Xr=h.extend({description:m().optional(),messages:O(Yr)}),Ir=p.extend({method:A("notifications/prompts/list_changed"),params:d.optional()}),co=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),Qr=T({taskSupport:he(["required","optional","forbidden"]).optional()}),kr=T({...g.shape,...w.shape,description:m().optional(),inputSchema:T({type:A("object"),properties:Q(m(),e).optional(),required:O(m()).optional()}).catchall(ie()),outputSchema:T({type:A("object"),properties:Q(m(),e).optional(),required:O(m()).optional()}).catchall(ie()).optional(),annotations:co.optional(),execution:Qr.optional(),_meta:Q(m(),ie()).optional()}),en=x.extend({method:A("tools/list")}),lo=M.extend({tools:O(kr)}),Ke=h.extend({content:O(vt),structuredContent:Q(m(),ie()).optional(),isError:te().optional()}),uo=c.extend({name:m(),arguments:Q(m(),ie()).optional()}),ia=u.extend({method:A("tools/call"),params:uo}),mo=p.extend({method:A("notifications/tools/list_changed"),params:d.optional()}),tn=he(["debug","info","notice","warning","error","critical","alert","emergency"]),po=s.extend({level:tn}),fo=u.extend({method:A("logging/setLevel"),params:po}),ho=d.extend({level:tn,logger:m().optional(),data:ie()}),go=p.extend({method:A("notifications/message"),params:ho}),vo=T({name:m().optional()}),yo=T({hints:O(vo).optional(),costPriority:F().min(0).max(1).optional(),speedPriority:F().min(0).max(1).optional(),intelligencePriority:F().min(0).max(1).optional()}),aa=T({mode:he(["auto","required","none"]).optional()}),_o=T({type:A("tool_result"),toolUseId:m().describe("The unique identifier for the corresponding tool call."),content:O(vt),structuredContent:T({}).loose().optional(),isError:te().optional(),_meta:Q(m(),ie()).optional()}),So=sr("type",[zr,wr,Rr]),Wt=sr("type",[zr,wr,Rr,ao,_o]),bo=T({role:Y,content:oe([Wt,O(Wt)]),_meta:Q(m(),ie()).optional()}),$o=c.extend({messages:O(bo),modelPreferences:yo.optional(),systemPrompt:m().optional(),includeContext:he(["none","thisServer","allServers"]).optional(),temperature:F().optional(),maxTokens:F().int(),stopSequences:O(m()).optional(),metadata:t.optional(),tools:O(kr).optional(),toolChoice:aa.optional()}),zo=u.extend({method:A("sampling/createMessage"),params:$o}),wo=h.extend({model:m(),stopReason:ae(he(["endTurn","stopSequence","maxTokens"]).or(m())),role:Y,content:So}),Ro=h.extend({model:m(),stopReason:ae(he(["endTurn","stopSequence","maxTokens","toolUse"]).or(m())),role:Y,content:oe([Wt,O(Wt)])}),Io=T({type:A("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),ko=T({type:A("string"),title:m().optional(),description:m().optional(),minLength:F().optional(),maxLength:F().optional(),format:he(["email","uri","date","date-time"]).optional(),default:m().optional()}),To=T({type:he(["number","integer"]),title:m().optional(),description:m().optional(),minimum:F().optional(),maximum:F().optional(),default:F().optional()}),Po=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),Eo=T({type:A("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),xo=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),Tr=oe([Po,Eo]),Pr=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({type:A("string"),enum:O(m())}),default:O(m()).optional()}),sa=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),ca=oe([Pr,sa]),dt=oe([xo,Tr,ca]),mt=oe([dt,Io,ko,To]),jo=c.extend({mode:A("form").optional(),message:m(),requestedSchema:T({type:A("object"),properties:Q(m(),mt),required:O(m()).optional()}).catchall(ie())}),$t=c.extend({mode:A("url"),message:m(),elicitationId:m(),url:m().url()}),la=oe([jo,$t]),ua=u.extend({method:A("elicitation/create"),params:la}),da=d.extend({elicitationId:m()}),ma=p.extend({method:A("notifications/elicitation/complete"),params:da}),pa=h.extend({action:he(["accept","decline","cancel"]),content:Ut(Qe=>Qe===null?void 0:Qe,Q(m(),oe([m(),F(),te(),O(m())])).optional())}),fa=T({type:A("ref/resource"),uri:m()}),ha=T({type:A("ref/prompt"),name:m()}),No=s.extend({ref:oe([ha,fa]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()}),ga=u.extend({method:A("completion/complete"),params:No}),va=h.extend({completion:ce({values:O(m()).max(100),total:ae(F().int()),hasMore:ae(te())})}),rn=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),ie()).optional()}),Oo=u.extend({method:A("roots/list"),params:s.optional()}),ya=h.extend({roots:O(rn)}),Ao=p.extend({method:A("notifications/roots/list_changed"),params:d.optional()}),ku=ce({ttl:F().optional(),pollInterval:F().optional()}),_a=he(["working","input_required","completed","failed","cancelled"]),We=T({taskId:m(),status:_a,ttl:oe([F(),Ot()]),createdAt:m(),lastUpdatedAt:m(),pollInterval:ae(F()),statusMessage:ae(m())}),Co=h.extend({task:We}),nn=d.merge(We),on=p.extend({method:A("notifications/tasks/status"),params:nn}),an=u.extend({method:A("tasks/get"),params:s.extend({taskId:m()})}),sn=h.merge(We),qo=u.extend({method:A("tasks/result"),params:s.extend({taskId:m()})}),yt=h.loose(),Ue=x.extend({method:A("tasks/list")}),Er=M.extend({tasks:O(We)}),Tu=u.extend({method:A("tasks/cancel"),params:s.extend({taskId:m()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,TaskMetadataSchema:r,RelatedTaskMetadataSchema:i,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:u,NotificationsParamsSchema:d,NotificationSchema:p,ResultSchema:h,RequestIdSchema:S,EmptyResultSchema:v,CancelledNotificationParamsSchema:$,CancelledNotificationSchema:y,IconSchema:f,IconsSchema:w,BaseMetadataSchema:g,ImplementationSchema:b,ClientTasksCapabilitySchema:_,ServerTasksCapabilitySchema:R,ClientCapabilitiesSchema:j,InitializeRequestParamsSchema:U,InitializeRequestSchema:C,ServerCapabilitiesSchema:V,InitializeResultSchema:ee,InitializedNotificationSchema:ne,PingRequestSchema:$e,ProgressSchema:Oe,ProgressNotificationParamsSchema:je,ProgressNotificationSchema:Ve,PaginatedRequestParamsSchema:Re,PaginatedRequestSchema:x,PaginatedResultSchema:M,ResourceContentsSchema:H,TextResourceContentsSchema:I,BlobResourceContentsSchema:q,RoleSchema:Y,AnnotationsSchema:se,ResourceSchema:Se,ResourceTemplateSchema:fe,ListResourcesRequestSchema:Ne,ListResourcesResultSchema:nt,ListResourceTemplatesRequestSchema:P,ListResourceTemplatesResultSchema:D,ResourceRequestParamsSchema:Z,ReadResourceRequestParamsSchema:me,ReadResourceRequestSchema:pe,ReadResourceResultSchema:ye,ResourceListChangedNotificationSchema:De,SubscribeRequestParamsSchema:Fe,SubscribeRequestSchema:Xe,UnsubscribeRequestParamsSchema:Ze,UnsubscribeRequestSchema:Ae,ResourceUpdatedNotificationParamsSchema:gt,ResourceUpdatedNotificationSchema:Je,PromptArgumentSchema:At,PromptSchema:bt,ListPromptsRequestSchema:Ct,ListPromptsResultSchema:Gt,GetPromptRequestParamsSchema:Bt,GetPromptRequestSchema:$r,TextContentSchema:zr,ImageContentSchema:wr,AudioContentSchema:Rr,ToolUseContentSchema:ao,EmbeddedResourceSchema:Kt,ResourceLinkSchema:so,ContentBlockSchema:vt,PromptMessageSchema:Yr,GetPromptResultSchema:Xr,PromptListChangedNotificationSchema:Ir,ToolAnnotationsSchema:co,ToolExecutionSchema:Qr,ToolSchema:kr,ListToolsRequestSchema:en,ListToolsResultSchema:lo,CallToolResultSchema:Ke,CallToolRequestParamsSchema:uo,CallToolRequestSchema:ia,ToolListChangedNotificationSchema:mo,LoggingLevelSchema:tn,SetLevelRequestParamsSchema:po,SetLevelRequestSchema:fo,LoggingMessageNotificationParamsSchema:ho,LoggingMessageNotificationSchema:go,ModelHintSchema:vo,ModelPreferencesSchema:yo,ToolChoiceSchema:aa,ToolResultContentSchema:_o,SamplingContentSchema:So,SamplingMessageContentBlockSchema:Wt,SamplingMessageSchema:bo,CreateMessageRequestParamsSchema:$o,CreateMessageRequestSchema:zo,CreateMessageResultSchema:wo,CreateMessageResultWithToolsSchema:Ro,BooleanSchemaSchema:Io,StringSchemaSchema:ko,NumberSchemaSchema:To,UntitledSingleSelectEnumSchemaSchema:Po,TitledSingleSelectEnumSchemaSchema:Eo,LegacyTitledEnumSchemaSchema:xo,SingleSelectEnumSchemaSchema:Tr,UntitledMultiSelectEnumSchemaSchema:Pr,TitledMultiSelectEnumSchemaSchema:sa,MultiSelectEnumSchemaSchema:ca,EnumSchemaSchema:dt,PrimitiveSchemaDefinitionSchema:mt,ElicitRequestFormParamsSchema:jo,ElicitRequestURLParamsSchema:$t,ElicitRequestParamsSchema:la,ElicitRequestSchema:ua,ElicitationCompleteNotificationParamsSchema:da,ElicitationCompleteNotificationSchema:ma,ElicitResultSchema:pa,ResourceTemplateReferenceSchema:fa,PromptReferenceSchema:ha,CompleteRequestParamsSchema:No,CompleteRequestSchema:ga,CompleteResultSchema:va,RootSchema:rn,ListRootsRequestSchema:Oo,ListRootsResultSchema:ya,RootsListChangedNotificationSchema:Ao,TaskCreationParamsSchema:ku,TaskStatusSchema:_a,TaskSchema:We,CreateTaskResultSchema:Co,TaskStatusNotificationParamsSchema:nn,TaskStatusNotificationSchema:on,GetTaskRequestSchema:an,GetTaskResultSchema:sn,GetTaskPayloadRequestSchema:qo,GetTaskPayloadResultSchema:yt,ListTasksRequestSchema:Ue,ListTasksResultSchema:Er,CancelTaskRequestSchema:Tu,CancelTaskResultSchema:h.merge(We),ClientRequestSchema:oe([$e,C,ga,fo,$r,Ct,Ne,P,pe,Xe,Ae,ia,en,an,qo,Ue,Tu]),ClientNotificationSchema:oe([y,Ve,ne,Ao,on]),ClientResultSchema:oe([v,wo,Ro,pa,ya,sn,Er,Co]),ServerRequestSchema:oe([$e,zo,ua,Oo,an,qo,Ue,Tu]),ServerNotificationSchema:oe([y,Ve,go,Je,De,mo,Ir,on,ma]),ServerResultSchema:oe([v,ee,va,Xr,Gt,nt,D,ye,Ke,lo,sn,Er,Co]),CallToolResultWireSchema:ie().superRefine((Qe,H$)=>{if(!(typeof Qe!="object"||Qe===null||Array.isArray(Qe)||Qe.content!==void 0)){for(let Fg of sS)if(Fg in Qe){H$.addIssue({code:"custom",message:`content is required when the body carries '${Fg}' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(ug).pipe(Ke)}}var BR;function cS(){return BR??=GR()}function lS(e){return e.type!=="object"}var KR=new Set(["const","enum","default","examples"]),WR=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas"]);function YR(e){let t=typeof e.$schema=="string"?e.$schema:void 0;if(e.$id!==void 0)return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let n=(o,r)=>{if(Array.isArray(o))return o.map(a=>n(a,!1));if(o===null||typeof o!="object"||!r&&o.$id!==void 0)return o;let i={};for(let[a,s]of Object.entries(o))r?i[a]=n(s,!1):(a==="$ref"||a==="$dynamicRef")&&typeof s=="string"?i[a]=s==="#"?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:KR.has(a)?i[a]=s:WR.has(a)?i[a]=n(s,!0):i[a]=n(s,!1);return i};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:n(e,!1)},required:["result"]}}var uS={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},dS={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},XR={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Jl;function dg(){if(Jl)return Jl;let e=cS();return Jl={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Jl}function mS(e){return Object.prototype.hasOwnProperty.call(uS,e)}function pS(e){return Object.prototype.hasOwnProperty.call(dS,e)}function QR(e){return Object.prototype.hasOwnProperty.call(XR,e)}function e0(e){return QR(e)?dg().resultSchemas[e]:void 0}function t0(e){return mS(e)?dg().requestSchemas[e]:void 0}function r0(e){return pS(e)?dg().notificationSchemas[e]:void 0}var uj=Object.keys(uS),dj=Object.keys(dS);function ig(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Gl(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var J_={ok:!1,reason:"not-in-era"};function G_(e){return ig(e)&&ig(e.outputSchema)&&lS(e.outputSchema)}var mg={era:"2025-11-25",hasRequestMethod:mS,hasNotificationMethod:pS,validateRequest:(e,t)=>Gl(t0(e),t),validateResult:(e,t)=>Gl(e0(e),t),validateNotification:(e,t)=>Gl(r0(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>J_,validateInputResponse:()=>J_,samplingResultVariant:((e,t)=>{let n=cS();return Gl(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>{},validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=aS(e),o=n.structuredContent;if(o===void 0)return n;let r=typeof o!="object"||o===null||Array.isArray(o),i=t!==void 0&&lS(t);return!r&&!i?n:{...n,structuredContent:{result:o}}},decodeResult(e,t){if(ig(t)&&"resultType"in t){let n={...t};return delete n.resultType,{kind:"complete",result:n}}return{kind:"complete",result:t}},encodeResult(e,t){if(e!=="tools/list")return t;let n=t.tools;return!Array.isArray(n)||!n.some(o=>G_(o))?t:{...t,tools:n.map(o=>G_(o)?{...o,outputSchema:YR(o.outputSchema)}:o)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>{}};function n0(){let e=cr(()=>oe([m(),F(),te(),Ot(),Q(m(),e),O(e)])),t=Q(m(),e),n=oe([m(),F().int()]),o=m(),r=oe([m(),F().int()]),i=he(["user","assistant"]),a=he(["debug","info","notice","warning","error","critical","alert","emergency"]),s=m().refine(Ue=>{try{return atob(Ue),!0}catch{return!1}},{message:"Invalid Base64 string"}),c=T({ttl:F().optional()}),u=T({taskId:m()}),d=ce({progressToken:n.optional(),"io.modelcontextprotocol/related-task":u.optional()}),p=T({_meta:d.optional()}),h=p.extend({task:c.optional()}),S=T({_meta:d.optional()}),v=T({method:m(),params:S.loose().optional()}),$=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:he(["light","dark"]).optional()}),y=T({icons:O($).optional()}),f=T({name:m(),title:m().optional()}),w=f.extend({...f.shape,...y.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),g=Rt(T({applyDefaults:te().optional()}),t),b=Ut(Ue=>Ue&&typeof Ue=="object"&&!Array.isArray(Ue)&&Object.keys(Ue).length===0?{form:{}}:Ue,Rt(T({form:g.optional(),url:t.optional()}),t.optional())),k=ce({list:t.optional(),cancel:t.optional(),requests:ce({sampling:ce({createMessage:t.optional()}).optional(),elicitation:ce({create:t.optional()}).optional()}).optional()}),z=ce({list:t.optional(),cancel:t.optional(),requests:ce({tools:ce({call:t.optional()}).optional()}).optional()}),_=T({experimental:Q(m(),t).optional(),sampling:T({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:k.optional(),extensions:Q(m(),t).optional()}),R=T({experimental:Q(m(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:z.optional(),extensions:Q(m(),t).optional()}),j=T({progress:F(),total:ae(F()),message:ae(m())}),U=T({...S.shape,...j.shape,progressToken:n}),C=v.extend({method:A("notifications/progress"),params:U}),V=S.extend({level:a,logger:m().optional(),data:ie()}),ee=v.extend({method:A("notifications/message"),params:V}),ne=T({uri:m(),mimeType:ae(m()),_meta:Q(m(),ie()).optional()}),$e=ne.extend({text:m()}),Oe=ne.extend({blob:s}),je=T({audience:O(i).optional(),priority:F().min(0).max(1).optional(),lastModified:ht.datetime({offset:!0}).optional()}),Ve=T({...f.shape,...y.shape,uri:m(),description:ae(m()),mimeType:ae(m()),size:ae(F()),annotations:je.optional(),_meta:ae(ce({}))}),Re=T({...f.shape,...y.shape,uriTemplate:m(),description:ae(m()),mimeType:ae(m()),annotations:je.optional(),_meta:ae(ce({}))}),x=v.extend({method:A("notifications/resources/list_changed"),params:S.optional()}),M=S.extend({uri:m()}),H=v.extend({method:A("notifications/resources/updated"),params:M}),I=T({name:m(),description:ae(m()),required:ae(te())}),E=T({...f.shape,...y.shape,description:ae(m()),arguments:ae(O(I)),_meta:ae(ce({}))}),q=v.extend({method:A("notifications/prompts/list_changed"),params:S.optional()}),Y=T({type:A("text"),text:m(),annotations:je.optional(),_meta:Q(m(),ie()).optional()}),se=T({type:A("image"),data:s,mimeType:m(),annotations:je.optional(),_meta:Q(m(),ie()).optional()}),Se=T({type:A("audio"),data:s,mimeType:m(),annotations:je.optional(),_meta:Q(m(),ie()).optional()}),fe=T({type:A("tool_use"),name:m(),id:m(),input:Q(m(),ie()),_meta:Q(m(),ie()).optional()}),Ne=T({type:A("resource"),resource:oe([$e,Oe]),annotations:je.optional(),_meta:Q(m(),ie()).optional()}),nt=Ve.extend({type:A("resource_link")}),P=oe([Y,se,Se,nt,Ne]),D=T({role:i,content:P}),Z=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),me=v.extend({method:A("notifications/tools/list_changed"),params:S.optional()}),pe=T({name:m().optional()}),ye=T({hints:O(pe).optional(),costPriority:F().min(0).max(1).optional(),speedPriority:F().min(0).max(1).optional(),intelligencePriority:F().min(0).max(1).optional()}),De=T({mode:he(["auto","required","none"]).optional()}),Fe=T({type:A("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),Xe=T({type:A("string"),title:m().optional(),description:m().optional(),minLength:F().optional(),maxLength:F().optional(),format:he(["email","uri","date","date-time"]).optional(),default:m().optional()}),Ze=T({type:he(["number","integer"]),title:m().optional(),description:m().optional(),minimum:F().optional(),maximum:F().optional(),default:F().optional()}),Ae=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),gt=T({type:A("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),Je=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),At=oe([Ae,gt]),bt=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({type:A("string"),enum:O(m())}),default:O(m()).optional()}),Ct=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),Gt=oe([bt,Ct]),Bt=oe([Je,At,Gt]),$r=oe([Bt,Fe,Xe,Ze]),zr=h.extend({mode:A("form").optional(),message:m(),requestedSchema:T({type:A("object"),properties:Q(m(),$r),required:O(m()).optional()}).catchall(ie())}),wr=T({type:A("ref/resource"),uri:m()}),Rr=T({type:A("ref/prompt"),name:m()}),ao=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),ie()).optional()}),Kt=_.shape,so=T({experimental:Kt.experimental,sampling:Kt.sampling,elicitation:Kt.elicitation,roots:Kt.roots,extensions:Kt.extensions}),vt=R.shape,Yr=T({experimental:vt.experimental,logging:vt.logging,completions:vt.completions,prompts:vt.prompts,resources:vt.resources,tools:vt.tools,extensions:vt.extensions}),Xr=ce({progressToken:n.optional(),[Zt]:m(),[Vr]:w,[Ft]:so,[ur]:a.optional()}),Ir=T({...f.shape,...y.shape,description:m().optional(),inputSchema:ce({$schema:m().optional(),type:A("object")}),outputSchema:ce({$schema:m().optional()}).optional(),annotations:Z.optional(),_meta:Q(m(),ie()).optional()}),co=T({type:A("tool_result"),toolUseId:m(),content:O(P),structuredContent:ie().optional(),isError:te().optional(),_meta:Q(m(),ie()).optional()}),Qr=oe([Y,se,Se,fe,co]),kr=T({role:i,content:oe([Qr,O(Qr)]),_meta:Q(m(),ie()).optional()}),en=m(),lo=Q(m(),ie()).optional();function Ke(Ue){return ce({_meta:lo,resultType:en.default("complete"),...Ue})}let uo=Ke({}),ia=Ke({nextCursor:o.optional()}),mo=Ke({content:O(P),structuredContent:ie().optional(),isError:te().optional()}),tn=Ke({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),tools:O(Ir),nextCursor:o.optional()}),po=Ke({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),prompts:O(E),nextCursor:o.optional()}),fo=Ke({description:m().optional(),messages:O(D)}),ho=Ke({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),resources:O(Ve),nextCursor:o.optional()}),go=Ke({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),resourceTemplates:O(Re),nextCursor:o.optional()}),vo=Ke({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),contents:O(oe([$e,Oe]))}),yo=Ke({completion:T({values:O(m()).max(100),total:F().int().optional(),hasMore:te().optional()}).loose()}),aa=Ke({ttlMs:F().int().min(0),cacheScope:he(["public","private"])}),_o=Ke({ttlMs:F().int().min(0).catch(0),cacheScope:he(["public","private"]).catch("private"),supportedVersions:O(m()),capabilities:Yr,serverInfo:w,instructions:m().optional()}),So=T({messages:O(kr),modelPreferences:ye.optional(),systemPrompt:m().optional(),includeContext:he(["none","thisServer","allServers"]).optional(),temperature:F().optional(),maxTokens:F().int(),stopSequences:O(m()).optional(),metadata:t.optional(),tools:O(Ir).optional(),toolChoice:De.optional()}),Wt=T({method:A("sampling/createMessage"),params:So}),bo=T({method:A("roots/list"),params:T({_meta:Q(m(),ie()).optional()}).optional()}),$o=T({...kr.shape,model:m(),stopReason:m().optional()}),zo=T({roots:O(ao)}),wo=T({action:he(["accept","decline","cancel"]),content:Q(m(),oe([m(),F(),te(),O(m())])).optional()}),Ro=T({mode:A("url"),message:m(),url:m().url()}),Io=oe([zr,Ro]),ko=T({method:A("elicitation/create"),params:Io}),To=oe([Wt,bo,ko]),Po=oe([$o,zo,wo]),Eo=Q(m(),To),xo=Q(m(),Po),Tr=Ke({inputRequests:Eo.optional(),requestState:m().optional()}),Pr={inputResponses:xo.optional(),requestState:m().optional()},sa=T({_meta:Xr,...Pr}),ca=ce({progressToken:n.optional()});function dt(Ue,Er){return T({method:A(Ue),params:T({_meta:Xr,...Er})})}function mt(Ue,Er){return T({method:A(Ue),params:T({_meta:ca.optional(),...Er}).optional()})}let jo={name:m(),arguments:Q(m(),ie()).optional(),...Pr},$t={cursor:o.optional()},la=dt("tools/call",jo),ua=dt("tools/list",$t),da=dt("prompts/list",$t),ma=dt("prompts/get",{name:m(),arguments:Q(m(),m()).optional(),...Pr}),pa=dt("resources/list",$t),fa=dt("resources/templates/list",$t),ha=dt("resources/read",{uri:m(),...Pr}),No={ref:oe([Rr,wr]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()},ga=dt("completion/complete",No),va=dt("server/discover",{}),rn=T({toolsListChanged:te().optional(),promptsListChanged:te().optional(),resourcesListChanged:te().optional(),resourceSubscriptions:O(m()).optional()}),Oo={notifications:rn},ya=dt("subscriptions/listen",Oo),Ao=ce({"io.modelcontextprotocol/subscriptionId":r}),ku=ce({_meta:Ao,resultType:en.default("complete")}),_a={"tools/call":mt("tools/call",jo),"tools/list":mt("tools/list",$t),"prompts/get":mt("prompts/get",{name:m(),arguments:Q(m(),m()).optional()}),"prompts/list":mt("prompts/list",$t),"resources/list":mt("resources/list",$t),"resources/templates/list":mt("resources/templates/list",$t),"resources/read":mt("resources/read",{uri:m()}),"completion/complete":mt("completion/complete",No),"server/discover":mt("server/discover",{}),"subscriptions/listen":mt("subscriptions/listen",Oo)};function We(Ue){return ce({_meta:lo,...Ue})}let Co={"tools/call":We({content:O(P),structuredContent:ie().optional(),isError:te().optional()}),"tools/list":We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),tools:O(Ir),nextCursor:o.optional()}),"prompts/get":We({description:m().optional(),messages:O(D)}),"prompts/list":We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),prompts:O(E),nextCursor:o.optional()}),"resources/list":We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),resources:O(Ve),nextCursor:o.optional()}),"resources/templates/list":We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),resourceTemplates:O(Re),nextCursor:o.optional()}),"resources/read":We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),contents:O(oe([$e,Oe]))}),"completion/complete":We({completion:T({values:O(m()).max(100),total:F().int().optional(),hasMore:te().optional()}).loose()}),"server/discover":We({ttlMs:F().int().min(0).catch(0),cacheScope:he(["public","private"]).catch("private"),supportedVersions:O(m()),capabilities:Yr,serverInfo:w,instructions:m().optional()}),"subscriptions/listen":We({})},nn=ce({"io.modelcontextprotocol/subscriptionId":r.optional()}),on=T({method:A("notifications/subscriptions/acknowledged"),params:T({_meta:nn.optional(),notifications:rn})}),an=T({_meta:nn.optional(),requestId:r,reason:m().optional()}),sn=T({method:A("notifications/cancelled"),params:an}),qo={"notifications/cancelled":sn,"notifications/progress":C,"notifications/message":ee,"notifications/resources/updated":H,"notifications/resources/list_changed":x,"notifications/tools/list_changed":me,"notifications/prompts/list_changed":q,"notifications/subscriptions/acknowledged":on},yt=Ue=>T({jsonrpc:A("2.0"),id:oe([m(),F().int()]),result:Ue}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,RequestIdSchema:r,RoleSchema:i,LoggingLevelSchema:a,TaskMetadataSchema:c,RelatedTaskMetadataSchema:u,RequestMetaSchema:d,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:h,NotificationsParamsSchema:S,NotificationSchema:v,IconSchema:$,IconsSchema:y,BaseMetadataSchema:f,ImplementationSchema:w,ClientTasksCapabilitySchema:k,ServerTasksCapabilitySchema:z,ClientCapabilitiesSchema:_,ServerCapabilitiesSchema:R,ProgressSchema:j,ProgressNotificationParamsSchema:U,ProgressNotificationSchema:C,LoggingMessageNotificationParamsSchema:V,LoggingMessageNotificationSchema:ee,ResourceContentsSchema:ne,TextResourceContentsSchema:$e,BlobResourceContentsSchema:Oe,AnnotationsSchema:je,ResourceSchema:Ve,ResourceTemplateSchema:Re,ResourceListChangedNotificationSchema:x,ResourceUpdatedNotificationParamsSchema:M,ResourceUpdatedNotificationSchema:H,PromptArgumentSchema:I,PromptSchema:E,PromptListChangedNotificationSchema:q,TextContentSchema:Y,ImageContentSchema:se,AudioContentSchema:Se,ToolUseContentSchema:fe,EmbeddedResourceSchema:Ne,ResourceLinkSchema:nt,ContentBlockSchema:P,PromptMessageSchema:D,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:me,ModelHintSchema:pe,ModelPreferencesSchema:ye,ToolChoiceSchema:De,BooleanSchemaSchema:Fe,StringSchemaSchema:Xe,NumberSchemaSchema:Ze,UntitledSingleSelectEnumSchemaSchema:Ae,TitledSingleSelectEnumSchemaSchema:gt,LegacyTitledEnumSchemaSchema:Je,SingleSelectEnumSchemaSchema:At,UntitledMultiSelectEnumSchemaSchema:bt,TitledMultiSelectEnumSchemaSchema:Ct,MultiSelectEnumSchemaSchema:Gt,EnumSchemaSchema:Bt,PrimitiveSchemaDefinitionSchema:$r,ElicitRequestFormParamsSchema:zr,ResourceTemplateReferenceSchema:wr,PromptReferenceSchema:Rr,RootSchema:ao,ClientCapabilities2026Schema:so,ServerCapabilities2026Schema:Yr,RequestMetaEnvelopeSchema:Xr,ToolSchema:Ir,ToolResultContentSchema:co,SamplingMessageContentBlockSchema:Qr,SamplingMessageSchema:kr,ResultTypeSchema:en,ResultSchema:uo,PaginatedResultSchema:ia,CallToolResultSchema:mo,ListToolsResultSchema:tn,ListPromptsResultSchema:po,GetPromptResultSchema:fo,ListResourcesResultSchema:ho,ListResourceTemplatesResultSchema:go,ReadResourceResultSchema:vo,CompleteResultSchema:yo,CacheableResultSchema:aa,DiscoverResultSchema:_o,CreateMessageRequestParamsSchema:So,CreateMessageRequestSchema:Wt,ListRootsRequestSchema:bo,CreateMessageResultSchema:$o,ListRootsResultSchema:zo,ElicitResultSchema:wo,ElicitRequestURLParamsSchema:Ro,ElicitRequestParamsSchema:Io,ElicitRequestSchema:ko,InputRequestSchema:To,InputResponseSchema:Po,InputRequestsSchema:Eo,InputResponsesSchema:xo,InputRequiredResultSchema:Tr,InputResponseRequestParamsSchema:sa,CallToolRequestSchema:la,ListToolsRequestSchema:ua,ListPromptsRequestSchema:da,GetPromptRequestSchema:ma,ListResourcesRequestSchema:pa,ListResourceTemplatesRequestSchema:fa,ReadResourceRequestSchema:ha,CompleteRequestSchema:ga,DiscoverRequestSchema:va,SubscriptionFilterSchema:rn,SubscriptionsListenRequestSchema:ya,SubscriptionsListenResultMetaSchema:Ao,SubscriptionsListenResultSchema:ku,dispatchRequestSchemas:_a,dispatchResultSchemas:Co,NotificationMetaSchema:nn,SubscriptionsAcknowledgedNotificationSchema:on,CancelledNotificationParamsSchema:an,CancelledNotificationSchema:sn,notificationSchemas2026:qo,JSONRPCResultResponseSchema:yt(uo),CallToolResultResponseSchema:yt(oe([mo,Tr])),ListToolsResultResponseSchema:yt(tn),ListPromptsResultResponseSchema:yt(po),GetPromptResultResponseSchema:yt(oe([fo,Tr])),ListResourcesResultResponseSchema:yt(ho),ListResourceTemplatesResultResponseSchema:yt(go),ReadResourceResultResponseSchema:yt(oe([vo,Tr])),CompleteResultResponseSchema:yt(yo),DiscoverResultResponseSchema:yt(_o)}}var o0;function Gr(){return o0??=n0()}var i0=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function a0(e){return i0.includes(e)}var Yn=Symbol("modelcontextprotocol.resultCacheHintFallback");function eu(e,t){if(t===void 0)return e;let n=e[Yn];if(n===void 0)return{...e,[Yn]:t};let o={},r=n.ttlMs??t.ttlMs;r!==void 0&&(o.ttlMs=r);let i=n.cacheScope??t.cacheScope;return i!==void 0&&(o.cacheScope=i),{...e,[Yn]:o}}function s0(e){return e[Yn]}function pg(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function fg(e){return e==="public"||e==="private"}function hg(e,t){if(e.ttlMs!==void 0&&!pg(e.ttlMs))throw new RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(e.cacheScope!==void 0&&!fg(e.cacheScope))throw new RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}var X=(function(e){return 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.ResourceNotFound=-32002]="ResourceNotFound",e[e.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",e[e.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired",e})({}),le=class fS extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return Xn(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Xn(this,t)}constructor(t,n,o){super(n),this.code=t,this.data=o,this.name="ProtocolError",cg(this,new.target)}static fromError(t,n,o){if(t===X.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new hS(r.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&o){let r=o;if(Array.isArray(r.supported)&&typeof r.requested=="string")return new to({supported:r.supported,requested:r.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let r=o;if(typeof r?.uri=="string"&&(t===X.ResourceNotFound||Object.keys(r).length===1))return new tu(r.uri,n)}if(t===X.MissingRequiredClientCapability&&o){let r=o;if(r.requiredCapabilities!==null&&typeof r.requiredCapabilities=="object"&&!Array.isArray(r.requiredCapabilities))return new ru({requiredCapabilities:r.requiredCapabilities},n)}return new fS(t,n,o)}},tu=class extends le{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(X.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},hS=class extends le{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},to=class extends le{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(X.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},ru=class extends le{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(X.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},c0=0,l0="private",u0=["tools/call","prompts/get","resources/read"];function d0(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:"complete"};if(n==="complete"||u0.includes(e))return t;throw new le(X.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function m0(e,t){let n=s0(t);if(t.resultType!=="complete"||!a0(e))return n===void 0?t:h0(t);let o=t,r=pg(o.ttlMs)?o.ttlMs:p0(n),i=fg(o.cacheScope)?o.cacheScope:f0(n),a={...o,ttlMs:r,cacheScope:i};return delete a[Yn],a}function p0(e){return e!==void 0&&pg(e.ttlMs)?e.ttlMs:c0}function f0(e){return e!==void 0&&fg(e.cacheScope)?e.cacheScope:l0}function h0(e){let t={...e};return delete t[Yn],t}var g0=["elicitation/create","sampling/createMessage","roots/list"],Bl;function gS(){if(Bl)return Bl;let e=Gr();return Bl={request:{"elicitation/create":T({method:A("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":T({method:A("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":T({method:A("roots/list"),params:ce({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Bl}function vS(e){return g0.includes(e)}function tg(e){return vS(e)?gS().request[e]:void 0}function v0(e){return vS(e)?gS().response[e]:void 0}var gg={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},yS={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function _S(e){return Object.prototype.hasOwnProperty.call(gg,e)}function SS(e){return Object.prototype.hasOwnProperty.call(yS,e)}function y0(e){return Object.prototype.hasOwnProperty.call(gg,e)}function _0(e){return _S(e)?Gr().dispatchRequestSchemas[e]:void 0}function S0(e){return y0(e)?Gr().dispatchResultSchemas[e]:void 0}function b0(e){return SS(e)?Gr().notificationSchemas2026[e]:void 0}var mj=Object.keys(gg),pj=Object.keys(yS);function Zi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ui(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var $0={ok:!1,reason:"not-in-era"},z0=[Zt,Vr,Ft];function w0(e,t){let n=t,o=!1,r=()=>(o||(n={...n},o=!0),n),i=t.tools;e==="tools/list"&&Array.isArray(i)&&i.some(s=>Zi(s)&&"execution"in s)&&(r().tools=i.map(s=>{if(!Zi(s)||!("execution"in s))return s;let c={...s};return delete c.execution,c}));let a=t.capabilities;if(Zi(a)&&"tasks"in a){let s={...a};delete s.tasks,r().capabilities=s}return n}var vg={era:"2026-07-28",hasRequestMethod:_S,hasNotificationMethod:SS,hasInputRequestMethod:e=>tg(e)!==void 0,validateRequest:(e,t)=>Ui(_0(e),t),validateResult:(e,t)=>Ui(S0(e),t),validateNotification:(e,t)=>Ui(b0(e),t),validateInputRequest:(e,t)=>Ui(tg(e),t),validateInputResponse:(e,t)=>Ui(v0(e),t),samplingResultVariant:()=>$0,outboundEnvelope(e){return{[Zt]:e.protocolVersion,[Vr]:e.clientInfo,[Ft]:e.clientCapabilities,...e.logLevel!==void 0&&{[ur]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let o of z0)o in e||t.push({key:o,problem:"missing"});let n=Gr().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let o of n.error.issues){let r=o.path.map(String),i=r.length>0?r.join("."):"_meta";r.length===1&&t.some(a=>a.key===i&&a.problem==="missing")||t.push({key:i,problem:o.message})}return t},projectCallToolResult:e=>aS(e),inputRequestSchema:tg,decodeResult(e,t){if(!Zi(t))return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if(typeof n!="string")return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n==="input_required"){let a=t.inputRequests,s=Zi(a)?a:{},c=t.requestState;return Object.keys(s).length===0&&typeof c!="string"?{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:s,...typeof c=="string"&&{requestState:c}}}if(n!=="complete")return{kind:"invalid",error:new ve(ze.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let o=R0(),r=Object.hasOwn(o,e)?o[e]:void 0;if(r!==void 0){let a=r.safeParse(t);if(!a.success)return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: ${a.error}`,{method:e})}}let i={...t};return delete i.resultType,{kind:"complete",result:i}},encodeResult(e,t){return m0(e,d0(e,w0(e,t)))},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientInfo, io.modelcontextprotocol/clientCapabilities)";let t=Gr().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(n=>n.message).join("; ")}`}},Kl;function R0(){if(Kl)return Kl;let e=Gr();return Kl={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Kl}var Gi="2026-07-28";function yr(e){return e!==void 0&&eo(e)?vg:mg}function B_(e){return e.revision!==void 0?yr(e.revision).era:e.era==="modern"?vg.era:mg.era}function rg(e){return bS.some(t=>t.hasRequestMethod(e))}function ng(e){return bS.some(t=>t.hasNotificationMethod(e))}var bS=[mg,vg];function K_(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Br(e){if(!K_(e))return;let t=e._meta;return K_(t)?t:void 0}function nu(e){let t=Br(e);return t!==void 0&&Zt in t}function ou(e){let t=Br(e)?.[Zt];return typeof t=="string"?t:void 0}function iu(e){return yr(Gi).validateEnvelopeMeta(e)}var I0=Hg({AnnotationsSchema:()=>Ht,AudioContentSchema:()=>Jn,BaseMetadataSchema:()=>Vt,BaseRequestParamsSchema:()=>Be,BlobResourceContentsSchema:()=>Pi,BooleanSchemaSchema:()=>Oi,CallToolRequestParamsSchema:()=>il,CallToolRequestSchema:()=>al,CallToolResultSchema:()=>Ni,CancelTaskRequestSchema:()=>Mh,CancelTaskResultSchema:()=>Dh,CancelledNotificationParamsSchema:()=>cc,CancelledNotificationSchema:()=>zi,ClientCapabilitiesSchema:()=>mc,ClientNotificationSchema:()=>Vh,ClientRequestSchema:()=>Uh,ClientResultSchema:()=>Zh,ClientTasksCapabilitySchema:()=>uc,CompatibilityCallToolResultSchema:()=>Th,CompleteRequestParamsSchema:()=>Nl,CompleteRequestSchema:()=>Ol,CompleteResultSchema:()=>Al,ContentBlockSchema:()=>Gn,CreateMessageRequestParamsSchema:()=>yl,CreateMessageRequestSchema:()=>_l,CreateMessageResultSchema:()=>Sl,CreateMessageResultWithToolsSchema:()=>bl,CreateTaskResultSchema:()=>xh,CursorSchema:()=>yi,DiscoverRequestSchema:()=>vc,DiscoverResultSchema:()=>yc,ElicitRequestFormParamsSchema:()=>Wn,ElicitRequestParamsSchema:()=>Il,ElicitRequestSchema:()=>kl,ElicitRequestURLParamsSchema:()=>Rl,ElicitResultSchema:()=>El,ElicitationCompleteNotificationParamsSchema:()=>Tl,ElicitationCompleteNotificationSchema:()=>Pl,EmbeddedResourceSchema:()=>Wc,EmptyResultSchema:()=>$i,EnumSchemaSchema:()=>wl,GetPromptRequestParamsSchema:()=>Gc,GetPromptRequestSchema:()=>Bc,GetPromptResultSchema:()=>Qc,GetTaskPayloadRequestSchema:()=>Ah,GetTaskPayloadResultSchema:()=>Ch,GetTaskRequestSchema:()=>Nh,GetTaskResultSchema:()=>Oh,IconSchema:()=>lc,IconsSchema:()=>mr,ImageContentSchema:()=>Hn,ImplementationSchema:()=>Vn,InitializeRequestParamsSchema:()=>pc,InitializeRequestSchema:()=>fc,InitializeResultSchema:()=>hc,InitializedNotificationSchema:()=>gc,JSONArraySchema:()=>Rh,JSONObjectSchema:()=>qe,JSONRPCErrorResponseSchema:()=>Un,JSONRPCMessageSchema:()=>bi,JSONRPCNotificationSchema:()=>Si,JSONRPCRequestSchema:()=>_i,JSONRPCResponseSchema:()=>Ih,JSONRPCResultResponseSchema:()=>Dn,JSONValueSchema:()=>lr,LegacyTitledEnumSchemaSchema:()=>qi,ListChangedOptionsBaseSchema:()=>Ph,ListPromptsRequestSchema:()=>Hc,ListPromptsResultSchema:()=>Jc,ListResourceTemplatesRequestSchema:()=>Rc,ListResourceTemplatesResultSchema:()=>Ic,ListResourcesRequestSchema:()=>zc,ListResourcesResultSchema:()=>wc,ListRootsRequestSchema:()=>ql,ListRootsResultSchema:()=>Ll,ListTasksRequestSchema:()=>qh,ListTasksResultSchema:()=>Lh,ListToolsRequestSchema:()=>nl,ListToolsResultSchema:()=>ol,LoggingLevelSchema:()=>gr,LoggingMessageNotificationParamsSchema:()=>ul,LoggingMessageNotificationSchema:()=>dl,ModelHintSchema:()=>ml,ModelPreferencesSchema:()=>pl,MultiSelectEnumSchemaSchema:()=>zl,NotificationSchema:()=>rt,NotificationsParamsSchema:()=>tt,NumberSchemaSchema:()=>Kn,PaginatedRequestParamsSchema:()=>bc,PaginatedRequestSchema:()=>pr,PaginatedResultSchema:()=>fr,PingRequestSchema:()=>Ri,PrimitiveSchemaDefinitionSchema:()=>Di,ProgressNotificationParamsSchema:()=>Sc,ProgressNotificationSchema:()=>Ii,ProgressSchema:()=>_c,ProgressTokenSchema:()=>vi,PromptArgumentSchema:()=>Zc,PromptListChangedNotificationSchema:()=>el,PromptMessageSchema:()=>Xc,PromptReferenceSchema:()=>jl,PromptSchema:()=>Fc,ReadResourceRequestParamsSchema:()=>kc,ReadResourceRequestSchema:()=>Tc,ReadResourceResultSchema:()=>Pc,RelatedTaskMetadataSchema:()=>sc,RequestIdSchema:()=>dr,RequestMetaSchema:()=>Mn,RequestSchema:()=>Le,ResourceContentsSchema:()=>ki,ResourceLinkSchema:()=>Yc,ResourceListChangedNotificationSchema:()=>Ec,ResourceRequestParamsSchema:()=>Zn,ResourceSchema:()=>Ei,ResourceTemplateReferenceSchema:()=>xl,ResourceTemplateSchema:()=>$c,ResourceUpdatedNotificationParamsSchema:()=>Uc,ResourceUpdatedNotificationSchema:()=>Vc,ResultSchema:()=>Me,RoleSchema:()=>hr,RootSchema:()=>Cl,RootsListChangedNotificationSchema:()=>Ml,SamplingContentSchema:()=>gl,SamplingMessageContentBlockSchema:()=>Dr,SamplingMessageSchema:()=>vl,ServerCapabilitiesSchema:()=>wi,ServerNotificationSchema:()=>Hh,ServerRequestSchema:()=>Fh,ServerResultSchema:()=>Jh,ServerTasksCapabilitySchema:()=>dc,SetLevelRequestParamsSchema:()=>cl,SetLevelRequestSchema:()=>ll,SingleSelectEnumSchemaSchema:()=>$l,StringSchemaSchema:()=>Bn,SubscribeRequestParamsSchema:()=>xc,SubscribeRequestSchema:()=>jc,SubscriptionFilterSchema:()=>xi,SubscriptionsAcknowledgedNotificationParamsSchema:()=>qc,SubscriptionsAcknowledgedNotificationSchema:()=>Lc,SubscriptionsListenRequestParamsSchema:()=>Ac,SubscriptionsListenRequestSchema:()=>Cc,SubscriptionsListenResultMetaSchema:()=>Mc,SubscriptionsListenResultSchema:()=>Dc,TaskAugmentedRequestParamsSchema:()=>Hr,TaskCreationParamsSchema:()=>Eh,TaskMetadataSchema:()=>ac,TaskSchema:()=>vr,TaskStatusNotificationParamsSchema:()=>Ul,TaskStatusNotificationSchema:()=>jh,TaskStatusSchema:()=>Dl,TextContentSchema:()=>Fn,TextResourceContentsSchema:()=>Ti,TitledMultiSelectEnumSchemaSchema:()=>Mi,TitledSingleSelectEnumSchemaSchema:()=>Ci,ToolAnnotationsSchema:()=>tl,ToolChoiceSchema:()=>fl,ToolExecutionSchema:()=>rl,ToolListChangedNotificationSchema:()=>sl,ToolResultContentSchema:()=>hl,ToolSchema:()=>ji,ToolUseContentSchema:()=>Kc,UnsubscribeRequestParamsSchema:()=>Nc,UnsubscribeRequestSchema:()=>Oc,UntitledMultiSelectEnumSchemaSchema:()=>Li,UntitledSingleSelectEnumSchemaSchema:()=>Ai});var St=e=>_i.safeParse(e).success,Sr=e=>Si.safeParse(e).success,Hi=e=>Dn.safeParse(e).success,au=e=>Un.safeParse(e).success;var Jt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";function yg(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function _g(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var W_="x-mcp-header",k0=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,T0=new Set(["string","integer","boolean","number"]);function Sg(e){let t=[],n=new Map,o=(i,a,s)=>{if(i===null||typeof i!="object")return;let c=i;if(W_ in c){if(!s||a.length===0)return`${Wl(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let d=c[W_];if(typeof d!="string"||d.length===0)return`${Wl(a)}: x-mcp-header MUST be a non-empty string`;if(!k0.test(d))return`${Wl(a)}: x-mcp-header '${d}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let p=typeof c.type=="string"?c.type:void 0;if(p===void 0||!T0.has(p))return`${Wl(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${p??"<none>"}`;let h=d.toLowerCase(),S=n.get(h);if(S!==void 0)return`x-mcp-header '${d}' is not case-insensitively unique (also declared as '${S}')`;n.set(h,d),t.push({path:a,headerName:d,type:p})}let u=c.properties;if(u!==null&&typeof u=="object")for(let[d,p]of Object.entries(u)){let h=o(p,[...a,d],s);if(h!==void 0)return h}for(let d of P0){let p=c[d];if(p===void 0)continue;let h=Array.isArray(p)?p:p!==null&&typeof p=="object"&&E0.has(d)?Object.values(p):[p];for(let S of h){let v=o(S,[...a,`<${d}>`],!1);if(v!==void 0)return v}}},r=o(e,[],!0);return r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r}}var P0=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],E0=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Wl(e){return e.length===0?"<root>":e.join(".")}var Xl=-32020,fj=[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32e3],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[X.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[Xl,X.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[X.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope \u2014 and a missing envelope on a request whose protocol-version header names a modern revision \u2014 is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[X.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision\u2019s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[X.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[Xl],conformance:["http-header-validation"],rationale:"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers \u2014 presence, sentinel decoding, and `Mcp-Name` \u2194 body cross-check \u2014 are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier\u2019s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5\u20136) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[X.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced \u2014 pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[Xl],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool\u2019s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}],x0={[X.ParseError]:400,[X.InvalidRequest]:400,[X.MethodNotFound]:404,[X.UnsupportedProtocolVersion]:400,[X.MissingRequiredClientCapability]:400,[Xl]:400};function Yl(e,t,n,o,r){return{kind:"reject",rung:e,cell:t,httpStatus:n,code:o.code,message:o.message,...o.data!==void 0&&{data:o.data},settled:r}}function bg(e){if(!nu(e))return!1;let t=ou(e);if(t===void 0||!eo(t))return!1;let n=Br(e);return n!==void 0&&iu(n).length===0}function $g(e,t){switch(e.reason){case"http-method":return Yl("http-method","modern-only-method-not-allowed",405,new le(-32e3,"Method not allowed."),!0);case"batch":return Yl("jsonrpc-shape","modern-only-batch-not-supported",400,new le(X.InvalidRequest,"Bad Request: JSON-RPC batches are not supported by this endpoint"),!0);case"response":return Yl("jsonrpc-shape","modern-only-response-post",400,new le(X.InvalidRequest,"Bad Request: JSON-RPC responses cannot be posted to this endpoint"),!0);case"notification":return;case"initialize":case"no-claim":{let n=e.requestedVersion;return Yl("era-classification","modern-only-missing-envelope",400,n===void 0?new le(X.UnsupportedProtocolVersion,"Unsupported protocol version: the request did not name a protocol version",{supported:[...t]}):new to({supported:[...t],requested:n}),!0)}}}function su(e,t){return ii(e,t)}function Vi(e){return new Set(e.flatMap(t=>Object.keys(t.shape)))}function Qn(e){if(e==null)return!1;let t=typeof e;return t!=="object"&&t!=="function"||!("~standard"in e)?!1:typeof e["~standard"]?.validate=="function"}var Y_=!1,ag="draft-2020-12";function br(e,t="input"){let n=e["~standard"],o;if(n.jsonSchema)o=n.jsonSchema[t]({target:ag});else if(n.vendor==="zod"){if(!("_zod"in e))throw new Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");Y_||(Y_=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),o=Lr(e,{target:ag,io:t})}else throw new Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output")return o.type!==void 0?o:$S(o)?{type:"object",...o}:o;if(o.type!==void 0&&o.type!=="object")throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(o.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...o}}function $S(e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;for(let t of["oneOf","anyOf","allOf"]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(o=>o!==null&&typeof o=="object"&&(o.type==="object"||$S(o)))}return!1}function j0(e){return e.path?.length?`${e.path.map(t=>String(typeof t=="object"?t.key:t)).join(".")}: ${e.message}`:e.message}async function Jr(e,t){let n=await e["~standard"].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(o=>j0(o)).join(", ")}:{success:!0,data:n.value}}function N0(e){let t=Lr(e,{target:ag,io:"input"});return typeof t.pattern=="string"?t.pattern:void 0}var O0=/\\\.\\d\{(\d+)\}/;function A0(e){let t=O0.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(o=>[!1,!0].flatMap(r=>n.map(i=>ht.datetime({local:o,offset:r,precision:i}))))}function C0(e,t){let n;switch(e){case"email":n=[Cs()];break;case"uri":n=[On()];break;case"date":n=[ht.date()];break;case"date-time":n=A0(t);break}return new Set(n.map(o=>N0(o)).filter(o=>o!==void 0))}function q0(e,t,n){return n!=="zod"?!0:C0(e,t).has(t)}function zS(e){let t=br(e,"input"),n=t.properties||{},o=t.required||[];return Object.entries(n).map(([r,i])=>({name:r,description:i?.description,required:o.includes(r)}))}function Ji(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function L0(e){try{return br(e,"input")}catch(t){let n=t instanceof Error?t.message:String(t);throw new le(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var M0=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function zg(e){return M0.has(e)||e.startsWith("x-")}var D0=new Set(["$schema",...Object.keys(Wn.shape.requestedSchema.shape)]),X_={string:Vi([Bn,Ai,Ci,qi]),number:Vi([Kn]),integer:Vi([Kn]),boolean:Vi([Oi]),array:Vi([Li,Mi])},U0=new Set(Bn.shape.format.unwrap().options);function V0(e,t,n,o){if(!Ji(e))return e;let r=typeof e.type=="string"&&Object.hasOwn(X_,e.type)?X_[e.type]:void 0;if(r===void 0)return e;let i={};for(let[a,s]of Object.entries(e))r.has(a)||zg(a)?i[a]=s:a==="pattern"&&e.type==="string"&&typeof e.format=="string"?U0.has(e.format)?(typeof s!="string"||!q0(e.format,s,n))&&o.push(`${t}.${a}`):i[a]=s:o.push(`${t}.${a}`);return i}function Z0(e,t){let n={},o=[];for(let[r,i]of Object.entries(e))r==="properties"&&Ji(i)?n[r]=Object.fromEntries(Object.entries(i).map(([a,s])=>[a,V0(s,`properties.${a}`,t,o)])):D0.has(r)?n[r]=i:zg(r)||o.push(r);if(o.length>0)throw new le(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${o.join(", ")}`);return n}function F0(e,t){if(!Ji(e.properties))return t;let n=Object.entries(e.properties).filter(([,o])=>!su(Di,o).success).map(([o])=>`properties.${o}`);return n.length>0?n.join(", "):t}function sg(e,t,n=""){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((o,r)=>sg(o,t[r],`${n}[${r}]`)):!Ji(e)||!Ji(t)?[]:Object.entries(e).flatMap(([o,r])=>{let i=n?`${n}.${o}`:o;return Object.prototype.hasOwnProperty.call(t,o)?sg(r,t[o],i):zg(o)?[]:[i]})}function H0(e){if(!Qn(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,n=Z0(L0(e.requestedSchema),t),o=su(Wn.shape.requestedSchema,n);if(!o.success)throw new le(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${F0(n,o.error.message)}`);let r=sg(n,o.data);if(r.length>0)throw new le(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);let i=(o.data.required??[]).filter(a=>!Object.prototype.hasOwnProperty.call(o.data.properties,a));if(i.length>0)throw new le(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${i.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}function J0(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState=="string";if(!t&&!n)throw new TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}var G0=Object.assign(J0,{elicit(e){try{return{method:"elicitation/create",params:H0(e)}}catch(t){throw t instanceof le?new TypeError(t.message,{cause:t}):t}},elicitUrl(e){return{method:"elicitation/create",params:{...e,mode:"url"}}},createMessage(e){return{method:"sampling/createMessage",params:e}},listRoots(){return{method:"roots/list"}}});var wS=250;function RS(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function IS(e,t){return new Promise((n,o)=>{if(t?.aborted){o(t.reason instanceof ve?t.reason:new ve(ze.RequestTimeout,String(t.reason)));return}let r=setTimeout(()=>{t?.removeEventListener("abort",i),n()},e),i=()=>{clearTimeout(r),o(t?.reason instanceof ve?t.reason:new ve(ze.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",i,{once:!0})})}function kS(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener("abort",n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:o=>t.abort(o),dispose:()=>e?.removeEventListener("abort",n)}}var B0=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],K0={IdJagTokenExchangeResponseSchema:Wh,OAuthClientInformationFullSchema:Xh,OAuthClientInformationSchema:Hl,OAuthClientMetadataSchema:Fl,OAuthClientRegistrationErrorSchema:Qh,OAuthErrorResponseSchema:Yh,OAuthMetadataSchema:Vl,OAuthProtectedResourceMetadataSchema:Gh,OAuthTokenRevocationRequestSchema:eg,OAuthTokensSchema:Kh,OpenIdProviderDiscoveryMetadataSchema:Bh,OpenIdProviderMetadataSchema:Zl},TS={},PS={};function ES(e,t){let n=e.slice(0,-6);TS[n]=t,PS[n]=o=>t.safeParse(o).success}for(let e of B0)ES(e,I0[e]);for(let[e,t]of Object.entries(K0))ES(e,t);var W0=Object.freeze(TS),Y0=Object.freeze(PS);function X0(e){switch(e){case"initialize":case"notifications/initialized":return yr(void 0);case"server/discover":return yr(Gi);default:return}}var xS=6e4,Q0=[Zt,Vr,Ft,ur],eI=["inputResponses","requestState"];function Q_(e,t){let n=e.params;if(!Fi(n))return{message:e,lifted:{}};let o=n._meta,r=Fi(o)?Q0.filter(c=>c in o):[],i=t==="request"?eI.filter(c=>c in n):[];if(r.length===0&&i.length===0)return{message:e,lifted:{}};let a={},s={...n};if(r.length>0&&Fi(o)){let c={},u={...o};for(let d of r)c[d]=o[d],delete u[d];a.envelope=c,Object.keys(u).length>0?s._meta=u:delete s._meta}for(let c of i)c==="inputResponses"&&(a.inputResponses=s[c]),c==="requestState"&&(a.requestState=s[c]),delete s[c];return{message:{...e,params:s},lifted:a}}function eS(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason==="not-in-era"))return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(o){let r=e.validateResult(t,o);return r.ok?{value:r.value}:{issues:[{message:r.reason==="invalid"?r.message:`not-in-era: ${t}`}]}}}}}function Bi(e){return()=>e}var tI=Bi(void 0);function wg(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:Bi(t)}}}var jS;function Rg(e,t){jS(e,t)}var NS=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{jS=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??oc,this.setNotificationHandler("notifications/cancelled",t=>{this._oncancel(t)}),this.setNotificationHandler("notifications/progress",t=>{this._onprogress(t)}),this.setRequestHandler("ping",t=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new ve(ze.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,o,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new ve(ze.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=r=>{n?.(r),this._onerror(r)};let o=this._transport?.onmessage;this._transport.onmessage=(r,i)=>{o?.(r,i),Hi(r)||au(r)?this._onresponse(r):St(r)?this._onrequest(r,i):Sr(r)?this._onnotification(r,i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(r)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new ve(ze.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let o of e.values())o(n);for(let o of t.values())o.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Q_(e,"notification"),o=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let a=B_(t.classification);if(a!==o.era){this._onerror(new Error(`Era mismatch on inbound notification '${n.method}': classified as ${a} but this instance serves ${o.era}`));return}}if(ng(n.method)&&!o.hasNotificationMethod(n.method))return;let r=this._notificationHandlers.get(n.method),i=this.fallbackNotificationHandler;r===void 0&&i===void 0||Promise.resolve().then(()=>r===void 0?i(n):r(n,o)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,t){let{message:n,lifted:o}=Q_(e,"request"),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop"){this._onerror(new Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let i=this._transport,a=($,y,f)=>{let w={jsonrpc:"2.0",id:n.id,error:{code:$,message:y,...f!==void 0&&{data:f}}};i?.send(w).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)))};if(t?.classification!==void 0){let $=B_(t.classification);if($!==r.era){this._onerror(new Error(`Era mismatch on inbound request '${n.method}': classified as ${$} but this instance serves ${r.era}`));let y=t.classification.revision??$;a(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${y}`,{supported:this._supportedProtocolVersions,requested:y});return}}if(rg(n.method)&&!r.hasRequestMethod(n.method)){a(X.MethodNotFound,"Method not found");return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){a(X.MethodNotFound,"Method not found");return}let c=r.checkInboundEnvelope(o);if(c!==void 0){a(X.InvalidParams,c);return}let u=($,y)=>this._notificationViaCodec(this._resolveOutboundCodec($.method),$,{...y,relatedRequestId:n.id}),d=($,y,f)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec($.method),$,y,{...f,relatedRequestId:n.id}),p=new AbortController;this._requestHandlerAbortControllers.set(n.id,p);let h=o.inputResponses===void 0?void 0:rI(o.inputResponses),S={sessionId:i?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...o.envelope!==void 0&&{envelope:o.envelope},...h!==void 0&&{inputResponses:h.accepted},...h!==void 0&&h.droppedKeys.length>0&&{droppedInputResponseKeys:h.droppedKeys},requestState:o.requestState===void 0?tI:Bi(o.requestState),signal:p.signal,send:(($,y,f)=>{let w=this._resolveOutboundCodec($.method);if(this._assertOutboundRequestInEra(w,$.method),Qn(y))return d($,y,f);let g=eS(w,$.method);if(g===void 0)throw new TypeError(`'${$.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return d($,g,y)}),notify:u},http:t?.authInfo?{authInfo:t.authInfo}:void 0},v=this.buildContext(S,t);Promise.resolve().then(()=>s(n,v)).then(async $=>{if(p.signal.aborted)return;let y;try{y=r.encodeResult(n.method,$)}catch(w){this._onerror(new Error(`Failed to encode result for ${n.method}: ${w}`)),a(X.InternalError,"Internal error");return}let f={result:y,jsonrpc:"2.0",id:n.id};await i?.send(f)},async $=>{if(p.signal.aborted)return;let y=Number.isSafeInteger($.code)?$.code:X.InternalError,f={jsonrpc:"2.0",id:n.id,error:{code:r.encodeErrorCode(y),message:$.message??"Internal error",...$.data!==void 0&&{data:$.data}}};await i?.send(f)}).catch($=>this._onerror(new Error(`Failed to send response: ${$}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===p&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&i&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(s){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),i(s);return}r(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Hi(e)?n(e):n(le.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let o=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(o,e.method),Qn(t))return this._requestWithSchemaViaCodec(o,e,t,n);let r=eS(o,e.method);if(r===void 0)throw new TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(o,e,r,t)}_negotiatedWireCodec(){return yr(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=X0(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(rg(t)&&!e.hasRequestMethod(t))throw new ve(ze.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let o=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(o,e.method),this._requestWithSchemaViaCodec(o,e,t,n)}_requestWithSchemaViaCodec(e,t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,headers:s}=o??{},c=Date.now(),u,d;return new Promise((p,h)=>{let S=z=>{h(z)};if(!this._transport){S(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(z){S(z);return}if(o?.signal?.aborted){let z=o.signal.reason;throw z instanceof ve?z:new ve(ze.RequestTimeout,String(z))}let v=e.era===Gi&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,$=this._requestMessageId++;d=$;let y={...t,jsonrpc:"2.0",id:$};o?.onprogress&&(this._progressHandlers.set($,o.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:$}});let f=this._envelopeOutbound(y),w=!1,g=z=>{w||(this._progressHandlers.delete($),v===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:$,reason:String(z)}}),{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(_=>this._onerror(new Error(`Failed to send cancellation: ${_}`))):v.abort(),h(z instanceof ve?z:new ve(ze.RequestTimeout,String(z))))};this._responseHandlers.set($,z=>{if(o?.signal?.aborted)return;if(w=!0,z instanceof Error)return h(z);let _;try{_=e.decodeResult(t.method,z.result)}catch(j){return h(j instanceof Error?j:new Error(String(j)))}if(_.kind==="invalid")return h(_.error);if(_.kind==="input_required"){if(o?.allowInputRequired===!0)return p(nI(_));let j={codec:e,request:t,resultSchema:n,options:o,flowStartedAt:c,retry:(U,C)=>this._requestWithSchemaViaCodec(e,U===void 0?{method:t.method}:{method:t.method,params:U},n,C)};return p(this._resolveNonCompleteResult(_,j))}let R=_.result;Jr(n,R).then(j=>{j.success?p(j.data):h(new ve(ze.InvalidResult,`Invalid result for ${t.method}: ${j.error}`))},h)}),u=()=>g(o?.signal?.reason),o?.signal?.addEventListener("abort",u,{once:!0});let b=o?.timeout??xS,k=()=>g(new ve(ze.RequestTimeout,"Request timed out",{timeout:b}));this._setupTimeout($,b,o?.maxTotalTimeout,k,o?.resetTimeoutOnProgress??!1),this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,headers:s,requestSignal:v?.signal}).catch(z=>{this._progressHandlers.delete($),h(z)})}).finally(()=>{u&&o?.signal?.removeEventListener("abort",u),d!==void 0&&(this._responseHandlers.delete(d),this._cleanupTimeout(d))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new ve(ze.NotConnected,"Not connected");if(ng(t.method)&&!e.hasNotificationMethod(t.method))throw new ve(ze.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let o=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(o,n).catch(r=>this._onerror(r))});return}await this._transport.send(o,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let o;if(typeof t=="function"){if(!rg(e))throw new TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);o=(r,i)=>{let a=this._negotiatedWireCodec(),s=a.validateRequest(e,r);if(!s.ok&&s.reason==="not-in-era"&&(s=a.validateInputRequest(e,r)),!s.ok)throw s.reason==="not-in-era"?new le(X.InternalError,`No wire schema for ${e} in the resolved era`):new Error(s.message);return Promise.resolve(t(s.value,i))}}else if(n)o=async(r,i)=>{let a=await Jr(t.params,{...r.params});if(!a.success)throw new le(X.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw new TypeError("setRequestHandler: handler is required");this._requestHandlers.set(e,this._wrapHandler(e,o))}_wrapHandler(e,t){return t}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t=="function"){if(!ng(e))throw new TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(o,r)=>{let i=r.validateNotification(e,o);if(!i.ok)throw i.reason==="not-in-era"?new le(X.InternalError,`No wire schema for ${e} in the resolved era`):new Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw new TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async o=>{let r=await Jr(t.params,{...o.params});if(!r.success)throw new le(X.InvalidParams,`Invalid params for notification ${e}: ${r.error}`);await n(r.data,o)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Fi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function OS(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Fi(a)&&Fi(i)?{...a,...i}:i}return n}function tS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function rI(e){let t={},n=[];if(!tS(e))return{accepted:t,droppedKeys:n};for(let[o,r]of Object.entries(e)){if(!tS(r)||"method"in r||"result"in r){n.push(o);continue}t[o]=r}return{accepted:t,droppedKeys:n}}function nI(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}var oI=K((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=r;function r(s){if(!s)throw new TypeError("argument string is required");var c=typeof s=="object"?i(s):s;if(typeof c!="string")throw new TypeError("argument string is required to be a string");var u=c.indexOf(";"),d=u!==-1?c.slice(0,u).trim():c.trim();if(!o.test(d))throw new TypeError("invalid media type");var p=new a(d.toLowerCase());if(u!==-1){var h,S,v;for(t.lastIndex=u;S=t.exec(c);){if(S.index!==u)throw new TypeError("invalid parameter format");u+=S[0].length,h=S[1].toLowerCase(),v=S[2],v.charCodeAt(0)===34&&(v=v.slice(1,-1),v.indexOf("\\")!==-1&&(v=v.replace(n,"$1"))),p.parameters[h]=v}if(u!==c.length)throw new TypeError("invalid parameter format")}return p}function i(s){var c;if(typeof s.getHeader=="function"?c=s.getHeader("content-type"):typeof s.headers=="object"&&(c=s.headers&&s.headers["content-type"]),typeof c!="string")throw new TypeError("content-type header is missing from object");return c}function a(s){this.parameters=Object.create(null),this.type=s}})),hj=ba(oI(),1);var AS=10*1024*1024,Ig=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??AS}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let e=this._buffer.indexOf(`
67
- `);if(e===-1)return null;let t=this._buffer.toString("utf8",0,e).replace(/\r$/,"");this._buffer=this._buffer.subarray(e+1);try{return CS(t)}catch(n){if(n instanceof SyntaxError)continue;throw n}}return null}clear(){this._buffer=void 0}};function CS(e){return bi.parse(JSON.parse(e))}function kg(e){return JSON.stringify(e)+`
68
- `}var iI=/^[A-Za-z0-9._-]{1,128}$/;function aI(e){let 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"),!iI.test(e)){let n=[...e].filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,r,i)=>i.indexOf(o)===r);return t.push(`Tool name contains invalid characters: ${n.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function sI(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);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 Tg(e){let t=aI(e);return sI(e,t.warnings),t.isValid}function cI(e){return typeof e=="object"&&e!==null&&"_zod"in e}function lI(e){return typeof e=="object"&&e!==null&&!("_zod"in e)&&"_def"in e&&typeof e._def?.typeName=="string"}function uI(e){if(typeof e!="object"||e===null||Qn(e))return!1;let t=Object.getPrototypeOf(e);return t!==Object.prototype&&t!==null?!1:Object.values(e).every(n=>cI(n))}function cu(e){if(e!==void 0){if(uI(e))return T(e);if(typeof e=="object"&&e!==null&&!Qn(e)&&Object.values(e).some(t=>lI(t)))throw new TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!Qn(e))throw new TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}}var uu=K((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;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var o=class extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((w,g)=>`${w}${g}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((w,g)=>(g instanceof n&&(w[g.str]=(w[g.str]||0)+1),w),{})}};e._Code=o,e.nil=new o("");function r(f,...w){let g=[f[0]],b=0;for(;b<w.length;)s(g,w[b]),g.push(f[++b]);return new o(g)}e._=r;let i=new o("+");function a(f,...w){let g=[S(f[0])],b=0;for(;b<w.length;)g.push(i),s(g,w[b]),g.push(i,S(f[++b]));return c(g),new o(g)}e.str=a;function s(f,w){w instanceof o?f.push(...w._items):w instanceof n?f.push(w):f.push(p(w))}e.addCodeArg=s;function c(f){let w=1;for(;w<f.length-1;){if(f[w]===i){let g=u(f[w-1],f[w+1]);if(g!==void 0){f.splice(w-1,3,g);continue}f[w++]="+"}w++}}function u(f,w){if(w==='""')return f;if(f==='""')return w;if(typeof f=="string")return w instanceof n||f[f.length-1]!=='"'?void 0:typeof w!="string"?`${f.slice(0,-1)}${w}"`:w[0]==='"'?f.slice(0,-1)+w.slice(1):void 0;if(typeof w=="string"&&w[0]==='"'&&!(f instanceof n))return`"${f}${w.slice(1)}`}function d(f,w){return w.emptyStr()?f:f.emptyStr()?w:a`${f}${w}`}e.strConcat=d;function p(f){return typeof f=="number"||typeof f=="boolean"||f===null?f:S(Array.isArray(f)?f.join(","):f)}function h(f){return new o(S(f))}e.stringify=h;function S(f){return JSON.stringify(f).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=S;function v(f){return typeof f=="string"&&e.IDENTIFIER.test(f)?new o(`.${f}`):r`[${f}]`}e.getProperty=v;function $(f){if(typeof f=="string"&&e.IDENTIFIER.test(f))return new o(`${f}`);throw new Error(`CodeGen: invalid export name: ${f}, use explicit $id name mapping`)}e.getEsmExportName=$;function y(f){return new o(f.toString())}e.regexpCode=y})),qS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=uu();var n=class extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}},o;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var r=class{constructor({prefixes:c,parent:u}={}){this._names={},this._prefixes=c,this._parent=u}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){let u=this._names[c]||this._nameGroup(c);return`${c}${u.index++}`}_nameGroup(c){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}};e.Scope=r;var i=class extends t.Name{constructor(c,u){super(u),this.prefix=c}setValue(c,{property:u,itemIndex:d}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(u)}[${d}]`}};e.ValueScopeName=i;let a=(0,t._)`\n`;var s=class extends r{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?a:t.nil}}get(){return this._scope}name(c){return new i(c,this._newName(c))}value(c,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let p=this.toName(c),{prefix:h}=p,S=(d=u.key)!==null&&d!==void 0?d:u.ref,v=this._values[h];if(v){let f=v.get(S);if(f)return f}else v=this._values[h]=new Map;v.set(S,p);let $=this._scope[h]||(this._scope[h]=[]),y=$.length;return $[y]=u.ref,p.setValue(u,{property:h,itemIndex:y}),p}getValue(c,u){let d=this._values[c];if(d)return d.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${c}${d.scopePath}`})}scopeCode(c=this._values,u,d){return this._reduceValues(c,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},u,d)}_reduceValues(c,u,d={},p){let h=t.nil;for(let S in c){let v=c[S];if(!v)continue;let $=d[S]=d[S]||new Map;v.forEach(y=>{if($.has(y))return;$.set(y,o.Started);let f=u(y);if(f){let w=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0,t._)`${h}${w} ${y} = ${f};${this.opts._n}`}else if(f=p?.(y))h=(0,t._)`${h}${f}${this.opts._n}`;else throw new n(y);$.set(y,o.Completed)})}return h}};e.ValueScope=s})),_e=K((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;let t=uu(),n=qS();var o=uu();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var r=qS();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return r.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("+")};var i=class{optimizeNodes(){return this}optimizeNames(I,E){return this}},a=class extends i{constructor(I,E,q){super(),this.varKind=I,this.name=E,this.rhs=q}render({es5:I,_n:E}){let q=I?n.varKinds.var:this.varKind,Y=this.rhs===void 0?"":` = ${this.rhs}`;return`${q} ${this.name}${Y};`+E}optimizeNames(I,E){if(I[this.name.str])return this.rhs&&(this.rhs=ne(this.rhs,I,E)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends i{constructor(I,E,q){super(),this.lhs=I,this.rhs=E,this.sideEffects=q}render({_n:I}){return`${this.lhs} = ${this.rhs};`+I}optimizeNames(I,E){if(!(this.lhs instanceof t.Name&&!I[this.lhs.str]&&!this.sideEffects))return this.rhs=ne(this.rhs,I,E),this}get names(){return ee(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(I,E,q,Y){super(I,q,Y),this.op=E}render({_n:I}){return`${this.lhs} ${this.op}= ${this.rhs};`+I}},u=class extends i{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`${this.label}:`+I}},d=class extends i{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`break${this.label?` ${this.label}`:""};`+I}},p=class extends i{constructor(I){super(),this.error=I}render({_n:I}){return`throw ${this.error};`+I}get names(){return this.error.names}},h=class extends i{constructor(I){super(),this.code=I}render({_n:I}){return`${this.code};`+I}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(I,E){return this.code=ne(this.code,I,E),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},S=class extends i{constructor(I=[]){super(),this.nodes=I}render(I){return this.nodes.reduce((E,q)=>E+q.render(I),"")}optimizeNodes(){let{nodes:I}=this,E=I.length;for(;E--;){let q=I[E].optimizeNodes();Array.isArray(q)?I.splice(E,1,...q):q?I[E]=q:I.splice(E,1)}return I.length>0?this:void 0}optimizeNames(I,E){let{nodes:q}=this,Y=q.length;for(;Y--;){let se=q[Y];se.optimizeNames(I,E)||($e(I,se.names),q.splice(Y,1))}return q.length>0?this:void 0}get names(){return this.nodes.reduce((I,E)=>V(I,E.names),{})}},v=class extends S{render(I){return"{"+I._n+super.render(I)+"}"+I._n}},$=class extends S{},y=class extends v{};y.kind="else";var f=class lu extends v{constructor(E,q){super(q),this.condition=E}render(E){let q=`if(${this.condition})`+super.render(E);return this.else&&(q+="else "+this.else.render(E)),q}optimizeNodes(){super.optimizeNodes();let E=this.condition;if(E===!0)return this.nodes;let q=this.else;if(q){let Y=q.optimizeNodes();q=this.else=Array.isArray(Y)?new y(Y):Y}if(q)return E===!1?q instanceof lu?q:q.nodes:this.nodes.length?this:new lu(Oe(E),q instanceof lu?[q]:q.nodes);if(!(E===!1||!this.nodes.length))return this}optimizeNames(E,q){var Y;if(this.else=(Y=this.else)===null||Y===void 0?void 0:Y.optimizeNames(E,q),!!(super.optimizeNames(E,q)||this.else))return this.condition=ne(this.condition,E,q),this}get names(){let E=super.names;return ee(E,this.condition),this.else&&V(E,this.else.names),E}};f.kind="if";var w=class extends v{};w.kind="for";var g=class extends w{constructor(I){super(),this.iteration=I}render(I){return`for(${this.iteration})`+super.render(I)}optimizeNames(I,E){if(super.optimizeNames(I,E))return this.iteration=ne(this.iteration,I,E),this}get names(){return V(super.names,this.iteration.names)}},b=class extends w{constructor(I,E,q,Y){super(),this.varKind=I,this.name=E,this.from=q,this.to=Y}render(I){let E=I.es5?n.varKinds.var:this.varKind,{name:q,from:Y,to:se}=this;return`for(${E} ${q}=${Y}; ${q}<${se}; ${q}++)`+super.render(I)}get names(){return ee(ee(super.names,this.from),this.to)}},k=class extends w{constructor(I,E,q,Y){super(),this.loop=I,this.varKind=E,this.name=q,this.iterable=Y}render(I){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(I)}optimizeNames(I,E){if(super.optimizeNames(I,E))return this.iterable=ne(this.iterable,I,E),this}get names(){return V(super.names,this.iterable.names)}},z=class extends v{constructor(I,E,q){super(),this.name=I,this.args=E,this.async=q}render(I){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(I)}};z.kind="func";var _=class extends S{render(I){return"return "+super.render(I)}};_.kind="return";var R=class extends v{render(I){let E="try"+super.render(I);return this.catch&&(E+=this.catch.render(I)),this.finally&&(E+=this.finally.render(I)),E}optimizeNodes(){var I,E;return super.optimizeNodes(),(I=this.catch)===null||I===void 0||I.optimizeNodes(),(E=this.finally)===null||E===void 0||E.optimizeNodes(),this}optimizeNames(I,E){var q,Y;return super.optimizeNames(I,E),(q=this.catch)===null||q===void 0||q.optimizeNames(I,E),(Y=this.finally)===null||Y===void 0||Y.optimizeNames(I,E),this}get names(){let I=super.names;return this.catch&&V(I,this.catch.names),this.finally&&V(I,this.finally.names),I}},j=class extends v{constructor(I){super(),this.error=I}render(I){return`catch(${this.error})`+super.render(I)}};j.kind="catch";var U=class extends v{render(I){return"finally"+super.render(I)}};U.kind="finally";var C=class{constructor(I,E={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...E,_n:E.lines?`
69
- `:""},this._extScope=I,this._scope=new n.Scope({parent:I}),this._nodes=[new $]}toString(){return this._root.render(this.opts)}name(I){return this._scope.name(I)}scopeName(I){return this._extScope.name(I)}scopeValue(I,E){let q=this._extScope.value(I,E);return(this._values[q.prefix]||(this._values[q.prefix]=new Set)).add(q),q}getScopeValue(I,E){return this._extScope.getValue(I,E)}scopeRefs(I){return this._extScope.scopeRefs(I,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(I,E,q,Y){let se=this._scope.toName(E);return q!==void 0&&Y&&(this._constants[se.str]=q),this._leafNode(new a(I,se,q)),se}const(I,E,q){return this._def(n.varKinds.const,I,E,q)}let(I,E,q){return this._def(n.varKinds.let,I,E,q)}var(I,E,q){return this._def(n.varKinds.var,I,E,q)}assign(I,E,q){return this._leafNode(new s(I,E,q))}add(I,E){return this._leafNode(new c(I,e.operators.ADD,E))}code(I){return typeof I=="function"?I():I!==t.nil&&this._leafNode(new h(I)),this}object(...I){let E=["{"];for(let[q,Y]of I)E.length>1&&E.push(","),E.push(q),(q!==Y||this.opts.es5)&&(E.push(":"),(0,t.addCodeArg)(E,Y));return E.push("}"),new t._Code(E)}if(I,E,q){if(this._blockNode(new f(I)),E&&q)this.code(E).else().code(q).endIf();else if(E)this.code(E).endIf();else if(q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(I){return this._elseNode(new f(I))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(f,y)}_for(I,E){return this._blockNode(I),E&&this.code(E).endFor(),this}for(I,E){return this._for(new g(I),E)}forRange(I,E,q,Y,se=this.opts.es5?n.varKinds.var:n.varKinds.let){let Se=this._scope.toName(I);return this._for(new b(se,Se,E,q),()=>Y(Se))}forOf(I,E,q,Y=n.varKinds.const){let se=this._scope.toName(I);if(this.opts.es5){let Se=E instanceof t.Name?E:this.var("_arr",E);return this.forRange("_i",0,(0,t._)`${Se}.length`,fe=>{this.var(se,(0,t._)`${Se}[${fe}]`),q(se)})}return this._for(new k("of",Y,se,E),()=>q(se))}forIn(I,E,q,Y=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(I,(0,t._)`Object.keys(${E})`,q);let se=this._scope.toName(I);return this._for(new k("in",Y,se,E),()=>q(se))}endFor(){return this._endBlockNode(w)}label(I){return this._leafNode(new u(I))}break(I){return this._leafNode(new d(I))}return(I){let E=new _;if(this._blockNode(E),this.code(I),E.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(I,E,q){if(!E&&!q)throw new Error('CodeGen: "try" without "catch" and "finally"');let Y=new R;if(this._blockNode(Y),this.code(I),E){let se=this.name("e");this._currNode=Y.catch=new j(se),E(se)}return q&&(this._currNode=Y.finally=new U,this.code(q)),this._endBlockNode(j,U)}throw(I){return this._leafNode(new p(I))}block(I,E){return this._blockStarts.push(this._nodes.length),I&&this.code(I).endBlock(E),this}endBlock(I){let E=this._blockStarts.pop();if(E===void 0)throw new Error("CodeGen: not in self-balancing block");let q=this._nodes.length-E;if(q<0||I!==void 0&&q!==I)throw new Error(`CodeGen: wrong number of nodes: ${q} vs ${I} expected`);return this._nodes.length=E,this}func(I,E=t.nil,q,Y){return this._blockNode(new z(I,E,q)),Y&&this.code(Y).endFunc(),this}endFunc(){return this._endBlockNode(z)}optimize(I=1){for(;I-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(I){return this._currNode.nodes.push(I),this}_blockNode(I){this._currNode.nodes.push(I),this._nodes.push(I)}_endBlockNode(I,E){let q=this._currNode;if(q instanceof I||E&&q instanceof E)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${E?`${I.kind}/${E.kind}`:I.kind}"`)}_elseNode(I){let E=this._currNode;if(!(E instanceof f))throw new Error('CodeGen: "else" without "if"');return this._currNode=E.else=I,this}get _root(){return this._nodes[0]}get _currNode(){let I=this._nodes;return I[I.length-1]}set _currNode(I){let E=this._nodes;E[E.length-1]=I}};e.CodeGen=C;function V(I,E){for(let q in E)I[q]=(I[q]||0)+(E[q]||0);return I}function ee(I,E){return E instanceof t._CodeOrName?V(I,E.names):I}function ne(I,E,q){if(I instanceof t.Name)return Y(I);if(!se(I))return I;return new t._Code(I._items.reduce((Se,fe)=>(fe instanceof t.Name&&(fe=Y(fe)),fe instanceof t._Code?Se.push(...fe._items):Se.push(fe),Se),[]));function Y(Se){let fe=q[Se.str];return fe===void 0||E[Se.str]!==1?Se:(delete E[Se.str],fe)}function se(Se){return Se instanceof t._Code&&Se._items.some(fe=>fe instanceof t.Name&&E[fe.str]===1&&q[fe.str]!==void 0)}}function $e(I,E){for(let q in E)I[q]=(I[q]||0)-(E[q]||0)}function Oe(I){return typeof I=="boolean"||typeof I=="number"||I===null?!I:(0,t._)`!${H(I)}`}e.not=Oe;let je=M(e.operators.AND);function Ve(...I){return I.reduce(je)}e.and=Ve;let Re=M(e.operators.OR);function x(...I){return I.reduce(Re)}e.or=x;function M(I){return(E,q)=>E===t.nil?q:q===t.nil?E:(0,t._)`${H(E)} ${I} ${H(q)}`}function H(I){return I instanceof t.Name?I:(0,t._)`(${I})`}})),Ie=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let t=_e(),n=uu();function o(z){let _={};for(let R of z)_[R]=!0;return _}e.toHash=o;function r(z,_){return typeof _=="boolean"?_:Object.keys(_).length===0?!0:(i(z,_),!a(_,z.self.RULES.all))}e.alwaysValidSchema=r;function i(z,_=z.schema){let{opts:R,self:j}=z;if(!R.strictSchema||typeof _=="boolean")return;let U=j.RULES.keywords;for(let C in _)U[C]||k(z,`unknown keyword: "${C}"`)}e.checkUnknownRules=i;function a(z,_){if(typeof z=="boolean")return!z;for(let R in z)if(_[R])return!0;return!1}e.schemaHasRules=a;function s(z,_){if(typeof z=="boolean")return!z;for(let R in z)if(R!=="$ref"&&_.all[R])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:z,schemaPath:_},R,j,U){if(!U){if(typeof R=="number"||typeof R=="boolean")return R;if(typeof R=="string")return(0,t._)`${R}`}return(0,t._)`${z}${_}${(0,t.getProperty)(j)}`}e.schemaRefOrVal=c;function u(z){return h(decodeURIComponent(z))}e.unescapeFragment=u;function d(z){return encodeURIComponent(p(z))}e.escapeFragment=d;function p(z){return typeof z=="number"?`${z}`:z.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=p;function h(z){return z.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=h;function S(z,_){if(Array.isArray(z))for(let R of z)_(R);else _(z)}e.eachItem=S;function v({mergeNames:z,mergeToName:_,mergeValues:R,resultToName:j}){return(U,C,V,ee)=>{let ne=V===void 0?C:V instanceof t.Name?(C instanceof t.Name?z(U,C,V):_(U,C,V),V):C instanceof t.Name?(_(U,V,C),C):R(C,V);return ee===t.Name&&!(ne instanceof t.Name)?j(U,ne):ne}}e.mergeEvaluated={props:v({mergeNames:(z,_,R)=>z.if((0,t._)`${R} !== true && ${_} !== undefined`,()=>{z.if((0,t._)`${_} === true`,()=>z.assign(R,!0),()=>z.assign(R,(0,t._)`${R} || {}`).code((0,t._)`Object.assign(${R}, ${_})`))}),mergeToName:(z,_,R)=>z.if((0,t._)`${R} !== true`,()=>{_===!0?z.assign(R,!0):(z.assign(R,(0,t._)`${R} || {}`),y(z,R,_))}),mergeValues:(z,_)=>z===!0?!0:{...z,..._},resultToName:$}),items:v({mergeNames:(z,_,R)=>z.if((0,t._)`${R} !== true && ${_} !== undefined`,()=>z.assign(R,(0,t._)`${_} === true ? true : ${R} > ${_} ? ${R} : ${_}`)),mergeToName:(z,_,R)=>z.if((0,t._)`${R} !== true`,()=>z.assign(R,_===!0?!0:(0,t._)`${R} > ${_} ? ${R} : ${_}`)),mergeValues:(z,_)=>z===!0?!0:Math.max(z,_),resultToName:(z,_)=>z.var("items",_)})};function $(z,_){if(_===!0)return z.var("props",!0);let R=z.var("props",(0,t._)`{}`);return _!==void 0&&y(z,R,_),R}e.evaluatedPropsToName=$;function y(z,_,R){Object.keys(R).forEach(j=>z.assign((0,t._)`${_}${(0,t.getProperty)(j)}`,!0))}e.setEvaluated=y;let f={};function w(z,_){return z.scopeValue("func",{ref:_,code:f[_.code]||(f[_.code]=new n._Code(_.code))})}e.useFunc=w;var g;(function(z){z[z.Num=0]="Num",z[z.Str=1]="Str"})(g||(e.Type=g={}));function b(z,_,R){if(z instanceof t.Name){let j=_===g.Num;return R?j?(0,t._)`"[" + ${z} + "]"`:(0,t._)`"['" + ${z} + "']"`:j?(0,t._)`"/" + ${z}`:(0,t._)`"/" + ${z}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return R?(0,t.getProperty)(z).toString():"/"+p(z)}e.getErrorPath=b;function k(z,_,R=z.opts.strictSchema){if(R){if(_=`strict mode: ${_}`,R===!0)throw new Error(_);z.self.logger.warn(_)}}e.checkStrictMode=k})),It=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};e.default=n})),mu=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=_e(),n=Ie(),o=It();e.keywordError={message:({keyword:y})=>(0,t.str)`must pass "${y}" keyword validation`},e.keyword$DataError={message:({keyword:y,schemaType:f})=>f?(0,t.str)`"${y}" keyword must be ${f} ($data)`:(0,t.str)`"${y}" keyword is invalid ($data)`};function r(y,f=e.keywordError,w,g){let{it:b}=y,{gen:k,compositeRule:z,allErrors:_}=b,R=p(y,f,w);g??(z||_)?c(k,R):u(b,(0,t._)`[${R}]`)}e.reportError=r;function i(y,f=e.keywordError,w){let{it:g}=y,{gen:b,compositeRule:k,allErrors:z}=g;c(b,p(y,f,w)),k||z||u(g,o.default.vErrors)}e.reportExtraError=i;function a(y,f){y.assign(o.default.errors,f),y.if((0,t._)`${o.default.vErrors} !== null`,()=>y.if(f,()=>y.assign((0,t._)`${o.default.vErrors}.length`,f),()=>y.assign(o.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:y,keyword:f,schemaValue:w,data:g,errsCount:b,it:k}){if(b===void 0)throw new Error("ajv implementation error");let z=y.name("err");y.forRange("i",b,o.default.errors,_=>{y.const(z,(0,t._)`${o.default.vErrors}[${_}]`),y.if((0,t._)`${z}.instancePath === undefined`,()=>y.assign((0,t._)`${z}.instancePath`,(0,t.strConcat)(o.default.instancePath,k.errorPath))),y.assign((0,t._)`${z}.schemaPath`,(0,t.str)`${k.errSchemaPath}/${f}`),k.opts.verbose&&(y.assign((0,t._)`${z}.schema`,w),y.assign((0,t._)`${z}.data`,g))})}e.extendErrors=s;function c(y,f){let w=y.const("err",f);y.if((0,t._)`${o.default.vErrors} === null`,()=>y.assign(o.default.vErrors,(0,t._)`[${w}]`),(0,t._)`${o.default.vErrors}.push(${w})`),y.code((0,t._)`${o.default.errors}++`)}function u(y,f){let{gen:w,validateName:g,schemaEnv:b}=y;b.$async?w.throw((0,t._)`new ${y.ValidationError}(${f})`):(w.assign((0,t._)`${g}.errors`,f),w.return(!1))}let d={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 p(y,f,w){let{createErrors:g}=y.it;return g===!1?(0,t._)`{}`:h(y,f,w)}function h(y,f,w={}){let{gen:g,it:b}=y,k=[S(b,w),v(y,w)];return $(y,f,k),g.object(...k)}function S({errorPath:y},{instancePath:f}){let w=f?(0,t.str)`${y}${(0,n.getErrorPath)(f,n.Type.Str)}`:y;return[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,w)]}function v({keyword:y,it:{errSchemaPath:f}},{schemaPath:w,parentSchema:g}){let b=g?f:(0,t.str)`${f}/${y}`;return w&&(b=(0,t.str)`${b}${(0,n.getErrorPath)(w,n.Type.Str)}`),[d.schemaPath,b]}function $(y,{params:f,message:w},g){let{keyword:b,data:k,schemaValue:z,it:_}=y,{opts:R,propertyName:j,topSchemaRef:U,schemaPath:C}=_;g.push([d.keyword,b],[d.params,typeof f=="function"?f(y):f||(0,t._)`{}`]),R.messages&&g.push([d.message,typeof w=="function"?w(y):w]),R.verbose&&g.push([d.schema,z],[d.parentSchema,(0,t._)`${U}${C}`],[o.default.data,k]),j&&g.push([d.propertyName,j])}})),dI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=mu(),n=_e(),o=It(),r={message:"boolean schema is false"};function i(c){let{gen:u,schema:d,validateName:p}=c;d===!1?s(c,!1):typeof d=="object"&&d.$async===!0?u.return(o.default.data):(u.assign((0,n._)`${p}.errors`,null),u.return(!0))}e.topBoolOrEmptySchema=i;function a(c,u){let{gen:d,schema:p}=c;p===!1?(d.var(u,!1),s(c)):d.var(u,!0)}e.boolOrEmptySchema=a;function s(c,u){let{gen:d,data:p}=c,h={gen:d,keyword:"false schema",data:p,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,t.reportError)(h,r,void 0,u)}})),LS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);function n(r){return typeof r=="string"&&t.has(r)}e.isJSONType=n;function o(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=o})),MS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:r,self:i},a){let s=i.RULES.types[a];return s&&s!==!0&&n(r,s)}e.schemaHasRulesForType=t;function n(r,i){return i.rules.some(a=>o(r,a))}e.shouldUseGroup=n;function o(r,i){var a;return r[i.keyword]!==void 0||((a=i.definition.implements)===null||a===void 0?void 0:a.some(s=>r[s]!==void 0))}e.shouldUseRule=o})),du=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let t=LS(),n=MS(),o=mu(),r=_e(),i=Ie();var a;(function(g){g[g.Correct=0]="Correct",g[g.Wrong=1]="Wrong"})(a||(e.DataType=a={}));function s(g){let b=c(g.type);if(b.includes("null")){if(g.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&g.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');g.nullable===!0&&b.push("null")}return b}e.getSchemaTypes=s;function c(g){let b=Array.isArray(g)?g:g?[g]:[];if(b.every(t.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}e.getJSONTypes=c;function u(g,b){let{gen:k,data:z,opts:_}=g,R=p(b,_.coerceTypes),j=b.length>0&&!(R.length===0&&b.length===1&&(0,n.schemaHasRulesForType)(g,b[0]));if(j){let U=$(b,z,_.strictNumbers,a.Wrong);k.if(U,()=>{R.length?h(g,b,R):f(g)})}return j}e.coerceAndCheckDataType=u;let d=new Set(["string","number","integer","boolean","null"]);function p(g,b){return b?g.filter(k=>d.has(k)||b==="array"&&k==="array"):[]}function h(g,b,k){let{gen:z,data:_,opts:R}=g,j=z.let("dataType",(0,r._)`typeof ${_}`),U=z.let("coerced",(0,r._)`undefined`);R.coerceTypes==="array"&&z.if((0,r._)`${j} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>z.assign(_,(0,r._)`${_}[0]`).assign(j,(0,r._)`typeof ${_}`).if($(b,_,R.strictNumbers),()=>z.assign(U,_))),z.if((0,r._)`${U} !== undefined`);for(let V of k)(d.has(V)||V==="array"&&R.coerceTypes==="array")&&C(V);z.else(),f(g),z.endIf(),z.if((0,r._)`${U} !== undefined`,()=>{z.assign(_,U),S(g,U)});function C(V){switch(V){case"string":z.elseIf((0,r._)`${j} == "number" || ${j} == "boolean"`).assign(U,(0,r._)`"" + ${_}`).elseIf((0,r._)`${_} === null`).assign(U,(0,r._)`""`);return;case"number":z.elseIf((0,r._)`${j} == "boolean" || ${_} === null
66
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function sr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,d={...l},p=c.ref;if(c.ref=null,p){o(p);let S=e.seen.get(p),v=S.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(v)):Object.assign(l,v),Object.assign(l,d),s._zod.parent===p)for(let y in l)y==="$ref"||y==="allOf"||y in d||delete l[y];if(v.$ref&&S.def)for(let y in l)y==="$ref"||y==="allOf"||y in S.def&&JSON.stringify(l[y])===JSON.stringify(S.def[y])&&delete l[y]}let h=s._zod.parent;if(h&&h!==p){o(h);let S=e.seen.get(h);if(S?.schema.$ref&&(l.$ref=S.schema.$ref,S.def))for(let v in l)v==="$ref"||v==="allOf"||v in S.def&&JSON.stringify(l[v])===JSON.stringify(S.def[v])&&delete l[v]}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&r.id===i&&delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:xn(t,"input",e.processors),output:xn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function ct(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return ct(o.element,n);if(o.type==="set")return ct(o.valueType,n);if(o.type==="lazy")return ct(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return ct(o.innerType,n);if(o.type==="intersection")return ct(o.left,n)||ct(o.right,n);if(o.type==="record"||o.type==="map")return ct(o.keyType,n)||ct(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ct(o.in,n)||ct(o.out,n);if(o.type==="object"){for(let r in o.shape)if(ct(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(ct(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(ct(r,n))return!0;return!!(o.rest&&ct(o.rest,n))}return!1}var qp=(e,t={})=>n=>{let o=ir({...n,processors:t});return Pe(e,o),ar(o,e),sr(o,e)},xn=(e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},a=ir({...r??{},target:i,io:t,processors:n});return Pe(e,a),ar(a,e),sr(a,e)};var TR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Lp=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof a=="number"&&(r.maxLength=a),s&&(r.format=TR[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),l&&(r.contentEncoding=l),c&&c.size>0){let d=[...c];d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Mp=(e,t,n,o)=>{let r=n,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let p=typeof d=="number"&&d>=(i??Number.NEGATIVE_INFINITY),h=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),S=t.target==="draft-04"||t.target==="openapi-3.0";p?S?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:typeof i=="number"&&(r.minimum=i),h?S?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l:typeof a=="number"&&(r.maximum=a),typeof c=="number"&&(r.multipleOf=c)},Dp=(e,t,n,o)=>{n.type="boolean"},Up=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Vp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Zp=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Fp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Hp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Jp=(e,t,n,o)=>{n.not={}},Gp=(e,t,n,o)=>{},Bp=(e,t,n,o)=>{},Kp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Wp=(e,t,n,o)=>{let r=e._zod.def,i=Uo(r.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Yp=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},Xp=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Qp=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},ef=(e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(r,i)},tf=(e,t,n,o)=>{n.type="boolean"},rf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},nf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},of=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},af=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},sf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},cf=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=Pe(i.element,t,{...o,path:[...o.path,"items"]})},lf=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let l in a)r.properties[l]=Pe(a[l],t,{...o,path:[...o.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(r.required=Array.from(c)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=Pe(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Rs=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,a=r.options.map((s,c)=>Pe(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=a:n.anyOf=a},uf=(e,t,n,o)=>{let r=e._zod.def,i=Pe(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=Pe(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=c},df=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((h,S)=>Pe(h,t,{...o,path:[...o.path,a,S]})),l=i.rest?Pe(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=c,l&&(r.items=l)):t.target==="openapi-3.0"?(r.items={anyOf:c},l&&r.items.anyOf.push(l),r.minItems=c.length,l||(r.maxItems=c.length)):(r.items=c,l&&(r.additionalItems=l));let{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(r.minItems=d),typeof p=="number"&&(r.maxItems=p)},mf=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=Pe(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let p of c)r.patternProperties[p.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Pe(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=Pe(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=a._zod.values;if(l){let d=[...l].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(r.required=d)}},pf=(e,t,n,o)=>{let r=e._zod.def,i=Pe(r.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},ff=(e,t,n,o)=>{let r=e._zod.def;Pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},hf=(e,t,n,o)=>{let r=e._zod.def;Pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},gf=(e,t,n,o)=>{let r=e._zod.def;Pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},vf=(e,t,n,o)=>{let r=e._zod.def;Pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},yf=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?r.out:r.in:r.out;Pe(a,t,o);let s=t.seen.get(e);s.ref=a},_f=(e,t,n,o)=>{let r=e._zod.def;Pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},Sf=(e,t,n,o)=>{let r=e._zod.def;Pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Is=(e,t,n,o)=>{let r=e._zod.def;Pe(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},bf=(e,t,n,o)=>{let r=e._zod.innerType;Pe(r,t,o);let i=t.seen.get(e);i.ref=r},ws={string:Lp,number:Mp,boolean:Dp,bigint:Up,symbol:Vp,null:Zp,undefined:Fp,void:Hp,never:Jp,any:Gp,unknown:Bp,date:Kp,enum:Wp,literal:Yp,nan:Xp,template_literal:Qp,file:ef,success:tf,custom:rf,function:nf,transform:of,map:af,set:sf,array:cf,object:lf,union:Rs,intersection:uf,tuple:df,record:mf,nullable:pf,nonoptional:ff,default:hf,prefault:gf,catch:vf,pipe:yf,readonly:_f,promise:Sf,optional:Is,lazy:bf};function Mr(e,t){if("_idmap"in e){let o=e,r=ir({...t,processors:ws}),i={};for(let c of o._idmap.entries()){let[l,d]=c;Pe(d,r)}let a={},s={registry:o,uri:t?.uri,defs:i};r.external=s;for(let c of o._idmap.entries()){let[l,d]=c;ar(r,d),a[l]=sr(r,d)}if(Object.keys(i).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let n=ir({...t,processors:ws});return Pe(e,n),ar(n,e),sr(n,e)}var ks=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=ir({processors:ws,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Pe(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),ar(this.ctx,t);let o=sr(this.ctx,t),{"~standard":r,...i}=o;return i}};var Ry={};var ii={};Lt(ii,{ZodAny:()=>Uf,ZodArray:()=>Hf,ZodBase64:()=>Ks,ZodBase64URL:()=>Ws,ZodBigInt:()=>Mn,ZodBigIntFormat:()=>Qs,ZodBoolean:()=>Ln,ZodCIDRv4:()=>Gs,ZodCIDRv6:()=>Bs,ZodCUID:()=>Ds,ZodCUID2:()=>Us,ZodCatch:()=>dh,ZodCodec:()=>hi,ZodCustom:()=>gi,ZodCustomStringFormat:()=>Cn,ZodDate:()=>di,ZodDefault:()=>ih,ZodDiscriminatedUnion:()=>Gf,ZodE164:()=>Ys,ZodEmail:()=>Cs,ZodEmoji:()=>Ls,ZodEnum:()=>Nn,ZodExactOptional:()=>rh,ZodFile:()=>eh,ZodFunction:()=>Sh,ZodGUID:()=>si,ZodIPv4:()=>Hs,ZodIPv6:()=>Js,ZodIntersection:()=>Bf,ZodJWT:()=>Xs,ZodKSUID:()=>Fs,ZodLazy:()=>yh,ZodLiteral:()=>Qf,ZodMAC:()=>qf,ZodMap:()=>Yf,ZodNaN:()=>ph,ZodNanoID:()=>Ms,ZodNever:()=>Zf,ZodNonOptional:()=>oc,ZodNull:()=>Df,ZodNullable:()=>oh,ZodNumber:()=>qn,ZodNumberFormat:()=>Dr,ZodObject:()=>mi,ZodOptional:()=>nc,ZodPipe:()=>fi,ZodPrefault:()=>sh,ZodPreprocess:()=>fh,ZodPromise:()=>_h,ZodReadonly:()=>hh,ZodRecord:()=>jn,ZodSet:()=>Xf,ZodString:()=>On,ZodStringFormat:()=>xe,ZodSuccess:()=>uh,ZodSymbol:()=>Lf,ZodTemplateLiteral:()=>vh,ZodTransform:()=>th,ZodTuple:()=>Kf,ZodType:()=>be,ZodULID:()=>Vs,ZodURL:()=>ui,ZodUUID:()=>Ot,ZodUndefined:()=>Mf,ZodUnion:()=>pi,ZodUnknown:()=>Vf,ZodVoid:()=>Ff,ZodXID:()=>Zs,ZodXor:()=>Jf,_ZodString:()=>As,_default:()=>ah,_function:()=>k_,any:()=>ec,array:()=>O,base64:()=>Jy,base64url:()=>Gy,bigint:()=>o_,boolean:()=>te,catch:()=>mh,check:()=>T_,cidrv4:()=>Fy,cidrv6:()=>Hy,codec:()=>z_,cuid:()=>Cy,cuid2:()=>qy,custom:()=>P_,date:()=>u_,describe:()=>E_,discriminatedUnion:()=>cr,e164:()=>By,email:()=>qs,emoji:()=>Oy,enum:()=>he,exactOptional:()=>nh,file:()=>__,float32:()=>e_,float64:()=>t_,function:()=>k_,guid:()=>Ty,hash:()=>Qy,hex:()=>Xy,hostname:()=>Yy,httpUrl:()=>Ny,instanceof:()=>j_,int:()=>Ns,int32:()=>r_,int64:()=>i_,intersection:()=>It,invertCodec:()=>w_,ipv4:()=>Uy,ipv6:()=>Zy,json:()=>O_,jwt:()=>Ky,keyof:()=>d_,ksuid:()=>Dy,lazy:()=>lr,literal:()=>A,looseObject:()=>ce,looseRecord:()=>h_,mac:()=>Vy,map:()=>g_,meta:()=>x_,nan:()=>$_,nanoid:()=>Ay,nativeEnum:()=>y_,never:()=>tc,nonoptional:()=>lh,null:()=>At,nullable:()=>ci,nullish:()=>S_,number:()=>F,object:()=>T,optional:()=>ae,partialRecord:()=>f_,pipe:()=>Os,prefault:()=>ch,preprocess:()=>Vt,promise:()=>I_,readonly:()=>gh,record:()=>Q,refine:()=>bh,set:()=>v_,strictObject:()=>m_,string:()=>m,stringFormat:()=>Wy,stringbool:()=>N_,success:()=>b_,superRefine:()=>$h,symbol:()=>s_,templateLiteral:()=>R_,transform:()=>rc,tuple:()=>Wf,uint32:()=>n_,uint64:()=>a_,ulid:()=>Ly,undefined:()=>c_,union:()=>oe,unknown:()=>ie,url:()=>An,uuid:()=>Py,uuidv4:()=>Ey,uuidv6:()=>xy,uuidv7:()=>jy,void:()=>l_,xid:()=>My,xor:()=>p_});var Ts={};Lt(Ts,{endsWith:()=>zn,gt:()=>jt,gte:()=>st,includes:()=>bn,length:()=>Lr,lowercase:()=>_n,lt:()=>xt,lte:()=>ht,maxLength:()=>qr,maxSize:()=>or,mime:()=>wn,minLength:()=>Dt,minSize:()=>Nt,multipleOf:()=>nr,negative:()=>Ss,nonnegative:()=>$s,nonpositive:()=>bs,normalize:()=>Rn,overwrite:()=>Rt,positive:()=>_s,property:()=>zs,regex:()=>yn,size:()=>Cr,slugify:()=>Pn,startsWith:()=>$n,toLowerCase:()=>kn,toUpperCase:()=>Tn,trim:()=>In,uppercase:()=>Sn});var gt={};Lt(gt,{ZodISODate:()=>Es,ZodISODateTime:()=>Ps,ZodISODuration:()=>js,ZodISOTime:()=>xs,date:()=>zf,datetime:()=>$f,duration:()=>Rf,time:()=>wf});var Ps=N("ZodISODateTime",(e,t)=>{Xd.init(e,t),xe.init(e,t)});function $f(e){return rp(Ps,e)}var Es=N("ZodISODate",(e,t)=>{Qd.init(e,t),xe.init(e,t)});function zf(e){return np(Es,e)}var xs=N("ZodISOTime",(e,t)=>{em.init(e,t),xe.init(e,t)});function wf(e){return op(xs,e)}var js=N("ZodISODuration",(e,t)=>{tm.init(e,t),xe.init(e,t)});function Rf(e){return ip(js,e)}var Iy=(e,t)=>{Jo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Bo(e,n)},flatten:{value:n=>Go(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ln,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ln,2)}},isEmpty:{get(){return e.issues.length===0}}})},ER=N("ZodError",Iy),dt=N("ZodError",Iy,{Parent:Error});var If=mn(dt),kf=pn(dt),ai=fn(dt),Tf=hn(dt),Pf=ka(dt),Ef=Ta(dt),xf=Pa(dt),jf=Ea(dt),Nf=xa(dt),Of=ja(dt),Af=Na(dt),Cf=Oa(dt);var ky=new WeakMap;function li(e,t,n){let o=Object.getPrototypeOf(e),r=ky.get(o);if(r||(r=new Set,ky.set(o,r)),!r.has(t)){r.add(t);for(let i in n){let a=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var be=N("ZodType",(e,t)=>(ge.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:xn(e,"input"),output:xn(e,"output")}}),e.toJSONSchema=qp(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>If(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>ai(e,n,o),e.parseAsync=async(n,o)=>kf(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Tf(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Pf(e,n,o),e.decode=(n,o)=>Ef(e,n,o),e.encodeAsync=async(n,o)=>xf(e,n,o),e.decodeAsync=async(n,o)=>jf(e,n,o),e.safeEncode=(n,o)=>Nf(e,n,o),e.safeDecode=(n,o)=>Of(e,n,o),e.safeEncodeAsync=async(n,o)=>Af(e,n,o),e.safeDecodeAsync=async(n,o)=>Cf(e,n,o),li(e,"ZodType",{check(...n){let o=this.def;return this.clone(B.mergeDefs(o,{checks:[...o.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return it(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(bh(n,o))},superRefine(n,o){return this.check($h(n,o))},overwrite(n){return this.check(Rt(n))},optional(){return ae(this)},exactOptional(){return nh(this)},nullable(){return ci(this)},nullish(){return ae(ci(this))},nonoptional(n){return lh(this,n)},array(){return O(this)},or(n){return oe([this,n])},and(n){return It(this,n)},transform(n){return Os(this,rc(n))},default(n){return ah(this,n)},prefault(n){return ch(this,n)},catch(n){return mh(this,n)},pipe(n){return Os(this,n)},readonly(){return gh(this)},describe(n){let o=this.clone();return Xe.add(o,{description:n}),o},meta(...n){if(n.length===0)return Xe.get(this);let o=this.clone();return Xe.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Xe.get(e)?.description},configurable:!0}),e)),As=N("_ZodString",(e,t)=>{Ar.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Lp(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,li(e,"_ZodString",{regex(...o){return this.check(yn(...o))},includes(...o){return this.check(bn(...o))},startsWith(...o){return this.check($n(...o))},endsWith(...o){return this.check(zn(...o))},min(...o){return this.check(Dt(...o))},max(...o){return this.check(qr(...o))},length(...o){return this.check(Lr(...o))},nonempty(...o){return this.check(Dt(1,...o))},lowercase(o){return this.check(_n(o))},uppercase(o){return this.check(Sn(o))},trim(){return this.check(In())},normalize(...o){return this.check(Rn(...o))},toLowerCase(){return this.check(kn())},toUpperCase(){return this.check(Tn())},slugify(){return this.check(Pn())}})}),On=N("ZodString",(e,t)=>{Ar.init(e,t),As.init(e,t),e.email=n=>e.check(Qa(Cs,n)),e.url=n=>e.check(oi(ui,n)),e.jwt=n=>e.check(ys(Xs,n)),e.emoji=n=>e.check(os(Ls,n)),e.guid=n=>e.check(ni(si,n)),e.uuid=n=>e.check(es(Ot,n)),e.uuidv4=n=>e.check(ts(Ot,n)),e.uuidv6=n=>e.check(rs(Ot,n)),e.uuidv7=n=>e.check(ns(Ot,n)),e.nanoid=n=>e.check(is(Ms,n)),e.guid=n=>e.check(ni(si,n)),e.cuid=n=>e.check(as(Ds,n)),e.cuid2=n=>e.check(ss(Us,n)),e.ulid=n=>e.check(cs(Vs,n)),e.base64=n=>e.check(hs(Ks,n)),e.base64url=n=>e.check(gs(Ws,n)),e.xid=n=>e.check(ls(Zs,n)),e.ksuid=n=>e.check(us(Fs,n)),e.ipv4=n=>e.check(ds(Hs,n)),e.ipv6=n=>e.check(ms(Js,n)),e.cidrv4=n=>e.check(ps(Gs,n)),e.cidrv6=n=>e.check(fs(Bs,n)),e.e164=n=>e.check(vs(Ys,n)),e.datetime=n=>e.check($f(n)),e.date=n=>e.check(zf(n)),e.time=n=>e.check(wf(n)),e.duration=n=>e.check(Rf(n))});function m(e){return Xm(On,e)}var xe=N("ZodStringFormat",(e,t)=>{Ee.init(e,t),As.init(e,t)}),Cs=N("ZodEmail",(e,t)=>{Zd.init(e,t),xe.init(e,t)});function qs(e){return Qa(Cs,e)}var si=N("ZodGUID",(e,t)=>{Ud.init(e,t),xe.init(e,t)});function Ty(e){return ni(si,e)}var Ot=N("ZodUUID",(e,t)=>{Vd.init(e,t),xe.init(e,t)});function Py(e){return es(Ot,e)}function Ey(e){return ts(Ot,e)}function xy(e){return rs(Ot,e)}function jy(e){return ns(Ot,e)}var ui=N("ZodURL",(e,t)=>{Fd.init(e,t),xe.init(e,t)});function An(e){return oi(ui,e)}function Ny(e){return oi(ui,{protocol:ft.httpProtocol,hostname:ft.domain,...B.normalizeParams(e)})}var Ls=N("ZodEmoji",(e,t)=>{Hd.init(e,t),xe.init(e,t)});function Oy(e){return os(Ls,e)}var Ms=N("ZodNanoID",(e,t)=>{Jd.init(e,t),xe.init(e,t)});function Ay(e){return is(Ms,e)}var Ds=N("ZodCUID",(e,t)=>{Gd.init(e,t),xe.init(e,t)});function Cy(e){return as(Ds,e)}var Us=N("ZodCUID2",(e,t)=>{Bd.init(e,t),xe.init(e,t)});function qy(e){return ss(Us,e)}var Vs=N("ZodULID",(e,t)=>{Kd.init(e,t),xe.init(e,t)});function Ly(e){return cs(Vs,e)}var Zs=N("ZodXID",(e,t)=>{Wd.init(e,t),xe.init(e,t)});function My(e){return ls(Zs,e)}var Fs=N("ZodKSUID",(e,t)=>{Yd.init(e,t),xe.init(e,t)});function Dy(e){return us(Fs,e)}var Hs=N("ZodIPv4",(e,t)=>{rm.init(e,t),xe.init(e,t)});function Uy(e){return ds(Hs,e)}var qf=N("ZodMAC",(e,t)=>{om.init(e,t),xe.init(e,t)});function Vy(e){return ep(qf,e)}var Js=N("ZodIPv6",(e,t)=>{nm.init(e,t),xe.init(e,t)});function Zy(e){return ms(Js,e)}var Gs=N("ZodCIDRv4",(e,t)=>{im.init(e,t),xe.init(e,t)});function Fy(e){return ps(Gs,e)}var Bs=N("ZodCIDRv6",(e,t)=>{am.init(e,t),xe.init(e,t)});function Hy(e){return fs(Bs,e)}var Ks=N("ZodBase64",(e,t)=>{cm.init(e,t),xe.init(e,t)});function Jy(e){return hs(Ks,e)}var Ws=N("ZodBase64URL",(e,t)=>{lm.init(e,t),xe.init(e,t)});function Gy(e){return gs(Ws,e)}var Ys=N("ZodE164",(e,t)=>{um.init(e,t),xe.init(e,t)});function By(e){return vs(Ys,e)}var Xs=N("ZodJWT",(e,t)=>{dm.init(e,t),xe.init(e,t)});function Ky(e){return ys(Xs,e)}var Cn=N("ZodCustomStringFormat",(e,t)=>{mm.init(e,t),xe.init(e,t)});function Wy(e,t,n={}){return En(Cn,e,t,n)}function Yy(e){return En(Cn,"hostname",ft.hostname,e)}function Xy(e){return En(Cn,"hex",ft.hex,e)}function Qy(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=ft[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return En(Cn,o,r,t)}var qn=N("ZodNumber",(e,t)=>{Za.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Mp(e,o,r,i),li(e,"ZodNumber",{gt(o,r){return this.check(jt(o,r))},gte(o,r){return this.check(st(o,r))},min(o,r){return this.check(st(o,r))},lt(o,r){return this.check(xt(o,r))},lte(o,r){return this.check(ht(o,r))},max(o,r){return this.check(ht(o,r))},int(o){return this.check(Ns(o))},safe(o){return this.check(Ns(o))},positive(o){return this.check(jt(0,o))},nonnegative(o){return this.check(st(0,o))},negative(o){return this.check(xt(0,o))},nonpositive(o){return this.check(ht(0,o))},multipleOf(o,r){return this.check(nr(o,r))},step(o,r){return this.check(nr(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function F(e){return ap(qn,e)}var Dr=N("ZodNumberFormat",(e,t)=>{pm.init(e,t),qn.init(e,t)});function Ns(e){return cp(Dr,e)}function e_(e){return lp(Dr,e)}function t_(e){return up(Dr,e)}function r_(e){return dp(Dr,e)}function n_(e){return mp(Dr,e)}var Ln=N("ZodBoolean",(e,t)=>{Xo.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Dp(e,n,o,r)});function te(e){return pp(Ln,e)}var Mn=N("ZodBigInt",(e,t)=>{Fa.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Up(e,o,r,i),e.gte=(o,r)=>e.check(st(o,r)),e.min=(o,r)=>e.check(st(o,r)),e.gt=(o,r)=>e.check(jt(o,r)),e.gte=(o,r)=>e.check(st(o,r)),e.min=(o,r)=>e.check(st(o,r)),e.lt=(o,r)=>e.check(xt(o,r)),e.lte=(o,r)=>e.check(ht(o,r)),e.max=(o,r)=>e.check(ht(o,r)),e.positive=o=>e.check(jt(BigInt(0),o)),e.negative=o=>e.check(xt(BigInt(0),o)),e.nonpositive=o=>e.check(ht(BigInt(0),o)),e.nonnegative=o=>e.check(st(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(nr(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function o_(e){return hp(Mn,e)}var Qs=N("ZodBigIntFormat",(e,t)=>{fm.init(e,t),Mn.init(e,t)});function i_(e){return vp(Qs,e)}function a_(e){return yp(Qs,e)}var Lf=N("ZodSymbol",(e,t)=>{hm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vp(e,n,o,r)});function s_(e){return _p(Lf,e)}var Mf=N("ZodUndefined",(e,t)=>{gm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fp(e,n,o,r)});function c_(e){return Sp(Mf,e)}var Df=N("ZodNull",(e,t)=>{vm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zp(e,n,o,r)});function At(e){return bp(Df,e)}var Uf=N("ZodAny",(e,t)=>{ym.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gp(e,n,o,r)});function ec(){return $p(Uf)}var Vf=N("ZodUnknown",(e,t)=>{_m.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Bp(e,n,o,r)});function ie(){return zp(Vf)}var Zf=N("ZodNever",(e,t)=>{Sm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jp(e,n,o,r)});function tc(e){return wp(Zf,e)}var Ff=N("ZodVoid",(e,t)=>{bm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hp(e,n,o,r)});function l_(e){return Rp(Ff,e)}var di=N("ZodDate",(e,t)=>{$m.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Kp(e,o,r,i),e.min=(o,r)=>e.check(st(o,r)),e.max=(o,r)=>e.check(ht(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function u_(e){return Ip(di,e)}var Hf=N("ZodArray",(e,t)=>{zm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cf(e,n,o,r),e.element=t.element,li(e,"ZodArray",{min(n,o){return this.check(Dt(n,o))},nonempty(n){return this.check(Dt(1,n))},max(n,o){return this.check(qr(n,o))},length(n,o){return this.check(Lr(n,o))},unwrap(){return this.element}})});function O(e,t){return Pp(Hf,e,t)}function d_(e){let t=e._zod.def.shape;return he(Object.keys(t))}var mi=N("ZodObject",(e,t)=>{wm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lf(e,n,o,r),B.defineLazy(e,"shape",()=>t.shape),li(e,"ZodObject",{keyof(){return he(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:ie()})},loose(){return this.clone({...this._zod.def,catchall:ie()})},strict(){return this.clone({...this._zod.def,catchall:tc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return B.extend(this,n)},safeExtend(n){return B.safeExtend(this,n)},merge(n){return B.merge(this,n)},pick(n){return B.pick(this,n)},omit(n){return B.omit(this,n)},partial(...n){return B.partial(nc,this,n[0])},required(...n){return B.required(oc,this,n[0])}})});function T(e,t){let n={type:"object",shape:e??{},...B.normalizeParams(t)};return new mi(n)}function m_(e,t){return new mi({type:"object",shape:e,catchall:tc(),...B.normalizeParams(t)})}function ce(e,t){return new mi({type:"object",shape:e,catchall:ie(),...B.normalizeParams(t)})}var pi=N("ZodUnion",(e,t)=>{Qo.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rs(e,n,o,r),e.options=t.options});function oe(e,t){return new pi({type:"union",options:e,...B.normalizeParams(t)})}var Jf=N("ZodXor",(e,t)=>{pi.init(e,t),Rm.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rs(e,n,o,r),e.options=t.options});function p_(e,t){return new Jf({type:"union",options:e,inclusive:!1,...B.normalizeParams(t)})}var Gf=N("ZodDiscriminatedUnion",(e,t)=>{pi.init(e,t),Im.init(e,t)});function cr(e,t,n){return new Gf({type:"union",options:t,discriminator:e,...B.normalizeParams(n)})}var Bf=N("ZodIntersection",(e,t)=>{km.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uf(e,n,o,r)});function It(e,t){return new Bf({type:"intersection",left:e,right:t})}var Kf=N("ZodTuple",(e,t)=>{Ha.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>df(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Wf(e,t,n){let o=t instanceof ge,r=o?n:t,i=o?t:null;return new Kf({type:"tuple",items:e,rest:i,...B.normalizeParams(r)})}var jn=N("ZodRecord",(e,t)=>{Tm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mf(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function Q(e,t,n){return!t||!t._zod?new jn({type:"record",keyType:m(),valueType:e,...B.normalizeParams(t)}):new jn({type:"record",keyType:e,valueType:t,...B.normalizeParams(n)})}function f_(e,t,n){let o=it(e);return o._zod.values=void 0,new jn({type:"record",keyType:o,valueType:t,...B.normalizeParams(n)})}function h_(e,t,n){return new jn({type:"record",keyType:e,valueType:t,mode:"loose",...B.normalizeParams(n)})}var Yf=N("ZodMap",(e,t)=>{Pm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>af(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Nt(...n)),e.nonempty=n=>e.check(Nt(1,n)),e.max=(...n)=>e.check(or(...n)),e.size=(...n)=>e.check(Cr(...n))});function g_(e,t,n){return new Yf({type:"map",keyType:e,valueType:t,...B.normalizeParams(n)})}var Xf=N("ZodSet",(e,t)=>{Em.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sf(e,n,o,r),e.min=(...n)=>e.check(Nt(...n)),e.nonempty=n=>e.check(Nt(1,n)),e.max=(...n)=>e.check(or(...n)),e.size=(...n)=>e.check(Cr(...n))});function v_(e,t){return new Xf({type:"set",valueType:e,...B.normalizeParams(t)})}var Nn=N("ZodEnum",(e,t)=>{xm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Wp(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Nn({...t,checks:[],...B.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Nn({...t,checks:[],...B.normalizeParams(r),entries:i})}});function he(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Nn({type:"enum",entries:n,...B.normalizeParams(t)})}function y_(e,t){return new Nn({type:"enum",entries:e,...B.normalizeParams(t)})}var Qf=N("ZodLiteral",(e,t)=>{jm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yp(e,n,o,r),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 A(e,t){return new Qf({type:"literal",values:Array.isArray(e)?e:[e],...B.normalizeParams(t)})}var eh=N("ZodFile",(e,t)=>{Nm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ef(e,n,o,r),e.min=(n,o)=>e.check(Nt(n,o)),e.max=(n,o)=>e.check(or(n,o)),e.mime=(n,o)=>e.check(wn(Array.isArray(n)?n:[n],o))});function __(e){return Ep(eh,e)}var th=N("ZodTransform",(e,t)=>{Om.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>of(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Xt(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(B.issue(i,n.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(B.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function rc(e){return new th({type:"transform",transform:e})}var nc=N("ZodOptional",(e,t)=>{Ja.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Is(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function ae(e){return new nc({type:"optional",innerType:e})}var rh=N("ZodExactOptional",(e,t)=>{Am.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Is(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function nh(e){return new rh({type:"optional",innerType:e})}var oh=N("ZodNullable",(e,t)=>{Cm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function ci(e){return new oh({type:"nullable",innerType:e})}function S_(e){return ae(ci(e))}var ih=N("ZodDefault",(e,t)=>{qm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ah(e,t){return new ih({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():B.shallowClone(t)}})}var sh=N("ZodPrefault",(e,t)=>{Lm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function ch(e,t){return new sh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():B.shallowClone(t)}})}var oc=N("ZodNonOptional",(e,t)=>{Mm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ff(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function lh(e,t){return new oc({type:"nonoptional",innerType:e,...B.normalizeParams(t)})}var uh=N("ZodSuccess",(e,t)=>{Dm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function b_(e){return new uh({type:"success",innerType:e})}var dh=N("ZodCatch",(e,t)=>{Um.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mh(e,t){return new dh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var ph=N("ZodNaN",(e,t)=>{Vm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xp(e,n,o,r)});function $_(e){return Tp(ph,e)}var fi=N("ZodPipe",(e,t)=>{Ga.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yf(e,n,o,r),e.in=t.in,e.out=t.out});function Os(e,t){return new fi({type:"pipe",in:e,out:t})}var hi=N("ZodCodec",(e,t)=>{fi.init(e,t),ei.init(e,t)});function z_(e,t,n){return new hi({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function w_(e){let t=e._zod.def;return new hi({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var fh=N("ZodPreprocess",(e,t)=>{fi.init(e,t),Zm.init(e,t)}),hh=N("ZodReadonly",(e,t)=>{Fm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_f(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function gh(e){return new hh({type:"readonly",innerType:e})}var vh=N("ZodTemplateLiteral",(e,t)=>{Hm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qp(e,n,o,r)});function R_(e,t){return new vh({type:"template_literal",parts:e,...B.normalizeParams(t)})}var yh=N("ZodLazy",(e,t)=>{Bm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bf(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function lr(e){return new yh({type:"lazy",getter:e})}var _h=N("ZodPromise",(e,t)=>{Gm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function I_(e){return new _h({type:"promise",innerType:e})}var Sh=N("ZodFunction",(e,t)=>{Jm.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>nf(e,n,o,r)});function k_(e){return new Sh({type:"function",input:Array.isArray(e?.input)?Wf(e?.input):e?.input??O(ie()),output:e?.output??ie()})}var gi=N("ZodCustom",(e,t)=>{Km.init(e,t),be.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rf(e,n,o,r)});function T_(e){let t=new je({check:"custom"});return t._zod.check=e,t}function P_(e,t){return xp(gi,e??(()=>!0),t)}function bh(e,t={}){return jp(gi,e,t)}function $h(e,t){return Np(e,t)}var E_=Op,x_=Ap;function j_(e,t={}){let n=new gi({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...B.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var N_=(...e)=>Cp({Codec:hi,Boolean:Ln,String:On},...e);function O_(e){let t=lr(()=>oe([m(e),F(),te(),At(),O(t),Q(m(),t)]));return t}function Vt(e,t){return new fh({type:"pipe",in:rc(e),out:t})}var wh={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 jR(e){qe({customError:e})}function NR(){return qe().customError}var zh;zh||(zh={});var re={...ii,...Ts,iso:gt},OR=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 AR(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function CR(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function A_(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return re.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){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return re.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=CR(r,t),a=tt(i,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return re.null();if(r.length===0)return re.never();if(r.length===1)return re.literal(r[0]);if(r.every(a=>typeof a=="string"))return re.enum(r);let i=r.map(a=>re.literal(a));return i.length<2?i[0]:re.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return re.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let a={...e,type:i};return A_(a,t)});return r.length===0?re.never():r.length===1?r[0]:re.union(r)}if(!n)return re.any();let o;switch(n){case"string":{let r=re.string();if(e.format){let i=e.format;i==="email"?r=r.check(re.email()):i==="uri"||i==="uri-reference"?r=r.check(re.url()):i==="uuid"||i==="guid"?r=r.check(re.uuid()):i==="date-time"?r=r.check(re.iso.datetime()):i==="date"?r=r.check(re.iso.date()):i==="time"?r=r.check(re.iso.time()):i==="duration"?r=r.check(re.iso.duration()):i==="ipv4"?r=r.check(re.ipv4()):i==="ipv6"?r=r.check(re.ipv6()):i==="mac"?r=r.check(re.mac()):i==="cidr"?r=r.check(re.cidrv4()):i==="cidr-v6"?r=r.check(re.cidrv6()):i==="base64"?r=r.check(re.base64()):i==="base64url"?r=r.check(re.base64url()):i==="e164"?r=r.check(re.e164()):i==="jwt"?r=r.check(re.jwt()):i==="emoji"?r=r.check(re.emoji()):i==="nanoid"?r=r.check(re.nanoid()):i==="cuid"?r=r.check(re.cuid()):i==="cuid2"?r=r.check(re.cuid2()):i==="ulid"?r=r.check(re.ulid()):i==="xid"?r=r.check(re.xid()):i==="ksuid"&&(r=r.check(re.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?re.number().int():re.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=re.boolean();break}case"null":{o=re.null();break}case"object":{let r={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let d=tt(l,t);r[c]=a.has(c)?d:d.optional()}if(e.propertyNames){let c=tt(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?tt(e.additionalProperties,t):re.any();if(Object.keys(r).length===0){o=re.record(c,l);break}let d=re.object(r).passthrough(),p=re.looseRecord(c,l);o=re.intersection(d,p);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),d=[];for(let h of l){let S=tt(c[h],t),v=re.string().regex(new RegExp(h));d.push(re.looseRecord(v,S))}let p=[];if(Object.keys(r).length>0&&p.push(re.object(r).passthrough()),p.push(...d),p.length===0)o=re.object({}).passthrough();else if(p.length===1)o=p[0];else{let h=re.intersection(p[0],p[1]);for(let S=2;S<p.length;S++)h=re.intersection(h,p[S]);o=h}break}let s=re.object(r);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(tt(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let a=r.map(c=>tt(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?tt(i,t):void 0;s?o=re.tuple(a).rest(s):o=re.tuple(a),typeof e.minItems=="number"&&(o=o.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(re.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>tt(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?tt(e.additionalItems,t):void 0;s?o=re.tuple(a).rest(s):o=re.tuple(a),typeof e.minItems=="number"&&(o=o.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(re.maxLength(e.maxItems)))}else if(i!==void 0){let a=tt(i,t),s=re.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=re.array(re.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function tt(e,t){if(typeof e=="boolean")return e?re.any():re.never();let n=A_(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>tt(l,t)),c=re.union(s);n=o?re.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>tt(l,t)),c=re.xor(s);n=o?re.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:re.any();else{let s=o?n:tt(e.allOf[0],t),c=o?0:1;for(let l=c;l<e.allOf.length;l++)s=re.intersection(s,tt(e.allOf[l],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=re.nullable(n)),e.readOnly===!0&&(n=re.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))OR.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function C_(e,t){if(typeof e=="boolean")return e?re.any():re.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=AR(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Xe};return tt(n,i)}var vi={};Lt(vi,{bigint:()=>DR,boolean:()=>MR,date:()=>UR,number:()=>LR,string:()=>qR});function qR(e){return Qm(On,e)}function LR(e){return sp(qn,e)}function MR(e){return fp(Ln,e)}function DR(e){return gp(Mn,e)}function UR(e){return kp(di,e)}qe(Ba());var Vr="2025-11-25";var ic=[Vr,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],ac="io.modelcontextprotocol/related-task",Ft="io.modelcontextprotocol/protocolVersion",Zr="io.modelcontextprotocol/clientInfo",Ht="io.modelcontextprotocol/clientCapabilities",Fr="io.modelcontextprotocol/subscriptionId",dr="io.modelcontextprotocol/logLevel";var Hr="2.0";var ur=lr(()=>oe([m(),F(),te(),At(),Q(m(),ur),O(ur)])),Le=Q(m(),ur),Ih=O(ur),yi=oe([m(),F().int()]),_i=m(),sc=T({ttl:F().optional()}),cc=T({taskId:m()}),Dn=ce({progressToken:yi.optional(),[ac]:cc.optional()}),Ke=T({_meta:Dn.optional()}),Jr=Ke.extend({task:sc.optional()}),Me=T({method:m(),params:Ke.loose().optional()}),rt=T({_meta:Dn.optional()}),nt=T({method:m(),params:rt.loose().optional()}),De=ce({_meta:Dn.optional()}),mr=oe([m(),F().int()]),Si=T({jsonrpc:A(Hr),id:mr,...Me.shape}).strict(),bi=T({jsonrpc:A(Hr),...nt.shape}).strict(),Un=T({jsonrpc:A(Hr),id:mr,result:De}).strict(),Vn=T({jsonrpc:A(Hr),id:mr.optional(),error:T({code:F().int(),message:m(),data:ie().optional()})}).strict(),$i=oe([Si,bi,Un,Vn]),kh=oe([Un,Vn]),zi=De.strict(),lc=rt.extend({requestId:mr.optional(),reason:m().optional()}),wi=nt.extend({method:A("notifications/cancelled"),params:lc}),uc=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:he(["light","dark"]).optional()}),pr=T({icons:O(uc).optional()}),Zt=T({name:m(),title:m().optional()}),Zn=Zt.extend({...Zt.shape,...pr.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),ZR=It(T({applyDefaults:te().optional()}),Le),FR=Vt(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,It(T({form:ZR.optional(),url:Le.optional()}),Le.optional())),dc=ce({list:Le.optional(),cancel:Le.optional(),requests:ce({sampling:ce({createMessage:Le.optional()}).optional(),elicitation:ce({create:Le.optional()}).optional()}).optional()}),mc=ce({list:Le.optional(),cancel:Le.optional(),requests:ce({tools:ce({call:Le.optional()}).optional()}).optional()}),pc=T({experimental:Q(m(),Le).optional(),sampling:T({context:Le.optional(),tools:Le.optional()}).optional(),elicitation:FR.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:dc.optional(),extensions:Q(m(),Le).optional()}),fc=Ke.extend({protocolVersion:m(),capabilities:pc,clientInfo:Zn}),hc=Me.extend({method:A("initialize"),params:fc}),Ri=T({experimental:Q(m(),Le).optional(),logging:Le.optional(),completions:Le.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:mc.optional(),extensions:Q(m(),Le).optional()}),gc=De.extend({protocolVersion:m(),capabilities:Ri,serverInfo:Zn,instructions:m().optional()}),vc=nt.extend({method:A("notifications/initialized"),params:rt.optional()}),yc=Me.extend({method:A("server/discover"),params:Ke.optional()}),_c=De.extend({supportedVersions:O(m()),capabilities:Ri,serverInfo:Zn,instructions:m().optional()}),Ii=Me.extend({method:A("ping"),params:Ke.optional()}),Sc=T({progress:F(),total:ae(F()),message:ae(m())}),bc=T({...rt.shape,...Sc.shape,progressToken:yi}),ki=nt.extend({method:A("notifications/progress"),params:bc}),$c=Ke.extend({cursor:_i.optional()}),fr=Me.extend({params:$c.optional()}),hr=De.extend({nextCursor:_i.optional()}),Ti=T({uri:m(),mimeType:ae(m()),_meta:Q(m(),ie()).optional()}),Pi=Ti.extend({text:m()}),Th=m().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ei=Ti.extend({blob:Th}),gr=he(["user","assistant"]),Jt=T({audience:O(gr).optional(),priority:F().min(0).max(1).optional(),lastModified:gt.datetime({offset:!0}).optional()}),xi=T({...Zt.shape,...pr.shape,uri:m(),description:ae(m()),mimeType:ae(m()),size:ae(F()),annotations:Jt.optional(),_meta:ae(ce({}))}),zc=T({...Zt.shape,...pr.shape,uriTemplate:m(),description:ae(m()),mimeType:ae(m()),annotations:Jt.optional(),_meta:ae(ce({}))}),wc=fr.extend({method:A("resources/list")}),Rc=hr.extend({resources:O(xi)}),Ic=fr.extend({method:A("resources/templates/list")}),kc=hr.extend({resourceTemplates:O(zc)}),Fn=Ke.extend({uri:m()}),Tc=Fn,Pc=Me.extend({method:A("resources/read"),params:Tc}),Ec=De.extend({contents:O(oe([Pi,Ei]))}),xc=nt.extend({method:A("notifications/resources/list_changed"),params:rt.optional()}),jc=Fn,Nc=Me.extend({method:A("resources/subscribe"),params:jc}),Oc=Fn,Ac=Me.extend({method:A("resources/unsubscribe"),params:Oc}),ji=T({toolsListChanged:te().optional(),promptsListChanged:te().optional(),resourcesListChanged:te().optional(),resourceSubscriptions:O(m()).optional()}),Cc=Ke.extend({notifications:ji}),qc=Me.extend({method:A("subscriptions/listen"),params:Cc}),Lc=rt.extend({notifications:ji}),Mc=nt.extend({method:A("notifications/subscriptions/acknowledged"),params:Lc}),Dc=ce({[Fr]:mr}),Uc=De.extend({_meta:Dc}),Vc=rt.extend({uri:m()}),Zc=nt.extend({method:A("notifications/resources/updated"),params:Vc}),Fc=T({name:m(),description:ae(m()),required:ae(te())}),Hc=T({...Zt.shape,...pr.shape,description:ae(m()),arguments:ae(O(Fc)),_meta:ae(ce({}))}),Jc=fr.extend({method:A("prompts/list")}),Gc=hr.extend({prompts:O(Hc)}),Bc=Ke.extend({name:m(),arguments:Q(m(),m()).optional()}),Kc=Me.extend({method:A("prompts/get"),params:Bc}),Hn=T({type:A("text"),text:m(),annotations:Jt.optional(),_meta:Q(m(),ie()).optional()}),Jn=T({type:A("image"),data:Th,mimeType:m(),annotations:Jt.optional(),_meta:Q(m(),ie()).optional()}),Gn=T({type:A("audio"),data:Th,mimeType:m(),annotations:Jt.optional(),_meta:Q(m(),ie()).optional()}),Wc=T({type:A("tool_use"),name:m(),id:m(),input:Q(m(),ie()),_meta:Q(m(),ie()).optional()}),Yc=T({type:A("resource"),resource:oe([Pi,Ei]),annotations:Jt.optional(),_meta:Q(m(),ie()).optional()}),Xc=xi.extend({type:A("resource_link")}),Bn=oe([Hn,Jn,Gn,Xc,Yc]),Qc=T({role:gr,content:Bn}),el=De.extend({description:m().optional(),messages:O(Qc)}),tl=nt.extend({method:A("notifications/prompts/list_changed"),params:rt.optional()}),rl=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),nl=T({taskSupport:he(["required","optional","forbidden"]).optional()}),Ni=T({...Zt.shape,...pr.shape,description:m().optional(),inputSchema:T({type:A("object"),properties:Q(m(),ur).optional(),required:O(m()).optional()}).catchall(ie()),outputSchema:ce({$schema:m().optional()}).optional(),annotations:rl.optional(),execution:nl.optional(),_meta:Q(m(),ie()).optional()}),ol=fr.extend({method:A("tools/list")}),il=hr.extend({tools:O(Ni)}),Oi=De.extend({content:O(Bn).default([]),structuredContent:ie().optional(),isError:te().optional()}),Ph=Oi.or(De.extend({toolResult:ie()})),al=Jr.extend({name:m(),arguments:Q(m(),ie()).optional()}),sl=Me.extend({method:A("tools/call"),params:al}),cl=nt.extend({method:A("notifications/tools/list_changed"),params:rt.optional()}),Eh=T({autoRefresh:te().default(!0),debounceMs:F().int().nonnegative().default(300)}),vr=he(["debug","info","notice","warning","error","critical","alert","emergency"]),ll=Ke.extend({level:vr}),ul=Me.extend({method:A("logging/setLevel"),params:ll}),dl=rt.extend({level:vr,logger:m().optional(),data:ie()}),ml=nt.extend({method:A("notifications/message"),params:dl}),pl=T({name:m().optional()}),fl=T({hints:O(pl).optional(),costPriority:F().min(0).max(1).optional(),speedPriority:F().min(0).max(1).optional(),intelligencePriority:F().min(0).max(1).optional()}),hl=T({mode:he(["auto","required","none"]).optional()}),gl=T({type:A("tool_result"),toolUseId:m().describe("The unique identifier for the corresponding tool call."),content:O(Bn),structuredContent:ie().optional(),isError:te().optional(),_meta:Q(m(),ie()).optional()}),vl=cr("type",[Hn,Jn,Gn]),Ur=cr("type",[Hn,Jn,Gn,Wc,gl]),yl=T({role:gr,content:oe([Ur,O(Ur)]),_meta:Q(m(),ie()).optional()}),_l=Jr.extend({messages:O(yl),modelPreferences:fl.optional(),systemPrompt:m().optional(),includeContext:he(["none","thisServer","allServers"]).optional(),temperature:F().optional(),maxTokens:F().int(),stopSequences:O(m()).optional(),metadata:Le.optional(),tools:O(Ni).optional(),toolChoice:hl.optional()}),Sl=Me.extend({method:A("sampling/createMessage"),params:_l}),bl=De.extend({model:m(),stopReason:ae(he(["endTurn","stopSequence","maxTokens"]).or(m())),role:gr,content:vl}),$l=De.extend({model:m(),stopReason:ae(he(["endTurn","stopSequence","maxTokens","toolUse"]).or(m())),role:gr,content:oe([Ur,O(Ur)])}),Ai=T({type:A("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),Kn=T({type:A("string"),title:m().optional(),description:m().optional(),minLength:F().optional(),maxLength:F().optional(),format:he(["email","uri","date","date-time"]).optional(),default:m().optional()}),Wn=T({type:he(["number","integer"]),title:m().optional(),description:m().optional(),minimum:F().optional(),maximum:F().optional(),default:F().optional()}),Ci=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),qi=T({type:A("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),Li=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),zl=oe([Ci,qi]),Mi=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({type:A("string"),enum:O(m())}),default:O(m()).optional()}),Di=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),wl=oe([Mi,Di]),Rl=oe([Li,zl,wl]),Ui=oe([Rl,Ai,Kn,Wn]),Yn=Jr.extend({mode:A("form").optional(),message:m(),requestedSchema:T({type:A("object"),properties:Q(m(),Ui),required:O(m()).optional()}).catchall(ie())}),Il=Jr.extend({mode:A("url"),message:m(),elicitationId:m(),url:m().url()}),kl=oe([Yn,Il]),Tl=Me.extend({method:A("elicitation/create"),params:kl}),Pl=rt.extend({elicitationId:m()}),El=nt.extend({method:A("notifications/elicitation/complete"),params:Pl}),xl=De.extend({action:he(["accept","decline","cancel"]),content:Vt(e=>e===null?void 0:e,Q(m(),oe([m(),F(),te(),O(m())])).optional())}),jl=T({type:A("ref/resource"),uri:m()}),Nl=T({type:A("ref/prompt"),name:m()}),Ol=Ke.extend({ref:oe([Nl,jl]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()}),Al=Me.extend({method:A("completion/complete"),params:Ol}),Cl=De.extend({completion:ce({values:O(m()).max(100),total:ae(F().int()),hasMore:ae(te())})}),ql=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),ie()).optional()}),Ll=Me.extend({method:A("roots/list"),params:Ke.optional()}),Ml=De.extend({roots:O(ql)}),Dl=nt.extend({method:A("notifications/roots/list_changed"),params:rt.optional()}),xh=ce({ttl:F().optional(),pollInterval:F().optional()}),Ul=he(["working","input_required","completed","failed","cancelled"]),yr=T({taskId:m(),status:Ul,ttl:oe([F(),At()]),createdAt:m(),lastUpdatedAt:m(),pollInterval:ae(F()),statusMessage:ae(m())}),jh=De.extend({task:yr}),Vl=rt.merge(yr),Nh=nt.extend({method:A("notifications/tasks/status"),params:Vl}),Oh=Me.extend({method:A("tasks/get"),params:Ke.extend({taskId:m()})}),Ah=De.merge(yr),Ch=Me.extend({method:A("tasks/result"),params:Ke.extend({taskId:m()})}),qh=De.loose(),Lh=fr.extend({method:A("tasks/list")}),Mh=hr.extend({tasks:O(yr)}),Dh=Me.extend({method:A("tasks/cancel"),params:Ke.extend({taskId:m()})}),Uh=De.merge(yr),Vh=oe([Ii,hc,yc,Al,ul,Kc,Jc,wc,Ic,Pc,Nc,Ac,qc,sl,ol]),Zh=oe([wi,ki,vc,Dl]),Fh=oe([zi,bl,$l,xl,Ml]),Hh=oe([Ii,Sl,Tl,Ll]),Jh=oe([wi,ki,ml,Zc,xc,cl,tl,Mc,El]),Gh=oe([zi,gc,_c,Cl,el,Gc,Rc,kc,Ec,Oi,il,Uc]),Be=An().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:wh.custom,message:"URL must be parseable",fatal:!0}),Mo}).refine(e=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Bh=ce({resource:m().url(),authorization_servers:O(Be).optional(),jwks_uri:m().url().optional(),scopes_supported:O(m()).optional(),bearer_methods_supported:O(m()).optional(),resource_signing_alg_values_supported:O(m()).optional(),resource_name:m().optional(),resource_documentation:m().optional(),resource_policy_uri:m().url().optional(),resource_tos_uri:m().url().optional(),tls_client_certificate_bound_access_tokens:te().optional(),authorization_details_types_supported:O(m()).optional(),dpop_signing_alg_values_supported:O(m()).optional(),dpop_bound_access_tokens_required:te().optional()}),Zl=ce({issuer:m(),authorization_endpoint:Be,token_endpoint:Be,registration_endpoint:Be.optional(),scopes_supported:O(m()).optional(),response_types_supported:O(m()),response_modes_supported:O(m()).optional(),grant_types_supported:O(m()).optional(),token_endpoint_auth_methods_supported:O(m()).optional(),token_endpoint_auth_signing_alg_values_supported:O(m()).optional(),service_documentation:Be.optional(),revocation_endpoint:Be.optional(),revocation_endpoint_auth_methods_supported:O(m()).optional(),revocation_endpoint_auth_signing_alg_values_supported:O(m()).optional(),introspection_endpoint:m().optional(),introspection_endpoint_auth_methods_supported:O(m()).optional(),introspection_endpoint_auth_signing_alg_values_supported:O(m()).optional(),code_challenge_methods_supported:O(m()).optional(),client_id_metadata_document_supported:te().optional(),authorization_response_iss_parameter_supported:te().optional().catch(void 0)}),Fl=ce({issuer:m(),authorization_endpoint:Be,token_endpoint:Be,userinfo_endpoint:Be.optional(),jwks_uri:Be,registration_endpoint:Be.optional(),scopes_supported:O(m()).optional(),response_types_supported:O(m()),response_modes_supported:O(m()).optional(),grant_types_supported:O(m()).optional(),acr_values_supported:O(m()).optional(),subject_types_supported:O(m()),id_token_signing_alg_values_supported:O(m()),id_token_encryption_alg_values_supported:O(m()).optional(),id_token_encryption_enc_values_supported:O(m()).optional(),userinfo_signing_alg_values_supported:O(m()).optional(),userinfo_encryption_alg_values_supported:O(m()).optional(),userinfo_encryption_enc_values_supported:O(m()).optional(),request_object_signing_alg_values_supported:O(m()).optional(),request_object_encryption_alg_values_supported:O(m()).optional(),request_object_encryption_enc_values_supported:O(m()).optional(),token_endpoint_auth_methods_supported:O(m()).optional(),token_endpoint_auth_signing_alg_values_supported:O(m()).optional(),display_values_supported:O(m()).optional(),claim_types_supported:O(m()).optional(),claims_supported:O(m()).optional(),service_documentation:m().optional(),claims_locales_supported:O(m()).optional(),ui_locales_supported:O(m()).optional(),claims_parameter_supported:te().optional(),request_parameter_supported:te().optional(),request_uri_parameter_supported:te().optional(),require_request_uri_registration:te().optional(),op_policy_uri:Be.optional(),op_tos_uri:Be.optional(),client_id_metadata_document_supported:te().optional(),authorization_response_iss_parameter_supported:te().optional().catch(void 0)}),Kh=T({...Fl.shape,...Zl.pick({code_challenge_methods_supported:!0}).shape}),Wh=T({access_token:m(),id_token:m().optional(),token_type:m(),expires_in:vi.number().optional(),scope:m().optional(),refresh_token:m().optional()}).strip(),Yh=T({issued_token_type:A("urn:ietf:params:oauth:token-type:id-jag"),access_token:m(),token_type:m().optional(),expires_in:F().optional(),scope:m().optional()}).strip(),Xh=T({error:m(),error_description:m().optional(),error_uri:m().optional()}),Rh=Be.optional().or(A("").transform(()=>{})),Hl=T({redirect_uris:O(Be),token_endpoint_auth_method:m().optional(),grant_types:O(m()).optional(),response_types:O(m()).optional(),application_type:m().optional(),client_name:m().optional(),client_uri:Be.optional(),logo_uri:Rh,scope:m().optional(),contacts:O(m()).optional(),tos_uri:Rh,policy_uri:m().optional(),jwks_uri:Be.optional(),jwks:ec().optional(),software_id:m().optional(),software_version:m().optional(),software_statement:m().optional()}).strip(),Jl=T({client_id:m(),client_secret:m().optional(),client_id_issued_at:F().optional(),client_secret_expires_at:F().optional()}).strip(),Qh=Hl.merge(Jl),eg=T({error:m(),error_description:m().optional()}).strip(),tg=T({token:m(),token_type_hint:m().optional()}).strip();var ig=Symbol.for("mcp.sdk.errorBrands");function lg(e,t){let n=new Set,o=t;for(;typeof o=="function";){let r=o.mcpBrand;Object.prototype.hasOwnProperty.call(o,"mcpBrand")&&typeof r=="string"&&n.add(r),o=Object.getPrototypeOf(o)}n.size!==0&&Object.defineProperty(e,ig,{value:n,enumerable:!1,configurable:!0})}function Qn(e,t){try{if(typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand=="string"&&Object.prototype.hasOwnProperty.call(t,ig)){let n=t[ig];if(n&&typeof n.has=="function"&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var HR=class nS extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](t){return Qn(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Qn(this,t)}constructor(t,n,o){super(n),this.code=t,this.errorUri=o,this.name="OAuthError",lg(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}static fromResponse(t){return new nS(t.error,t.error_description??t.error,t.error_uri)}},ze=(function(e){return e.NotConnected="NOT_CONNECTED",e.AlreadyConnected="ALREADY_CONNECTED",e.NotInitialized="NOT_INITIALIZED",e.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",e.RequestTimeout="REQUEST_TIMEOUT",e.ConnectionClosed="CONNECTION_CLOSED",e.SendFailed="SEND_FAILED",e.InvalidResult="INVALID_RESULT",e.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",e.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",e.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",e.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",e.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",e.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",e.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",e.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",e.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",e.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",e.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",e})({}),ve=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return Qn(this,e)}static isInstance(e){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Qn(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name="SdkError",lg(this,new.target)}},JR=class extends ve{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,n){super(e,t,n),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function J_(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function GR(e,t,n){return e==="elicitation"&&t==="form"&&n.form===void 0&&n.url===void 0}function oS(e){switch(e.method){case"elicitation/create":return e.params?.mode==="url"?{elicitation:{url:{}}}:{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;return t!==void 0&&(t.tools!==void 0||t.toolChoice!==void 0)?{sampling:{tools:{}}}:{sampling:{}}}case"roots/list":return{roots:{}};default:return}}function eu(e,t){let n={};for(let[o,r]of Object.entries(e)){if(r===void 0)continue;let i=t===void 0?void 0:t[o];if(i===void 0){n[o]=r;continue}if(J_(r)&&J_(i)){let a={};for(let[s,c]of Object.entries(r))c!==void 0&&i[s]===void 0&&!GR(o,s,i)&&(a[s]=c);Object.keys(a).length>0&&(n[o]=a)}}return Object.keys(n).length>0?n:void 0}var iS="2026-07-28",Sr=[iS];function to(e){return e>=iS}function aS(e){return e.filter(t=>!to(t))}function ug(e){return e.filter(t=>to(t))}function sS(e){let t=e.structuredContent;return t===void 0||!(typeof t!="object"||t===null||Array.isArray(t))||(e.content?.some(n=>n.type==="text")??!1)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var cS=["task","inputRequests","requestState"];function dg(e){return e===null||typeof e!="object"||Array.isArray(e)||e.content!==void 0||cS.some(t=>t in e)?e:{...e,content:[]}}function BR(){let e=lr(()=>oe([m(),F(),te(),At(),Q(m(),e),O(e)])),t=Q(m(),e),n=oe([m(),F().int()]),o=m(),r=T({ttl:F().optional()}),i=T({taskId:m()}),a=ce({progressToken:n.optional(),"io.modelcontextprotocol/related-task":i.optional()}),s=T({_meta:a.optional()}),c=s.extend({task:r.optional()}),l=T({method:m(),params:s.loose().optional()}),d=T({_meta:a.optional()}),p=T({method:m(),params:d.loose().optional()}),h=ce({_meta:a.optional()}),S=oe([m(),F().int()]),v=h.strict(),$=d.extend({requestId:S.optional(),reason:m().optional()}),y=p.extend({method:A("notifications/cancelled"),params:$}),f=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:he(["light","dark"]).optional()}),w=T({icons:O(f).optional()}),g=T({name:m(),title:m().optional()}),b=g.extend({...g.shape,...w.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),k=It(T({applyDefaults:te().optional()}),t),z=Vt(et=>et&&typeof et=="object"&&!Array.isArray(et)&&Object.keys(et).length===0?{form:{}}:et,It(T({form:k.optional(),url:t.optional()}),t.optional())),_=ce({list:t.optional(),cancel:t.optional(),requests:ce({sampling:ce({createMessage:t.optional()}).optional(),elicitation:ce({create:t.optional()}).optional()}).optional()}),R=ce({list:t.optional(),cancel:t.optional(),requests:ce({tools:ce({call:t.optional()}).optional()}).optional()}),j=T({experimental:Q(m(),t).optional(),sampling:T({context:t.optional(),tools:t.optional()}).optional(),elicitation:z.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:_.optional(),extensions:Q(m(),t).optional()}),U=s.extend({protocolVersion:m(),capabilities:j,clientInfo:b}),C=l.extend({method:A("initialize"),params:U}),V=T({experimental:Q(m(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:R.optional(),extensions:Q(m(),t).optional()}),ee=h.extend({protocolVersion:m(),capabilities:V,serverInfo:b,instructions:m().optional()}),ne=p.extend({method:A("notifications/initialized"),params:d.optional()}),$e=l.extend({method:A("ping"),params:s.optional()}),Ae=T({progress:F(),total:ae(F()),message:ae(m())}),Ne=T({...d.shape,...Ae.shape,progressToken:n}),Fe=p.extend({method:A("notifications/progress"),params:Ne}),Ie=s.extend({cursor:o.optional()}),x=l.extend({params:Ie.optional()}),M=h.extend({nextCursor:o.optional()}),H=T({uri:m(),mimeType:ae(m()),_meta:Q(m(),ie()).optional()}),I=H.extend({text:m()}),E=m().refine(et=>{try{return atob(et),!0}catch{return!1}},{message:"Invalid Base64 string"}),q=H.extend({blob:E}),Y=he(["user","assistant"]),se=T({audience:O(Y).optional(),priority:F().min(0).max(1).optional(),lastModified:gt.datetime({offset:!0}).optional()}),Se=T({...g.shape,...w.shape,uri:m(),description:ae(m()),mimeType:ae(m()),size:ae(F()),annotations:se.optional(),_meta:ae(ce({}))}),fe=T({...g.shape,...w.shape,uriTemplate:m(),description:ae(m()),mimeType:ae(m()),annotations:se.optional(),_meta:ae(ce({}))}),Oe=x.extend({method:A("resources/list")}),ot=M.extend({resources:O(Se)}),P=x.extend({method:A("resources/templates/list")}),D=M.extend({resourceTemplates:O(fe)}),Z=s.extend({uri:m()}),me=Z,pe=l.extend({method:A("resources/read"),params:me}),ye=h.extend({contents:O(oe([I,q]))}),Ue=p.extend({method:A("notifications/resources/list_changed"),params:d.optional()}),Je=Z,Qe=l.extend({method:A("resources/subscribe"),params:Je}),He=Z,Ce=l.extend({method:A("resources/unsubscribe"),params:He}),vt=d.extend({uri:m()}),Ge=p.extend({method:A("notifications/resources/updated"),params:vt}),Ct=T({name:m(),description:ae(m()),required:ae(te())}),$t=T({...g.shape,...w.shape,description:ae(m()),arguments:ae(O(Ct)),_meta:ae(ce({}))}),qt=x.extend({method:A("prompts/list")}),Bt=M.extend({prompts:O($t)}),Kt=s.extend({name:m(),arguments:Q(m(),m()).optional()}),zr=l.extend({method:A("prompts/get"),params:Kt}),wr=T({type:A("text"),text:m(),annotations:se.optional(),_meta:Q(m(),ie()).optional()}),Rr=T({type:A("image"),data:E,mimeType:m(),annotations:se.optional(),_meta:Q(m(),ie()).optional()}),Ir=T({type:A("audio"),data:E,mimeType:m(),annotations:se.optional(),_meta:Q(m(),ie()).optional()}),so=T({type:A("tool_use"),name:m(),id:m(),input:Q(m(),ie()),_meta:Q(m(),ie()).optional()}),Wt=T({type:A("resource"),resource:oe([I,q]),annotations:se.optional(),_meta:Q(m(),ie()).optional()}),co=Se.extend({type:A("resource_link")}),yt=oe([wr,Rr,Ir,co,Wt]),Xr=T({role:Y,content:yt}),Qr=h.extend({description:m().optional(),messages:O(Xr)}),kr=p.extend({method:A("notifications/prompts/list_changed"),params:d.optional()}),lo=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),en=T({taskSupport:he(["required","optional","forbidden"]).optional()}),Tr=T({...g.shape,...w.shape,description:m().optional(),inputSchema:T({type:A("object"),properties:Q(m(),e).optional(),required:O(m()).optional()}).catchall(ie()),outputSchema:T({type:A("object"),properties:Q(m(),e).optional(),required:O(m()).optional()}).catchall(ie()).optional(),annotations:lo.optional(),execution:en.optional(),_meta:Q(m(),ie()).optional()}),tn=x.extend({method:A("tools/list")}),uo=M.extend({tools:O(Tr)}),We=h.extend({content:O(yt),structuredContent:Q(m(),ie()).optional(),isError:te().optional()}),mo=c.extend({name:m(),arguments:Q(m(),ie()).optional()}),aa=l.extend({method:A("tools/call"),params:mo}),po=p.extend({method:A("notifications/tools/list_changed"),params:d.optional()}),rn=he(["debug","info","notice","warning","error","critical","alert","emergency"]),fo=s.extend({level:rn}),ho=l.extend({method:A("logging/setLevel"),params:fo}),go=d.extend({level:rn,logger:m().optional(),data:ie()}),vo=p.extend({method:A("notifications/message"),params:go}),yo=T({name:m().optional()}),_o=T({hints:O(yo).optional(),costPriority:F().min(0).max(1).optional(),speedPriority:F().min(0).max(1).optional(),intelligencePriority:F().min(0).max(1).optional()}),sa=T({mode:he(["auto","required","none"]).optional()}),So=T({type:A("tool_result"),toolUseId:m().describe("The unique identifier for the corresponding tool call."),content:O(yt),structuredContent:T({}).loose().optional(),isError:te().optional(),_meta:Q(m(),ie()).optional()}),bo=cr("type",[wr,Rr,Ir]),Yt=cr("type",[wr,Rr,Ir,so,So]),$o=T({role:Y,content:oe([Yt,O(Yt)]),_meta:Q(m(),ie()).optional()}),zo=c.extend({messages:O($o),modelPreferences:_o.optional(),systemPrompt:m().optional(),includeContext:he(["none","thisServer","allServers"]).optional(),temperature:F().optional(),maxTokens:F().int(),stopSequences:O(m()).optional(),metadata:t.optional(),tools:O(Tr).optional(),toolChoice:sa.optional()}),wo=l.extend({method:A("sampling/createMessage"),params:zo}),Ro=h.extend({model:m(),stopReason:ae(he(["endTurn","stopSequence","maxTokens"]).or(m())),role:Y,content:bo}),Io=h.extend({model:m(),stopReason:ae(he(["endTurn","stopSequence","maxTokens","toolUse"]).or(m())),role:Y,content:oe([Yt,O(Yt)])}),ko=T({type:A("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),To=T({type:A("string"),title:m().optional(),description:m().optional(),minLength:F().optional(),maxLength:F().optional(),format:he(["email","uri","date","date-time"]).optional(),default:m().optional()}),Po=T({type:he(["number","integer"]),title:m().optional(),description:m().optional(),minimum:F().optional(),maximum:F().optional(),default:F().optional()}),Eo=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),xo=T({type:A("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),jo=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),Pr=oe([Eo,xo]),Er=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({type:A("string"),enum:O(m())}),default:O(m()).optional()}),ca=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),la=oe([Er,ca]),mt=oe([jo,Pr,la]),pt=oe([mt,ko,To,Po]),No=c.extend({mode:A("form").optional(),message:m(),requestedSchema:T({type:A("object"),properties:Q(m(),pt),required:O(m()).optional()}).catchall(ie())}),zt=c.extend({mode:A("url"),message:m(),elicitationId:m(),url:m().url()}),ua=oe([No,zt]),da=l.extend({method:A("elicitation/create"),params:ua}),ma=d.extend({elicitationId:m()}),pa=p.extend({method:A("notifications/elicitation/complete"),params:ma}),fa=h.extend({action:he(["accept","decline","cancel"]),content:Vt(et=>et===null?void 0:et,Q(m(),oe([m(),F(),te(),O(m())])).optional())}),ha=T({type:A("ref/resource"),uri:m()}),ga=T({type:A("ref/prompt"),name:m()}),Oo=s.extend({ref:oe([ga,ha]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()}),va=l.extend({method:A("completion/complete"),params:Oo}),ya=h.extend({completion:ce({values:O(m()).max(100),total:ae(F().int()),hasMore:ae(te())})}),nn=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),ie()).optional()}),Ao=l.extend({method:A("roots/list"),params:s.optional()}),_a=h.extend({roots:O(nn)}),Co=p.extend({method:A("notifications/roots/list_changed"),params:d.optional()}),Tu=ce({ttl:F().optional(),pollInterval:F().optional()}),Sa=he(["working","input_required","completed","failed","cancelled"]),Ye=T({taskId:m(),status:Sa,ttl:oe([F(),At()]),createdAt:m(),lastUpdatedAt:m(),pollInterval:ae(F()),statusMessage:ae(m())}),qo=h.extend({task:Ye}),on=d.merge(Ye),an=p.extend({method:A("notifications/tasks/status"),params:on}),sn=l.extend({method:A("tasks/get"),params:s.extend({taskId:m()})}),cn=h.merge(Ye),Lo=l.extend({method:A("tasks/result"),params:s.extend({taskId:m()})}),_t=h.loose(),Ve=x.extend({method:A("tasks/list")}),xr=M.extend({tasks:O(Ye)}),Pu=l.extend({method:A("tasks/cancel"),params:s.extend({taskId:m()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,TaskMetadataSchema:r,RelatedTaskMetadataSchema:i,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:d,NotificationSchema:p,ResultSchema:h,RequestIdSchema:S,EmptyResultSchema:v,CancelledNotificationParamsSchema:$,CancelledNotificationSchema:y,IconSchema:f,IconsSchema:w,BaseMetadataSchema:g,ImplementationSchema:b,ClientTasksCapabilitySchema:_,ServerTasksCapabilitySchema:R,ClientCapabilitiesSchema:j,InitializeRequestParamsSchema:U,InitializeRequestSchema:C,ServerCapabilitiesSchema:V,InitializeResultSchema:ee,InitializedNotificationSchema:ne,PingRequestSchema:$e,ProgressSchema:Ae,ProgressNotificationParamsSchema:Ne,ProgressNotificationSchema:Fe,PaginatedRequestParamsSchema:Ie,PaginatedRequestSchema:x,PaginatedResultSchema:M,ResourceContentsSchema:H,TextResourceContentsSchema:I,BlobResourceContentsSchema:q,RoleSchema:Y,AnnotationsSchema:se,ResourceSchema:Se,ResourceTemplateSchema:fe,ListResourcesRequestSchema:Oe,ListResourcesResultSchema:ot,ListResourceTemplatesRequestSchema:P,ListResourceTemplatesResultSchema:D,ResourceRequestParamsSchema:Z,ReadResourceRequestParamsSchema:me,ReadResourceRequestSchema:pe,ReadResourceResultSchema:ye,ResourceListChangedNotificationSchema:Ue,SubscribeRequestParamsSchema:Je,SubscribeRequestSchema:Qe,UnsubscribeRequestParamsSchema:He,UnsubscribeRequestSchema:Ce,ResourceUpdatedNotificationParamsSchema:vt,ResourceUpdatedNotificationSchema:Ge,PromptArgumentSchema:Ct,PromptSchema:$t,ListPromptsRequestSchema:qt,ListPromptsResultSchema:Bt,GetPromptRequestParamsSchema:Kt,GetPromptRequestSchema:zr,TextContentSchema:wr,ImageContentSchema:Rr,AudioContentSchema:Ir,ToolUseContentSchema:so,EmbeddedResourceSchema:Wt,ResourceLinkSchema:co,ContentBlockSchema:yt,PromptMessageSchema:Xr,GetPromptResultSchema:Qr,PromptListChangedNotificationSchema:kr,ToolAnnotationsSchema:lo,ToolExecutionSchema:en,ToolSchema:Tr,ListToolsRequestSchema:tn,ListToolsResultSchema:uo,CallToolResultSchema:We,CallToolRequestParamsSchema:mo,CallToolRequestSchema:aa,ToolListChangedNotificationSchema:po,LoggingLevelSchema:rn,SetLevelRequestParamsSchema:fo,SetLevelRequestSchema:ho,LoggingMessageNotificationParamsSchema:go,LoggingMessageNotificationSchema:vo,ModelHintSchema:yo,ModelPreferencesSchema:_o,ToolChoiceSchema:sa,ToolResultContentSchema:So,SamplingContentSchema:bo,SamplingMessageContentBlockSchema:Yt,SamplingMessageSchema:$o,CreateMessageRequestParamsSchema:zo,CreateMessageRequestSchema:wo,CreateMessageResultSchema:Ro,CreateMessageResultWithToolsSchema:Io,BooleanSchemaSchema:ko,StringSchemaSchema:To,NumberSchemaSchema:Po,UntitledSingleSelectEnumSchemaSchema:Eo,TitledSingleSelectEnumSchemaSchema:xo,LegacyTitledEnumSchemaSchema:jo,SingleSelectEnumSchemaSchema:Pr,UntitledMultiSelectEnumSchemaSchema:Er,TitledMultiSelectEnumSchemaSchema:ca,MultiSelectEnumSchemaSchema:la,EnumSchemaSchema:mt,PrimitiveSchemaDefinitionSchema:pt,ElicitRequestFormParamsSchema:No,ElicitRequestURLParamsSchema:zt,ElicitRequestParamsSchema:ua,ElicitRequestSchema:da,ElicitationCompleteNotificationParamsSchema:ma,ElicitationCompleteNotificationSchema:pa,ElicitResultSchema:fa,ResourceTemplateReferenceSchema:ha,PromptReferenceSchema:ga,CompleteRequestParamsSchema:Oo,CompleteRequestSchema:va,CompleteResultSchema:ya,RootSchema:nn,ListRootsRequestSchema:Ao,ListRootsResultSchema:_a,RootsListChangedNotificationSchema:Co,TaskCreationParamsSchema:Tu,TaskStatusSchema:Sa,TaskSchema:Ye,CreateTaskResultSchema:qo,TaskStatusNotificationParamsSchema:on,TaskStatusNotificationSchema:an,GetTaskRequestSchema:sn,GetTaskResultSchema:cn,GetTaskPayloadRequestSchema:Lo,GetTaskPayloadResultSchema:_t,ListTasksRequestSchema:Ve,ListTasksResultSchema:xr,CancelTaskRequestSchema:Pu,CancelTaskResultSchema:h.merge(Ye),ClientRequestSchema:oe([$e,C,va,ho,zr,qt,Oe,P,pe,Qe,Ce,aa,tn,sn,Lo,Ve,Pu]),ClientNotificationSchema:oe([y,Fe,ne,Co,an]),ClientResultSchema:oe([v,Ro,Io,fa,_a,cn,xr,qo]),ServerRequestSchema:oe([$e,wo,da,Ao,sn,Lo,Ve,Pu]),ServerNotificationSchema:oe([y,Fe,vo,Ge,Ue,po,kr,an,pa]),ServerResultSchema:oe([v,ee,ya,Qr,Bt,ot,D,ye,We,uo,cn,xr,qo]),CallToolResultWireSchema:ie().superRefine((et,J$)=>{if(!(typeof et!="object"||et===null||Array.isArray(et)||et.content!==void 0)){for(let Hg of cS)if(Hg in et){J$.addIssue({code:"custom",message:`content is required when the body carries '${Hg}' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(dg).pipe(We)}}var KR;function lS(){return KR??=BR()}function uS(e){return e.type!=="object"}var WR=new Set(["const","enum","default","examples"]),YR=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas"]);function XR(e){let t=typeof e.$schema=="string"?e.$schema:void 0;if(e.$id!==void 0)return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let n=(o,r)=>{if(Array.isArray(o))return o.map(a=>n(a,!1));if(o===null||typeof o!="object"||!r&&o.$id!==void 0)return o;let i={};for(let[a,s]of Object.entries(o))r?i[a]=n(s,!1):(a==="$ref"||a==="$dynamicRef")&&typeof s=="string"?i[a]=s==="#"?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:WR.has(a)?i[a]=s:YR.has(a)?i[a]=n(s,!0):i[a]=n(s,!1);return i};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:n(e,!1)},required:["result"]}}var dS={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},mS={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},QR={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Gl;function mg(){if(Gl)return Gl;let e=lS();return Gl={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Gl}function pS(e){return Object.prototype.hasOwnProperty.call(dS,e)}function fS(e){return Object.prototype.hasOwnProperty.call(mS,e)}function eI(e){return Object.prototype.hasOwnProperty.call(QR,e)}function tI(e){return eI(e)?mg().resultSchemas[e]:void 0}function rI(e){return pS(e)?mg().requestSchemas[e]:void 0}function nI(e){return fS(e)?mg().notificationSchemas[e]:void 0}var dj=Object.keys(dS),mj=Object.keys(mS);function ag(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Bl(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var G_={ok:!1,reason:"not-in-era"};function B_(e){return ag(e)&&ag(e.outputSchema)&&uS(e.outputSchema)}var pg={era:"2025-11-25",hasRequestMethod:pS,hasNotificationMethod:fS,validateRequest:(e,t)=>Bl(rI(e),t),validateResult:(e,t)=>Bl(tI(e),t),validateNotification:(e,t)=>Bl(nI(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>G_,validateInputResponse:()=>G_,samplingResultVariant:((e,t)=>{let n=lS();return Bl(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>{},validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=sS(e),o=n.structuredContent;if(o===void 0)return n;let r=typeof o!="object"||o===null||Array.isArray(o),i=t!==void 0&&uS(t);return!r&&!i?n:{...n,structuredContent:{result:o}}},decodeResult(e,t){if(ag(t)&&"resultType"in t){let n={...t};return delete n.resultType,{kind:"complete",result:n}}return{kind:"complete",result:t}},encodeResult(e,t){if(e!=="tools/list")return t;let n=t.tools;return!Array.isArray(n)||!n.some(o=>B_(o))?t:{...t,tools:n.map(o=>B_(o)?{...o,outputSchema:XR(o.outputSchema)}:o)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>{}};function oI(){let e=lr(()=>oe([m(),F(),te(),At(),Q(m(),e),O(e)])),t=Q(m(),e),n=oe([m(),F().int()]),o=m(),r=oe([m(),F().int()]),i=he(["user","assistant"]),a=he(["debug","info","notice","warning","error","critical","alert","emergency"]),s=m().refine(Ve=>{try{return atob(Ve),!0}catch{return!1}},{message:"Invalid Base64 string"}),c=T({ttl:F().optional()}),l=T({taskId:m()}),d=ce({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),p=T({_meta:d.optional()}),h=p.extend({task:c.optional()}),S=T({_meta:d.optional()}),v=T({method:m(),params:S.loose().optional()}),$=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:he(["light","dark"]).optional()}),y=T({icons:O($).optional()}),f=T({name:m(),title:m().optional()}),w=f.extend({...f.shape,...y.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),g=It(T({applyDefaults:te().optional()}),t),b=Vt(Ve=>Ve&&typeof Ve=="object"&&!Array.isArray(Ve)&&Object.keys(Ve).length===0?{form:{}}:Ve,It(T({form:g.optional(),url:t.optional()}),t.optional())),k=ce({list:t.optional(),cancel:t.optional(),requests:ce({sampling:ce({createMessage:t.optional()}).optional(),elicitation:ce({create:t.optional()}).optional()}).optional()}),z=ce({list:t.optional(),cancel:t.optional(),requests:ce({tools:ce({call:t.optional()}).optional()}).optional()}),_=T({experimental:Q(m(),t).optional(),sampling:T({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:k.optional(),extensions:Q(m(),t).optional()}),R=T({experimental:Q(m(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:z.optional(),extensions:Q(m(),t).optional()}),j=T({progress:F(),total:ae(F()),message:ae(m())}),U=T({...S.shape,...j.shape,progressToken:n}),C=v.extend({method:A("notifications/progress"),params:U}),V=S.extend({level:a,logger:m().optional(),data:ie()}),ee=v.extend({method:A("notifications/message"),params:V}),ne=T({uri:m(),mimeType:ae(m()),_meta:Q(m(),ie()).optional()}),$e=ne.extend({text:m()}),Ae=ne.extend({blob:s}),Ne=T({audience:O(i).optional(),priority:F().min(0).max(1).optional(),lastModified:gt.datetime({offset:!0}).optional()}),Fe=T({...f.shape,...y.shape,uri:m(),description:ae(m()),mimeType:ae(m()),size:ae(F()),annotations:Ne.optional(),_meta:ae(ce({}))}),Ie=T({...f.shape,...y.shape,uriTemplate:m(),description:ae(m()),mimeType:ae(m()),annotations:Ne.optional(),_meta:ae(ce({}))}),x=v.extend({method:A("notifications/resources/list_changed"),params:S.optional()}),M=S.extend({uri:m()}),H=v.extend({method:A("notifications/resources/updated"),params:M}),I=T({name:m(),description:ae(m()),required:ae(te())}),E=T({...f.shape,...y.shape,description:ae(m()),arguments:ae(O(I)),_meta:ae(ce({}))}),q=v.extend({method:A("notifications/prompts/list_changed"),params:S.optional()}),Y=T({type:A("text"),text:m(),annotations:Ne.optional(),_meta:Q(m(),ie()).optional()}),se=T({type:A("image"),data:s,mimeType:m(),annotations:Ne.optional(),_meta:Q(m(),ie()).optional()}),Se=T({type:A("audio"),data:s,mimeType:m(),annotations:Ne.optional(),_meta:Q(m(),ie()).optional()}),fe=T({type:A("tool_use"),name:m(),id:m(),input:Q(m(),ie()),_meta:Q(m(),ie()).optional()}),Oe=T({type:A("resource"),resource:oe([$e,Ae]),annotations:Ne.optional(),_meta:Q(m(),ie()).optional()}),ot=Fe.extend({type:A("resource_link")}),P=oe([Y,se,Se,ot,Oe]),D=T({role:i,content:P}),Z=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),me=v.extend({method:A("notifications/tools/list_changed"),params:S.optional()}),pe=T({name:m().optional()}),ye=T({hints:O(pe).optional(),costPriority:F().min(0).max(1).optional(),speedPriority:F().min(0).max(1).optional(),intelligencePriority:F().min(0).max(1).optional()}),Ue=T({mode:he(["auto","required","none"]).optional()}),Je=T({type:A("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),Qe=T({type:A("string"),title:m().optional(),description:m().optional(),minLength:F().optional(),maxLength:F().optional(),format:he(["email","uri","date","date-time"]).optional(),default:m().optional()}),He=T({type:he(["number","integer"]),title:m().optional(),description:m().optional(),minimum:F().optional(),maximum:F().optional(),default:F().optional()}),Ce=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),vt=T({type:A("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),Ge=T({type:A("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),Ct=oe([Ce,vt]),$t=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({type:A("string"),enum:O(m())}),default:O(m()).optional()}),qt=T({type:A("array"),title:m().optional(),description:m().optional(),minItems:F().optional(),maxItems:F().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),Bt=oe([$t,qt]),Kt=oe([Ge,Ct,Bt]),zr=oe([Kt,Je,Qe,He]),wr=h.extend({mode:A("form").optional(),message:m(),requestedSchema:T({type:A("object"),properties:Q(m(),zr),required:O(m()).optional()}).catchall(ie())}),Rr=T({type:A("ref/resource"),uri:m()}),Ir=T({type:A("ref/prompt"),name:m()}),so=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),ie()).optional()}),Wt=_.shape,co=T({experimental:Wt.experimental,sampling:Wt.sampling,elicitation:Wt.elicitation,roots:Wt.roots,extensions:Wt.extensions}),yt=R.shape,Xr=T({experimental:yt.experimental,logging:yt.logging,completions:yt.completions,prompts:yt.prompts,resources:yt.resources,tools:yt.tools,extensions:yt.extensions}),Qr=ce({progressToken:n.optional(),[Ft]:m(),[Zr]:w,[Ht]:co,[dr]:a.optional()}),kr=T({...f.shape,...y.shape,description:m().optional(),inputSchema:ce({$schema:m().optional(),type:A("object")}),outputSchema:ce({$schema:m().optional()}).optional(),annotations:Z.optional(),_meta:Q(m(),ie()).optional()}),lo=T({type:A("tool_result"),toolUseId:m(),content:O(P),structuredContent:ie().optional(),isError:te().optional(),_meta:Q(m(),ie()).optional()}),en=oe([Y,se,Se,fe,lo]),Tr=T({role:i,content:oe([en,O(en)]),_meta:Q(m(),ie()).optional()}),tn=m(),uo=Q(m(),ie()).optional();function We(Ve){return ce({_meta:uo,resultType:tn.default("complete"),...Ve})}let mo=We({}),aa=We({nextCursor:o.optional()}),po=We({content:O(P),structuredContent:ie().optional(),isError:te().optional()}),rn=We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),tools:O(kr),nextCursor:o.optional()}),fo=We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),prompts:O(E),nextCursor:o.optional()}),ho=We({description:m().optional(),messages:O(D)}),go=We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),resources:O(Fe),nextCursor:o.optional()}),vo=We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),resourceTemplates:O(Ie),nextCursor:o.optional()}),yo=We({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),contents:O(oe([$e,Ae]))}),_o=We({completion:T({values:O(m()).max(100),total:F().int().optional(),hasMore:te().optional()}).loose()}),sa=We({ttlMs:F().int().min(0),cacheScope:he(["public","private"])}),So=We({ttlMs:F().int().min(0).catch(0),cacheScope:he(["public","private"]).catch("private"),supportedVersions:O(m()),capabilities:Xr,serverInfo:w,instructions:m().optional()}),bo=T({messages:O(Tr),modelPreferences:ye.optional(),systemPrompt:m().optional(),includeContext:he(["none","thisServer","allServers"]).optional(),temperature:F().optional(),maxTokens:F().int(),stopSequences:O(m()).optional(),metadata:t.optional(),tools:O(kr).optional(),toolChoice:Ue.optional()}),Yt=T({method:A("sampling/createMessage"),params:bo}),$o=T({method:A("roots/list"),params:T({_meta:Q(m(),ie()).optional()}).optional()}),zo=T({...Tr.shape,model:m(),stopReason:m().optional()}),wo=T({roots:O(so)}),Ro=T({action:he(["accept","decline","cancel"]),content:Q(m(),oe([m(),F(),te(),O(m())])).optional()}),Io=T({mode:A("url"),message:m(),url:m().url()}),ko=oe([wr,Io]),To=T({method:A("elicitation/create"),params:ko}),Po=oe([Yt,$o,To]),Eo=oe([zo,wo,Ro]),xo=Q(m(),Po),jo=Q(m(),Eo),Pr=We({inputRequests:xo.optional(),requestState:m().optional()}),Er={inputResponses:jo.optional(),requestState:m().optional()},ca=T({_meta:Qr,...Er}),la=ce({progressToken:n.optional()});function mt(Ve,xr){return T({method:A(Ve),params:T({_meta:Qr,...xr})})}function pt(Ve,xr){return T({method:A(Ve),params:T({_meta:la.optional(),...xr}).optional()})}let No={name:m(),arguments:Q(m(),ie()).optional(),...Er},zt={cursor:o.optional()},ua=mt("tools/call",No),da=mt("tools/list",zt),ma=mt("prompts/list",zt),pa=mt("prompts/get",{name:m(),arguments:Q(m(),m()).optional(),...Er}),fa=mt("resources/list",zt),ha=mt("resources/templates/list",zt),ga=mt("resources/read",{uri:m(),...Er}),Oo={ref:oe([Ir,Rr]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()},va=mt("completion/complete",Oo),ya=mt("server/discover",{}),nn=T({toolsListChanged:te().optional(),promptsListChanged:te().optional(),resourcesListChanged:te().optional(),resourceSubscriptions:O(m()).optional()}),Ao={notifications:nn},_a=mt("subscriptions/listen",Ao),Co=ce({"io.modelcontextprotocol/subscriptionId":r}),Tu=ce({_meta:Co,resultType:tn.default("complete")}),Sa={"tools/call":pt("tools/call",No),"tools/list":pt("tools/list",zt),"prompts/get":pt("prompts/get",{name:m(),arguments:Q(m(),m()).optional()}),"prompts/list":pt("prompts/list",zt),"resources/list":pt("resources/list",zt),"resources/templates/list":pt("resources/templates/list",zt),"resources/read":pt("resources/read",{uri:m()}),"completion/complete":pt("completion/complete",Oo),"server/discover":pt("server/discover",{}),"subscriptions/listen":pt("subscriptions/listen",Ao)};function Ye(Ve){return ce({_meta:uo,...Ve})}let qo={"tools/call":Ye({content:O(P),structuredContent:ie().optional(),isError:te().optional()}),"tools/list":Ye({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),tools:O(kr),nextCursor:o.optional()}),"prompts/get":Ye({description:m().optional(),messages:O(D)}),"prompts/list":Ye({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),prompts:O(E),nextCursor:o.optional()}),"resources/list":Ye({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),resources:O(Fe),nextCursor:o.optional()}),"resources/templates/list":Ye({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),resourceTemplates:O(Ie),nextCursor:o.optional()}),"resources/read":Ye({ttlMs:F().int().min(0),cacheScope:he(["public","private"]),contents:O(oe([$e,Ae]))}),"completion/complete":Ye({completion:T({values:O(m()).max(100),total:F().int().optional(),hasMore:te().optional()}).loose()}),"server/discover":Ye({ttlMs:F().int().min(0).catch(0),cacheScope:he(["public","private"]).catch("private"),supportedVersions:O(m()),capabilities:Xr,serverInfo:w,instructions:m().optional()}),"subscriptions/listen":Ye({})},on=ce({"io.modelcontextprotocol/subscriptionId":r.optional()}),an=T({method:A("notifications/subscriptions/acknowledged"),params:T({_meta:on.optional(),notifications:nn})}),sn=T({_meta:on.optional(),requestId:r,reason:m().optional()}),cn=T({method:A("notifications/cancelled"),params:sn}),Lo={"notifications/cancelled":cn,"notifications/progress":C,"notifications/message":ee,"notifications/resources/updated":H,"notifications/resources/list_changed":x,"notifications/tools/list_changed":me,"notifications/prompts/list_changed":q,"notifications/subscriptions/acknowledged":an},_t=Ve=>T({jsonrpc:A("2.0"),id:oe([m(),F().int()]),result:Ve}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,RequestIdSchema:r,RoleSchema:i,LoggingLevelSchema:a,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:d,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:h,NotificationsParamsSchema:S,NotificationSchema:v,IconSchema:$,IconsSchema:y,BaseMetadataSchema:f,ImplementationSchema:w,ClientTasksCapabilitySchema:k,ServerTasksCapabilitySchema:z,ClientCapabilitiesSchema:_,ServerCapabilitiesSchema:R,ProgressSchema:j,ProgressNotificationParamsSchema:U,ProgressNotificationSchema:C,LoggingMessageNotificationParamsSchema:V,LoggingMessageNotificationSchema:ee,ResourceContentsSchema:ne,TextResourceContentsSchema:$e,BlobResourceContentsSchema:Ae,AnnotationsSchema:Ne,ResourceSchema:Fe,ResourceTemplateSchema:Ie,ResourceListChangedNotificationSchema:x,ResourceUpdatedNotificationParamsSchema:M,ResourceUpdatedNotificationSchema:H,PromptArgumentSchema:I,PromptSchema:E,PromptListChangedNotificationSchema:q,TextContentSchema:Y,ImageContentSchema:se,AudioContentSchema:Se,ToolUseContentSchema:fe,EmbeddedResourceSchema:Oe,ResourceLinkSchema:ot,ContentBlockSchema:P,PromptMessageSchema:D,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:me,ModelHintSchema:pe,ModelPreferencesSchema:ye,ToolChoiceSchema:Ue,BooleanSchemaSchema:Je,StringSchemaSchema:Qe,NumberSchemaSchema:He,UntitledSingleSelectEnumSchemaSchema:Ce,TitledSingleSelectEnumSchemaSchema:vt,LegacyTitledEnumSchemaSchema:Ge,SingleSelectEnumSchemaSchema:Ct,UntitledMultiSelectEnumSchemaSchema:$t,TitledMultiSelectEnumSchemaSchema:qt,MultiSelectEnumSchemaSchema:Bt,EnumSchemaSchema:Kt,PrimitiveSchemaDefinitionSchema:zr,ElicitRequestFormParamsSchema:wr,ResourceTemplateReferenceSchema:Rr,PromptReferenceSchema:Ir,RootSchema:so,ClientCapabilities2026Schema:co,ServerCapabilities2026Schema:Xr,RequestMetaEnvelopeSchema:Qr,ToolSchema:kr,ToolResultContentSchema:lo,SamplingMessageContentBlockSchema:en,SamplingMessageSchema:Tr,ResultTypeSchema:tn,ResultSchema:mo,PaginatedResultSchema:aa,CallToolResultSchema:po,ListToolsResultSchema:rn,ListPromptsResultSchema:fo,GetPromptResultSchema:ho,ListResourcesResultSchema:go,ListResourceTemplatesResultSchema:vo,ReadResourceResultSchema:yo,CompleteResultSchema:_o,CacheableResultSchema:sa,DiscoverResultSchema:So,CreateMessageRequestParamsSchema:bo,CreateMessageRequestSchema:Yt,ListRootsRequestSchema:$o,CreateMessageResultSchema:zo,ListRootsResultSchema:wo,ElicitResultSchema:Ro,ElicitRequestURLParamsSchema:Io,ElicitRequestParamsSchema:ko,ElicitRequestSchema:To,InputRequestSchema:Po,InputResponseSchema:Eo,InputRequestsSchema:xo,InputResponsesSchema:jo,InputRequiredResultSchema:Pr,InputResponseRequestParamsSchema:ca,CallToolRequestSchema:ua,ListToolsRequestSchema:da,ListPromptsRequestSchema:ma,GetPromptRequestSchema:pa,ListResourcesRequestSchema:fa,ListResourceTemplatesRequestSchema:ha,ReadResourceRequestSchema:ga,CompleteRequestSchema:va,DiscoverRequestSchema:ya,SubscriptionFilterSchema:nn,SubscriptionsListenRequestSchema:_a,SubscriptionsListenResultMetaSchema:Co,SubscriptionsListenResultSchema:Tu,dispatchRequestSchemas:Sa,dispatchResultSchemas:qo,NotificationMetaSchema:on,SubscriptionsAcknowledgedNotificationSchema:an,CancelledNotificationParamsSchema:sn,CancelledNotificationSchema:cn,notificationSchemas2026:Lo,JSONRPCResultResponseSchema:_t(mo),CallToolResultResponseSchema:_t(oe([po,Pr])),ListToolsResultResponseSchema:_t(rn),ListPromptsResultResponseSchema:_t(fo),GetPromptResultResponseSchema:_t(oe([ho,Pr])),ListResourcesResultResponseSchema:_t(go),ListResourceTemplatesResultResponseSchema:_t(vo),ReadResourceResultResponseSchema:_t(oe([yo,Pr])),CompleteResultResponseSchema:_t(_o),DiscoverResultResponseSchema:_t(So)}}var iI;function Br(){return iI??=oI()}var aI=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function sI(e){return aI.includes(e)}var Xn=Symbol("modelcontextprotocol.resultCacheHintFallback");function tu(e,t){if(t===void 0)return e;let n=e[Xn];if(n===void 0)return{...e,[Xn]:t};let o={},r=n.ttlMs??t.ttlMs;r!==void 0&&(o.ttlMs=r);let i=n.cacheScope??t.cacheScope;return i!==void 0&&(o.cacheScope=i),{...e,[Xn]:o}}function cI(e){return e[Xn]}function fg(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function hg(e){return e==="public"||e==="private"}function gg(e,t){if(e.ttlMs!==void 0&&!fg(e.ttlMs))throw new RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(e.cacheScope!==void 0&&!hg(e.cacheScope))throw new RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}var X=(function(e){return 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.ResourceNotFound=-32002]="ResourceNotFound",e[e.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",e[e.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired",e})({}),le=class hS extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return Qn(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Qn(this,t)}constructor(t,n,o){super(n),this.code=t,this.data=o,this.name="ProtocolError",lg(this,new.target)}static fromError(t,n,o){if(t===X.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new gS(r.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&o){let r=o;if(Array.isArray(r.supported)&&typeof r.requested=="string")return new ro({supported:r.supported,requested:r.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let r=o;if(typeof r?.uri=="string"&&(t===X.ResourceNotFound||Object.keys(r).length===1))return new ru(r.uri,n)}if(t===X.MissingRequiredClientCapability&&o){let r=o;if(r.requiredCapabilities!==null&&typeof r.requiredCapabilities=="object"&&!Array.isArray(r.requiredCapabilities))return new nu({requiredCapabilities:r.requiredCapabilities},n)}return new hS(t,n,o)}},ru=class extends le{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(X.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},gS=class extends le{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},ro=class extends le{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(X.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},nu=class extends le{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(X.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},lI=0,uI="private",dI=["tools/call","prompts/get","resources/read"];function mI(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:"complete"};if(n==="complete"||dI.includes(e))return t;throw new le(X.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function pI(e,t){let n=cI(t);if(t.resultType!=="complete"||!sI(e))return n===void 0?t:gI(t);let o=t,r=fg(o.ttlMs)?o.ttlMs:fI(n),i=hg(o.cacheScope)?o.cacheScope:hI(n),a={...o,ttlMs:r,cacheScope:i};return delete a[Xn],a}function fI(e){return e!==void 0&&fg(e.ttlMs)?e.ttlMs:lI}function hI(e){return e!==void 0&&hg(e.cacheScope)?e.cacheScope:uI}function gI(e){let t={...e};return delete t[Xn],t}var vI=["elicitation/create","sampling/createMessage","roots/list"],Kl;function vS(){if(Kl)return Kl;let e=Br();return Kl={request:{"elicitation/create":T({method:A("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":T({method:A("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":T({method:A("roots/list"),params:ce({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Kl}function yS(e){return vI.includes(e)}function rg(e){return yS(e)?vS().request[e]:void 0}function yI(e){return yS(e)?vS().response[e]:void 0}var vg={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},_S={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function SS(e){return Object.prototype.hasOwnProperty.call(vg,e)}function bS(e){return Object.prototype.hasOwnProperty.call(_S,e)}function _I(e){return Object.prototype.hasOwnProperty.call(vg,e)}function SI(e){return SS(e)?Br().dispatchRequestSchemas[e]:void 0}function bI(e){return _I(e)?Br().dispatchResultSchemas[e]:void 0}function $I(e){return bS(e)?Br().notificationSchemas2026[e]:void 0}var pj=Object.keys(vg),fj=Object.keys(_S);function Fi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Vi(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var zI={ok:!1,reason:"not-in-era"},wI=[Ft,Zr,Ht];function RI(e,t){let n=t,o=!1,r=()=>(o||(n={...n},o=!0),n),i=t.tools;e==="tools/list"&&Array.isArray(i)&&i.some(s=>Fi(s)&&"execution"in s)&&(r().tools=i.map(s=>{if(!Fi(s)||!("execution"in s))return s;let c={...s};return delete c.execution,c}));let a=t.capabilities;if(Fi(a)&&"tasks"in a){let s={...a};delete s.tasks,r().capabilities=s}return n}var yg={era:"2026-07-28",hasRequestMethod:SS,hasNotificationMethod:bS,hasInputRequestMethod:e=>rg(e)!==void 0,validateRequest:(e,t)=>Vi(SI(e),t),validateResult:(e,t)=>Vi(bI(e),t),validateNotification:(e,t)=>Vi($I(e),t),validateInputRequest:(e,t)=>Vi(rg(e),t),validateInputResponse:(e,t)=>Vi(yI(e),t),samplingResultVariant:()=>zI,outboundEnvelope(e){return{[Ft]:e.protocolVersion,[Zr]:e.clientInfo,[Ht]:e.clientCapabilities,...e.logLevel!==void 0&&{[dr]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let o of wI)o in e||t.push({key:o,problem:"missing"});let n=Br().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let o of n.error.issues){let r=o.path.map(String),i=r.length>0?r.join("."):"_meta";r.length===1&&t.some(a=>a.key===i&&a.problem==="missing")||t.push({key:i,problem:o.message})}return t},projectCallToolResult:e=>sS(e),inputRequestSchema:rg,decodeResult(e,t){if(!Fi(t))return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if(typeof n!="string")return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n==="input_required"){let a=t.inputRequests,s=Fi(a)?a:{},c=t.requestState;return Object.keys(s).length===0&&typeof c!="string"?{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:s,...typeof c=="string"&&{requestState:c}}}if(n!=="complete")return{kind:"invalid",error:new ve(ze.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let o=II(),r=Object.hasOwn(o,e)?o[e]:void 0;if(r!==void 0){let a=r.safeParse(t);if(!a.success)return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: ${a.error}`,{method:e})}}let i={...t};return delete i.resultType,{kind:"complete",result:i}},encodeResult(e,t){return pI(e,mI(e,RI(e,t)))},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientInfo, io.modelcontextprotocol/clientCapabilities)";let t=Br().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(n=>n.message).join("; ")}`}},Wl;function II(){if(Wl)return Wl;let e=Br();return Wl={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Wl}var Bi="2026-07-28";function _r(e){return e!==void 0&&to(e)?yg:pg}function K_(e){return e.revision!==void 0?_r(e.revision).era:e.era==="modern"?yg.era:pg.era}function ng(e){return $S.some(t=>t.hasRequestMethod(e))}function og(e){return $S.some(t=>t.hasNotificationMethod(e))}var $S=[pg,yg];function W_(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Kr(e){if(!W_(e))return;let t=e._meta;return W_(t)?t:void 0}function ou(e){let t=Kr(e);return t!==void 0&&Ft in t}function iu(e){let t=Kr(e)?.[Ft];return typeof t=="string"?t:void 0}function au(e){return _r(Bi).validateEnvelopeMeta(e)}var kI=Jg({AnnotationsSchema:()=>Jt,AudioContentSchema:()=>Gn,BaseMetadataSchema:()=>Zt,BaseRequestParamsSchema:()=>Ke,BlobResourceContentsSchema:()=>Ei,BooleanSchemaSchema:()=>Ai,CallToolRequestParamsSchema:()=>al,CallToolRequestSchema:()=>sl,CallToolResultSchema:()=>Oi,CancelTaskRequestSchema:()=>Dh,CancelTaskResultSchema:()=>Uh,CancelledNotificationParamsSchema:()=>lc,CancelledNotificationSchema:()=>wi,ClientCapabilitiesSchema:()=>pc,ClientNotificationSchema:()=>Zh,ClientRequestSchema:()=>Vh,ClientResultSchema:()=>Fh,ClientTasksCapabilitySchema:()=>dc,CompatibilityCallToolResultSchema:()=>Ph,CompleteRequestParamsSchema:()=>Ol,CompleteRequestSchema:()=>Al,CompleteResultSchema:()=>Cl,ContentBlockSchema:()=>Bn,CreateMessageRequestParamsSchema:()=>_l,CreateMessageRequestSchema:()=>Sl,CreateMessageResultSchema:()=>bl,CreateMessageResultWithToolsSchema:()=>$l,CreateTaskResultSchema:()=>jh,CursorSchema:()=>_i,DiscoverRequestSchema:()=>yc,DiscoverResultSchema:()=>_c,ElicitRequestFormParamsSchema:()=>Yn,ElicitRequestParamsSchema:()=>kl,ElicitRequestSchema:()=>Tl,ElicitRequestURLParamsSchema:()=>Il,ElicitResultSchema:()=>xl,ElicitationCompleteNotificationParamsSchema:()=>Pl,ElicitationCompleteNotificationSchema:()=>El,EmbeddedResourceSchema:()=>Yc,EmptyResultSchema:()=>zi,EnumSchemaSchema:()=>Rl,GetPromptRequestParamsSchema:()=>Bc,GetPromptRequestSchema:()=>Kc,GetPromptResultSchema:()=>el,GetTaskPayloadRequestSchema:()=>Ch,GetTaskPayloadResultSchema:()=>qh,GetTaskRequestSchema:()=>Oh,GetTaskResultSchema:()=>Ah,IconSchema:()=>uc,IconsSchema:()=>pr,ImageContentSchema:()=>Jn,ImplementationSchema:()=>Zn,InitializeRequestParamsSchema:()=>fc,InitializeRequestSchema:()=>hc,InitializeResultSchema:()=>gc,InitializedNotificationSchema:()=>vc,JSONArraySchema:()=>Ih,JSONObjectSchema:()=>Le,JSONRPCErrorResponseSchema:()=>Vn,JSONRPCMessageSchema:()=>$i,JSONRPCNotificationSchema:()=>bi,JSONRPCRequestSchema:()=>Si,JSONRPCResponseSchema:()=>kh,JSONRPCResultResponseSchema:()=>Un,JSONValueSchema:()=>ur,LegacyTitledEnumSchemaSchema:()=>Li,ListChangedOptionsBaseSchema:()=>Eh,ListPromptsRequestSchema:()=>Jc,ListPromptsResultSchema:()=>Gc,ListResourceTemplatesRequestSchema:()=>Ic,ListResourceTemplatesResultSchema:()=>kc,ListResourcesRequestSchema:()=>wc,ListResourcesResultSchema:()=>Rc,ListRootsRequestSchema:()=>Ll,ListRootsResultSchema:()=>Ml,ListTasksRequestSchema:()=>Lh,ListTasksResultSchema:()=>Mh,ListToolsRequestSchema:()=>ol,ListToolsResultSchema:()=>il,LoggingLevelSchema:()=>vr,LoggingMessageNotificationParamsSchema:()=>dl,LoggingMessageNotificationSchema:()=>ml,ModelHintSchema:()=>pl,ModelPreferencesSchema:()=>fl,MultiSelectEnumSchemaSchema:()=>wl,NotificationSchema:()=>nt,NotificationsParamsSchema:()=>rt,NumberSchemaSchema:()=>Wn,PaginatedRequestParamsSchema:()=>$c,PaginatedRequestSchema:()=>fr,PaginatedResultSchema:()=>hr,PingRequestSchema:()=>Ii,PrimitiveSchemaDefinitionSchema:()=>Ui,ProgressNotificationParamsSchema:()=>bc,ProgressNotificationSchema:()=>ki,ProgressSchema:()=>Sc,ProgressTokenSchema:()=>yi,PromptArgumentSchema:()=>Fc,PromptListChangedNotificationSchema:()=>tl,PromptMessageSchema:()=>Qc,PromptReferenceSchema:()=>Nl,PromptSchema:()=>Hc,ReadResourceRequestParamsSchema:()=>Tc,ReadResourceRequestSchema:()=>Pc,ReadResourceResultSchema:()=>Ec,RelatedTaskMetadataSchema:()=>cc,RequestIdSchema:()=>mr,RequestMetaSchema:()=>Dn,RequestSchema:()=>Me,ResourceContentsSchema:()=>Ti,ResourceLinkSchema:()=>Xc,ResourceListChangedNotificationSchema:()=>xc,ResourceRequestParamsSchema:()=>Fn,ResourceSchema:()=>xi,ResourceTemplateReferenceSchema:()=>jl,ResourceTemplateSchema:()=>zc,ResourceUpdatedNotificationParamsSchema:()=>Vc,ResourceUpdatedNotificationSchema:()=>Zc,ResultSchema:()=>De,RoleSchema:()=>gr,RootSchema:()=>ql,RootsListChangedNotificationSchema:()=>Dl,SamplingContentSchema:()=>vl,SamplingMessageContentBlockSchema:()=>Ur,SamplingMessageSchema:()=>yl,ServerCapabilitiesSchema:()=>Ri,ServerNotificationSchema:()=>Jh,ServerRequestSchema:()=>Hh,ServerResultSchema:()=>Gh,ServerTasksCapabilitySchema:()=>mc,SetLevelRequestParamsSchema:()=>ll,SetLevelRequestSchema:()=>ul,SingleSelectEnumSchemaSchema:()=>zl,StringSchemaSchema:()=>Kn,SubscribeRequestParamsSchema:()=>jc,SubscribeRequestSchema:()=>Nc,SubscriptionFilterSchema:()=>ji,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Lc,SubscriptionsAcknowledgedNotificationSchema:()=>Mc,SubscriptionsListenRequestParamsSchema:()=>Cc,SubscriptionsListenRequestSchema:()=>qc,SubscriptionsListenResultMetaSchema:()=>Dc,SubscriptionsListenResultSchema:()=>Uc,TaskAugmentedRequestParamsSchema:()=>Jr,TaskCreationParamsSchema:()=>xh,TaskMetadataSchema:()=>sc,TaskSchema:()=>yr,TaskStatusNotificationParamsSchema:()=>Vl,TaskStatusNotificationSchema:()=>Nh,TaskStatusSchema:()=>Ul,TextContentSchema:()=>Hn,TextResourceContentsSchema:()=>Pi,TitledMultiSelectEnumSchemaSchema:()=>Di,TitledSingleSelectEnumSchemaSchema:()=>qi,ToolAnnotationsSchema:()=>rl,ToolChoiceSchema:()=>hl,ToolExecutionSchema:()=>nl,ToolListChangedNotificationSchema:()=>cl,ToolResultContentSchema:()=>gl,ToolSchema:()=>Ni,ToolUseContentSchema:()=>Wc,UnsubscribeRequestParamsSchema:()=>Oc,UnsubscribeRequestSchema:()=>Ac,UntitledMultiSelectEnumSchemaSchema:()=>Mi,UntitledSingleSelectEnumSchemaSchema:()=>Ci});var bt=e=>Si.safeParse(e).success,br=e=>bi.safeParse(e).success,Ji=e=>Un.safeParse(e).success,su=e=>Vn.safeParse(e).success;var Gt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";function _g(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Sg(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var Y_="x-mcp-header",TI=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,PI=new Set(["string","integer","boolean","number"]);function bg(e){let t=[],n=new Map,o=(i,a,s)=>{if(i===null||typeof i!="object")return;let c=i;if(Y_ in c){if(!s||a.length===0)return`${Yl(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let d=c[Y_];if(typeof d!="string"||d.length===0)return`${Yl(a)}: x-mcp-header MUST be a non-empty string`;if(!TI.test(d))return`${Yl(a)}: x-mcp-header '${d}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let p=typeof c.type=="string"?c.type:void 0;if(p===void 0||!PI.has(p))return`${Yl(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${p??"<none>"}`;let h=d.toLowerCase(),S=n.get(h);if(S!==void 0)return`x-mcp-header '${d}' is not case-insensitively unique (also declared as '${S}')`;n.set(h,d),t.push({path:a,headerName:d,type:p})}let l=c.properties;if(l!==null&&typeof l=="object")for(let[d,p]of Object.entries(l)){let h=o(p,[...a,d],s);if(h!==void 0)return h}for(let d of EI){let p=c[d];if(p===void 0)continue;let h=Array.isArray(p)?p:p!==null&&typeof p=="object"&&xI.has(d)?Object.values(p):[p];for(let S of h){let v=o(S,[...a,`<${d}>`],!1);if(v!==void 0)return v}}},r=o(e,[],!0);return r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r}}var EI=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],xI=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Yl(e){return e.length===0?"<root>":e.join(".")}var Ql=-32020,hj=[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32e3],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[X.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[Ql,X.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[X.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope \u2014 and a missing envelope on a request whose protocol-version header names a modern revision \u2014 is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[X.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision\u2019s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[X.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[Ql],conformance:["http-header-validation"],rationale:"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers \u2014 presence, sentinel decoding, and `Mcp-Name` \u2194 body cross-check \u2014 are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier\u2019s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5\u20136) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[X.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced \u2014 pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[Ql],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool\u2019s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}],jI={[X.ParseError]:400,[X.InvalidRequest]:400,[X.MethodNotFound]:404,[X.UnsupportedProtocolVersion]:400,[X.MissingRequiredClientCapability]:400,[Ql]:400};function Xl(e,t,n,o,r){return{kind:"reject",rung:e,cell:t,httpStatus:n,code:o.code,message:o.message,...o.data!==void 0&&{data:o.data},settled:r}}function $g(e){if(!ou(e))return!1;let t=iu(e);if(t===void 0||!to(t))return!1;let n=Kr(e);return n!==void 0&&au(n).length===0}function zg(e,t){switch(e.reason){case"http-method":return Xl("http-method","modern-only-method-not-allowed",405,new le(-32e3,"Method not allowed."),!0);case"batch":return Xl("jsonrpc-shape","modern-only-batch-not-supported",400,new le(X.InvalidRequest,"Bad Request: JSON-RPC batches are not supported by this endpoint"),!0);case"response":return Xl("jsonrpc-shape","modern-only-response-post",400,new le(X.InvalidRequest,"Bad Request: JSON-RPC responses cannot be posted to this endpoint"),!0);case"notification":return;case"initialize":case"no-claim":{let n=e.requestedVersion;return Xl("era-classification","modern-only-missing-envelope",400,n===void 0?new le(X.UnsupportedProtocolVersion,"Unsupported protocol version: the request did not name a protocol version",{supported:[...t]}):new ro({supported:[...t],requested:n}),!0)}}}function cu(e,t){return ai(e,t)}function Zi(e){return new Set(e.flatMap(t=>Object.keys(t.shape)))}function eo(e){if(e==null)return!1;let t=typeof e;return t!=="object"&&t!=="function"||!("~standard"in e)?!1:typeof e["~standard"]?.validate=="function"}var X_=!1,sg="draft-2020-12";function $r(e,t="input"){let n=e["~standard"],o;if(n.jsonSchema)o=n.jsonSchema[t]({target:sg});else if(n.vendor==="zod"){if(!("_zod"in e))throw new Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");X_||(X_=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),o=Mr(e,{target:sg,io:t})}else throw new Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output")return o.type!==void 0?o:zS(o)?{type:"object",...o}:o;if(o.type!==void 0&&o.type!=="object")throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(o.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...o}}function zS(e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;for(let t of["oneOf","anyOf","allOf"]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(o=>o!==null&&typeof o=="object"&&(o.type==="object"||zS(o)))}return!1}function NI(e){return e.path?.length?`${e.path.map(t=>String(typeof t=="object"?t.key:t)).join(".")}: ${e.message}`:e.message}async function Gr(e,t){let n=await e["~standard"].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(o=>NI(o)).join(", ")}:{success:!0,data:n.value}}function OI(e){let t=Mr(e,{target:sg,io:"input"});return typeof t.pattern=="string"?t.pattern:void 0}var AI=/\\\.\\d\{(\d+)\}/;function CI(e){let t=AI.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(o=>[!1,!0].flatMap(r=>n.map(i=>gt.datetime({local:o,offset:r,precision:i}))))}function qI(e,t){let n;switch(e){case"email":n=[qs()];break;case"uri":n=[An()];break;case"date":n=[gt.date()];break;case"date-time":n=CI(t);break}return new Set(n.map(o=>OI(o)).filter(o=>o!==void 0))}function LI(e,t,n){return n!=="zod"?!0:qI(e,t).has(t)}function wS(e){let t=$r(e,"input"),n=t.properties||{},o=t.required||[];return Object.entries(n).map(([r,i])=>({name:r,description:i?.description,required:o.includes(r)}))}function Gi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function MI(e){try{return $r(e,"input")}catch(t){let n=t instanceof Error?t.message:String(t);throw new le(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var DI=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function wg(e){return DI.has(e)||e.startsWith("x-")}var UI=new Set(["$schema",...Object.keys(Yn.shape.requestedSchema.shape)]),Q_={string:Zi([Kn,Ci,qi,Li]),number:Zi([Wn]),integer:Zi([Wn]),boolean:Zi([Ai]),array:Zi([Mi,Di])},VI=new Set(Kn.shape.format.unwrap().options);function ZI(e,t,n,o){if(!Gi(e))return e;let r=typeof e.type=="string"&&Object.hasOwn(Q_,e.type)?Q_[e.type]:void 0;if(r===void 0)return e;let i={};for(let[a,s]of Object.entries(e))r.has(a)||wg(a)?i[a]=s:a==="pattern"&&e.type==="string"&&typeof e.format=="string"?VI.has(e.format)?(typeof s!="string"||!LI(e.format,s,n))&&o.push(`${t}.${a}`):i[a]=s:o.push(`${t}.${a}`);return i}function FI(e,t){let n={},o=[];for(let[r,i]of Object.entries(e))r==="properties"&&Gi(i)?n[r]=Object.fromEntries(Object.entries(i).map(([a,s])=>[a,ZI(s,`properties.${a}`,t,o)])):UI.has(r)?n[r]=i:wg(r)||o.push(r);if(o.length>0)throw new le(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${o.join(", ")}`);return n}function HI(e,t){if(!Gi(e.properties))return t;let n=Object.entries(e.properties).filter(([,o])=>!cu(Ui,o).success).map(([o])=>`properties.${o}`);return n.length>0?n.join(", "):t}function cg(e,t,n=""){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((o,r)=>cg(o,t[r],`${n}[${r}]`)):!Gi(e)||!Gi(t)?[]:Object.entries(e).flatMap(([o,r])=>{let i=n?`${n}.${o}`:o;return Object.prototype.hasOwnProperty.call(t,o)?cg(r,t[o],i):wg(o)?[]:[i]})}function JI(e){if(!eo(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,n=FI(MI(e.requestedSchema),t),o=cu(Yn.shape.requestedSchema,n);if(!o.success)throw new le(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${HI(n,o.error.message)}`);let r=cg(n,o.data);if(r.length>0)throw new le(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);let i=(o.data.required??[]).filter(a=>!Object.prototype.hasOwnProperty.call(o.data.properties,a));if(i.length>0)throw new le(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${i.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}function GI(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState=="string";if(!t&&!n)throw new TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}var BI=Object.assign(GI,{elicit(e){try{return{method:"elicitation/create",params:JI(e)}}catch(t){throw t instanceof le?new TypeError(t.message,{cause:t}):t}},elicitUrl(e){return{method:"elicitation/create",params:{...e,mode:"url"}}},createMessage(e){return{method:"sampling/createMessage",params:e}},listRoots(){return{method:"roots/list"}}});var RS=250;function IS(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function kS(e,t){return new Promise((n,o)=>{if(t?.aborted){o(t.reason instanceof ve?t.reason:new ve(ze.RequestTimeout,String(t.reason)));return}let r=setTimeout(()=>{t?.removeEventListener("abort",i),n()},e),i=()=>{clearTimeout(r),o(t?.reason instanceof ve?t.reason:new ve(ze.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",i,{once:!0})})}function TS(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener("abort",n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:o=>t.abort(o),dispose:()=>e?.removeEventListener("abort",n)}}var KI=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],WI={IdJagTokenExchangeResponseSchema:Yh,OAuthClientInformationFullSchema:Qh,OAuthClientInformationSchema:Jl,OAuthClientMetadataSchema:Hl,OAuthClientRegistrationErrorSchema:eg,OAuthErrorResponseSchema:Xh,OAuthMetadataSchema:Zl,OAuthProtectedResourceMetadataSchema:Bh,OAuthTokenRevocationRequestSchema:tg,OAuthTokensSchema:Wh,OpenIdProviderDiscoveryMetadataSchema:Kh,OpenIdProviderMetadataSchema:Fl},PS={},ES={};function xS(e,t){let n=e.slice(0,-6);PS[n]=t,ES[n]=o=>t.safeParse(o).success}for(let e of KI)xS(e,kI[e]);for(let[e,t]of Object.entries(WI))xS(e,t);var YI=Object.freeze(PS),XI=Object.freeze(ES);function QI(e){switch(e){case"initialize":case"notifications/initialized":return _r(void 0);case"server/discover":return _r(Bi);default:return}}var jS=6e4,e0=[Ft,Zr,Ht,dr],t0=["inputResponses","requestState"];function eS(e,t){let n=e.params;if(!Hi(n))return{message:e,lifted:{}};let o=n._meta,r=Hi(o)?e0.filter(c=>c in o):[],i=t==="request"?t0.filter(c=>c in n):[];if(r.length===0&&i.length===0)return{message:e,lifted:{}};let a={},s={...n};if(r.length>0&&Hi(o)){let c={},l={...o};for(let d of r)c[d]=o[d],delete l[d];a.envelope=c,Object.keys(l).length>0?s._meta=l:delete s._meta}for(let c of i)c==="inputResponses"&&(a.inputResponses=s[c]),c==="requestState"&&(a.requestState=s[c]),delete s[c];return{message:{...e,params:s},lifted:a}}function tS(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason==="not-in-era"))return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(o){let r=e.validateResult(t,o);return r.ok?{value:r.value}:{issues:[{message:r.reason==="invalid"?r.message:`not-in-era: ${t}`}]}}}}}function Ki(e){return()=>e}var r0=Ki(void 0);function Rg(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:Ki(t)}}}var NS;function Ig(e,t){NS(e,t)}var OS=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{NS=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??ic,this.setNotificationHandler("notifications/cancelled",t=>{this._oncancel(t)}),this.setNotificationHandler("notifications/progress",t=>{this._onprogress(t)}),this.setRequestHandler("ping",t=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new ve(ze.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,o,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new ve(ze.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=r=>{n?.(r),this._onerror(r)};let o=this._transport?.onmessage;this._transport.onmessage=(r,i)=>{o?.(r,i),Ji(r)||su(r)?this._onresponse(r):bt(r)?this._onrequest(r,i):br(r)?this._onnotification(r,i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(r)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new ve(ze.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let o of e.values())o(n);for(let o of t.values())o.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=eS(e,"notification"),o=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let a=K_(t.classification);if(a!==o.era){this._onerror(new Error(`Era mismatch on inbound notification '${n.method}': classified as ${a} but this instance serves ${o.era}`));return}}if(og(n.method)&&!o.hasNotificationMethod(n.method))return;let r=this._notificationHandlers.get(n.method),i=this.fallbackNotificationHandler;r===void 0&&i===void 0||Promise.resolve().then(()=>r===void 0?i(n):r(n,o)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,t){let{message:n,lifted:o}=eS(e,"request"),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop"){this._onerror(new Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let i=this._transport,a=($,y,f)=>{let w={jsonrpc:"2.0",id:n.id,error:{code:$,message:y,...f!==void 0&&{data:f}}};i?.send(w).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)))};if(t?.classification!==void 0){let $=K_(t.classification);if($!==r.era){this._onerror(new Error(`Era mismatch on inbound request '${n.method}': classified as ${$} but this instance serves ${r.era}`));let y=t.classification.revision??$;a(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${y}`,{supported:this._supportedProtocolVersions,requested:y});return}}if(ng(n.method)&&!r.hasRequestMethod(n.method)){a(X.MethodNotFound,"Method not found");return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){a(X.MethodNotFound,"Method not found");return}let c=r.checkInboundEnvelope(o);if(c!==void 0){a(X.InvalidParams,c);return}let l=($,y)=>this._notificationViaCodec(this._resolveOutboundCodec($.method),$,{...y,relatedRequestId:n.id}),d=($,y,f)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec($.method),$,y,{...f,relatedRequestId:n.id}),p=new AbortController;this._requestHandlerAbortControllers.set(n.id,p);let h=o.inputResponses===void 0?void 0:n0(o.inputResponses),S={sessionId:i?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...o.envelope!==void 0&&{envelope:o.envelope},...h!==void 0&&{inputResponses:h.accepted},...h!==void 0&&h.droppedKeys.length>0&&{droppedInputResponseKeys:h.droppedKeys},requestState:o.requestState===void 0?r0:Ki(o.requestState),signal:p.signal,send:(($,y,f)=>{let w=this._resolveOutboundCodec($.method);if(this._assertOutboundRequestInEra(w,$.method),eo(y))return d($,y,f);let g=tS(w,$.method);if(g===void 0)throw new TypeError(`'${$.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return d($,g,y)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},v=this.buildContext(S,t);Promise.resolve().then(()=>s(n,v)).then(async $=>{if(p.signal.aborted)return;let y;try{y=r.encodeResult(n.method,$)}catch(w){this._onerror(new Error(`Failed to encode result for ${n.method}: ${w}`)),a(X.InternalError,"Internal error");return}let f={result:y,jsonrpc:"2.0",id:n.id};await i?.send(f)},async $=>{if(p.signal.aborted)return;let y=Number.isSafeInteger($.code)?$.code:X.InternalError,f={jsonrpc:"2.0",id:n.id,error:{code:r.encodeErrorCode(y),message:$.message??"Internal error",...$.data!==void 0&&{data:$.data}}};await i?.send(f)}).catch($=>this._onerror(new Error(`Failed to send response: ${$}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===p&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&i&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(s){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),i(s);return}r(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Ji(e)?n(e):n(le.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let o=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(o,e.method),eo(t))return this._requestWithSchemaViaCodec(o,e,t,n);let r=tS(o,e.method);if(r===void 0)throw new TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(o,e,r,t)}_negotiatedWireCodec(){return _r(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=QI(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(ng(t)&&!e.hasRequestMethod(t))throw new ve(ze.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let o=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(o,e.method),this._requestWithSchemaViaCodec(o,e,t,n)}_requestWithSchemaViaCodec(e,t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,headers:s}=o??{},c=Date.now(),l,d;return new Promise((p,h)=>{let S=z=>{h(z)};if(!this._transport){S(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(z){S(z);return}if(o?.signal?.aborted){let z=o.signal.reason;throw z instanceof ve?z:new ve(ze.RequestTimeout,String(z))}let v=e.era===Bi&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,$=this._requestMessageId++;d=$;let y={...t,jsonrpc:"2.0",id:$};o?.onprogress&&(this._progressHandlers.set($,o.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:$}});let f=this._envelopeOutbound(y),w=!1,g=z=>{w||(this._progressHandlers.delete($),v===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:$,reason:String(z)}}),{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(_=>this._onerror(new Error(`Failed to send cancellation: ${_}`))):v.abort(),h(z instanceof ve?z:new ve(ze.RequestTimeout,String(z))))};this._responseHandlers.set($,z=>{if(o?.signal?.aborted)return;if(w=!0,z instanceof Error)return h(z);let _;try{_=e.decodeResult(t.method,z.result)}catch(j){return h(j instanceof Error?j:new Error(String(j)))}if(_.kind==="invalid")return h(_.error);if(_.kind==="input_required"){if(o?.allowInputRequired===!0)return p(o0(_));let j={codec:e,request:t,resultSchema:n,options:o,flowStartedAt:c,retry:(U,C)=>this._requestWithSchemaViaCodec(e,U===void 0?{method:t.method}:{method:t.method,params:U},n,C)};return p(this._resolveNonCompleteResult(_,j))}let R=_.result;Gr(n,R).then(j=>{j.success?p(j.data):h(new ve(ze.InvalidResult,`Invalid result for ${t.method}: ${j.error}`))},h)}),l=()=>g(o?.signal?.reason),o?.signal?.addEventListener("abort",l,{once:!0});let b=o?.timeout??jS,k=()=>g(new ve(ze.RequestTimeout,"Request timed out",{timeout:b}));this._setupTimeout($,b,o?.maxTotalTimeout,k,o?.resetTimeoutOnProgress??!1),this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,headers:s,requestSignal:v?.signal}).catch(z=>{this._progressHandlers.delete($),h(z)})}).finally(()=>{l&&o?.signal?.removeEventListener("abort",l),d!==void 0&&(this._responseHandlers.delete(d),this._cleanupTimeout(d))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new ve(ze.NotConnected,"Not connected");if(og(t.method)&&!e.hasNotificationMethod(t.method))throw new ve(ze.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let o=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(o,n).catch(r=>this._onerror(r))});return}await this._transport.send(o,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let o;if(typeof t=="function"){if(!ng(e))throw new TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);o=(r,i)=>{let a=this._negotiatedWireCodec(),s=a.validateRequest(e,r);if(!s.ok&&s.reason==="not-in-era"&&(s=a.validateInputRequest(e,r)),!s.ok)throw s.reason==="not-in-era"?new le(X.InternalError,`No wire schema for ${e} in the resolved era`):new Error(s.message);return Promise.resolve(t(s.value,i))}}else if(n)o=async(r,i)=>{let a=await Gr(t.params,{...r.params});if(!a.success)throw new le(X.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw new TypeError("setRequestHandler: handler is required");this._requestHandlers.set(e,this._wrapHandler(e,o))}_wrapHandler(e,t){return t}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t=="function"){if(!og(e))throw new TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(o,r)=>{let i=r.validateNotification(e,o);if(!i.ok)throw i.reason==="not-in-era"?new le(X.InternalError,`No wire schema for ${e} in the resolved era`):new Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw new TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async o=>{let r=await Gr(t.params,{...o.params});if(!r.success)throw new le(X.InvalidParams,`Invalid params for notification ${e}: ${r.error}`);await n(r.data,o)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Hi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function AS(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Hi(a)&&Hi(i)?{...a,...i}:i}return n}function rS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function n0(e){let t={},n=[];if(!rS(e))return{accepted:t,droppedKeys:n};for(let[o,r]of Object.entries(e)){if(!rS(r)||"method"in r||"result"in r){n.push(o);continue}t[o]=r}return{accepted:t,droppedKeys:n}}function o0(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}var i0=K((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=r;function r(s){if(!s)throw new TypeError("argument string is required");var c=typeof s=="object"?i(s):s;if(typeof c!="string")throw new TypeError("argument string is required to be a string");var l=c.indexOf(";"),d=l!==-1?c.slice(0,l).trim():c.trim();if(!o.test(d))throw new TypeError("invalid media type");var p=new a(d.toLowerCase());if(l!==-1){var h,S,v;for(t.lastIndex=l;S=t.exec(c);){if(S.index!==l)throw new TypeError("invalid parameter format");l+=S[0].length,h=S[1].toLowerCase(),v=S[2],v.charCodeAt(0)===34&&(v=v.slice(1,-1),v.indexOf("\\")!==-1&&(v=v.replace(n,"$1"))),p.parameters[h]=v}if(l!==c.length)throw new TypeError("invalid parameter format")}return p}function i(s){var c;if(typeof s.getHeader=="function"?c=s.getHeader("content-type"):typeof s.headers=="object"&&(c=s.headers&&s.headers["content-type"]),typeof c!="string")throw new TypeError("content-type header is missing from object");return c}function a(s){this.parameters=Object.create(null),this.type=s}})),gj=$a(i0(),1);var CS=10*1024*1024,kg=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??CS}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let e=this._buffer.indexOf(`
67
+ `);if(e===-1)return null;let t=this._buffer.toString("utf8",0,e).replace(/\r$/,"");this._buffer=this._buffer.subarray(e+1);try{return qS(t)}catch(n){if(n instanceof SyntaxError)continue;throw n}}return null}clear(){this._buffer=void 0}};function qS(e){return $i.parse(JSON.parse(e))}function Tg(e){return JSON.stringify(e)+`
68
+ `}var a0=/^[A-Za-z0-9._-]{1,128}$/;function s0(e){let 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"),!a0.test(e)){let n=[...e].filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,r,i)=>i.indexOf(o)===r);return t.push(`Tool name contains invalid characters: ${n.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function c0(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);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 Pg(e){let t=s0(e);return c0(e,t.warnings),t.isValid}function l0(e){return typeof e=="object"&&e!==null&&"_zod"in e}function u0(e){return typeof e=="object"&&e!==null&&!("_zod"in e)&&"_def"in e&&typeof e._def?.typeName=="string"}function d0(e){if(typeof e!="object"||e===null||eo(e))return!1;let t=Object.getPrototypeOf(e);return t!==Object.prototype&&t!==null?!1:Object.values(e).every(n=>l0(n))}function lu(e){if(e!==void 0){if(d0(e))return T(e);if(typeof e=="object"&&e!==null&&!eo(e)&&Object.values(e).some(t=>u0(t)))throw new TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!eo(e))throw new TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}}var du=K((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;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var o=class extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((w,g)=>`${w}${g}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((w,g)=>(g instanceof n&&(w[g.str]=(w[g.str]||0)+1),w),{})}};e._Code=o,e.nil=new o("");function r(f,...w){let g=[f[0]],b=0;for(;b<w.length;)s(g,w[b]),g.push(f[++b]);return new o(g)}e._=r;let i=new o("+");function a(f,...w){let g=[S(f[0])],b=0;for(;b<w.length;)g.push(i),s(g,w[b]),g.push(i,S(f[++b]));return c(g),new o(g)}e.str=a;function s(f,w){w instanceof o?f.push(...w._items):w instanceof n?f.push(w):f.push(p(w))}e.addCodeArg=s;function c(f){let w=1;for(;w<f.length-1;){if(f[w]===i){let g=l(f[w-1],f[w+1]);if(g!==void 0){f.splice(w-1,3,g);continue}f[w++]="+"}w++}}function l(f,w){if(w==='""')return f;if(f==='""')return w;if(typeof f=="string")return w instanceof n||f[f.length-1]!=='"'?void 0:typeof w!="string"?`${f.slice(0,-1)}${w}"`:w[0]==='"'?f.slice(0,-1)+w.slice(1):void 0;if(typeof w=="string"&&w[0]==='"'&&!(f instanceof n))return`"${f}${w.slice(1)}`}function d(f,w){return w.emptyStr()?f:f.emptyStr()?w:a`${f}${w}`}e.strConcat=d;function p(f){return typeof f=="number"||typeof f=="boolean"||f===null?f:S(Array.isArray(f)?f.join(","):f)}function h(f){return new o(S(f))}e.stringify=h;function S(f){return JSON.stringify(f).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=S;function v(f){return typeof f=="string"&&e.IDENTIFIER.test(f)?new o(`.${f}`):r`[${f}]`}e.getProperty=v;function $(f){if(typeof f=="string"&&e.IDENTIFIER.test(f))return new o(`${f}`);throw new Error(`CodeGen: invalid export name: ${f}, use explicit $id name mapping`)}e.getEsmExportName=$;function y(f){return new o(f.toString())}e.regexpCode=y})),LS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=du();var n=class extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}},o;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var r=class{constructor({prefixes:c,parent:l}={}){this._names={},this._prefixes=c,this._parent=l}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){let l=this._names[c]||this._nameGroup(c);return`${c}${l.index++}`}_nameGroup(c){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}};e.Scope=r;var i=class extends t.Name{constructor(c,l){super(l),this.prefix=c}setValue(c,{property:l,itemIndex:d}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(l)}[${d}]`}};e.ValueScopeName=i;let a=(0,t._)`\n`;var s=class extends r{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?a:t.nil}}get(){return this._scope}name(c){return new i(c,this._newName(c))}value(c,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let p=this.toName(c),{prefix:h}=p,S=(d=l.key)!==null&&d!==void 0?d:l.ref,v=this._values[h];if(v){let f=v.get(S);if(f)return f}else v=this._values[h]=new Map;v.set(S,p);let $=this._scope[h]||(this._scope[h]=[]),y=$.length;return $[y]=l.ref,p.setValue(l,{property:h,itemIndex:y}),p}getValue(c,l){let d=this._values[c];if(d)return d.get(l)}scopeRefs(c,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._)`${c}${d.scopePath}`})}scopeCode(c=this._values,l,d){return this._reduceValues(c,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},l,d)}_reduceValues(c,l,d={},p){let h=t.nil;for(let S in c){let v=c[S];if(!v)continue;let $=d[S]=d[S]||new Map;v.forEach(y=>{if($.has(y))return;$.set(y,o.Started);let f=l(y);if(f){let w=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0,t._)`${h}${w} ${y} = ${f};${this.opts._n}`}else if(f=p?.(y))h=(0,t._)`${h}${f}${this.opts._n}`;else throw new n(y);$.set(y,o.Completed)})}return h}};e.ValueScope=s})),_e=K((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;let t=du(),n=LS();var o=du();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var r=LS();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return r.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("+")};var i=class{optimizeNodes(){return this}optimizeNames(I,E){return this}},a=class extends i{constructor(I,E,q){super(),this.varKind=I,this.name=E,this.rhs=q}render({es5:I,_n:E}){let q=I?n.varKinds.var:this.varKind,Y=this.rhs===void 0?"":` = ${this.rhs}`;return`${q} ${this.name}${Y};`+E}optimizeNames(I,E){if(I[this.name.str])return this.rhs&&(this.rhs=ne(this.rhs,I,E)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends i{constructor(I,E,q){super(),this.lhs=I,this.rhs=E,this.sideEffects=q}render({_n:I}){return`${this.lhs} = ${this.rhs};`+I}optimizeNames(I,E){if(!(this.lhs instanceof t.Name&&!I[this.lhs.str]&&!this.sideEffects))return this.rhs=ne(this.rhs,I,E),this}get names(){return ee(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(I,E,q,Y){super(I,q,Y),this.op=E}render({_n:I}){return`${this.lhs} ${this.op}= ${this.rhs};`+I}},l=class extends i{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`${this.label}:`+I}},d=class extends i{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`break${this.label?` ${this.label}`:""};`+I}},p=class extends i{constructor(I){super(),this.error=I}render({_n:I}){return`throw ${this.error};`+I}get names(){return this.error.names}},h=class extends i{constructor(I){super(),this.code=I}render({_n:I}){return`${this.code};`+I}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(I,E){return this.code=ne(this.code,I,E),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},S=class extends i{constructor(I=[]){super(),this.nodes=I}render(I){return this.nodes.reduce((E,q)=>E+q.render(I),"")}optimizeNodes(){let{nodes:I}=this,E=I.length;for(;E--;){let q=I[E].optimizeNodes();Array.isArray(q)?I.splice(E,1,...q):q?I[E]=q:I.splice(E,1)}return I.length>0?this:void 0}optimizeNames(I,E){let{nodes:q}=this,Y=q.length;for(;Y--;){let se=q[Y];se.optimizeNames(I,E)||($e(I,se.names),q.splice(Y,1))}return q.length>0?this:void 0}get names(){return this.nodes.reduce((I,E)=>V(I,E.names),{})}},v=class extends S{render(I){return"{"+I._n+super.render(I)+"}"+I._n}},$=class extends S{},y=class extends v{};y.kind="else";var f=class uu extends v{constructor(E,q){super(q),this.condition=E}render(E){let q=`if(${this.condition})`+super.render(E);return this.else&&(q+="else "+this.else.render(E)),q}optimizeNodes(){super.optimizeNodes();let E=this.condition;if(E===!0)return this.nodes;let q=this.else;if(q){let Y=q.optimizeNodes();q=this.else=Array.isArray(Y)?new y(Y):Y}if(q)return E===!1?q instanceof uu?q:q.nodes:this.nodes.length?this:new uu(Ae(E),q instanceof uu?[q]:q.nodes);if(!(E===!1||!this.nodes.length))return this}optimizeNames(E,q){var Y;if(this.else=(Y=this.else)===null||Y===void 0?void 0:Y.optimizeNames(E,q),!!(super.optimizeNames(E,q)||this.else))return this.condition=ne(this.condition,E,q),this}get names(){let E=super.names;return ee(E,this.condition),this.else&&V(E,this.else.names),E}};f.kind="if";var w=class extends v{};w.kind="for";var g=class extends w{constructor(I){super(),this.iteration=I}render(I){return`for(${this.iteration})`+super.render(I)}optimizeNames(I,E){if(super.optimizeNames(I,E))return this.iteration=ne(this.iteration,I,E),this}get names(){return V(super.names,this.iteration.names)}},b=class extends w{constructor(I,E,q,Y){super(),this.varKind=I,this.name=E,this.from=q,this.to=Y}render(I){let E=I.es5?n.varKinds.var:this.varKind,{name:q,from:Y,to:se}=this;return`for(${E} ${q}=${Y}; ${q}<${se}; ${q}++)`+super.render(I)}get names(){return ee(ee(super.names,this.from),this.to)}},k=class extends w{constructor(I,E,q,Y){super(),this.loop=I,this.varKind=E,this.name=q,this.iterable=Y}render(I){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(I)}optimizeNames(I,E){if(super.optimizeNames(I,E))return this.iterable=ne(this.iterable,I,E),this}get names(){return V(super.names,this.iterable.names)}},z=class extends v{constructor(I,E,q){super(),this.name=I,this.args=E,this.async=q}render(I){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(I)}};z.kind="func";var _=class extends S{render(I){return"return "+super.render(I)}};_.kind="return";var R=class extends v{render(I){let E="try"+super.render(I);return this.catch&&(E+=this.catch.render(I)),this.finally&&(E+=this.finally.render(I)),E}optimizeNodes(){var I,E;return super.optimizeNodes(),(I=this.catch)===null||I===void 0||I.optimizeNodes(),(E=this.finally)===null||E===void 0||E.optimizeNodes(),this}optimizeNames(I,E){var q,Y;return super.optimizeNames(I,E),(q=this.catch)===null||q===void 0||q.optimizeNames(I,E),(Y=this.finally)===null||Y===void 0||Y.optimizeNames(I,E),this}get names(){let I=super.names;return this.catch&&V(I,this.catch.names),this.finally&&V(I,this.finally.names),I}},j=class extends v{constructor(I){super(),this.error=I}render(I){return`catch(${this.error})`+super.render(I)}};j.kind="catch";var U=class extends v{render(I){return"finally"+super.render(I)}};U.kind="finally";var C=class{constructor(I,E={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...E,_n:E.lines?`
69
+ `:""},this._extScope=I,this._scope=new n.Scope({parent:I}),this._nodes=[new $]}toString(){return this._root.render(this.opts)}name(I){return this._scope.name(I)}scopeName(I){return this._extScope.name(I)}scopeValue(I,E){let q=this._extScope.value(I,E);return(this._values[q.prefix]||(this._values[q.prefix]=new Set)).add(q),q}getScopeValue(I,E){return this._extScope.getValue(I,E)}scopeRefs(I){return this._extScope.scopeRefs(I,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(I,E,q,Y){let se=this._scope.toName(E);return q!==void 0&&Y&&(this._constants[se.str]=q),this._leafNode(new a(I,se,q)),se}const(I,E,q){return this._def(n.varKinds.const,I,E,q)}let(I,E,q){return this._def(n.varKinds.let,I,E,q)}var(I,E,q){return this._def(n.varKinds.var,I,E,q)}assign(I,E,q){return this._leafNode(new s(I,E,q))}add(I,E){return this._leafNode(new c(I,e.operators.ADD,E))}code(I){return typeof I=="function"?I():I!==t.nil&&this._leafNode(new h(I)),this}object(...I){let E=["{"];for(let[q,Y]of I)E.length>1&&E.push(","),E.push(q),(q!==Y||this.opts.es5)&&(E.push(":"),(0,t.addCodeArg)(E,Y));return E.push("}"),new t._Code(E)}if(I,E,q){if(this._blockNode(new f(I)),E&&q)this.code(E).else().code(q).endIf();else if(E)this.code(E).endIf();else if(q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(I){return this._elseNode(new f(I))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(f,y)}_for(I,E){return this._blockNode(I),E&&this.code(E).endFor(),this}for(I,E){return this._for(new g(I),E)}forRange(I,E,q,Y,se=this.opts.es5?n.varKinds.var:n.varKinds.let){let Se=this._scope.toName(I);return this._for(new b(se,Se,E,q),()=>Y(Se))}forOf(I,E,q,Y=n.varKinds.const){let se=this._scope.toName(I);if(this.opts.es5){let Se=E instanceof t.Name?E:this.var("_arr",E);return this.forRange("_i",0,(0,t._)`${Se}.length`,fe=>{this.var(se,(0,t._)`${Se}[${fe}]`),q(se)})}return this._for(new k("of",Y,se,E),()=>q(se))}forIn(I,E,q,Y=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(I,(0,t._)`Object.keys(${E})`,q);let se=this._scope.toName(I);return this._for(new k("in",Y,se,E),()=>q(se))}endFor(){return this._endBlockNode(w)}label(I){return this._leafNode(new l(I))}break(I){return this._leafNode(new d(I))}return(I){let E=new _;if(this._blockNode(E),this.code(I),E.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(I,E,q){if(!E&&!q)throw new Error('CodeGen: "try" without "catch" and "finally"');let Y=new R;if(this._blockNode(Y),this.code(I),E){let se=this.name("e");this._currNode=Y.catch=new j(se),E(se)}return q&&(this._currNode=Y.finally=new U,this.code(q)),this._endBlockNode(j,U)}throw(I){return this._leafNode(new p(I))}block(I,E){return this._blockStarts.push(this._nodes.length),I&&this.code(I).endBlock(E),this}endBlock(I){let E=this._blockStarts.pop();if(E===void 0)throw new Error("CodeGen: not in self-balancing block");let q=this._nodes.length-E;if(q<0||I!==void 0&&q!==I)throw new Error(`CodeGen: wrong number of nodes: ${q} vs ${I} expected`);return this._nodes.length=E,this}func(I,E=t.nil,q,Y){return this._blockNode(new z(I,E,q)),Y&&this.code(Y).endFunc(),this}endFunc(){return this._endBlockNode(z)}optimize(I=1){for(;I-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(I){return this._currNode.nodes.push(I),this}_blockNode(I){this._currNode.nodes.push(I),this._nodes.push(I)}_endBlockNode(I,E){let q=this._currNode;if(q instanceof I||E&&q instanceof E)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${E?`${I.kind}/${E.kind}`:I.kind}"`)}_elseNode(I){let E=this._currNode;if(!(E instanceof f))throw new Error('CodeGen: "else" without "if"');return this._currNode=E.else=I,this}get _root(){return this._nodes[0]}get _currNode(){let I=this._nodes;return I[I.length-1]}set _currNode(I){let E=this._nodes;E[E.length-1]=I}};e.CodeGen=C;function V(I,E){for(let q in E)I[q]=(I[q]||0)+(E[q]||0);return I}function ee(I,E){return E instanceof t._CodeOrName?V(I,E.names):I}function ne(I,E,q){if(I instanceof t.Name)return Y(I);if(!se(I))return I;return new t._Code(I._items.reduce((Se,fe)=>(fe instanceof t.Name&&(fe=Y(fe)),fe instanceof t._Code?Se.push(...fe._items):Se.push(fe),Se),[]));function Y(Se){let fe=q[Se.str];return fe===void 0||E[Se.str]!==1?Se:(delete E[Se.str],fe)}function se(Se){return Se instanceof t._Code&&Se._items.some(fe=>fe instanceof t.Name&&E[fe.str]===1&&q[fe.str]!==void 0)}}function $e(I,E){for(let q in E)I[q]=(I[q]||0)-(E[q]||0)}function Ae(I){return typeof I=="boolean"||typeof I=="number"||I===null?!I:(0,t._)`!${H(I)}`}e.not=Ae;let Ne=M(e.operators.AND);function Fe(...I){return I.reduce(Ne)}e.and=Fe;let Ie=M(e.operators.OR);function x(...I){return I.reduce(Ie)}e.or=x;function M(I){return(E,q)=>E===t.nil?q:q===t.nil?E:(0,t._)`${H(E)} ${I} ${H(q)}`}function H(I){return I instanceof t.Name?I:(0,t._)`(${I})`}})),ke=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let t=_e(),n=du();function o(z){let _={};for(let R of z)_[R]=!0;return _}e.toHash=o;function r(z,_){return typeof _=="boolean"?_:Object.keys(_).length===0?!0:(i(z,_),!a(_,z.self.RULES.all))}e.alwaysValidSchema=r;function i(z,_=z.schema){let{opts:R,self:j}=z;if(!R.strictSchema||typeof _=="boolean")return;let U=j.RULES.keywords;for(let C in _)U[C]||k(z,`unknown keyword: "${C}"`)}e.checkUnknownRules=i;function a(z,_){if(typeof z=="boolean")return!z;for(let R in z)if(_[R])return!0;return!1}e.schemaHasRules=a;function s(z,_){if(typeof z=="boolean")return!z;for(let R in z)if(R!=="$ref"&&_.all[R])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:z,schemaPath:_},R,j,U){if(!U){if(typeof R=="number"||typeof R=="boolean")return R;if(typeof R=="string")return(0,t._)`${R}`}return(0,t._)`${z}${_}${(0,t.getProperty)(j)}`}e.schemaRefOrVal=c;function l(z){return h(decodeURIComponent(z))}e.unescapeFragment=l;function d(z){return encodeURIComponent(p(z))}e.escapeFragment=d;function p(z){return typeof z=="number"?`${z}`:z.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=p;function h(z){return z.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=h;function S(z,_){if(Array.isArray(z))for(let R of z)_(R);else _(z)}e.eachItem=S;function v({mergeNames:z,mergeToName:_,mergeValues:R,resultToName:j}){return(U,C,V,ee)=>{let ne=V===void 0?C:V instanceof t.Name?(C instanceof t.Name?z(U,C,V):_(U,C,V),V):C instanceof t.Name?(_(U,V,C),C):R(C,V);return ee===t.Name&&!(ne instanceof t.Name)?j(U,ne):ne}}e.mergeEvaluated={props:v({mergeNames:(z,_,R)=>z.if((0,t._)`${R} !== true && ${_} !== undefined`,()=>{z.if((0,t._)`${_} === true`,()=>z.assign(R,!0),()=>z.assign(R,(0,t._)`${R} || {}`).code((0,t._)`Object.assign(${R}, ${_})`))}),mergeToName:(z,_,R)=>z.if((0,t._)`${R} !== true`,()=>{_===!0?z.assign(R,!0):(z.assign(R,(0,t._)`${R} || {}`),y(z,R,_))}),mergeValues:(z,_)=>z===!0?!0:{...z,..._},resultToName:$}),items:v({mergeNames:(z,_,R)=>z.if((0,t._)`${R} !== true && ${_} !== undefined`,()=>z.assign(R,(0,t._)`${_} === true ? true : ${R} > ${_} ? ${R} : ${_}`)),mergeToName:(z,_,R)=>z.if((0,t._)`${R} !== true`,()=>z.assign(R,_===!0?!0:(0,t._)`${R} > ${_} ? ${R} : ${_}`)),mergeValues:(z,_)=>z===!0?!0:Math.max(z,_),resultToName:(z,_)=>z.var("items",_)})};function $(z,_){if(_===!0)return z.var("props",!0);let R=z.var("props",(0,t._)`{}`);return _!==void 0&&y(z,R,_),R}e.evaluatedPropsToName=$;function y(z,_,R){Object.keys(R).forEach(j=>z.assign((0,t._)`${_}${(0,t.getProperty)(j)}`,!0))}e.setEvaluated=y;let f={};function w(z,_){return z.scopeValue("func",{ref:_,code:f[_.code]||(f[_.code]=new n._Code(_.code))})}e.useFunc=w;var g;(function(z){z[z.Num=0]="Num",z[z.Str=1]="Str"})(g||(e.Type=g={}));function b(z,_,R){if(z instanceof t.Name){let j=_===g.Num;return R?j?(0,t._)`"[" + ${z} + "]"`:(0,t._)`"['" + ${z} + "']"`:j?(0,t._)`"/" + ${z}`:(0,t._)`"/" + ${z}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return R?(0,t.getProperty)(z).toString():"/"+p(z)}e.getErrorPath=b;function k(z,_,R=z.opts.strictSchema){if(R){if(_=`strict mode: ${_}`,R===!0)throw new Error(_);z.self.logger.warn(_)}}e.checkStrictMode=k})),kt=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};e.default=n})),pu=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=_e(),n=ke(),o=kt();e.keywordError={message:({keyword:y})=>(0,t.str)`must pass "${y}" keyword validation`},e.keyword$DataError={message:({keyword:y,schemaType:f})=>f?(0,t.str)`"${y}" keyword must be ${f} ($data)`:(0,t.str)`"${y}" keyword is invalid ($data)`};function r(y,f=e.keywordError,w,g){let{it:b}=y,{gen:k,compositeRule:z,allErrors:_}=b,R=p(y,f,w);g??(z||_)?c(k,R):l(b,(0,t._)`[${R}]`)}e.reportError=r;function i(y,f=e.keywordError,w){let{it:g}=y,{gen:b,compositeRule:k,allErrors:z}=g;c(b,p(y,f,w)),k||z||l(g,o.default.vErrors)}e.reportExtraError=i;function a(y,f){y.assign(o.default.errors,f),y.if((0,t._)`${o.default.vErrors} !== null`,()=>y.if(f,()=>y.assign((0,t._)`${o.default.vErrors}.length`,f),()=>y.assign(o.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:y,keyword:f,schemaValue:w,data:g,errsCount:b,it:k}){if(b===void 0)throw new Error("ajv implementation error");let z=y.name("err");y.forRange("i",b,o.default.errors,_=>{y.const(z,(0,t._)`${o.default.vErrors}[${_}]`),y.if((0,t._)`${z}.instancePath === undefined`,()=>y.assign((0,t._)`${z}.instancePath`,(0,t.strConcat)(o.default.instancePath,k.errorPath))),y.assign((0,t._)`${z}.schemaPath`,(0,t.str)`${k.errSchemaPath}/${f}`),k.opts.verbose&&(y.assign((0,t._)`${z}.schema`,w),y.assign((0,t._)`${z}.data`,g))})}e.extendErrors=s;function c(y,f){let w=y.const("err",f);y.if((0,t._)`${o.default.vErrors} === null`,()=>y.assign(o.default.vErrors,(0,t._)`[${w}]`),(0,t._)`${o.default.vErrors}.push(${w})`),y.code((0,t._)`${o.default.errors}++`)}function l(y,f){let{gen:w,validateName:g,schemaEnv:b}=y;b.$async?w.throw((0,t._)`new ${y.ValidationError}(${f})`):(w.assign((0,t._)`${g}.errors`,f),w.return(!1))}let d={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 p(y,f,w){let{createErrors:g}=y.it;return g===!1?(0,t._)`{}`:h(y,f,w)}function h(y,f,w={}){let{gen:g,it:b}=y,k=[S(b,w),v(y,w)];return $(y,f,k),g.object(...k)}function S({errorPath:y},{instancePath:f}){let w=f?(0,t.str)`${y}${(0,n.getErrorPath)(f,n.Type.Str)}`:y;return[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,w)]}function v({keyword:y,it:{errSchemaPath:f}},{schemaPath:w,parentSchema:g}){let b=g?f:(0,t.str)`${f}/${y}`;return w&&(b=(0,t.str)`${b}${(0,n.getErrorPath)(w,n.Type.Str)}`),[d.schemaPath,b]}function $(y,{params:f,message:w},g){let{keyword:b,data:k,schemaValue:z,it:_}=y,{opts:R,propertyName:j,topSchemaRef:U,schemaPath:C}=_;g.push([d.keyword,b],[d.params,typeof f=="function"?f(y):f||(0,t._)`{}`]),R.messages&&g.push([d.message,typeof w=="function"?w(y):w]),R.verbose&&g.push([d.schema,z],[d.parentSchema,(0,t._)`${U}${C}`],[o.default.data,k]),j&&g.push([d.propertyName,j])}})),m0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=pu(),n=_e(),o=kt(),r={message:"boolean schema is false"};function i(c){let{gen:l,schema:d,validateName:p}=c;d===!1?s(c,!1):typeof d=="object"&&d.$async===!0?l.return(o.default.data):(l.assign((0,n._)`${p}.errors`,null),l.return(!0))}e.topBoolOrEmptySchema=i;function a(c,l){let{gen:d,schema:p}=c;p===!1?(d.var(l,!1),s(c)):d.var(l,!0)}e.boolOrEmptySchema=a;function s(c,l){let{gen:d,data:p}=c,h={gen:d,keyword:"false schema",data:p,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,t.reportError)(h,r,void 0,l)}})),MS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);function n(r){return typeof r=="string"&&t.has(r)}e.isJSONType=n;function o(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=o})),DS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:r,self:i},a){let s=i.RULES.types[a];return s&&s!==!0&&n(r,s)}e.schemaHasRulesForType=t;function n(r,i){return i.rules.some(a=>o(r,a))}e.shouldUseGroup=n;function o(r,i){var a;return r[i.keyword]!==void 0||((a=i.definition.implements)===null||a===void 0?void 0:a.some(s=>r[s]!==void 0))}e.shouldUseRule=o})),mu=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let t=MS(),n=DS(),o=pu(),r=_e(),i=ke();var a;(function(g){g[g.Correct=0]="Correct",g[g.Wrong=1]="Wrong"})(a||(e.DataType=a={}));function s(g){let b=c(g.type);if(b.includes("null")){if(g.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&g.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');g.nullable===!0&&b.push("null")}return b}e.getSchemaTypes=s;function c(g){let b=Array.isArray(g)?g:g?[g]:[];if(b.every(t.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}e.getJSONTypes=c;function l(g,b){let{gen:k,data:z,opts:_}=g,R=p(b,_.coerceTypes),j=b.length>0&&!(R.length===0&&b.length===1&&(0,n.schemaHasRulesForType)(g,b[0]));if(j){let U=$(b,z,_.strictNumbers,a.Wrong);k.if(U,()=>{R.length?h(g,b,R):f(g)})}return j}e.coerceAndCheckDataType=l;let d=new Set(["string","number","integer","boolean","null"]);function p(g,b){return b?g.filter(k=>d.has(k)||b==="array"&&k==="array"):[]}function h(g,b,k){let{gen:z,data:_,opts:R}=g,j=z.let("dataType",(0,r._)`typeof ${_}`),U=z.let("coerced",(0,r._)`undefined`);R.coerceTypes==="array"&&z.if((0,r._)`${j} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>z.assign(_,(0,r._)`${_}[0]`).assign(j,(0,r._)`typeof ${_}`).if($(b,_,R.strictNumbers),()=>z.assign(U,_))),z.if((0,r._)`${U} !== undefined`);for(let V of k)(d.has(V)||V==="array"&&R.coerceTypes==="array")&&C(V);z.else(),f(g),z.endIf(),z.if((0,r._)`${U} !== undefined`,()=>{z.assign(_,U),S(g,U)});function C(V){switch(V){case"string":z.elseIf((0,r._)`${j} == "number" || ${j} == "boolean"`).assign(U,(0,r._)`"" + ${_}`).elseIf((0,r._)`${_} === null`).assign(U,(0,r._)`""`);return;case"number":z.elseIf((0,r._)`${j} == "boolean" || ${_} === null
70
70
  || (${j} == "string" && ${_} && ${_} == +${_})`).assign(U,(0,r._)`+${_}`);return;case"integer":z.elseIf((0,r._)`${j} === "boolean" || ${_} === null
71
71
  || (${j} === "string" && ${_} && ${_} == +${_} && !(${_} % 1))`).assign(U,(0,r._)`+${_}`);return;case"boolean":z.elseIf((0,r._)`${_} === "false" || ${_} === 0 || ${_} === null`).assign(U,!1).elseIf((0,r._)`${_} === "true" || ${_} === 1`).assign(U,!0);return;case"null":z.elseIf((0,r._)`${_} === "" || ${_} === 0 || ${_} === false`),z.assign(U,null);return;case"array":z.elseIf((0,r._)`${j} === "string" || ${j} === "number"
72
- || ${j} === "boolean" || ${_} === null`).assign(U,(0,r._)`[${_}]`)}}}function S({gen:g,parentData:b,parentDataProperty:k},z){g.if((0,r._)`${b} !== undefined`,()=>g.assign((0,r._)`${b}[${k}]`,z))}function v(g,b,k,z=a.Correct){let _=z===a.Correct?r.operators.EQ:r.operators.NEQ,R;switch(g){case"null":return(0,r._)`${b} ${_} null`;case"array":R=(0,r._)`Array.isArray(${b})`;break;case"object":R=(0,r._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":R=j((0,r._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":R=j();break;default:return(0,r._)`typeof ${b} ${_} ${g}`}return z===a.Correct?R:(0,r.not)(R);function j(U=r.nil){return(0,r.and)((0,r._)`typeof ${b} == "number"`,U,k?(0,r._)`isFinite(${b})`:r.nil)}}e.checkDataType=v;function $(g,b,k,z){if(g.length===1)return v(g[0],b,k,z);let _,R=(0,i.toHash)(g);if(R.array&&R.object){let j=(0,r._)`typeof ${b} != "object"`;_=R.null?j:(0,r._)`!${b} || ${j}`,delete R.null,delete R.array,delete R.object}else _=r.nil;R.number&&delete R.integer;for(let j in R)_=(0,r.and)(_,v(j,b,k,z));return _}e.checkDataTypes=$;let y={message:({schema:g})=>`must be ${g}`,params:({schema:g,schemaValue:b})=>typeof g=="string"?(0,r._)`{type: ${g}}`:(0,r._)`{type: ${b}}`};function f(g){let b=w(g);(0,o.reportError)(b,y)}e.reportTypeError=f;function w(g){let{gen:b,data:k,schema:z}=g,_=(0,i.schemaRefOrVal)(g,z,"type");return{gen:b,keyword:"type",data:k,schema:z.type,schemaCode:_,schemaValue:_,parentSchema:z,params:{},it:g}}})),mI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=_e(),n=Ie();function o(i,a){let{properties:s,items:c}=i.schema;if(a==="object"&&s)for(let u in s)r(i,u,s[u].default);else a==="array"&&Array.isArray(c)&&c.forEach((u,d)=>r(i,d,u.default))}e.assignDefaults=o;function r(i,a,s){let{gen:c,compositeRule:u,data:d,opts:p}=i;if(s===void 0)return;let h=(0,t._)`${d}${(0,t.getProperty)(a)}`;if(u){(0,n.checkStrictMode)(i,`default is ignored for: ${h}`);return}let S=(0,t._)`${h} === undefined`;p.useDefaults==="empty"&&(S=(0,t._)`${S} || ${h} === null || ${h} === ""`),c.if(S,(0,t._)`${h} = ${(0,t.stringify)(s)}`)}})),kt=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=_e(),n=Ie(),o=It(),r=Ie();function i(g,b){let{gen:k,data:z,it:_}=g;k.if(p(k,z,b,_.opts.ownProperties),()=>{g.setParams({missingProperty:(0,t._)`${b}`},!0),g.error()})}e.checkReportMissingProp=i;function a({gen:g,data:b,it:{opts:k}},z,_){return(0,t.or)(...z.map(R=>(0,t.and)(p(g,b,R,k.ownProperties),(0,t._)`${_} = ${R}`)))}e.checkMissingProp=a;function s(g,b){g.setParams({missingProperty:b},!0),g.error()}e.reportMissingProp=s;function c(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function u(g,b,k){return(0,t._)`${c(g)}.call(${b}, ${k})`}e.isOwnProperty=u;function d(g,b,k,z){let _=(0,t._)`${b}${(0,t.getProperty)(k)} !== undefined`;return z?(0,t._)`${_} && ${u(g,b,k)}`:_}e.propertyInData=d;function p(g,b,k,z){let _=(0,t._)`${b}${(0,t.getProperty)(k)} === undefined`;return z?(0,t.or)(_,(0,t.not)(u(g,b,k))):_}e.noPropertyInData=p;function h(g){return g?Object.keys(g).filter(b=>b!=="__proto__"):[]}e.allSchemaProperties=h;function S(g,b){return h(b).filter(k=>!(0,n.alwaysValidSchema)(g,b[k]))}e.schemaProperties=S;function v({schemaCode:g,data:b,it:{gen:k,topSchemaRef:z,schemaPath:_,errorPath:R},it:j},U,C,V){let ee=V?(0,t._)`${g}, ${b}, ${z}${_}`:b,ne=[[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,R)],[o.default.parentData,j.parentData],[o.default.parentDataProperty,j.parentDataProperty],[o.default.rootData,o.default.rootData]];j.opts.dynamicRef&&ne.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);let $e=(0,t._)`${ee}, ${k.object(...ne)}`;return C!==t.nil?(0,t._)`${U}.call(${C}, ${$e})`:(0,t._)`${U}(${$e})`}e.callValidateCode=v;let $=(0,t._)`new RegExp`;function y({gen:g,it:{opts:b}},k){let z=b.unicodeRegExp?"u":"",{regExp:_}=b.code,R=_(k,z);return g.scopeValue("pattern",{key:R.toString(),ref:R,code:(0,t._)`${_.code==="new RegExp"?$:(0,r.useFunc)(g,_)}(${k}, ${z})`})}e.usePattern=y;function f(g){let{gen:b,data:k,keyword:z,it:_}=g,R=b.name("valid");if(_.allErrors){let U=b.let("valid",!0);return j(()=>b.assign(U,!1)),U}return b.var(R,!0),j(()=>b.break()),R;function j(U){let C=b.const("len",(0,t._)`${k}.length`);b.forRange("i",0,C,V=>{g.subschema({keyword:z,dataProp:V,dataPropType:n.Type.Num},R),b.if((0,t.not)(R),U)})}}e.validateArray=f;function w(g){let{gen:b,schema:k,keyword:z,it:_}=g;if(!Array.isArray(k))throw new Error("ajv implementation error");if(k.some(U=>(0,n.alwaysValidSchema)(_,U))&&!_.opts.unevaluated)return;let R=b.let("valid",!1),j=b.name("_valid");b.block(()=>k.forEach((U,C)=>{let V=g.subschema({keyword:z,schemaProp:C,compositeRule:!0},j);b.assign(R,(0,t._)`${R} || ${j}`),g.mergeValidEvaluated(V,j)||b.if((0,t.not)(R))})),g.result(R,()=>g.reset(),()=>g.error(!0))}e.validateUnion=w})),pI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=_e(),n=It(),o=kt(),r=mu();function i(S,v){let{gen:$,keyword:y,schema:f,parentSchema:w,it:g}=S,b=v.macro.call(g.self,f,w,g),k=d($,y,b);g.opts.validateSchema!==!1&&g.self.validateSchema(b,!0);let z=$.name("valid");S.subschema({schema:b,schemaPath:t.nil,errSchemaPath:`${g.errSchemaPath}/${y}`,topSchemaRef:k,compositeRule:!0},z),S.pass(z,()=>S.error(!0))}e.macroKeywordCode=i;function a(S,v){var $;let{gen:y,keyword:f,schema:w,parentSchema:g,$data:b,it:k}=S;u(k,v);let z=d(y,f,!b&&v.compile?v.compile.call(k.self,w,g,k):v.validate),_=y.let("valid");S.block$data(_,R),S.ok(($=v.valid)!==null&&$!==void 0?$:_);function R(){if(v.errors===!1)C(),v.modifying&&s(S),V(()=>S.error());else{let ee=v.async?j():U();v.modifying&&s(S),V(()=>c(S,ee))}}function j(){let ee=y.let("ruleErrs",null);return y.try(()=>C((0,t._)`await `),ne=>y.assign(_,!1).if((0,t._)`${ne} instanceof ${k.ValidationError}`,()=>y.assign(ee,(0,t._)`${ne}.errors`),()=>y.throw(ne))),ee}function U(){let ee=(0,t._)`${z}.errors`;return y.assign(ee,null),C(t.nil),ee}function C(ee=v.async?(0,t._)`await `:t.nil){let ne=k.opts.passContext?n.default.this:n.default.self,$e=!("compile"in v&&!b||v.schema===!1);y.assign(_,(0,t._)`${ee}${(0,o.callValidateCode)(S,z,ne,$e)}`,v.modifying)}function V(ee){var ne;y.if((0,t.not)((ne=v.valid)!==null&&ne!==void 0?ne:_),ee)}}e.funcKeywordCode=a;function s(S){let{gen:v,data:$,it:y}=S;v.if(y.parentData,()=>v.assign($,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function c(S,v){let{gen:$}=S;$.if((0,t._)`Array.isArray(${v})`,()=>{$.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${v} : ${n.default.vErrors}.concat(${v})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,r.extendErrors)(S)},()=>S.error())}function u({schemaEnv:S},v){if(v.async&&!S.$async)throw new Error("async keyword in sync schema")}function d(S,v,$){if($===void 0)throw new Error(`keyword "${v}" failed to compile`);return S.scopeValue("keyword",typeof $=="function"?{ref:$}:{ref:$,code:(0,t.stringify)($)})}function p(S,v,$=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(S):y==="object"?S&&typeof S=="object"&&!Array.isArray(S):typeof S==y||$&&typeof S>"u")}e.validSchemaType=p;function h({schema:S,opts:v,self:$,errSchemaPath:y},f,w){if(Array.isArray(f.keyword)?!f.keyword.includes(w):f.keyword!==w)throw new Error("ajv implementation error");let g=f.dependencies;if(g?.some(b=>!Object.prototype.hasOwnProperty.call(S,b)))throw new Error(`parent schema must have dependencies of ${w}: ${g.join(",")}`);if(f.validateSchema&&!f.validateSchema(S[w])){let b=`keyword "${w}" value is invalid at path "${y}": `+$.errorsText(f.validateSchema.errors);if(v.validateSchema==="log")$.logger.error(b);else throw new Error(b)}}e.validateKeywordUsage=h})),fI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=_e(),n=Ie();function o(a,{keyword:s,schemaProp:c,schema:u,schemaPath:d,errSchemaPath:p,topSchemaRef:h}){if(s!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){let S=a.schema[s];return c===void 0?{schema:S,schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:S[c],schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}${(0,t.getProperty)(c)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,n.escapeFragment)(c)}`}}if(u!==void 0){if(d===void 0||p===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:d,topSchemaRef:h,errSchemaPath:p}}throw new Error('either "keyword" or "schema" must be passed')}e.getSubschema=o;function r(a,s,{dataProp:c,dataPropType:u,data:d,dataTypes:p,propertyName:h}){if(d!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:S}=s;if(c!==void 0){let{errorPath:$,dataPathArr:y,opts:f}=s;v(S.let("data",(0,t._)`${s.data}${(0,t.getProperty)(c)}`,!0)),a.errorPath=(0,t.str)`${$}${(0,n.getErrorPath)(c,u,f.jsPropertySyntax)}`,a.parentDataProperty=(0,t._)`${c}`,a.dataPathArr=[...y,a.parentDataProperty]}d!==void 0&&(v(d instanceof t.Name?d:S.let("data",d,!0)),h!==void 0&&(a.propertyName=h)),p&&(a.dataTypes=p);function v($){a.data=$,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,$]}}e.extendSubschemaData=r;function i(a,{jtdDiscriminator:s,jtdMetadata:c,compositeRule:u,createErrors:d,allErrors:p}){u!==void 0&&(a.compositeRule=u),d!==void 0&&(a.createErrors=d),p!==void 0&&(a.allErrors=p),a.jtdDiscriminator=s,a.jtdMetadata=c}e.extendSubschemaMode=i})),DS=K(((e,t)=>{t.exports=function n(o,r){if(o===r)return!0;if(o&&r&&typeof o=="object"&&typeof r=="object"){if(o.constructor!==r.constructor)return!1;var i,a,s;if(Array.isArray(o)){if(i=o.length,i!=r.length)return!1;for(a=i;a--!==0;)if(!n(o[a],r[a]))return!1;return!0}if(o.constructor===RegExp)return o.source===r.source&&o.flags===r.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===r.valueOf();if(o.toString!==Object.prototype.toString)return o.toString()===r.toString();if(s=Object.keys(o),i=s.length,i!==Object.keys(r).length)return!1;for(a=i;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=i;a--!==0;){var c=s[a];if(!n(o[c],r[c]))return!1}return!0}return o!==o&&r!==r}})),hI=K(((e,t)=>{var n=t.exports=function(i,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var c=typeof s=="function"?s:s.pre||function(){},u=s.post||function(){};o(a,c,u,i,"",i)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.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 o(i,a,s,c,u,d,p,h,S,v){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,u,d,p,h,S,v);for(var $ in c){var y=c[$];if(Array.isArray(y)){if($ in n.arrayKeywords)for(var f=0;f<y.length;f++)o(i,a,s,y[f],u+"/"+$+"/"+f,d,u,$,c,f)}else if($ in n.propsKeywords){if(y&&typeof y=="object")for(var w in y)o(i,a,s,y[w],u+"/"+$+"/"+r(w),d,u,$,c,w)}else($ in n.keywords||i.allKeys&&!($ in n.skipKeywords))&&o(i,a,s,y,u+"/"+$,d,u,$,c)}s(c,u,d,p,h,S,v)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}})),pu=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=Ie(),n=DS(),o=hI(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(y,f=!0){return typeof y=="boolean"?!0:f===!0?!s(y):f?c(y)<=f:!1}e.inlineRef=i;let a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(y){for(let f in y){if(a.has(f))return!0;let w=y[f];if(Array.isArray(w)&&w.some(s)||typeof w=="object"&&s(w))return!0}return!1}function c(y){let f=0;for(let w in y){if(w==="$ref")return 1/0;if(f++,!r.has(w)&&(typeof y[w]=="object"&&(0,t.eachItem)(y[w],g=>f+=c(g)),f===1/0))return 1/0}return f}function u(y,f="",w){return w!==!1&&(f=h(f)),d(y,y.parse(f))}e.getFullPath=u;function d(y,f){return y.serialize(f).split("#")[0]+"#"}e._getFullPath=d;let p=/#\/?$/;function h(y){return y?y.replace(p,""):""}e.normalizeId=h;function S(y,f,w){return w=h(w),y.resolve(f,w)}e.resolveUrl=S;let v=/^[a-z_][-a-z0-9._]*$/i;function $(y,f){if(typeof y=="boolean")return{};let{schemaId:w,uriResolver:g}=this.opts,b=h(y[w]||f),k={"":b},z=u(g,b,!1),_={},R=new Set;return o(y,{allKeys:!0},(C,V,ee,ne)=>{if(ne===void 0)return;let $e=z+V,Oe=k[ne];typeof C[w]=="string"&&(Oe=je.call(this,C[w])),Ve.call(this,C.$anchor),Ve.call(this,C.$dynamicAnchor),k[V]=Oe;function je(Re){let x=this.opts.uriResolver.resolve;if(Re=h(Oe?x(Oe,Re):Re),R.has(Re))throw U(Re);R.add(Re);let M=this.refs[Re];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?j(C,M.schema,Re):Re!==h($e)&&(Re[0]==="#"?(j(C,_[Re],Re),_[Re]=C):this.refs[Re]=$e),Re}function Ve(Re){if(typeof Re=="string"){if(!v.test(Re))throw new Error(`invalid anchor "${Re}"`);je.call(this,`#${Re}`)}}}),_;function j(C,V,ee){if(V!==void 0&&!n(C,V))throw U(ee)}function U(C){return new Error(`reference "${C}" resolves to more than one schema`)}}e.getSchemaRefs=$})),Ki=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=dI(),n=du(),o=MS(),r=du(),i=mI(),a=pI(),s=fI(),c=_e(),u=It(),d=pu(),p=Ie(),h=mu();function S(P){if(z(P)&&(R(P),k(P))){f(P);return}v(P,()=>(0,t.topBoolOrEmptySchema)(P))}e.validateFunctionCode=S;function v({gen:P,validateName:D,schema:Z,schemaEnv:me,opts:pe},ye){pe.code.es5?P.func(D,(0,c._)`${u.default.data}, ${u.default.valCxt}`,me.$async,()=>{P.code((0,c._)`"use strict"; ${g(Z,pe)}`),y(P,pe),P.code(ye)}):P.func(D,(0,c._)`${u.default.data}, ${$(pe)}`,me.$async,()=>P.code(g(Z,pe)).code(ye))}function $(P){return(0,c._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${P.dynamicRef?(0,c._)`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function y(P,D){P.if(u.default.valCxt,()=>{P.var(u.default.instancePath,(0,c._)`${u.default.valCxt}.${u.default.instancePath}`),P.var(u.default.parentData,(0,c._)`${u.default.valCxt}.${u.default.parentData}`),P.var(u.default.parentDataProperty,(0,c._)`${u.default.valCxt}.${u.default.parentDataProperty}`),P.var(u.default.rootData,(0,c._)`${u.default.valCxt}.${u.default.rootData}`),D.dynamicRef&&P.var(u.default.dynamicAnchors,(0,c._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{P.var(u.default.instancePath,(0,c._)`""`),P.var(u.default.parentData,(0,c._)`undefined`),P.var(u.default.parentDataProperty,(0,c._)`undefined`),P.var(u.default.rootData,u.default.data),D.dynamicRef&&P.var(u.default.dynamicAnchors,(0,c._)`{}`)})}function f(P){let{schema:D,opts:Z,gen:me}=P;v(P,()=>{Z.$comment&&D.$comment&&ne(P),C(P),me.let(u.default.vErrors,null),me.let(u.default.errors,0),Z.unevaluated&&w(P),j(P),$e(P)})}function w(P){let{gen:D,validateName:Z}=P;P.evaluated=D.const("evaluated",(0,c._)`${Z}.evaluated`),D.if((0,c._)`${P.evaluated}.dynamicProps`,()=>D.assign((0,c._)`${P.evaluated}.props`,(0,c._)`undefined`)),D.if((0,c._)`${P.evaluated}.dynamicItems`,()=>D.assign((0,c._)`${P.evaluated}.items`,(0,c._)`undefined`))}function g(P,D){let Z=typeof P=="object"&&P[D.schemaId];return Z&&(D.code.source||D.code.process)?(0,c._)`/*# sourceURL=${Z} */`:c.nil}function b(P,D){if(z(P)&&(R(P),k(P))){_(P,D);return}(0,t.boolOrEmptySchema)(P,D)}function k({schema:P,self:D}){if(typeof P=="boolean")return!P;for(let Z in P)if(D.RULES.all[Z])return!0;return!1}function z(P){return typeof P.schema!="boolean"}function _(P,D){let{schema:Z,gen:me,opts:pe}=P;pe.$comment&&Z.$comment&&ne(P),V(P),ee(P);let ye=me.const("_errs",u.default.errors);j(P,ye),me.var(D,(0,c._)`${ye} === ${u.default.errors}`)}function R(P){(0,p.checkUnknownRules)(P),U(P)}function j(P,D){if(P.opts.jtd)return je(P,[],!1,D);let Z=(0,n.getSchemaTypes)(P.schema);je(P,Z,!(0,n.coerceAndCheckDataType)(P,Z),D)}function U(P){let{schema:D,errSchemaPath:Z,opts:me,self:pe}=P;D.$ref&&me.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(D,pe.RULES)&&pe.logger.warn(`$ref: keywords ignored in schema at path "${Z}"`)}function C(P){let{schema:D,opts:Z}=P;D.default!==void 0&&Z.useDefaults&&Z.strictSchema&&(0,p.checkStrictMode)(P,"default is ignored in the schema root")}function V(P){let D=P.schema[P.opts.schemaId];D&&(P.baseId=(0,d.resolveUrl)(P.opts.uriResolver,P.baseId,D))}function ee(P){if(P.schema.$async&&!P.schemaEnv.$async)throw new Error("async schema in sync schema")}function ne({gen:P,schemaEnv:D,schema:Z,errSchemaPath:me,opts:pe}){let ye=Z.$comment;if(pe.$comment===!0)P.code((0,c._)`${u.default.self}.logger.log(${ye})`);else if(typeof pe.$comment=="function"){let De=(0,c.str)`${me}/$comment`,Fe=P.scopeValue("root",{ref:D.root});P.code((0,c._)`${u.default.self}.opts.$comment(${ye}, ${De}, ${Fe}.schema)`)}}function $e(P){let{gen:D,schemaEnv:Z,validateName:me,ValidationError:pe,opts:ye}=P;Z.$async?D.if((0,c._)`${u.default.errors} === 0`,()=>D.return(u.default.data),()=>D.throw((0,c._)`new ${pe}(${u.default.vErrors})`)):(D.assign((0,c._)`${me}.errors`,u.default.vErrors),ye.unevaluated&&Oe(P),D.return((0,c._)`${u.default.errors} === 0`))}function Oe({gen:P,evaluated:D,props:Z,items:me}){Z instanceof c.Name&&P.assign((0,c._)`${D}.props`,Z),me instanceof c.Name&&P.assign((0,c._)`${D}.items`,me)}function je(P,D,Z,me){let{gen:pe,schema:ye,data:De,allErrors:Fe,opts:Xe,self:Ze}=P,{RULES:Ae}=Ze;if(ye.$ref&&(Xe.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(ye,Ae))){pe.block(()=>Se(P,"$ref",Ae.all.$ref.definition));return}Xe.jtd||Re(P,D),pe.block(()=>{for(let Je of Ae.rules)gt(Je);gt(Ae.post)});function gt(Je){(0,o.shouldUseGroup)(ye,Je)&&(Je.type?(pe.if((0,r.checkDataType)(Je.type,De,Xe.strictNumbers)),Ve(P,Je),D.length===1&&D[0]===Je.type&&Z&&(pe.else(),(0,r.reportTypeError)(P)),pe.endIf()):Ve(P,Je),Fe||pe.if((0,c._)`${u.default.errors} === ${me||0}`))}}function Ve(P,D){let{gen:Z,schema:me,opts:{useDefaults:pe}}=P;pe&&(0,i.assignDefaults)(P,D.type),Z.block(()=>{for(let ye of D.rules)(0,o.shouldUseRule)(me,ye)&&Se(P,ye.keyword,ye.definition,D.type)})}function Re(P,D){P.schemaEnv.meta||!P.opts.strictTypes||(x(P,D),P.opts.allowUnionTypes||M(P,D),H(P,P.dataTypes))}function x(P,D){if(D.length){if(!P.dataTypes.length){P.dataTypes=D;return}D.forEach(Z=>{E(P.dataTypes,Z)||Y(P,`type "${Z}" not allowed by context "${P.dataTypes.join(",")}"`)}),q(P,D)}}function M(P,D){D.length>1&&!(D.length===2&&D.includes("null"))&&Y(P,"use allowUnionTypes to allow union type keyword")}function H(P,D){let Z=P.self.RULES.all;for(let me in Z){let pe=Z[me];if(typeof pe=="object"&&(0,o.shouldUseRule)(P.schema,pe)){let{type:ye}=pe.definition;ye.length&&!ye.some(De=>I(D,De))&&Y(P,`missing type "${ye.join(",")}" for keyword "${me}"`)}}}function I(P,D){return P.includes(D)||D==="number"&&P.includes("integer")}function E(P,D){return P.includes(D)||D==="integer"&&P.includes("number")}function q(P,D){let Z=[];for(let me of P.dataTypes)E(D,me)?Z.push(me):D.includes("integer")&&me==="number"&&Z.push("integer");P.dataTypes=Z}function Y(P,D){let Z=P.schemaEnv.baseId+P.errSchemaPath;D+=` at "${Z}" (strictTypes)`,(0,p.checkStrictMode)(P,D,P.opts.strictTypes)}var se=class{constructor(P,D,Z){if((0,a.validateKeywordUsage)(P,D,Z),this.gen=P.gen,this.allErrors=P.allErrors,this.keyword=Z,this.data=P.data,this.schema=P.schema[Z],this.$data=D.$data&&P.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(P,this.schema,Z,this.$data),this.schemaType=D.schemaType,this.parentSchema=P.schema,this.params={},this.it=P,this.def=D,this.$data)this.schemaCode=P.gen.const("vSchema",nt(this.$data,P));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw new Error(`${Z} value must be ${JSON.stringify(D.schemaType)}`);("code"in D?D.trackErrors:D.errors!==!1)&&(this.errsCount=P.gen.const("_errs",u.default.errors))}result(P,D,Z){this.failResult((0,c.not)(P),D,Z)}failResult(P,D,Z){this.gen.if(P),Z?Z():this.error(),D?(this.gen.else(),D(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(P,D){this.failResult((0,c.not)(P),void 0,D)}fail(P){if(P===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(P),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(P){if(!this.$data)return this.fail(P);let{schemaCode:D}=this;this.fail((0,c._)`${D} !== undefined && (${(0,c.or)(this.invalid$data(),P)})`)}error(P,D,Z){if(D){this.setParams(D),this._error(P,Z),this.setParams({});return}this._error(P,Z)}_error(P,D){(P?h.reportExtraError:h.reportError)(this,this.def.error,D)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(P){this.allErrors||this.gen.if(P)}setParams(P,D){D?Object.assign(this.params,P):this.params=P}block$data(P,D,Z=c.nil){this.gen.block(()=>{this.check$data(P,Z),D()})}check$data(P=c.nil,D=c.nil){if(!this.$data)return;let{gen:Z,schemaCode:me,schemaType:pe,def:ye}=this;Z.if((0,c.or)((0,c._)`${me} === undefined`,D)),P!==c.nil&&Z.assign(P,!0),(pe.length||ye.validateSchema)&&(Z.elseIf(this.invalid$data()),this.$dataError(),P!==c.nil&&Z.assign(P,!1)),Z.else()}invalid$data(){let{gen:P,schemaCode:D,schemaType:Z,def:me,it:pe}=this;return(0,c.or)(ye(),De());function ye(){if(Z.length){if(!(D instanceof c.Name))throw new Error("ajv implementation error");let Fe=Array.isArray(Z)?Z:[Z];return(0,c._)`${(0,r.checkDataTypes)(Fe,D,pe.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function De(){if(me.validateSchema){let Fe=P.scopeValue("validate$data",{ref:me.validateSchema});return(0,c._)`!${Fe}(${D})`}return c.nil}}subschema(P,D){let Z=(0,s.getSubschema)(this.it,P);(0,s.extendSubschemaData)(Z,this.it,P),(0,s.extendSubschemaMode)(Z,P);let me={...this.it,...Z,items:void 0,props:void 0};return b(me,D),me}mergeEvaluated(P,D){let{it:Z,gen:me}=this;Z.opts.unevaluated&&(Z.props!==!0&&P.props!==void 0&&(Z.props=p.mergeEvaluated.props(me,P.props,Z.props,D)),Z.items!==!0&&P.items!==void 0&&(Z.items=p.mergeEvaluated.items(me,P.items,Z.items,D)))}mergeValidEvaluated(P,D){let{it:Z,gen:me}=this;if(Z.opts.unevaluated&&(Z.props!==!0||Z.items!==!0))return me.if(D,()=>this.mergeEvaluated(P,c.Name)),!0}};e.KeywordCxt=se;function Se(P,D,Z,me){let pe=new se(P,Z,D);"code"in Z?Z.code(pe,me):pe.$data&&Z.validate?(0,a.funcKeywordCode)(pe,Z):"macro"in Z?(0,a.macroKeywordCode)(pe,Z):(Z.compile||Z.validate)&&(0,a.funcKeywordCode)(pe,Z)}let fe=/^\/(?:[^~]|~0|~1)*$/,Ne=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function nt(P,{dataLevel:D,dataNames:Z,dataPathArr:me}){let pe,ye;if(P==="")return u.default.rootData;if(P[0]==="/"){if(!fe.test(P))throw new Error(`Invalid JSON-pointer: ${P}`);pe=P,ye=u.default.rootData}else{let Ze=Ne.exec(P);if(!Ze)throw new Error(`Invalid JSON-pointer: ${P}`);let Ae=+Ze[1];if(pe=Ze[2],pe==="#"){if(Ae>=D)throw new Error(Xe("property/index",Ae));return me[D-Ae]}if(Ae>D)throw new Error(Xe("data",Ae));if(ye=Z[D-Ae],!pe)return ye}let De=ye,Fe=pe.split("/");for(let Ze of Fe)Ze&&(ye=(0,c._)`${ye}${(0,c.getProperty)((0,p.unescapeJsonPointer)(Ze))}`,De=(0,c._)`${De} && ${ye}`);return De;function Xe(Ze,Ae){return`Cannot access ${Ze} ${Ae} levels up, current level is ${D}`}}e.getData=nt})),fu=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}};e.default=t})),Wi=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pu();var n=class extends Error{constructor(o,r,i,a){super(a||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(o,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,this.missingRef))}};e.default=n})),hu=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=_e(),n=fu(),o=It(),r=pu(),i=Ie(),a=Ki();var s=class{constructor(f){var w;this.refs={},this.dynamicAnchors={};let g;typeof f.schema=="object"&&(g=f.schema),this.schema=f.schema,this.schemaId=f.schemaId,this.root=f.root||this,this.baseId=(w=f.baseId)!==null&&w!==void 0?w:(0,r.normalizeId)(g?.[f.schemaId||"$id"]),this.schemaPath=f.schemaPath,this.localRefs=f.localRefs,this.meta=f.meta,this.$async=g?.$async,this.refs={}}};e.SchemaEnv=s;function c(f){let w=p.call(this,f);if(w)return w;let g=(0,r.getFullPath)(this.opts.uriResolver,f.root.baseId),{es5:b,lines:k}=this.opts.code,{ownProperties:z}=this.opts,_=new t.CodeGen(this.scope,{es5:b,lines:k,ownProperties:z}),R;f.$async&&(R=_.scopeValue("Error",{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let j=_.scopeName("validate");f.validateName=j;let U={gen:_,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:f.schema,code:(0,t.stringify)(f.schema)}:{ref:f.schema}),validateName:j,ValidationError:R,schema:f.schema,schemaEnv:f,rootId:g,baseId:f.baseId||g,schemaPath:t.nil,errSchemaPath:f.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this},C;try{this._compilations.add(f),(0,a.validateFunctionCode)(U),_.optimize(this.opts.code.optimize);let V=_.toString();C=`${_.scopeRefs(o.default.scope)}return ${V}`,this.opts.code.process&&(C=this.opts.code.process(C,f));let ee=new Function(`${o.default.self}`,`${o.default.scope}`,C)(this,this.scope.get());if(this.scope.value(j,{ref:ee}),ee.errors=null,ee.schema=f.schema,ee.schemaEnv=f,f.$async&&(ee.$async=!0),this.opts.code.source===!0&&(ee.source={validateName:j,validateCode:V,scopeValues:_._values}),this.opts.unevaluated){let{props:ne,items:$e}=U;ee.evaluated={props:ne instanceof t.Name?void 0:ne,items:$e instanceof t.Name?void 0:$e,dynamicProps:ne instanceof t.Name,dynamicItems:$e instanceof t.Name},ee.source&&(ee.source.evaluated=(0,t.stringify)(ee.evaluated))}return f.validate=ee,f}catch(V){throw delete f.validate,delete f.validateName,C&&this.logger.error("Error compiling schema, function code:",C),V}finally{this._compilations.delete(f)}}e.compileSchema=c;function u(f,w,g){var b;g=(0,r.resolveUrl)(this.opts.uriResolver,w,g);let k=f.refs[g];if(k)return k;let z=S.call(this,f,g);if(z===void 0){let _=(b=f.localRefs)===null||b===void 0?void 0:b[g],{schemaId:R}=this.opts;_&&(z=new s({schema:_,schemaId:R,root:f,baseId:w}))}if(z!==void 0)return f.refs[g]=d.call(this,z)}e.resolveRef=u;function d(f){return(0,r.inlineRef)(f.schema,this.opts.inlineRefs)?f.schema:f.validate?f:c.call(this,f)}function p(f){for(let w of this._compilations)if(h(w,f))return w}e.getCompilingSchema=p;function h(f,w){return f.schema===w.schema&&f.root===w.root&&f.baseId===w.baseId}function S(f,w){let g;for(;typeof(g=this.refs[w])=="string";)w=g;return g||this.schemas[w]||v.call(this,f,w)}function v(f,w){let g=this.opts.uriResolver.parse(w),b=(0,r._getFullPath)(this.opts.uriResolver,g),k=(0,r.getFullPath)(this.opts.uriResolver,f.baseId,void 0);if(Object.keys(f.schema).length>0&&b===k)return y.call(this,g,f);let z=(0,r.normalizeId)(b),_=this.refs[z]||this.schemas[z];if(typeof _=="string"){let R=v.call(this,f,_);return typeof R?.schema!="object"?void 0:y.call(this,g,R)}if(typeof _?.schema=="object"){if(_.validate||c.call(this,_),z===(0,r.normalizeId)(w)){let{schema:R}=_,{schemaId:j}=this.opts,U=R[j];return U&&(k=(0,r.resolveUrl)(this.opts.uriResolver,k,U)),new s({schema:R,schemaId:j,root:f,baseId:k})}return y.call(this,g,_)}}e.resolveSchema=v;let $=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(f,{baseId:w,schema:g,root:b}){var k;if(((k=f.fragment)===null||k===void 0?void 0:k[0])!=="/")return;for(let R of f.fragment.slice(1).split("/")){if(typeof g=="boolean")return;let j=g[(0,i.unescapeFragment)(R)];if(j===void 0)return;g=j;let U=typeof g=="object"&&g[this.opts.schemaId];!$.has(R)&&U&&(w=(0,r.resolveUrl)(this.opts.uriResolver,w,U))}let z;if(typeof g!="boolean"&&g.$ref&&!(0,i.schemaHasRulesButRef)(g,this.RULES)){let R=(0,r.resolveUrl)(this.opts.uriResolver,w,g.$ref);z=v.call(this,b,R)}let{schemaId:_}=this.opts;if(z=z||new s({schema:g,schemaId:_,root:b,baseId:w}),z.schema!==z.root.schema)return z}})),gI=K(((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}})),US=K(((e,t)=>{let n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),o=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);function r(v){let $="",y=0,f=0;for(f=0;f<v.length;f++)if(y=v[f].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";$+=v[f];break}for(f+=1;f<v.length;f++){if(y=v[f].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";$+=v[f]}return $}let i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(v){return v.length=0,!0}function s(v,$,y){if(v.length){let f=r(v);if(f!=="")$.push(f);else return y.error=!0,!1;v.length=0}return!0}function c(v){let $=0,y={error:!1,address:"",zone:""},f=[],w=[],g=!1,b=!1,k=s;for(let z=0;z<v.length;z++){let _=v[z];if(!(_==="["||_==="]"))if(_===":"){if(g===!0&&(b=!0),!k(w,f,y))break;if(++$>7){y.error=!0;break}z>0&&v[z-1]===":"&&(g=!0),f.push(":");continue}else if(_==="%"){if(!k(w,f,y))break;k=a}else{w.push(_);continue}}return w.length&&(k===a?y.zone=w.join(""):b?f.push(w.join("")):f.push(r(w))),y.address=f.join(""),y}function u(v){if(d(v,":")<2)return{host:v,isIPV6:!1};let $=c(v);if($.error)return{host:v,isIPV6:!1};{let y=$.address,f=$.address;return $.zone&&(y+="%"+$.zone,f+="%25"+$.zone),{host:y,isIPV6:!0,escapedHost:f}}}function d(v,$){let y=0;for(let f=0;f<v.length;f++)v[f]===$&&y++;return y}function p(v){let $=v,y=[],f=-1,w=0;for(;w=$.length;){if(w===1){if($===".")break;if($==="/"){y.push("/");break}else{y.push($);break}}else if(w===2){if($[0]==="."){if($[1]===".")break;if($[1]==="/"){$=$.slice(2);continue}}else if($[0]==="/"&&($[1]==="."||$[1]==="/")){y.push("/");break}}else if(w===3&&$==="/.."){y.length!==0&&y.pop(),y.push("/");break}if($[0]==="."){if($[1]==="."){if($[2]==="/"){$=$.slice(3);continue}}else if($[1]==="/"){$=$.slice(2);continue}}else if($[0]==="/"&&$[1]==="."){if($[2]==="/"){$=$.slice(2);continue}else if($[2]==="."&&$[3]==="/"){$=$.slice(3),y.length!==0&&y.pop();continue}}if((f=$.indexOf("/",1))===-1){y.push($);break}else y.push($.slice(0,f)),$=$.slice(f)}return y.join("")}function h(v,$){let y=$!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=y(v.scheme)),v.userinfo!==void 0&&(v.userinfo=y(v.userinfo)),v.host!==void 0&&(v.host=y(v.host)),v.path!==void 0&&(v.path=y(v.path)),v.query!==void 0&&(v.query=y(v.query)),v.fragment!==void 0&&(v.fragment=y(v.fragment)),v}function S(v){let $=[];if(v.userinfo!==void 0&&($.push(v.userinfo),$.push("@")),v.host!==void 0){let y=unescape(v.host);if(!o(y)){let f=u(y);f.isIPV6===!0?y=`[${f.escapedHost}]`:y=v.host}$.push(y)}return(typeof v.port=="number"||typeof v.port=="string")&&($.push(":"),$.push(String(v.port))),$.length?$.join(""):void 0}t.exports={nonSimpleDomain:i,recomposeAuthority:S,normalizeComponentEncoding:h,removeDotSegments:p,isIPv4:o,isUUID:n,normalizeIPv6:u,stringArrayToHexStripped:r}})),vI=K(((e,t)=>{let{isUUID:n}=US(),o=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i(_){return r.indexOf(_)!==-1}function a(_){return _.secure===!0?!0:_.secure===!1?!1:_.scheme?_.scheme.length===3&&(_.scheme[0]==="w"||_.scheme[0]==="W")&&(_.scheme[1]==="s"||_.scheme[1]==="S")&&(_.scheme[2]==="s"||_.scheme[2]==="S"):!1}function s(_){return _.host||(_.error=_.error||"HTTP URIs must have a host."),_}function c(_){let R=String(_.scheme).toLowerCase()==="https";return(_.port===(R?443:80)||_.port==="")&&(_.port=void 0),_.path||(_.path="/"),_}function u(_){return _.secure=a(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function d(_){if((_.port===(a(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){let[R,j]=_.resourceName.split("?");_.path=R&&R!=="/"?R:void 0,_.query=j,_.resourceName=void 0}return _.fragment=void 0,_}function p(_,R){if(!_.path)return _.error="URN can not be parsed",_;let j=_.path.match(o);if(j){let U=R.scheme||_.scheme||"urn";_.nid=j[1].toLowerCase(),_.nss=j[2];let C=z(`${U}:${R.nid||_.nid}`);_.path=void 0,C&&(_=C.parse(_,R))}else _.error=_.error||"URN can not be parsed.";return _}function h(_,R){if(_.nid===void 0)throw new Error("URN without nid cannot be serialized");let j=R.scheme||_.scheme||"urn",U=_.nid.toLowerCase(),C=z(`${j}:${R.nid||U}`);C&&(_=C.serialize(_,R));let V=_,ee=_.nss;return V.path=`${U||R.nid}:${ee}`,R.skipEscape=!0,V}function S(_,R){let j=_;return j.uuid=j.nss,j.nss=void 0,!R.tolerant&&(!j.uuid||!n(j.uuid))&&(j.error=j.error||"UUID is not valid."),j}function v(_){let R=_;return R.nss=(_.uuid||"").toLowerCase(),R}let $={scheme:"http",domainHost:!0,parse:s,serialize:c},y={scheme:"https",domainHost:$.domainHost,parse:s,serialize:c},f={scheme:"ws",domainHost:!0,parse:u,serialize:d},w={scheme:"wss",domainHost:f.domainHost,parse:f.parse,serialize:f.serialize},k={http:$,https:y,ws:f,wss:w,urn:{scheme:"urn",parse:p,serialize:h,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:S,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(k,null);function z(_){return _&&(k[_]||k[_.toLowerCase()])||void 0}t.exports={wsIsSecure:a,SCHEMES:k,isValidSchemeName:i,getSchemeHandler:z}})),yI=K(((e,t)=>{let{normalizeIPv6:n,removeDotSegments:o,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:a,nonSimpleDomain:s}=US(),{SCHEMES:c,getSchemeHandler:u}=vI();function d(w,g){return typeof w=="string"?w=v(y(w,g),g):typeof w=="object"&&(w=y(v(w,g),g)),w}function p(w,g,b){let k=b?Object.assign({scheme:"null"},b):{scheme:"null"},z=h(y(w,k),y(g,k),k,!0);return k.skipEscape=!0,v(z,k)}function h(w,g,b,k){let z={};return k||(w=y(v(w,b),b),g=y(v(g,b),b)),b=b||{},!b.tolerant&&g.scheme?(z.scheme=g.scheme,z.userinfo=g.userinfo,z.host=g.host,z.port=g.port,z.path=o(g.path||""),z.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?(z.userinfo=g.userinfo,z.host=g.host,z.port=g.port,z.path=o(g.path||""),z.query=g.query):(g.path?(g.path[0]==="/"?z.path=o(g.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?z.path="/"+g.path:w.path?z.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+g.path:z.path=g.path,z.path=o(z.path)),z.query=g.query):(z.path=w.path,g.query!==void 0?z.query=g.query:z.query=w.query),z.userinfo=w.userinfo,z.host=w.host,z.port=w.port),z.scheme=w.scheme),z.fragment=g.fragment,z}function S(w,g,b){return typeof w=="string"?(w=unescape(w),w=v(i(y(w,b),!0),{...b,skipEscape:!0})):typeof w=="object"&&(w=v(i(w,!0),{...b,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=v(i(y(g,b),!0),{...b,skipEscape:!0})):typeof g=="object"&&(g=v(i(g,!0),{...b,skipEscape:!0})),w.toLowerCase()===g.toLowerCase()}function v(w,g){let b={host:w.host,scheme:w.scheme,userinfo:w.userinfo,port:w.port,path:w.path,query:w.query,nid:w.nid,nss:w.nss,uuid:w.uuid,fragment:w.fragment,reference:w.reference,resourceName:w.resourceName,secure:w.secure,error:""},k=Object.assign({},g),z=[],_=u(k.scheme||b.scheme);_&&_.serialize&&_.serialize(b,k),b.path!==void 0&&(k.skipEscape?b.path=unescape(b.path):(b.path=escape(b.path),b.scheme!==void 0&&(b.path=b.path.split("%3A").join(":")))),k.reference!=="suffix"&&b.scheme&&z.push(b.scheme,":");let R=r(b);if(R!==void 0&&(k.reference!=="suffix"&&z.push("//"),z.push(R),b.path&&b.path[0]!=="/"&&z.push("/")),b.path!==void 0){let j=b.path;!k.absolutePath&&(!_||!_.absolutePath)&&(j=o(j)),R===void 0&&j[0]==="/"&&j[1]==="/"&&(j="/%2F"+j.slice(2)),z.push(j)}return b.query!==void 0&&z.push("?",b.query),b.fragment!==void 0&&z.push("#",b.fragment),z.join("")}let $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(w,g){let b=Object.assign({},g),k={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},z=!1;b.reference==="suffix"&&(b.scheme?w=b.scheme+":"+w:w="//"+w);let _=w.match($);if(_){if(k.scheme=_[1],k.userinfo=_[3],k.host=_[4],k.port=parseInt(_[5],10),k.path=_[6]||"",k.query=_[7],k.fragment=_[8],isNaN(k.port)&&(k.port=_[5]),k.host)if(a(k.host)===!1){let j=n(k.host);k.host=j.host.toLowerCase(),z=j.isIPV6}else z=!0;k.scheme===void 0&&k.userinfo===void 0&&k.host===void 0&&k.port===void 0&&k.query===void 0&&!k.path?k.reference="same-document":k.scheme===void 0?k.reference="relative":k.fragment===void 0?k.reference="absolute":k.reference="uri",b.reference&&b.reference!=="suffix"&&b.reference!==k.reference&&(k.error=k.error||"URI is not a "+b.reference+" reference.");let R=u(b.scheme||k.scheme);if(!b.unicodeSupport&&(!R||!R.unicodeSupport)&&k.host&&(b.domainHost||R&&R.domainHost)&&z===!1&&s(k.host))try{k.host=URL.domainToASCII(k.host.toLowerCase())}catch(j){k.error=k.error||"Host's domain name can not be converted to ASCII: "+j}(!R||R&&!R.skipNormalize)&&(w.indexOf("%")!==-1&&(k.scheme!==void 0&&(k.scheme=unescape(k.scheme)),k.host!==void 0&&(k.host=unescape(k.host))),k.path&&(k.path=escape(unescape(k.path))),k.fragment&&(k.fragment=encodeURI(decodeURIComponent(k.fragment)))),R&&R.parse&&R.parse(k,b)}else k.error=k.error||"URI can not be parsed.";return k}let f={SCHEMES:c,normalize:d,resolve:p,resolveComponent:h,equal:S,serialize:v,parse:y};t.exports=f,t.exports.default=f,t.exports.fastUri=f})),_I=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=yI();t.code='require("ajv/dist/runtime/uri").default',e.default=t})),VS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Ki();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});let o=fu(),r=Wi(),i=LS(),a=hu(),s=_e(),c=pu(),u=du(),d=Ie(),p=gI(),h=_I(),S=(x,M)=>new RegExp(x,M);S.code="new RegExp";let v=["removeAdditional","useDefaults","coerceTypes"],$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={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."},f={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},w=200;function g(x){var M,H,I,E,q,Y,se,Se,fe,Ne,nt,P,D,Z,me,pe,ye,De,Fe,Xe,Ze,Ae,gt,Je,At;let bt=x.strict,Ct=(M=x.code)===null||M===void 0?void 0:M.optimize,Gt=Ct===!0||Ct===void 0?1:Ct||0,Bt=(I=(H=x.code)===null||H===void 0?void 0:H.regExp)!==null&&I!==void 0?I:S,$r=(E=x.uriResolver)!==null&&E!==void 0?E:h.default;return{strictSchema:(Y=(q=x.strictSchema)!==null&&q!==void 0?q:bt)!==null&&Y!==void 0?Y:!0,strictNumbers:(Se=(se=x.strictNumbers)!==null&&se!==void 0?se:bt)!==null&&Se!==void 0?Se:!0,strictTypes:(Ne=(fe=x.strictTypes)!==null&&fe!==void 0?fe:bt)!==null&&Ne!==void 0?Ne:"log",strictTuples:(P=(nt=x.strictTuples)!==null&&nt!==void 0?nt:bt)!==null&&P!==void 0?P:"log",strictRequired:(Z=(D=x.strictRequired)!==null&&D!==void 0?D:bt)!==null&&Z!==void 0?Z:!1,code:x.code?{...x.code,optimize:Gt,regExp:Bt}:{optimize:Gt,regExp:Bt},loopRequired:(me=x.loopRequired)!==null&&me!==void 0?me:w,loopEnum:(pe=x.loopEnum)!==null&&pe!==void 0?pe:w,meta:(ye=x.meta)!==null&&ye!==void 0?ye:!0,messages:(De=x.messages)!==null&&De!==void 0?De:!0,inlineRefs:(Fe=x.inlineRefs)!==null&&Fe!==void 0?Fe:!0,schemaId:(Xe=x.schemaId)!==null&&Xe!==void 0?Xe:"$id",addUsedSchema:(Ze=x.addUsedSchema)!==null&&Ze!==void 0?Ze:!0,validateSchema:(Ae=x.validateSchema)!==null&&Ae!==void 0?Ae:!0,validateFormats:(gt=x.validateFormats)!==null&&gt!==void 0?gt:!0,unicodeRegExp:(Je=x.unicodeRegExp)!==null&&Je!==void 0?Je:!0,int32range:(At=x.int32range)!==null&&At!==void 0?At:!0,uriResolver:$r}}var b=class{constructor(x={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,x=this.opts={...x,...g(x)};let{es5:M,lines:H}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:$,es5:M,lines:H}),this.logger=V(x.logger);let I=x.validateFormats;x.validateFormats=!1,this.RULES=(0,i.getRules)(),k.call(this,y,x,"NOT SUPPORTED"),k.call(this,f,x,"DEPRECATED","warn"),this._metaOpts=U.call(this),x.formats&&R.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),x.keywords&&j.call(this,x.keywords),typeof x.meta=="object"&&this.addMetaSchema(x.meta),_.call(this),x.validateFormats=I}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:x,meta:M,schemaId:H}=this.opts,I=p;H==="id"&&(I={...p},I.id=I.$id,delete I.$id),M&&x&&this.addMetaSchema(I,I[H],!1)}defaultMeta(){let{meta:x,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof x=="object"?x[M]||x:void 0}validate(x,M){let H;if(typeof x=="string"){if(H=this.getSchema(x),!H)throw new Error(`no schema with key or ref "${x}"`)}else H=this.compile(x);let I=H(M);return"$async"in H||(this.errors=H.errors),I}compile(x,M){let H=this._addSchema(x,M);return H.validate||this._compileSchemaEnv(H)}compileAsync(x,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:H}=this.opts;return I.call(this,x,M);async function I(fe,Ne){await E.call(this,fe.$schema);let nt=this._addSchema(fe,Ne);return nt.validate||q.call(this,nt)}async function E(fe){fe&&!this.getSchema(fe)&&await I.call(this,{$ref:fe},!0)}async function q(fe){try{return this._compileSchemaEnv(fe)}catch(Ne){if(!(Ne instanceof r.default))throw Ne;return Y.call(this,Ne),await se.call(this,Ne.missingSchema),q.call(this,fe)}}function Y({missingSchema:fe,missingRef:Ne}){if(this.refs[fe])throw new Error(`AnySchema ${fe} is loaded but ${Ne} cannot be resolved`)}async function se(fe){let Ne=await Se.call(this,fe);this.refs[fe]||await E.call(this,Ne.$schema),this.refs[fe]||this.addSchema(Ne,fe,M)}async function Se(fe){let Ne=this._loading[fe];if(Ne)return Ne;try{return await(this._loading[fe]=H(fe))}finally{delete this._loading[fe]}}}addSchema(x,M,H,I=this.opts.validateSchema){if(Array.isArray(x)){for(let q of x)this.addSchema(q,void 0,H,I);return this}let E;if(typeof x=="object"){let{schemaId:q}=this.opts;if(E=x[q],E!==void 0&&typeof E!="string")throw new Error(`schema ${q} must be string`)}return M=(0,c.normalizeId)(M||E),this._checkUnique(M),this.schemas[M]=this._addSchema(x,H,M,I,!0),this}addMetaSchema(x,M,H=this.opts.validateSchema){return this.addSchema(x,M,!0,H),this}validateSchema(x,M){if(typeof x=="boolean")return!0;let H;if(H=x.$schema,H!==void 0&&typeof H!="string")throw new Error("$schema must be a string");if(H=H||this.opts.defaultMeta||this.defaultMeta(),!H)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let I=this.validate(H,x);if(!I&&M){let E="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(E);else throw new Error(E)}return I}getSchema(x){let M;for(;typeof(M=z.call(this,x))=="string";)x=M;if(M===void 0){let{schemaId:H}=this.opts,I=new a.SchemaEnv({schema:{},schemaId:H});if(M=a.resolveSchema.call(this,I,x),!M)return;this.refs[x]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(x){if(x instanceof RegExp)return this._removeAllSchemas(this.schemas,x),this._removeAllSchemas(this.refs,x),this;switch(typeof x){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let M=z.call(this,x);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[x],delete this.refs[x],this}case"object":{let M=x;this._cache.delete(M);let H=x[this.opts.schemaId];return H&&(H=(0,c.normalizeId)(H),delete this.schemas[H],delete this.refs[H]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(x){for(let M of x)this.addKeyword(M);return this}addKeyword(x,M){let H;if(typeof x=="string")H=x,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=H);else if(typeof x=="object"&&M===void 0){if(M=x,H=M.keyword,Array.isArray(H)&&!H.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ne.call(this,H,M),!M)return(0,d.eachItem)(H,E=>$e.call(this,E)),this;je.call(this,M);let I={...M,type:(0,u.getJSONTypes)(M.type),schemaType:(0,u.getJSONTypes)(M.schemaType)};return(0,d.eachItem)(H,I.type.length===0?E=>$e.call(this,E,I):E=>I.type.forEach(q=>$e.call(this,E,I,q))),this}getKeyword(x){let M=this.RULES.all[x];return typeof M=="object"?M.definition:!!M}removeKeyword(x){let{RULES:M}=this;delete M.keywords[x],delete M.all[x];for(let H of M.rules){let I=H.rules.findIndex(E=>E.keyword===x);I>=0&&H.rules.splice(I,1)}return this}addFormat(x,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[x]=M,this}errorsText(x=this.errors,{separator:M=", ",dataVar:H="data"}={}){return!x||x.length===0?"No errors":x.map(I=>`${H}${I.instancePath} ${I.message}`).reduce((I,E)=>I+M+E)}$dataMetaSchema(x,M){let H=this.RULES.all;x=JSON.parse(JSON.stringify(x));for(let I of M){let E=I.split("/").slice(1),q=x;for(let Y of E)q=q[Y];for(let Y in H){let se=H[Y];if(typeof se!="object")continue;let{$data:Se}=se.definition,fe=q[Y];Se&&fe&&(q[Y]=Re(fe))}}return x}_removeAllSchemas(x,M){for(let H in x){let I=x[H];(!M||M.test(H))&&(typeof I=="string"?delete x[H]:I&&!I.meta&&(this._cache.delete(I.schema),delete x[H]))}}_addSchema(x,M,H,I=this.opts.validateSchema,E=this.opts.addUsedSchema){let q,{schemaId:Y}=this.opts;if(typeof x=="object")q=x[Y];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof x!="boolean")throw new Error("schema must be object or boolean")}let se=this._cache.get(x);if(se!==void 0)return se;H=(0,c.normalizeId)(q||H);let Se=c.getSchemaRefs.call(this,x,H);return se=new a.SchemaEnv({schema:x,schemaId:Y,meta:M,baseId:H,localRefs:Se}),this._cache.set(se.schema,se),E&&!H.startsWith("#")&&(H&&this._checkUnique(H),this.refs[H]=se),I&&this.validateSchema(x,!0),se}_checkUnique(x){if(this.schemas[x]||this.refs[x])throw new Error(`schema with key or id "${x}" already exists`)}_compileSchemaEnv(x){if(x.meta?this._compileMetaSchema(x):a.compileSchema.call(this,x),!x.validate)throw new Error("ajv implementation error");return x.validate}_compileMetaSchema(x){let M=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,x)}finally{this.opts=M}}};b.ValidationError=o.default,b.MissingRefError=r.default,e.default=b;function k(x,M,H,I="error"){for(let E in x){let q=E;q in M&&this.logger[I](`${H}: option ${E}. ${x[q]}`)}}function z(x){return x=(0,c.normalizeId)(x),this.schemas[x]||this.refs[x]}function _(){let x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(let M in x)this.addSchema(x[M],M)}function R(){for(let x in this.opts.formats){let M=this.opts.formats[x];M&&this.addFormat(x,M)}}function j(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let M in x){let H=x[M];H.keyword||(H.keyword=M),this.addKeyword(H)}}function U(){let x={...this.opts};for(let M of v)delete x[M];return x}let C={log(){},warn(){},error(){}};function V(x){if(x===!1)return C;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}let ee=/^[a-z_$][a-z0-9_$:-]*$/i;function ne(x,M){let{RULES:H}=this;if((0,d.eachItem)(x,I=>{if(H.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!ee.test(I))throw new Error(`Keyword ${I} has invalid name`)}),!!M&&M.$data&&!("code"in M||"validate"in M))throw new Error('$data keyword must have "code" or "validate" function')}function $e(x,M,H){var I;let E=M?.post;if(H&&E)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:q}=this,Y=E?q.post:q.rules.find(({type:Se})=>Se===H);if(Y||(Y={type:H,rules:[]},q.rules.push(Y)),q.keywords[x]=!0,!M)return;let se={keyword:x,definition:{...M,type:(0,u.getJSONTypes)(M.type),schemaType:(0,u.getJSONTypes)(M.schemaType)}};M.before?Oe.call(this,Y,se,M.before):Y.rules.push(se),q.all[x]=se,(I=M.implements)===null||I===void 0||I.forEach(Se=>this.addKeyword(Se))}function Oe(x,M,H){let I=x.rules.findIndex(E=>E.keyword===H);I>=0?x.rules.splice(I,0,M):(x.rules.push(M),this.logger.warn(`rule ${H} is not defined`))}function je(x){let{metaSchema:M}=x;M!==void 0&&(x.$data&&this.opts.$data&&(M=Re(M)),x.validateSchema=this.compile(M,!0))}let Ve={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Re(x){return{anyOf:[x,Ve]}}})),SI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=t})),Pg=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=Wi(),n=kt(),o=_e(),r=It(),i=hu(),a=Ie(),s={keyword:"$ref",schemaType:"string",code(d){let{gen:p,schema:h,it:S}=d,{baseId:v,schemaEnv:$,validateName:y,opts:f,self:w}=S,{root:g}=$;if((h==="#"||h==="#/")&&v===g.baseId)return k();let b=i.resolveRef.call(w,g,v,h);if(b===void 0)throw new t.default(S.opts.uriResolver,v,h);if(b instanceof i.SchemaEnv)return z(b);return _(b);function k(){if($===g)return u(d,y,$,$.$async);let R=p.scopeValue("root",{ref:g});return u(d,(0,o._)`${R}.validate`,g,g.$async)}function z(R){u(d,c(d,R),R,R.$async)}function _(R){let j=p.scopeValue("schema",f.code.source===!0?{ref:R,code:(0,o.stringify)(R)}:{ref:R}),U=p.name("valid"),C=d.subschema({schema:R,dataTypes:[],schemaPath:o.nil,topSchemaRef:j,errSchemaPath:h},U);d.mergeEvaluated(C),d.ok(U)}}};function c(d,p){let{gen:h}=d;return p.validate?h.scopeValue("validate",{ref:p.validate}):(0,o._)`${h.scopeValue("wrapper",{ref:p})}.validate`}e.getValidate=c;function u(d,p,h,S){let{gen:v,it:$}=d,{allErrors:y,schemaEnv:f,opts:w}=$,g=w.passContext?r.default.this:o.nil;S?b():k();function b(){if(!f.$async)throw new Error("async schema referenced by sync schema");let R=v.let("valid");v.try(()=>{v.code((0,o._)`await ${(0,n.callValidateCode)(d,p,g)}`),_(p),y||v.assign(R,!0)},j=>{v.if((0,o._)`!(${j} instanceof ${$.ValidationError})`,()=>v.throw(j)),z(j),y||v.assign(R,!1)}),d.ok(R)}function k(){d.result((0,n.callValidateCode)(d,p,g),()=>_(p),()=>z(p))}function z(R){let j=(0,o._)`${R}.errors`;v.assign(r.default.vErrors,(0,o._)`${r.default.vErrors} === null ? ${j} : ${r.default.vErrors}.concat(${j})`),v.assign(r.default.errors,(0,o._)`${r.default.vErrors}.length`)}function _(R){var j;if(!$.opts.unevaluated)return;let U=(j=h?.validate)===null||j===void 0?void 0:j.evaluated;if($.props!==!0)if(U&&!U.dynamicProps)U.props!==void 0&&($.props=a.mergeEvaluated.props(v,U.props,$.props));else{let C=v.var("props",(0,o._)`${R}.evaluated.props`);$.props=a.mergeEvaluated.props(v,C,$.props,o.Name)}if($.items!==!0)if(U&&!U.dynamicItems)U.items!==void 0&&($.items=a.mergeEvaluated.items(v,U.items,$.items));else{let C=v.var("items",(0,o._)`${R}.evaluated.items`);$.items=a.mergeEvaluated.items(v,C,$.items,o.Name)}}}e.callRef=u,e.default=s})),ZS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=SI(),n=Pg(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,n.default];e.default=o})),bI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=t.operators,o={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},r={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:i,schemaCode:a})=>(0,t.str)`must be ${o[i].okStr} ${a}`,params:({keyword:i,schemaCode:a})=>(0,t._)`{comparison: ${o[i].okStr}, limit: ${a}}`},code(i){let{keyword:a,data:s,schemaCode:c}=i;i.fail$data((0,t._)`${s} ${o[a].fail} ${c} || isNaN(${s})`)}};e.default=r})),$I=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must be multiple of ${o}`,params:({schemaCode:o})=>(0,t._)`{multipleOf: ${o}}`},code(o){let{gen:r,data:i,schemaCode:a,it:s}=o,c=s.opts.multipleOfPrecision,u=r.let("res"),d=c?(0,t._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${c}`:(0,t._)`${u} !== parseInt(${u})`;o.fail$data((0,t._)`(${a} === 0 || (${u} = ${i}/${a}, ${d}))`)}};e.default=n})),zI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(n){let o=n.length,r=0,i=0,a;for(;i<o;)r++,a=n.charCodeAt(i++),a>=55296&&a<=56319&&i<o&&(a=n.charCodeAt(i),(a&64512)===56320&&i++);return r}e.default=t,t.code='require("ajv/dist/runtime/ucs2length").default'})),wI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o=zI(),r={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:a}){let s=i==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${a} characters`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){let{keyword:a,data:s,schemaCode:c,it:u}=i,d=a==="maxLength"?t.operators.GT:t.operators.LT,p=u.opts.unicode===!1?(0,t._)`${s}.length`:(0,t._)`${(0,n.useFunc)(i.gen,o.default)}(${s})`;i.fail$data((0,t._)`${p} ${d} ${c}`)}};e.default=r})),RI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=kt(),n=Ie(),o=_e(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,o.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,o._)`{pattern: ${i}}`},code(i){let{gen:a,data:s,$data:c,schema:u,schemaCode:d,it:p}=i,h=p.opts.unicodeRegExp?"u":"";if(c){let{regExp:S}=p.opts.code,v=S.code==="new RegExp"?(0,o._)`new RegExp`:(0,n.useFunc)(a,S),$=a.let("valid");a.try(()=>a.assign($,(0,o._)`${v}(${d}, ${h}).test(${s})`),()=>a.assign($,!1)),i.fail$data((0,o._)`!${$}`)}else{let S=(0,t.usePattern)(i,u);i.fail$data((0,o._)`!${S}.test(${s})`)}}};e.default=r})),II=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:r}){let i=o==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${r} properties`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){let{keyword:r,data:i,schemaCode:a}=o,s=r==="maxProperties"?t.operators.GT:t.operators.LT;o.fail$data((0,t._)`Object.keys(${i}).length ${s} ${a}`)}};e.default=n})),kI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=kt(),n=_e(),o=Ie(),r={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,n.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,n._)`{missingProperty: ${i}}`},code(i){let{gen:a,schema:s,schemaCode:c,data:u,$data:d,it:p}=i,{opts:h}=p;if(!d&&s.length===0)return;let S=s.length>=h.loopRequired;if(p.allErrors?v():$(),h.strictRequired){let w=i.parentSchema.properties,{definedProperties:g}=i.it;for(let b of s)if(w?.[b]===void 0&&!g.has(b)){let k=`required property "${b}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(p,k,p.opts.strictRequired)}}function v(){if(S||d)i.block$data(n.nil,y);else for(let w of s)(0,t.checkReportMissingProp)(i,w)}function $(){let w=a.let("missing");if(S||d){let g=a.let("valid",!0);i.block$data(g,()=>f(w,g)),i.ok(g)}else a.if((0,t.checkMissingProp)(i,s,w)),(0,t.reportMissingProp)(i,w),a.else()}function y(){a.forOf("prop",c,w=>{i.setParams({missingProperty:w}),a.if((0,t.noPropertyInData)(a,u,w,h.ownProperties),()=>i.error())})}function f(w,g){i.setParams({missingProperty:w}),a.forOf(w,c,()=>{a.assign(g,(0,t.propertyInData)(a,u,w,h.ownProperties)),a.if((0,n.not)(g),()=>{i.error(),a.break()})},n.nil)}}};e.default=r})),TI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:r}){let i=o==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${r} items`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){let{keyword:r,data:i,schemaCode:a}=o,s=r==="maxItems"?t.operators.GT:t.operators.LT;o.fail$data((0,t._)`${i}.length ${s} ${a}`)}};e.default=n})),Eg=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=DS();t.code='require("ajv/dist/runtime/equal").default',e.default=t})),PI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=du(),n=_e(),o=Ie(),r=Eg(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:s}})=>(0,n.str)`must NOT have duplicate items (items ## ${s} and ${a} are identical)`,params:({params:{i:a,j:s}})=>(0,n._)`{i: ${a}, j: ${s}}`},code(a){let{gen:s,data:c,$data:u,schema:d,parentSchema:p,schemaCode:h,it:S}=a;if(!u&&!d)return;let v=s.let("valid"),$=p.items?(0,t.getSchemaTypes)(p.items):[];a.block$data(v,y,(0,n._)`${h} === false`),a.ok(v);function y(){let b=s.let("i",(0,n._)`${c}.length`),k=s.let("j");a.setParams({i:b,j:k}),s.assign(v,!0),s.if((0,n._)`${b} > 1`,()=>(f()?w:g)(b,k))}function f(){return $.length>0&&!$.some(b=>b==="object"||b==="array")}function w(b,k){let z=s.name("item"),_=(0,t.checkDataTypes)($,z,S.opts.strictNumbers,t.DataType.Wrong),R=s.const("indices",(0,n._)`{}`);s.for((0,n._)`;${b}--;`,()=>{s.let(z,(0,n._)`${c}[${b}]`),s.if(_,(0,n._)`continue`),$.length>1&&s.if((0,n._)`typeof ${z} == "string"`,(0,n._)`${z} += "_"`),s.if((0,n._)`typeof ${R}[${z}] == "number"`,()=>{s.assign(k,(0,n._)`${R}[${z}]`),a.error(),s.assign(v,!1).break()}).code((0,n._)`${R}[${z}] = ${b}`)})}function g(b,k){let z=(0,o.useFunc)(s,r.default),_=s.name("outer");s.label(_).for((0,n._)`;${b}--;`,()=>s.for((0,n._)`${k} = ${b}; ${k}--;`,()=>s.if((0,n._)`${z}(${c}[${b}], ${c}[${k}])`,()=>{a.error(),s.assign(v,!1).break(_)})))}}};e.default=i})),EI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o=Eg(),r={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,t._)`{allowedValue: ${i}}`},code(i){let{gen:a,data:s,$data:c,schemaCode:u,schema:d}=i;c||d&&typeof d=="object"?i.fail$data((0,t._)`!${(0,n.useFunc)(a,o.default)}(${s}, ${u})`):i.fail((0,t._)`${d} !== ${s}`)}};e.default=r})),xI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o=Eg(),r={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,t._)`{allowedValues: ${i}}`},code(i){let{gen:a,data:s,$data:c,schema:u,schemaCode:d,it:p}=i;if(!c&&u.length===0)throw new Error("enum must have non-empty array");let h=u.length>=p.opts.loopEnum,S,v=()=>S??(S=(0,n.useFunc)(a,o.default)),$;if(h||c)$=a.let("valid"),i.block$data($,y);else{if(!Array.isArray(u))throw new Error("ajv implementation error");let w=a.const("vSchema",d);$=(0,t.or)(...u.map((g,b)=>f(w,b)))}i.pass($);function y(){a.assign($,!1),a.forOf("v",d,w=>a.if((0,t._)`${v()}(${s}, ${w})`,()=>a.assign($,!0).break()))}function f(w,g){let b=u[g];return typeof b=="object"&&b!==null?(0,t._)`${v()}(${s}, ${w}[${g}])`:(0,t._)`${s} === ${b}`}}};e.default=r})),FS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=bI(),n=$I(),o=wI(),r=RI(),i=II(),a=kI(),s=TI(),c=PI(),u=EI(),d=xI(),p=[t.default,n.default,o.default,r.default,i.default,a.default,s.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,d.default];e.default=p})),HS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=_e(),n=Ie(),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){let{parentSchema:a,it:s}=i,{items:c}=a;if(!Array.isArray(c)){(0,n.checkStrictMode)(s,'"additionalItems" is ignored when "items" is not an array of schemas');return}r(i,c)}};function r(i,a){let{gen:s,schema:c,data:u,keyword:d,it:p}=i;p.items=!0;let h=s.const("len",(0,t._)`${u}.length`);if(c===!1)i.setParams({len:a.length}),i.pass((0,t._)`${h} <= ${a.length}`);else if(typeof c=="object"&&!(0,n.alwaysValidSchema)(p,c)){let v=s.var("valid",(0,t._)`${h} <= ${a.length}`);s.if((0,t.not)(v),()=>S(v)),i.ok(v)}function S(v){s.forRange("i",a.length,h,$=>{i.subschema({keyword:d,dataProp:$,dataPropType:n.Type.Num},v),p.allErrors||s.if((0,t.not)(v),()=>s.break())})}}e.validateAdditionalItems=r,e.default=o})),JS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=_e(),n=Ie(),o=kt(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){let{schema:s,it:c}=a;if(Array.isArray(s))return i(a,"additionalItems",s);c.items=!0,!(0,n.alwaysValidSchema)(c,s)&&a.ok((0,o.validateArray)(a))}};function i(a,s,c=a.schema){let{gen:u,parentSchema:d,data:p,keyword:h,it:S}=a;y(d),S.opts.unevaluated&&c.length&&S.items!==!0&&(S.items=n.mergeEvaluated.items(u,c.length,S.items));let v=u.name("valid"),$=u.const("len",(0,t._)`${p}.length`);c.forEach((f,w)=>{(0,n.alwaysValidSchema)(S,f)||(u.if((0,t._)`${$} > ${w}`,()=>a.subschema({keyword:h,schemaProp:w,dataProp:w},v)),a.ok(v))});function y(f){let{opts:w,errSchemaPath:g}=S,b=c.length,k=b===f.minItems&&(b===f.maxItems||f[s]===!1);if(w.strictTuples&&!k){let z=`"${h}" is ${b}-tuple, but minItems or maxItems/${s} are not specified or different at path "${g}"`;(0,n.checkStrictMode)(S,z,w.strictTuples)}}}e.validateTuple=i,e.default=r})),jI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=JS(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0,t.validateTuple)(o,"items")};e.default=n})),NI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o=kt(),r=HS(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){let{schema:s,parentSchema:c,it:u}=a,{prefixItems:d}=c;u.items=!0,!(0,n.alwaysValidSchema)(u,s)&&(d?(0,r.validateAdditionalItems)(a,d):a.ok((0,o.validateArray)(a)))}};e.default=i})),OI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:r,max:i}})=>i===void 0?(0,t.str)`must contain at least ${r} valid item(s)`:(0,t.str)`must contain at least ${r} and no more than ${i} valid item(s)`,params:({params:{min:r,max:i}})=>i===void 0?(0,t._)`{minContains: ${r}}`:(0,t._)`{minContains: ${r}, maxContains: ${i}}`},code(r){let{gen:i,schema:a,parentSchema:s,data:c,it:u}=r,d,p,{minContains:h,maxContains:S}=s;u.opts.next?(d=h===void 0?1:h,p=S):d=1;let v=i.const("len",(0,t._)`${c}.length`);if(r.setParams({min:d,max:p}),p===void 0&&d===0){(0,n.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&d>p){(0,n.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,n.alwaysValidSchema)(u,a)){let g=(0,t._)`${v} >= ${d}`;p!==void 0&&(g=(0,t._)`${g} && ${v} <= ${p}`),r.pass(g);return}u.items=!0;let $=i.name("valid");p===void 0&&d===1?f($,()=>i.if($,()=>i.break())):d===0?(i.let($,!0),p!==void 0&&i.if((0,t._)`${c}.length > 0`,y)):(i.let($,!1),y()),r.result($,()=>r.reset());function y(){let g=i.name("_valid"),b=i.let("count",0);f(g,()=>i.if(g,()=>w(b)))}function f(g,b){i.forRange("i",0,v,k=>{r.subschema({keyword:"contains",dataProp:k,dataPropType:n.Type.Num,compositeRule:!0},g),b()})}function w(g){i.code((0,t._)`${g}++`),p===void 0?i.if((0,t._)`${g} >= ${d}`,()=>i.assign($,!0).break()):(i.if((0,t._)`${g} > ${p}`,()=>i.assign($,!1).break()),d===1?i.assign($,!0):i.if((0,t._)`${g} >= ${d}`,()=>i.assign($,!0)))}}};e.default=o})),xg=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=_e(),n=Ie(),o=kt();e.error={message:({params:{property:c,depsCount:u,deps:d}})=>{let p=u===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:d,missingProperty:p}})=>(0,t._)`{property: ${c},
72
+ || ${j} === "boolean" || ${_} === null`).assign(U,(0,r._)`[${_}]`)}}}function S({gen:g,parentData:b,parentDataProperty:k},z){g.if((0,r._)`${b} !== undefined`,()=>g.assign((0,r._)`${b}[${k}]`,z))}function v(g,b,k,z=a.Correct){let _=z===a.Correct?r.operators.EQ:r.operators.NEQ,R;switch(g){case"null":return(0,r._)`${b} ${_} null`;case"array":R=(0,r._)`Array.isArray(${b})`;break;case"object":R=(0,r._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":R=j((0,r._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":R=j();break;default:return(0,r._)`typeof ${b} ${_} ${g}`}return z===a.Correct?R:(0,r.not)(R);function j(U=r.nil){return(0,r.and)((0,r._)`typeof ${b} == "number"`,U,k?(0,r._)`isFinite(${b})`:r.nil)}}e.checkDataType=v;function $(g,b,k,z){if(g.length===1)return v(g[0],b,k,z);let _,R=(0,i.toHash)(g);if(R.array&&R.object){let j=(0,r._)`typeof ${b} != "object"`;_=R.null?j:(0,r._)`!${b} || ${j}`,delete R.null,delete R.array,delete R.object}else _=r.nil;R.number&&delete R.integer;for(let j in R)_=(0,r.and)(_,v(j,b,k,z));return _}e.checkDataTypes=$;let y={message:({schema:g})=>`must be ${g}`,params:({schema:g,schemaValue:b})=>typeof g=="string"?(0,r._)`{type: ${g}}`:(0,r._)`{type: ${b}}`};function f(g){let b=w(g);(0,o.reportError)(b,y)}e.reportTypeError=f;function w(g){let{gen:b,data:k,schema:z}=g,_=(0,i.schemaRefOrVal)(g,z,"type");return{gen:b,keyword:"type",data:k,schema:z.type,schemaCode:_,schemaValue:_,parentSchema:z,params:{},it:g}}})),p0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=_e(),n=ke();function o(i,a){let{properties:s,items:c}=i.schema;if(a==="object"&&s)for(let l in s)r(i,l,s[l].default);else a==="array"&&Array.isArray(c)&&c.forEach((l,d)=>r(i,d,l.default))}e.assignDefaults=o;function r(i,a,s){let{gen:c,compositeRule:l,data:d,opts:p}=i;if(s===void 0)return;let h=(0,t._)`${d}${(0,t.getProperty)(a)}`;if(l){(0,n.checkStrictMode)(i,`default is ignored for: ${h}`);return}let S=(0,t._)`${h} === undefined`;p.useDefaults==="empty"&&(S=(0,t._)`${S} || ${h} === null || ${h} === ""`),c.if(S,(0,t._)`${h} = ${(0,t.stringify)(s)}`)}})),Tt=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=_e(),n=ke(),o=kt(),r=ke();function i(g,b){let{gen:k,data:z,it:_}=g;k.if(p(k,z,b,_.opts.ownProperties),()=>{g.setParams({missingProperty:(0,t._)`${b}`},!0),g.error()})}e.checkReportMissingProp=i;function a({gen:g,data:b,it:{opts:k}},z,_){return(0,t.or)(...z.map(R=>(0,t.and)(p(g,b,R,k.ownProperties),(0,t._)`${_} = ${R}`)))}e.checkMissingProp=a;function s(g,b){g.setParams({missingProperty:b},!0),g.error()}e.reportMissingProp=s;function c(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(g,b,k){return(0,t._)`${c(g)}.call(${b}, ${k})`}e.isOwnProperty=l;function d(g,b,k,z){let _=(0,t._)`${b}${(0,t.getProperty)(k)} !== undefined`;return z?(0,t._)`${_} && ${l(g,b,k)}`:_}e.propertyInData=d;function p(g,b,k,z){let _=(0,t._)`${b}${(0,t.getProperty)(k)} === undefined`;return z?(0,t.or)(_,(0,t.not)(l(g,b,k))):_}e.noPropertyInData=p;function h(g){return g?Object.keys(g).filter(b=>b!=="__proto__"):[]}e.allSchemaProperties=h;function S(g,b){return h(b).filter(k=>!(0,n.alwaysValidSchema)(g,b[k]))}e.schemaProperties=S;function v({schemaCode:g,data:b,it:{gen:k,topSchemaRef:z,schemaPath:_,errorPath:R},it:j},U,C,V){let ee=V?(0,t._)`${g}, ${b}, ${z}${_}`:b,ne=[[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,R)],[o.default.parentData,j.parentData],[o.default.parentDataProperty,j.parentDataProperty],[o.default.rootData,o.default.rootData]];j.opts.dynamicRef&&ne.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);let $e=(0,t._)`${ee}, ${k.object(...ne)}`;return C!==t.nil?(0,t._)`${U}.call(${C}, ${$e})`:(0,t._)`${U}(${$e})`}e.callValidateCode=v;let $=(0,t._)`new RegExp`;function y({gen:g,it:{opts:b}},k){let z=b.unicodeRegExp?"u":"",{regExp:_}=b.code,R=_(k,z);return g.scopeValue("pattern",{key:R.toString(),ref:R,code:(0,t._)`${_.code==="new RegExp"?$:(0,r.useFunc)(g,_)}(${k}, ${z})`})}e.usePattern=y;function f(g){let{gen:b,data:k,keyword:z,it:_}=g,R=b.name("valid");if(_.allErrors){let U=b.let("valid",!0);return j(()=>b.assign(U,!1)),U}return b.var(R,!0),j(()=>b.break()),R;function j(U){let C=b.const("len",(0,t._)`${k}.length`);b.forRange("i",0,C,V=>{g.subschema({keyword:z,dataProp:V,dataPropType:n.Type.Num},R),b.if((0,t.not)(R),U)})}}e.validateArray=f;function w(g){let{gen:b,schema:k,keyword:z,it:_}=g;if(!Array.isArray(k))throw new Error("ajv implementation error");if(k.some(U=>(0,n.alwaysValidSchema)(_,U))&&!_.opts.unevaluated)return;let R=b.let("valid",!1),j=b.name("_valid");b.block(()=>k.forEach((U,C)=>{let V=g.subschema({keyword:z,schemaProp:C,compositeRule:!0},j);b.assign(R,(0,t._)`${R} || ${j}`),g.mergeValidEvaluated(V,j)||b.if((0,t.not)(R))})),g.result(R,()=>g.reset(),()=>g.error(!0))}e.validateUnion=w})),f0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=_e(),n=kt(),o=Tt(),r=pu();function i(S,v){let{gen:$,keyword:y,schema:f,parentSchema:w,it:g}=S,b=v.macro.call(g.self,f,w,g),k=d($,y,b);g.opts.validateSchema!==!1&&g.self.validateSchema(b,!0);let z=$.name("valid");S.subschema({schema:b,schemaPath:t.nil,errSchemaPath:`${g.errSchemaPath}/${y}`,topSchemaRef:k,compositeRule:!0},z),S.pass(z,()=>S.error(!0))}e.macroKeywordCode=i;function a(S,v){var $;let{gen:y,keyword:f,schema:w,parentSchema:g,$data:b,it:k}=S;l(k,v);let z=d(y,f,!b&&v.compile?v.compile.call(k.self,w,g,k):v.validate),_=y.let("valid");S.block$data(_,R),S.ok(($=v.valid)!==null&&$!==void 0?$:_);function R(){if(v.errors===!1)C(),v.modifying&&s(S),V(()=>S.error());else{let ee=v.async?j():U();v.modifying&&s(S),V(()=>c(S,ee))}}function j(){let ee=y.let("ruleErrs",null);return y.try(()=>C((0,t._)`await `),ne=>y.assign(_,!1).if((0,t._)`${ne} instanceof ${k.ValidationError}`,()=>y.assign(ee,(0,t._)`${ne}.errors`),()=>y.throw(ne))),ee}function U(){let ee=(0,t._)`${z}.errors`;return y.assign(ee,null),C(t.nil),ee}function C(ee=v.async?(0,t._)`await `:t.nil){let ne=k.opts.passContext?n.default.this:n.default.self,$e=!("compile"in v&&!b||v.schema===!1);y.assign(_,(0,t._)`${ee}${(0,o.callValidateCode)(S,z,ne,$e)}`,v.modifying)}function V(ee){var ne;y.if((0,t.not)((ne=v.valid)!==null&&ne!==void 0?ne:_),ee)}}e.funcKeywordCode=a;function s(S){let{gen:v,data:$,it:y}=S;v.if(y.parentData,()=>v.assign($,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function c(S,v){let{gen:$}=S;$.if((0,t._)`Array.isArray(${v})`,()=>{$.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${v} : ${n.default.vErrors}.concat(${v})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,r.extendErrors)(S)},()=>S.error())}function l({schemaEnv:S},v){if(v.async&&!S.$async)throw new Error("async keyword in sync schema")}function d(S,v,$){if($===void 0)throw new Error(`keyword "${v}" failed to compile`);return S.scopeValue("keyword",typeof $=="function"?{ref:$}:{ref:$,code:(0,t.stringify)($)})}function p(S,v,$=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(S):y==="object"?S&&typeof S=="object"&&!Array.isArray(S):typeof S==y||$&&typeof S>"u")}e.validSchemaType=p;function h({schema:S,opts:v,self:$,errSchemaPath:y},f,w){if(Array.isArray(f.keyword)?!f.keyword.includes(w):f.keyword!==w)throw new Error("ajv implementation error");let g=f.dependencies;if(g?.some(b=>!Object.prototype.hasOwnProperty.call(S,b)))throw new Error(`parent schema must have dependencies of ${w}: ${g.join(",")}`);if(f.validateSchema&&!f.validateSchema(S[w])){let b=`keyword "${w}" value is invalid at path "${y}": `+$.errorsText(f.validateSchema.errors);if(v.validateSchema==="log")$.logger.error(b);else throw new Error(b)}}e.validateKeywordUsage=h})),h0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=_e(),n=ke();function o(a,{keyword:s,schemaProp:c,schema:l,schemaPath:d,errSchemaPath:p,topSchemaRef:h}){if(s!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){let S=a.schema[s];return c===void 0?{schema:S,schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:S[c],schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}${(0,t.getProperty)(c)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,n.escapeFragment)(c)}`}}if(l!==void 0){if(d===void 0||p===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:d,topSchemaRef:h,errSchemaPath:p}}throw new Error('either "keyword" or "schema" must be passed')}e.getSubschema=o;function r(a,s,{dataProp:c,dataPropType:l,data:d,dataTypes:p,propertyName:h}){if(d!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:S}=s;if(c!==void 0){let{errorPath:$,dataPathArr:y,opts:f}=s;v(S.let("data",(0,t._)`${s.data}${(0,t.getProperty)(c)}`,!0)),a.errorPath=(0,t.str)`${$}${(0,n.getErrorPath)(c,l,f.jsPropertySyntax)}`,a.parentDataProperty=(0,t._)`${c}`,a.dataPathArr=[...y,a.parentDataProperty]}d!==void 0&&(v(d instanceof t.Name?d:S.let("data",d,!0)),h!==void 0&&(a.propertyName=h)),p&&(a.dataTypes=p);function v($){a.data=$,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,$]}}e.extendSubschemaData=r;function i(a,{jtdDiscriminator:s,jtdMetadata:c,compositeRule:l,createErrors:d,allErrors:p}){l!==void 0&&(a.compositeRule=l),d!==void 0&&(a.createErrors=d),p!==void 0&&(a.allErrors=p),a.jtdDiscriminator=s,a.jtdMetadata=c}e.extendSubschemaMode=i})),US=K(((e,t)=>{t.exports=function n(o,r){if(o===r)return!0;if(o&&r&&typeof o=="object"&&typeof r=="object"){if(o.constructor!==r.constructor)return!1;var i,a,s;if(Array.isArray(o)){if(i=o.length,i!=r.length)return!1;for(a=i;a--!==0;)if(!n(o[a],r[a]))return!1;return!0}if(o.constructor===RegExp)return o.source===r.source&&o.flags===r.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===r.valueOf();if(o.toString!==Object.prototype.toString)return o.toString()===r.toString();if(s=Object.keys(o),i=s.length,i!==Object.keys(r).length)return!1;for(a=i;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=i;a--!==0;){var c=s[a];if(!n(o[c],r[c]))return!1}return!0}return o!==o&&r!==r}})),g0=K(((e,t)=>{var n=t.exports=function(i,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var c=typeof s=="function"?s:s.pre||function(){},l=s.post||function(){};o(a,c,l,i,"",i)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.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 o(i,a,s,c,l,d,p,h,S,v){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,l,d,p,h,S,v);for(var $ in c){var y=c[$];if(Array.isArray(y)){if($ in n.arrayKeywords)for(var f=0;f<y.length;f++)o(i,a,s,y[f],l+"/"+$+"/"+f,d,l,$,c,f)}else if($ in n.propsKeywords){if(y&&typeof y=="object")for(var w in y)o(i,a,s,y[w],l+"/"+$+"/"+r(w),d,l,$,c,w)}else($ in n.keywords||i.allKeys&&!($ in n.skipKeywords))&&o(i,a,s,y,l+"/"+$,d,l,$,c)}s(c,l,d,p,h,S,v)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}})),fu=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=ke(),n=US(),o=g0(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(y,f=!0){return typeof y=="boolean"?!0:f===!0?!s(y):f?c(y)<=f:!1}e.inlineRef=i;let a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(y){for(let f in y){if(a.has(f))return!0;let w=y[f];if(Array.isArray(w)&&w.some(s)||typeof w=="object"&&s(w))return!0}return!1}function c(y){let f=0;for(let w in y){if(w==="$ref")return 1/0;if(f++,!r.has(w)&&(typeof y[w]=="object"&&(0,t.eachItem)(y[w],g=>f+=c(g)),f===1/0))return 1/0}return f}function l(y,f="",w){return w!==!1&&(f=h(f)),d(y,y.parse(f))}e.getFullPath=l;function d(y,f){return y.serialize(f).split("#")[0]+"#"}e._getFullPath=d;let p=/#\/?$/;function h(y){return y?y.replace(p,""):""}e.normalizeId=h;function S(y,f,w){return w=h(w),y.resolve(f,w)}e.resolveUrl=S;let v=/^[a-z_][-a-z0-9._]*$/i;function $(y,f){if(typeof y=="boolean")return{};let{schemaId:w,uriResolver:g}=this.opts,b=h(y[w]||f),k={"":b},z=l(g,b,!1),_={},R=new Set;return o(y,{allKeys:!0},(C,V,ee,ne)=>{if(ne===void 0)return;let $e=z+V,Ae=k[ne];typeof C[w]=="string"&&(Ae=Ne.call(this,C[w])),Fe.call(this,C.$anchor),Fe.call(this,C.$dynamicAnchor),k[V]=Ae;function Ne(Ie){let x=this.opts.uriResolver.resolve;if(Ie=h(Ae?x(Ae,Ie):Ie),R.has(Ie))throw U(Ie);R.add(Ie);let M=this.refs[Ie];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?j(C,M.schema,Ie):Ie!==h($e)&&(Ie[0]==="#"?(j(C,_[Ie],Ie),_[Ie]=C):this.refs[Ie]=$e),Ie}function Fe(Ie){if(typeof Ie=="string"){if(!v.test(Ie))throw new Error(`invalid anchor "${Ie}"`);Ne.call(this,`#${Ie}`)}}}),_;function j(C,V,ee){if(V!==void 0&&!n(C,V))throw U(ee)}function U(C){return new Error(`reference "${C}" resolves to more than one schema`)}}e.getSchemaRefs=$})),Wi=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=m0(),n=mu(),o=DS(),r=mu(),i=p0(),a=f0(),s=h0(),c=_e(),l=kt(),d=fu(),p=ke(),h=pu();function S(P){if(z(P)&&(R(P),k(P))){f(P);return}v(P,()=>(0,t.topBoolOrEmptySchema)(P))}e.validateFunctionCode=S;function v({gen:P,validateName:D,schema:Z,schemaEnv:me,opts:pe},ye){pe.code.es5?P.func(D,(0,c._)`${l.default.data}, ${l.default.valCxt}`,me.$async,()=>{P.code((0,c._)`"use strict"; ${g(Z,pe)}`),y(P,pe),P.code(ye)}):P.func(D,(0,c._)`${l.default.data}, ${$(pe)}`,me.$async,()=>P.code(g(Z,pe)).code(ye))}function $(P){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${P.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function y(P,D){P.if(l.default.valCxt,()=>{P.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),P.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),P.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),P.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),D.dynamicRef&&P.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{P.var(l.default.instancePath,(0,c._)`""`),P.var(l.default.parentData,(0,c._)`undefined`),P.var(l.default.parentDataProperty,(0,c._)`undefined`),P.var(l.default.rootData,l.default.data),D.dynamicRef&&P.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function f(P){let{schema:D,opts:Z,gen:me}=P;v(P,()=>{Z.$comment&&D.$comment&&ne(P),C(P),me.let(l.default.vErrors,null),me.let(l.default.errors,0),Z.unevaluated&&w(P),j(P),$e(P)})}function w(P){let{gen:D,validateName:Z}=P;P.evaluated=D.const("evaluated",(0,c._)`${Z}.evaluated`),D.if((0,c._)`${P.evaluated}.dynamicProps`,()=>D.assign((0,c._)`${P.evaluated}.props`,(0,c._)`undefined`)),D.if((0,c._)`${P.evaluated}.dynamicItems`,()=>D.assign((0,c._)`${P.evaluated}.items`,(0,c._)`undefined`))}function g(P,D){let Z=typeof P=="object"&&P[D.schemaId];return Z&&(D.code.source||D.code.process)?(0,c._)`/*# sourceURL=${Z} */`:c.nil}function b(P,D){if(z(P)&&(R(P),k(P))){_(P,D);return}(0,t.boolOrEmptySchema)(P,D)}function k({schema:P,self:D}){if(typeof P=="boolean")return!P;for(let Z in P)if(D.RULES.all[Z])return!0;return!1}function z(P){return typeof P.schema!="boolean"}function _(P,D){let{schema:Z,gen:me,opts:pe}=P;pe.$comment&&Z.$comment&&ne(P),V(P),ee(P);let ye=me.const("_errs",l.default.errors);j(P,ye),me.var(D,(0,c._)`${ye} === ${l.default.errors}`)}function R(P){(0,p.checkUnknownRules)(P),U(P)}function j(P,D){if(P.opts.jtd)return Ne(P,[],!1,D);let Z=(0,n.getSchemaTypes)(P.schema);Ne(P,Z,!(0,n.coerceAndCheckDataType)(P,Z),D)}function U(P){let{schema:D,errSchemaPath:Z,opts:me,self:pe}=P;D.$ref&&me.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(D,pe.RULES)&&pe.logger.warn(`$ref: keywords ignored in schema at path "${Z}"`)}function C(P){let{schema:D,opts:Z}=P;D.default!==void 0&&Z.useDefaults&&Z.strictSchema&&(0,p.checkStrictMode)(P,"default is ignored in the schema root")}function V(P){let D=P.schema[P.opts.schemaId];D&&(P.baseId=(0,d.resolveUrl)(P.opts.uriResolver,P.baseId,D))}function ee(P){if(P.schema.$async&&!P.schemaEnv.$async)throw new Error("async schema in sync schema")}function ne({gen:P,schemaEnv:D,schema:Z,errSchemaPath:me,opts:pe}){let ye=Z.$comment;if(pe.$comment===!0)P.code((0,c._)`${l.default.self}.logger.log(${ye})`);else if(typeof pe.$comment=="function"){let Ue=(0,c.str)`${me}/$comment`,Je=P.scopeValue("root",{ref:D.root});P.code((0,c._)`${l.default.self}.opts.$comment(${ye}, ${Ue}, ${Je}.schema)`)}}function $e(P){let{gen:D,schemaEnv:Z,validateName:me,ValidationError:pe,opts:ye}=P;Z.$async?D.if((0,c._)`${l.default.errors} === 0`,()=>D.return(l.default.data),()=>D.throw((0,c._)`new ${pe}(${l.default.vErrors})`)):(D.assign((0,c._)`${me}.errors`,l.default.vErrors),ye.unevaluated&&Ae(P),D.return((0,c._)`${l.default.errors} === 0`))}function Ae({gen:P,evaluated:D,props:Z,items:me}){Z instanceof c.Name&&P.assign((0,c._)`${D}.props`,Z),me instanceof c.Name&&P.assign((0,c._)`${D}.items`,me)}function Ne(P,D,Z,me){let{gen:pe,schema:ye,data:Ue,allErrors:Je,opts:Qe,self:He}=P,{RULES:Ce}=He;if(ye.$ref&&(Qe.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(ye,Ce))){pe.block(()=>Se(P,"$ref",Ce.all.$ref.definition));return}Qe.jtd||Ie(P,D),pe.block(()=>{for(let Ge of Ce.rules)vt(Ge);vt(Ce.post)});function vt(Ge){(0,o.shouldUseGroup)(ye,Ge)&&(Ge.type?(pe.if((0,r.checkDataType)(Ge.type,Ue,Qe.strictNumbers)),Fe(P,Ge),D.length===1&&D[0]===Ge.type&&Z&&(pe.else(),(0,r.reportTypeError)(P)),pe.endIf()):Fe(P,Ge),Je||pe.if((0,c._)`${l.default.errors} === ${me||0}`))}}function Fe(P,D){let{gen:Z,schema:me,opts:{useDefaults:pe}}=P;pe&&(0,i.assignDefaults)(P,D.type),Z.block(()=>{for(let ye of D.rules)(0,o.shouldUseRule)(me,ye)&&Se(P,ye.keyword,ye.definition,D.type)})}function Ie(P,D){P.schemaEnv.meta||!P.opts.strictTypes||(x(P,D),P.opts.allowUnionTypes||M(P,D),H(P,P.dataTypes))}function x(P,D){if(D.length){if(!P.dataTypes.length){P.dataTypes=D;return}D.forEach(Z=>{E(P.dataTypes,Z)||Y(P,`type "${Z}" not allowed by context "${P.dataTypes.join(",")}"`)}),q(P,D)}}function M(P,D){D.length>1&&!(D.length===2&&D.includes("null"))&&Y(P,"use allowUnionTypes to allow union type keyword")}function H(P,D){let Z=P.self.RULES.all;for(let me in Z){let pe=Z[me];if(typeof pe=="object"&&(0,o.shouldUseRule)(P.schema,pe)){let{type:ye}=pe.definition;ye.length&&!ye.some(Ue=>I(D,Ue))&&Y(P,`missing type "${ye.join(",")}" for keyword "${me}"`)}}}function I(P,D){return P.includes(D)||D==="number"&&P.includes("integer")}function E(P,D){return P.includes(D)||D==="integer"&&P.includes("number")}function q(P,D){let Z=[];for(let me of P.dataTypes)E(D,me)?Z.push(me):D.includes("integer")&&me==="number"&&Z.push("integer");P.dataTypes=Z}function Y(P,D){let Z=P.schemaEnv.baseId+P.errSchemaPath;D+=` at "${Z}" (strictTypes)`,(0,p.checkStrictMode)(P,D,P.opts.strictTypes)}var se=class{constructor(P,D,Z){if((0,a.validateKeywordUsage)(P,D,Z),this.gen=P.gen,this.allErrors=P.allErrors,this.keyword=Z,this.data=P.data,this.schema=P.schema[Z],this.$data=D.$data&&P.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(P,this.schema,Z,this.$data),this.schemaType=D.schemaType,this.parentSchema=P.schema,this.params={},this.it=P,this.def=D,this.$data)this.schemaCode=P.gen.const("vSchema",ot(this.$data,P));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw new Error(`${Z} value must be ${JSON.stringify(D.schemaType)}`);("code"in D?D.trackErrors:D.errors!==!1)&&(this.errsCount=P.gen.const("_errs",l.default.errors))}result(P,D,Z){this.failResult((0,c.not)(P),D,Z)}failResult(P,D,Z){this.gen.if(P),Z?Z():this.error(),D?(this.gen.else(),D(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(P,D){this.failResult((0,c.not)(P),void 0,D)}fail(P){if(P===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(P),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(P){if(!this.$data)return this.fail(P);let{schemaCode:D}=this;this.fail((0,c._)`${D} !== undefined && (${(0,c.or)(this.invalid$data(),P)})`)}error(P,D,Z){if(D){this.setParams(D),this._error(P,Z),this.setParams({});return}this._error(P,Z)}_error(P,D){(P?h.reportExtraError:h.reportError)(this,this.def.error,D)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(P){this.allErrors||this.gen.if(P)}setParams(P,D){D?Object.assign(this.params,P):this.params=P}block$data(P,D,Z=c.nil){this.gen.block(()=>{this.check$data(P,Z),D()})}check$data(P=c.nil,D=c.nil){if(!this.$data)return;let{gen:Z,schemaCode:me,schemaType:pe,def:ye}=this;Z.if((0,c.or)((0,c._)`${me} === undefined`,D)),P!==c.nil&&Z.assign(P,!0),(pe.length||ye.validateSchema)&&(Z.elseIf(this.invalid$data()),this.$dataError(),P!==c.nil&&Z.assign(P,!1)),Z.else()}invalid$data(){let{gen:P,schemaCode:D,schemaType:Z,def:me,it:pe}=this;return(0,c.or)(ye(),Ue());function ye(){if(Z.length){if(!(D instanceof c.Name))throw new Error("ajv implementation error");let Je=Array.isArray(Z)?Z:[Z];return(0,c._)`${(0,r.checkDataTypes)(Je,D,pe.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function Ue(){if(me.validateSchema){let Je=P.scopeValue("validate$data",{ref:me.validateSchema});return(0,c._)`!${Je}(${D})`}return c.nil}}subschema(P,D){let Z=(0,s.getSubschema)(this.it,P);(0,s.extendSubschemaData)(Z,this.it,P),(0,s.extendSubschemaMode)(Z,P);let me={...this.it,...Z,items:void 0,props:void 0};return b(me,D),me}mergeEvaluated(P,D){let{it:Z,gen:me}=this;Z.opts.unevaluated&&(Z.props!==!0&&P.props!==void 0&&(Z.props=p.mergeEvaluated.props(me,P.props,Z.props,D)),Z.items!==!0&&P.items!==void 0&&(Z.items=p.mergeEvaluated.items(me,P.items,Z.items,D)))}mergeValidEvaluated(P,D){let{it:Z,gen:me}=this;if(Z.opts.unevaluated&&(Z.props!==!0||Z.items!==!0))return me.if(D,()=>this.mergeEvaluated(P,c.Name)),!0}};e.KeywordCxt=se;function Se(P,D,Z,me){let pe=new se(P,Z,D);"code"in Z?Z.code(pe,me):pe.$data&&Z.validate?(0,a.funcKeywordCode)(pe,Z):"macro"in Z?(0,a.macroKeywordCode)(pe,Z):(Z.compile||Z.validate)&&(0,a.funcKeywordCode)(pe,Z)}let fe=/^\/(?:[^~]|~0|~1)*$/,Oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ot(P,{dataLevel:D,dataNames:Z,dataPathArr:me}){let pe,ye;if(P==="")return l.default.rootData;if(P[0]==="/"){if(!fe.test(P))throw new Error(`Invalid JSON-pointer: ${P}`);pe=P,ye=l.default.rootData}else{let He=Oe.exec(P);if(!He)throw new Error(`Invalid JSON-pointer: ${P}`);let Ce=+He[1];if(pe=He[2],pe==="#"){if(Ce>=D)throw new Error(Qe("property/index",Ce));return me[D-Ce]}if(Ce>D)throw new Error(Qe("data",Ce));if(ye=Z[D-Ce],!pe)return ye}let Ue=ye,Je=pe.split("/");for(let He of Je)He&&(ye=(0,c._)`${ye}${(0,c.getProperty)((0,p.unescapeJsonPointer)(He))}`,Ue=(0,c._)`${Ue} && ${ye}`);return Ue;function Qe(He,Ce){return`Cannot access ${He} ${Ce} levels up, current level is ${D}`}}e.getData=ot})),hu=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}};e.default=t})),Yi=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=fu();var n=class extends Error{constructor(o,r,i,a){super(a||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(o,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,this.missingRef))}};e.default=n})),gu=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=_e(),n=hu(),o=kt(),r=fu(),i=ke(),a=Wi();var s=class{constructor(f){var w;this.refs={},this.dynamicAnchors={};let g;typeof f.schema=="object"&&(g=f.schema),this.schema=f.schema,this.schemaId=f.schemaId,this.root=f.root||this,this.baseId=(w=f.baseId)!==null&&w!==void 0?w:(0,r.normalizeId)(g?.[f.schemaId||"$id"]),this.schemaPath=f.schemaPath,this.localRefs=f.localRefs,this.meta=f.meta,this.$async=g?.$async,this.refs={}}};e.SchemaEnv=s;function c(f){let w=p.call(this,f);if(w)return w;let g=(0,r.getFullPath)(this.opts.uriResolver,f.root.baseId),{es5:b,lines:k}=this.opts.code,{ownProperties:z}=this.opts,_=new t.CodeGen(this.scope,{es5:b,lines:k,ownProperties:z}),R;f.$async&&(R=_.scopeValue("Error",{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let j=_.scopeName("validate");f.validateName=j;let U={gen:_,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:f.schema,code:(0,t.stringify)(f.schema)}:{ref:f.schema}),validateName:j,ValidationError:R,schema:f.schema,schemaEnv:f,rootId:g,baseId:f.baseId||g,schemaPath:t.nil,errSchemaPath:f.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this},C;try{this._compilations.add(f),(0,a.validateFunctionCode)(U),_.optimize(this.opts.code.optimize);let V=_.toString();C=`${_.scopeRefs(o.default.scope)}return ${V}`,this.opts.code.process&&(C=this.opts.code.process(C,f));let ee=new Function(`${o.default.self}`,`${o.default.scope}`,C)(this,this.scope.get());if(this.scope.value(j,{ref:ee}),ee.errors=null,ee.schema=f.schema,ee.schemaEnv=f,f.$async&&(ee.$async=!0),this.opts.code.source===!0&&(ee.source={validateName:j,validateCode:V,scopeValues:_._values}),this.opts.unevaluated){let{props:ne,items:$e}=U;ee.evaluated={props:ne instanceof t.Name?void 0:ne,items:$e instanceof t.Name?void 0:$e,dynamicProps:ne instanceof t.Name,dynamicItems:$e instanceof t.Name},ee.source&&(ee.source.evaluated=(0,t.stringify)(ee.evaluated))}return f.validate=ee,f}catch(V){throw delete f.validate,delete f.validateName,C&&this.logger.error("Error compiling schema, function code:",C),V}finally{this._compilations.delete(f)}}e.compileSchema=c;function l(f,w,g){var b;g=(0,r.resolveUrl)(this.opts.uriResolver,w,g);let k=f.refs[g];if(k)return k;let z=S.call(this,f,g);if(z===void 0){let _=(b=f.localRefs)===null||b===void 0?void 0:b[g],{schemaId:R}=this.opts;_&&(z=new s({schema:_,schemaId:R,root:f,baseId:w}))}if(z!==void 0)return f.refs[g]=d.call(this,z)}e.resolveRef=l;function d(f){return(0,r.inlineRef)(f.schema,this.opts.inlineRefs)?f.schema:f.validate?f:c.call(this,f)}function p(f){for(let w of this._compilations)if(h(w,f))return w}e.getCompilingSchema=p;function h(f,w){return f.schema===w.schema&&f.root===w.root&&f.baseId===w.baseId}function S(f,w){let g;for(;typeof(g=this.refs[w])=="string";)w=g;return g||this.schemas[w]||v.call(this,f,w)}function v(f,w){let g=this.opts.uriResolver.parse(w),b=(0,r._getFullPath)(this.opts.uriResolver,g),k=(0,r.getFullPath)(this.opts.uriResolver,f.baseId,void 0);if(Object.keys(f.schema).length>0&&b===k)return y.call(this,g,f);let z=(0,r.normalizeId)(b),_=this.refs[z]||this.schemas[z];if(typeof _=="string"){let R=v.call(this,f,_);return typeof R?.schema!="object"?void 0:y.call(this,g,R)}if(typeof _?.schema=="object"){if(_.validate||c.call(this,_),z===(0,r.normalizeId)(w)){let{schema:R}=_,{schemaId:j}=this.opts,U=R[j];return U&&(k=(0,r.resolveUrl)(this.opts.uriResolver,k,U)),new s({schema:R,schemaId:j,root:f,baseId:k})}return y.call(this,g,_)}}e.resolveSchema=v;let $=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(f,{baseId:w,schema:g,root:b}){var k;if(((k=f.fragment)===null||k===void 0?void 0:k[0])!=="/")return;for(let R of f.fragment.slice(1).split("/")){if(typeof g=="boolean")return;let j=g[(0,i.unescapeFragment)(R)];if(j===void 0)return;g=j;let U=typeof g=="object"&&g[this.opts.schemaId];!$.has(R)&&U&&(w=(0,r.resolveUrl)(this.opts.uriResolver,w,U))}let z;if(typeof g!="boolean"&&g.$ref&&!(0,i.schemaHasRulesButRef)(g,this.RULES)){let R=(0,r.resolveUrl)(this.opts.uriResolver,w,g.$ref);z=v.call(this,b,R)}let{schemaId:_}=this.opts;if(z=z||new s({schema:g,schemaId:_,root:b,baseId:w}),z.schema!==z.root.schema)return z}})),v0=K(((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}})),VS=K(((e,t)=>{let n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),o=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);function r(v){let $="",y=0,f=0;for(f=0;f<v.length;f++)if(y=v[f].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";$+=v[f];break}for(f+=1;f<v.length;f++){if(y=v[f].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";$+=v[f]}return $}let i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(v){return v.length=0,!0}function s(v,$,y){if(v.length){let f=r(v);if(f!=="")$.push(f);else return y.error=!0,!1;v.length=0}return!0}function c(v){let $=0,y={error:!1,address:"",zone:""},f=[],w=[],g=!1,b=!1,k=s;for(let z=0;z<v.length;z++){let _=v[z];if(!(_==="["||_==="]"))if(_===":"){if(g===!0&&(b=!0),!k(w,f,y))break;if(++$>7){y.error=!0;break}z>0&&v[z-1]===":"&&(g=!0),f.push(":");continue}else if(_==="%"){if(!k(w,f,y))break;k=a}else{w.push(_);continue}}return w.length&&(k===a?y.zone=w.join(""):b?f.push(w.join("")):f.push(r(w))),y.address=f.join(""),y}function l(v){if(d(v,":")<2)return{host:v,isIPV6:!1};let $=c(v);if($.error)return{host:v,isIPV6:!1};{let y=$.address,f=$.address;return $.zone&&(y+="%"+$.zone,f+="%25"+$.zone),{host:y,isIPV6:!0,escapedHost:f}}}function d(v,$){let y=0;for(let f=0;f<v.length;f++)v[f]===$&&y++;return y}function p(v){let $=v,y=[],f=-1,w=0;for(;w=$.length;){if(w===1){if($===".")break;if($==="/"){y.push("/");break}else{y.push($);break}}else if(w===2){if($[0]==="."){if($[1]===".")break;if($[1]==="/"){$=$.slice(2);continue}}else if($[0]==="/"&&($[1]==="."||$[1]==="/")){y.push("/");break}}else if(w===3&&$==="/.."){y.length!==0&&y.pop(),y.push("/");break}if($[0]==="."){if($[1]==="."){if($[2]==="/"){$=$.slice(3);continue}}else if($[1]==="/"){$=$.slice(2);continue}}else if($[0]==="/"&&$[1]==="."){if($[2]==="/"){$=$.slice(2);continue}else if($[2]==="."&&$[3]==="/"){$=$.slice(3),y.length!==0&&y.pop();continue}}if((f=$.indexOf("/",1))===-1){y.push($);break}else y.push($.slice(0,f)),$=$.slice(f)}return y.join("")}function h(v,$){let y=$!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=y(v.scheme)),v.userinfo!==void 0&&(v.userinfo=y(v.userinfo)),v.host!==void 0&&(v.host=y(v.host)),v.path!==void 0&&(v.path=y(v.path)),v.query!==void 0&&(v.query=y(v.query)),v.fragment!==void 0&&(v.fragment=y(v.fragment)),v}function S(v){let $=[];if(v.userinfo!==void 0&&($.push(v.userinfo),$.push("@")),v.host!==void 0){let y=unescape(v.host);if(!o(y)){let f=l(y);f.isIPV6===!0?y=`[${f.escapedHost}]`:y=v.host}$.push(y)}return(typeof v.port=="number"||typeof v.port=="string")&&($.push(":"),$.push(String(v.port))),$.length?$.join(""):void 0}t.exports={nonSimpleDomain:i,recomposeAuthority:S,normalizeComponentEncoding:h,removeDotSegments:p,isIPv4:o,isUUID:n,normalizeIPv6:l,stringArrayToHexStripped:r}})),y0=K(((e,t)=>{let{isUUID:n}=VS(),o=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i(_){return r.indexOf(_)!==-1}function a(_){return _.secure===!0?!0:_.secure===!1?!1:_.scheme?_.scheme.length===3&&(_.scheme[0]==="w"||_.scheme[0]==="W")&&(_.scheme[1]==="s"||_.scheme[1]==="S")&&(_.scheme[2]==="s"||_.scheme[2]==="S"):!1}function s(_){return _.host||(_.error=_.error||"HTTP URIs must have a host."),_}function c(_){let R=String(_.scheme).toLowerCase()==="https";return(_.port===(R?443:80)||_.port==="")&&(_.port=void 0),_.path||(_.path="/"),_}function l(_){return _.secure=a(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function d(_){if((_.port===(a(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){let[R,j]=_.resourceName.split("?");_.path=R&&R!=="/"?R:void 0,_.query=j,_.resourceName=void 0}return _.fragment=void 0,_}function p(_,R){if(!_.path)return _.error="URN can not be parsed",_;let j=_.path.match(o);if(j){let U=R.scheme||_.scheme||"urn";_.nid=j[1].toLowerCase(),_.nss=j[2];let C=z(`${U}:${R.nid||_.nid}`);_.path=void 0,C&&(_=C.parse(_,R))}else _.error=_.error||"URN can not be parsed.";return _}function h(_,R){if(_.nid===void 0)throw new Error("URN without nid cannot be serialized");let j=R.scheme||_.scheme||"urn",U=_.nid.toLowerCase(),C=z(`${j}:${R.nid||U}`);C&&(_=C.serialize(_,R));let V=_,ee=_.nss;return V.path=`${U||R.nid}:${ee}`,R.skipEscape=!0,V}function S(_,R){let j=_;return j.uuid=j.nss,j.nss=void 0,!R.tolerant&&(!j.uuid||!n(j.uuid))&&(j.error=j.error||"UUID is not valid."),j}function v(_){let R=_;return R.nss=(_.uuid||"").toLowerCase(),R}let $={scheme:"http",domainHost:!0,parse:s,serialize:c},y={scheme:"https",domainHost:$.domainHost,parse:s,serialize:c},f={scheme:"ws",domainHost:!0,parse:l,serialize:d},w={scheme:"wss",domainHost:f.domainHost,parse:f.parse,serialize:f.serialize},k={http:$,https:y,ws:f,wss:w,urn:{scheme:"urn",parse:p,serialize:h,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:S,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(k,null);function z(_){return _&&(k[_]||k[_.toLowerCase()])||void 0}t.exports={wsIsSecure:a,SCHEMES:k,isValidSchemeName:i,getSchemeHandler:z}})),_0=K(((e,t)=>{let{normalizeIPv6:n,removeDotSegments:o,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:a,nonSimpleDomain:s}=VS(),{SCHEMES:c,getSchemeHandler:l}=y0();function d(w,g){return typeof w=="string"?w=v(y(w,g),g):typeof w=="object"&&(w=y(v(w,g),g)),w}function p(w,g,b){let k=b?Object.assign({scheme:"null"},b):{scheme:"null"},z=h(y(w,k),y(g,k),k,!0);return k.skipEscape=!0,v(z,k)}function h(w,g,b,k){let z={};return k||(w=y(v(w,b),b),g=y(v(g,b),b)),b=b||{},!b.tolerant&&g.scheme?(z.scheme=g.scheme,z.userinfo=g.userinfo,z.host=g.host,z.port=g.port,z.path=o(g.path||""),z.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?(z.userinfo=g.userinfo,z.host=g.host,z.port=g.port,z.path=o(g.path||""),z.query=g.query):(g.path?(g.path[0]==="/"?z.path=o(g.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?z.path="/"+g.path:w.path?z.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+g.path:z.path=g.path,z.path=o(z.path)),z.query=g.query):(z.path=w.path,g.query!==void 0?z.query=g.query:z.query=w.query),z.userinfo=w.userinfo,z.host=w.host,z.port=w.port),z.scheme=w.scheme),z.fragment=g.fragment,z}function S(w,g,b){return typeof w=="string"?(w=unescape(w),w=v(i(y(w,b),!0),{...b,skipEscape:!0})):typeof w=="object"&&(w=v(i(w,!0),{...b,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=v(i(y(g,b),!0),{...b,skipEscape:!0})):typeof g=="object"&&(g=v(i(g,!0),{...b,skipEscape:!0})),w.toLowerCase()===g.toLowerCase()}function v(w,g){let b={host:w.host,scheme:w.scheme,userinfo:w.userinfo,port:w.port,path:w.path,query:w.query,nid:w.nid,nss:w.nss,uuid:w.uuid,fragment:w.fragment,reference:w.reference,resourceName:w.resourceName,secure:w.secure,error:""},k=Object.assign({},g),z=[],_=l(k.scheme||b.scheme);_&&_.serialize&&_.serialize(b,k),b.path!==void 0&&(k.skipEscape?b.path=unescape(b.path):(b.path=escape(b.path),b.scheme!==void 0&&(b.path=b.path.split("%3A").join(":")))),k.reference!=="suffix"&&b.scheme&&z.push(b.scheme,":");let R=r(b);if(R!==void 0&&(k.reference!=="suffix"&&z.push("//"),z.push(R),b.path&&b.path[0]!=="/"&&z.push("/")),b.path!==void 0){let j=b.path;!k.absolutePath&&(!_||!_.absolutePath)&&(j=o(j)),R===void 0&&j[0]==="/"&&j[1]==="/"&&(j="/%2F"+j.slice(2)),z.push(j)}return b.query!==void 0&&z.push("?",b.query),b.fragment!==void 0&&z.push("#",b.fragment),z.join("")}let $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(w,g){let b=Object.assign({},g),k={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},z=!1;b.reference==="suffix"&&(b.scheme?w=b.scheme+":"+w:w="//"+w);let _=w.match($);if(_){if(k.scheme=_[1],k.userinfo=_[3],k.host=_[4],k.port=parseInt(_[5],10),k.path=_[6]||"",k.query=_[7],k.fragment=_[8],isNaN(k.port)&&(k.port=_[5]),k.host)if(a(k.host)===!1){let j=n(k.host);k.host=j.host.toLowerCase(),z=j.isIPV6}else z=!0;k.scheme===void 0&&k.userinfo===void 0&&k.host===void 0&&k.port===void 0&&k.query===void 0&&!k.path?k.reference="same-document":k.scheme===void 0?k.reference="relative":k.fragment===void 0?k.reference="absolute":k.reference="uri",b.reference&&b.reference!=="suffix"&&b.reference!==k.reference&&(k.error=k.error||"URI is not a "+b.reference+" reference.");let R=l(b.scheme||k.scheme);if(!b.unicodeSupport&&(!R||!R.unicodeSupport)&&k.host&&(b.domainHost||R&&R.domainHost)&&z===!1&&s(k.host))try{k.host=URL.domainToASCII(k.host.toLowerCase())}catch(j){k.error=k.error||"Host's domain name can not be converted to ASCII: "+j}(!R||R&&!R.skipNormalize)&&(w.indexOf("%")!==-1&&(k.scheme!==void 0&&(k.scheme=unescape(k.scheme)),k.host!==void 0&&(k.host=unescape(k.host))),k.path&&(k.path=escape(unescape(k.path))),k.fragment&&(k.fragment=encodeURI(decodeURIComponent(k.fragment)))),R&&R.parse&&R.parse(k,b)}else k.error=k.error||"URI can not be parsed.";return k}let f={SCHEMES:c,normalize:d,resolve:p,resolveComponent:h,equal:S,serialize:v,parse:y};t.exports=f,t.exports.default=f,t.exports.fastUri=f})),S0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_0();t.code='require("ajv/dist/runtime/uri").default',e.default=t})),ZS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Wi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});let o=hu(),r=Yi(),i=MS(),a=gu(),s=_e(),c=fu(),l=mu(),d=ke(),p=v0(),h=S0(),S=(x,M)=>new RegExp(x,M);S.code="new RegExp";let v=["removeAdditional","useDefaults","coerceTypes"],$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={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."},f={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},w=200;function g(x){var M,H,I,E,q,Y,se,Se,fe,Oe,ot,P,D,Z,me,pe,ye,Ue,Je,Qe,He,Ce,vt,Ge,Ct;let $t=x.strict,qt=(M=x.code)===null||M===void 0?void 0:M.optimize,Bt=qt===!0||qt===void 0?1:qt||0,Kt=(I=(H=x.code)===null||H===void 0?void 0:H.regExp)!==null&&I!==void 0?I:S,zr=(E=x.uriResolver)!==null&&E!==void 0?E:h.default;return{strictSchema:(Y=(q=x.strictSchema)!==null&&q!==void 0?q:$t)!==null&&Y!==void 0?Y:!0,strictNumbers:(Se=(se=x.strictNumbers)!==null&&se!==void 0?se:$t)!==null&&Se!==void 0?Se:!0,strictTypes:(Oe=(fe=x.strictTypes)!==null&&fe!==void 0?fe:$t)!==null&&Oe!==void 0?Oe:"log",strictTuples:(P=(ot=x.strictTuples)!==null&&ot!==void 0?ot:$t)!==null&&P!==void 0?P:"log",strictRequired:(Z=(D=x.strictRequired)!==null&&D!==void 0?D:$t)!==null&&Z!==void 0?Z:!1,code:x.code?{...x.code,optimize:Bt,regExp:Kt}:{optimize:Bt,regExp:Kt},loopRequired:(me=x.loopRequired)!==null&&me!==void 0?me:w,loopEnum:(pe=x.loopEnum)!==null&&pe!==void 0?pe:w,meta:(ye=x.meta)!==null&&ye!==void 0?ye:!0,messages:(Ue=x.messages)!==null&&Ue!==void 0?Ue:!0,inlineRefs:(Je=x.inlineRefs)!==null&&Je!==void 0?Je:!0,schemaId:(Qe=x.schemaId)!==null&&Qe!==void 0?Qe:"$id",addUsedSchema:(He=x.addUsedSchema)!==null&&He!==void 0?He:!0,validateSchema:(Ce=x.validateSchema)!==null&&Ce!==void 0?Ce:!0,validateFormats:(vt=x.validateFormats)!==null&&vt!==void 0?vt:!0,unicodeRegExp:(Ge=x.unicodeRegExp)!==null&&Ge!==void 0?Ge:!0,int32range:(Ct=x.int32range)!==null&&Ct!==void 0?Ct:!0,uriResolver:zr}}var b=class{constructor(x={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,x=this.opts={...x,...g(x)};let{es5:M,lines:H}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:$,es5:M,lines:H}),this.logger=V(x.logger);let I=x.validateFormats;x.validateFormats=!1,this.RULES=(0,i.getRules)(),k.call(this,y,x,"NOT SUPPORTED"),k.call(this,f,x,"DEPRECATED","warn"),this._metaOpts=U.call(this),x.formats&&R.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),x.keywords&&j.call(this,x.keywords),typeof x.meta=="object"&&this.addMetaSchema(x.meta),_.call(this),x.validateFormats=I}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:x,meta:M,schemaId:H}=this.opts,I=p;H==="id"&&(I={...p},I.id=I.$id,delete I.$id),M&&x&&this.addMetaSchema(I,I[H],!1)}defaultMeta(){let{meta:x,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof x=="object"?x[M]||x:void 0}validate(x,M){let H;if(typeof x=="string"){if(H=this.getSchema(x),!H)throw new Error(`no schema with key or ref "${x}"`)}else H=this.compile(x);let I=H(M);return"$async"in H||(this.errors=H.errors),I}compile(x,M){let H=this._addSchema(x,M);return H.validate||this._compileSchemaEnv(H)}compileAsync(x,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:H}=this.opts;return I.call(this,x,M);async function I(fe,Oe){await E.call(this,fe.$schema);let ot=this._addSchema(fe,Oe);return ot.validate||q.call(this,ot)}async function E(fe){fe&&!this.getSchema(fe)&&await I.call(this,{$ref:fe},!0)}async function q(fe){try{return this._compileSchemaEnv(fe)}catch(Oe){if(!(Oe instanceof r.default))throw Oe;return Y.call(this,Oe),await se.call(this,Oe.missingSchema),q.call(this,fe)}}function Y({missingSchema:fe,missingRef:Oe}){if(this.refs[fe])throw new Error(`AnySchema ${fe} is loaded but ${Oe} cannot be resolved`)}async function se(fe){let Oe=await Se.call(this,fe);this.refs[fe]||await E.call(this,Oe.$schema),this.refs[fe]||this.addSchema(Oe,fe,M)}async function Se(fe){let Oe=this._loading[fe];if(Oe)return Oe;try{return await(this._loading[fe]=H(fe))}finally{delete this._loading[fe]}}}addSchema(x,M,H,I=this.opts.validateSchema){if(Array.isArray(x)){for(let q of x)this.addSchema(q,void 0,H,I);return this}let E;if(typeof x=="object"){let{schemaId:q}=this.opts;if(E=x[q],E!==void 0&&typeof E!="string")throw new Error(`schema ${q} must be string`)}return M=(0,c.normalizeId)(M||E),this._checkUnique(M),this.schemas[M]=this._addSchema(x,H,M,I,!0),this}addMetaSchema(x,M,H=this.opts.validateSchema){return this.addSchema(x,M,!0,H),this}validateSchema(x,M){if(typeof x=="boolean")return!0;let H;if(H=x.$schema,H!==void 0&&typeof H!="string")throw new Error("$schema must be a string");if(H=H||this.opts.defaultMeta||this.defaultMeta(),!H)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let I=this.validate(H,x);if(!I&&M){let E="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(E);else throw new Error(E)}return I}getSchema(x){let M;for(;typeof(M=z.call(this,x))=="string";)x=M;if(M===void 0){let{schemaId:H}=this.opts,I=new a.SchemaEnv({schema:{},schemaId:H});if(M=a.resolveSchema.call(this,I,x),!M)return;this.refs[x]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(x){if(x instanceof RegExp)return this._removeAllSchemas(this.schemas,x),this._removeAllSchemas(this.refs,x),this;switch(typeof x){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let M=z.call(this,x);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[x],delete this.refs[x],this}case"object":{let M=x;this._cache.delete(M);let H=x[this.opts.schemaId];return H&&(H=(0,c.normalizeId)(H),delete this.schemas[H],delete this.refs[H]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(x){for(let M of x)this.addKeyword(M);return this}addKeyword(x,M){let H;if(typeof x=="string")H=x,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=H);else if(typeof x=="object"&&M===void 0){if(M=x,H=M.keyword,Array.isArray(H)&&!H.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ne.call(this,H,M),!M)return(0,d.eachItem)(H,E=>$e.call(this,E)),this;Ne.call(this,M);let I={...M,type:(0,l.getJSONTypes)(M.type),schemaType:(0,l.getJSONTypes)(M.schemaType)};return(0,d.eachItem)(H,I.type.length===0?E=>$e.call(this,E,I):E=>I.type.forEach(q=>$e.call(this,E,I,q))),this}getKeyword(x){let M=this.RULES.all[x];return typeof M=="object"?M.definition:!!M}removeKeyword(x){let{RULES:M}=this;delete M.keywords[x],delete M.all[x];for(let H of M.rules){let I=H.rules.findIndex(E=>E.keyword===x);I>=0&&H.rules.splice(I,1)}return this}addFormat(x,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[x]=M,this}errorsText(x=this.errors,{separator:M=", ",dataVar:H="data"}={}){return!x||x.length===0?"No errors":x.map(I=>`${H}${I.instancePath} ${I.message}`).reduce((I,E)=>I+M+E)}$dataMetaSchema(x,M){let H=this.RULES.all;x=JSON.parse(JSON.stringify(x));for(let I of M){let E=I.split("/").slice(1),q=x;for(let Y of E)q=q[Y];for(let Y in H){let se=H[Y];if(typeof se!="object")continue;let{$data:Se}=se.definition,fe=q[Y];Se&&fe&&(q[Y]=Ie(fe))}}return x}_removeAllSchemas(x,M){for(let H in x){let I=x[H];(!M||M.test(H))&&(typeof I=="string"?delete x[H]:I&&!I.meta&&(this._cache.delete(I.schema),delete x[H]))}}_addSchema(x,M,H,I=this.opts.validateSchema,E=this.opts.addUsedSchema){let q,{schemaId:Y}=this.opts;if(typeof x=="object")q=x[Y];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof x!="boolean")throw new Error("schema must be object or boolean")}let se=this._cache.get(x);if(se!==void 0)return se;H=(0,c.normalizeId)(q||H);let Se=c.getSchemaRefs.call(this,x,H);return se=new a.SchemaEnv({schema:x,schemaId:Y,meta:M,baseId:H,localRefs:Se}),this._cache.set(se.schema,se),E&&!H.startsWith("#")&&(H&&this._checkUnique(H),this.refs[H]=se),I&&this.validateSchema(x,!0),se}_checkUnique(x){if(this.schemas[x]||this.refs[x])throw new Error(`schema with key or id "${x}" already exists`)}_compileSchemaEnv(x){if(x.meta?this._compileMetaSchema(x):a.compileSchema.call(this,x),!x.validate)throw new Error("ajv implementation error");return x.validate}_compileMetaSchema(x){let M=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,x)}finally{this.opts=M}}};b.ValidationError=o.default,b.MissingRefError=r.default,e.default=b;function k(x,M,H,I="error"){for(let E in x){let q=E;q in M&&this.logger[I](`${H}: option ${E}. ${x[q]}`)}}function z(x){return x=(0,c.normalizeId)(x),this.schemas[x]||this.refs[x]}function _(){let x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(let M in x)this.addSchema(x[M],M)}function R(){for(let x in this.opts.formats){let M=this.opts.formats[x];M&&this.addFormat(x,M)}}function j(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let M in x){let H=x[M];H.keyword||(H.keyword=M),this.addKeyword(H)}}function U(){let x={...this.opts};for(let M of v)delete x[M];return x}let C={log(){},warn(){},error(){}};function V(x){if(x===!1)return C;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}let ee=/^[a-z_$][a-z0-9_$:-]*$/i;function ne(x,M){let{RULES:H}=this;if((0,d.eachItem)(x,I=>{if(H.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!ee.test(I))throw new Error(`Keyword ${I} has invalid name`)}),!!M&&M.$data&&!("code"in M||"validate"in M))throw new Error('$data keyword must have "code" or "validate" function')}function $e(x,M,H){var I;let E=M?.post;if(H&&E)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:q}=this,Y=E?q.post:q.rules.find(({type:Se})=>Se===H);if(Y||(Y={type:H,rules:[]},q.rules.push(Y)),q.keywords[x]=!0,!M)return;let se={keyword:x,definition:{...M,type:(0,l.getJSONTypes)(M.type),schemaType:(0,l.getJSONTypes)(M.schemaType)}};M.before?Ae.call(this,Y,se,M.before):Y.rules.push(se),q.all[x]=se,(I=M.implements)===null||I===void 0||I.forEach(Se=>this.addKeyword(Se))}function Ae(x,M,H){let I=x.rules.findIndex(E=>E.keyword===H);I>=0?x.rules.splice(I,0,M):(x.rules.push(M),this.logger.warn(`rule ${H} is not defined`))}function Ne(x){let{metaSchema:M}=x;M!==void 0&&(x.$data&&this.opts.$data&&(M=Ie(M)),x.validateSchema=this.compile(M,!0))}let Fe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ie(x){return{anyOf:[x,Fe]}}})),b0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=t})),Eg=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=Yi(),n=Tt(),o=_e(),r=kt(),i=gu(),a=ke(),s={keyword:"$ref",schemaType:"string",code(d){let{gen:p,schema:h,it:S}=d,{baseId:v,schemaEnv:$,validateName:y,opts:f,self:w}=S,{root:g}=$;if((h==="#"||h==="#/")&&v===g.baseId)return k();let b=i.resolveRef.call(w,g,v,h);if(b===void 0)throw new t.default(S.opts.uriResolver,v,h);if(b instanceof i.SchemaEnv)return z(b);return _(b);function k(){if($===g)return l(d,y,$,$.$async);let R=p.scopeValue("root",{ref:g});return l(d,(0,o._)`${R}.validate`,g,g.$async)}function z(R){l(d,c(d,R),R,R.$async)}function _(R){let j=p.scopeValue("schema",f.code.source===!0?{ref:R,code:(0,o.stringify)(R)}:{ref:R}),U=p.name("valid"),C=d.subschema({schema:R,dataTypes:[],schemaPath:o.nil,topSchemaRef:j,errSchemaPath:h},U);d.mergeEvaluated(C),d.ok(U)}}};function c(d,p){let{gen:h}=d;return p.validate?h.scopeValue("validate",{ref:p.validate}):(0,o._)`${h.scopeValue("wrapper",{ref:p})}.validate`}e.getValidate=c;function l(d,p,h,S){let{gen:v,it:$}=d,{allErrors:y,schemaEnv:f,opts:w}=$,g=w.passContext?r.default.this:o.nil;S?b():k();function b(){if(!f.$async)throw new Error("async schema referenced by sync schema");let R=v.let("valid");v.try(()=>{v.code((0,o._)`await ${(0,n.callValidateCode)(d,p,g)}`),_(p),y||v.assign(R,!0)},j=>{v.if((0,o._)`!(${j} instanceof ${$.ValidationError})`,()=>v.throw(j)),z(j),y||v.assign(R,!1)}),d.ok(R)}function k(){d.result((0,n.callValidateCode)(d,p,g),()=>_(p),()=>z(p))}function z(R){let j=(0,o._)`${R}.errors`;v.assign(r.default.vErrors,(0,o._)`${r.default.vErrors} === null ? ${j} : ${r.default.vErrors}.concat(${j})`),v.assign(r.default.errors,(0,o._)`${r.default.vErrors}.length`)}function _(R){var j;if(!$.opts.unevaluated)return;let U=(j=h?.validate)===null||j===void 0?void 0:j.evaluated;if($.props!==!0)if(U&&!U.dynamicProps)U.props!==void 0&&($.props=a.mergeEvaluated.props(v,U.props,$.props));else{let C=v.var("props",(0,o._)`${R}.evaluated.props`);$.props=a.mergeEvaluated.props(v,C,$.props,o.Name)}if($.items!==!0)if(U&&!U.dynamicItems)U.items!==void 0&&($.items=a.mergeEvaluated.items(v,U.items,$.items));else{let C=v.var("items",(0,o._)`${R}.evaluated.items`);$.items=a.mergeEvaluated.items(v,C,$.items,o.Name)}}}e.callRef=l,e.default=s})),FS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=b0(),n=Eg(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,n.default];e.default=o})),$0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=t.operators,o={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},r={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:i,schemaCode:a})=>(0,t.str)`must be ${o[i].okStr} ${a}`,params:({keyword:i,schemaCode:a})=>(0,t._)`{comparison: ${o[i].okStr}, limit: ${a}}`},code(i){let{keyword:a,data:s,schemaCode:c}=i;i.fail$data((0,t._)`${s} ${o[a].fail} ${c} || isNaN(${s})`)}};e.default=r})),z0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must be multiple of ${o}`,params:({schemaCode:o})=>(0,t._)`{multipleOf: ${o}}`},code(o){let{gen:r,data:i,schemaCode:a,it:s}=o,c=s.opts.multipleOfPrecision,l=r.let("res"),d=c?(0,t._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,t._)`${l} !== parseInt(${l})`;o.fail$data((0,t._)`(${a} === 0 || (${l} = ${i}/${a}, ${d}))`)}};e.default=n})),w0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(n){let o=n.length,r=0,i=0,a;for(;i<o;)r++,a=n.charCodeAt(i++),a>=55296&&a<=56319&&i<o&&(a=n.charCodeAt(i),(a&64512)===56320&&i++);return r}e.default=t,t.code='require("ajv/dist/runtime/ucs2length").default'})),R0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o=w0(),r={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:a}){let s=i==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${a} characters`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){let{keyword:a,data:s,schemaCode:c,it:l}=i,d=a==="maxLength"?t.operators.GT:t.operators.LT,p=l.opts.unicode===!1?(0,t._)`${s}.length`:(0,t._)`${(0,n.useFunc)(i.gen,o.default)}(${s})`;i.fail$data((0,t._)`${p} ${d} ${c}`)}};e.default=r})),I0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Tt(),n=ke(),o=_e(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,o.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,o._)`{pattern: ${i}}`},code(i){let{gen:a,data:s,$data:c,schema:l,schemaCode:d,it:p}=i,h=p.opts.unicodeRegExp?"u":"";if(c){let{regExp:S}=p.opts.code,v=S.code==="new RegExp"?(0,o._)`new RegExp`:(0,n.useFunc)(a,S),$=a.let("valid");a.try(()=>a.assign($,(0,o._)`${v}(${d}, ${h}).test(${s})`),()=>a.assign($,!1)),i.fail$data((0,o._)`!${$}`)}else{let S=(0,t.usePattern)(i,l);i.fail$data((0,o._)`!${S}.test(${s})`)}}};e.default=r})),k0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:r}){let i=o==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${r} properties`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){let{keyword:r,data:i,schemaCode:a}=o,s=r==="maxProperties"?t.operators.GT:t.operators.LT;o.fail$data((0,t._)`Object.keys(${i}).length ${s} ${a}`)}};e.default=n})),T0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Tt(),n=_e(),o=ke(),r={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,n.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,n._)`{missingProperty: ${i}}`},code(i){let{gen:a,schema:s,schemaCode:c,data:l,$data:d,it:p}=i,{opts:h}=p;if(!d&&s.length===0)return;let S=s.length>=h.loopRequired;if(p.allErrors?v():$(),h.strictRequired){let w=i.parentSchema.properties,{definedProperties:g}=i.it;for(let b of s)if(w?.[b]===void 0&&!g.has(b)){let k=`required property "${b}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(p,k,p.opts.strictRequired)}}function v(){if(S||d)i.block$data(n.nil,y);else for(let w of s)(0,t.checkReportMissingProp)(i,w)}function $(){let w=a.let("missing");if(S||d){let g=a.let("valid",!0);i.block$data(g,()=>f(w,g)),i.ok(g)}else a.if((0,t.checkMissingProp)(i,s,w)),(0,t.reportMissingProp)(i,w),a.else()}function y(){a.forOf("prop",c,w=>{i.setParams({missingProperty:w}),a.if((0,t.noPropertyInData)(a,l,w,h.ownProperties),()=>i.error())})}function f(w,g){i.setParams({missingProperty:w}),a.forOf(w,c,()=>{a.assign(g,(0,t.propertyInData)(a,l,w,h.ownProperties)),a.if((0,n.not)(g),()=>{i.error(),a.break()})},n.nil)}}};e.default=r})),P0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:r}){let i=o==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${r} items`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){let{keyword:r,data:i,schemaCode:a}=o,s=r==="maxItems"?t.operators.GT:t.operators.LT;o.fail$data((0,t._)`${i}.length ${s} ${a}`)}};e.default=n})),xg=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=US();t.code='require("ajv/dist/runtime/equal").default',e.default=t})),E0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=mu(),n=_e(),o=ke(),r=xg(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:s}})=>(0,n.str)`must NOT have duplicate items (items ## ${s} and ${a} are identical)`,params:({params:{i:a,j:s}})=>(0,n._)`{i: ${a}, j: ${s}}`},code(a){let{gen:s,data:c,$data:l,schema:d,parentSchema:p,schemaCode:h,it:S}=a;if(!l&&!d)return;let v=s.let("valid"),$=p.items?(0,t.getSchemaTypes)(p.items):[];a.block$data(v,y,(0,n._)`${h} === false`),a.ok(v);function y(){let b=s.let("i",(0,n._)`${c}.length`),k=s.let("j");a.setParams({i:b,j:k}),s.assign(v,!0),s.if((0,n._)`${b} > 1`,()=>(f()?w:g)(b,k))}function f(){return $.length>0&&!$.some(b=>b==="object"||b==="array")}function w(b,k){let z=s.name("item"),_=(0,t.checkDataTypes)($,z,S.opts.strictNumbers,t.DataType.Wrong),R=s.const("indices",(0,n._)`{}`);s.for((0,n._)`;${b}--;`,()=>{s.let(z,(0,n._)`${c}[${b}]`),s.if(_,(0,n._)`continue`),$.length>1&&s.if((0,n._)`typeof ${z} == "string"`,(0,n._)`${z} += "_"`),s.if((0,n._)`typeof ${R}[${z}] == "number"`,()=>{s.assign(k,(0,n._)`${R}[${z}]`),a.error(),s.assign(v,!1).break()}).code((0,n._)`${R}[${z}] = ${b}`)})}function g(b,k){let z=(0,o.useFunc)(s,r.default),_=s.name("outer");s.label(_).for((0,n._)`;${b}--;`,()=>s.for((0,n._)`${k} = ${b}; ${k}--;`,()=>s.if((0,n._)`${z}(${c}[${b}], ${c}[${k}])`,()=>{a.error(),s.assign(v,!1).break(_)})))}}};e.default=i})),x0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o=xg(),r={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,t._)`{allowedValue: ${i}}`},code(i){let{gen:a,data:s,$data:c,schemaCode:l,schema:d}=i;c||d&&typeof d=="object"?i.fail$data((0,t._)`!${(0,n.useFunc)(a,o.default)}(${s}, ${l})`):i.fail((0,t._)`${d} !== ${s}`)}};e.default=r})),j0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o=xg(),r={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,t._)`{allowedValues: ${i}}`},code(i){let{gen:a,data:s,$data:c,schema:l,schemaCode:d,it:p}=i;if(!c&&l.length===0)throw new Error("enum must have non-empty array");let h=l.length>=p.opts.loopEnum,S,v=()=>S??(S=(0,n.useFunc)(a,o.default)),$;if(h||c)$=a.let("valid"),i.block$data($,y);else{if(!Array.isArray(l))throw new Error("ajv implementation error");let w=a.const("vSchema",d);$=(0,t.or)(...l.map((g,b)=>f(w,b)))}i.pass($);function y(){a.assign($,!1),a.forOf("v",d,w=>a.if((0,t._)`${v()}(${s}, ${w})`,()=>a.assign($,!0).break()))}function f(w,g){let b=l[g];return typeof b=="object"&&b!==null?(0,t._)`${v()}(${s}, ${w}[${g}])`:(0,t._)`${s} === ${b}`}}};e.default=r})),HS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=$0(),n=z0(),o=R0(),r=I0(),i=k0(),a=T0(),s=P0(),c=E0(),l=x0(),d=j0(),p=[t.default,n.default,o.default,r.default,i.default,a.default,s.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,d.default];e.default=p})),JS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=_e(),n=ke(),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){let{parentSchema:a,it:s}=i,{items:c}=a;if(!Array.isArray(c)){(0,n.checkStrictMode)(s,'"additionalItems" is ignored when "items" is not an array of schemas');return}r(i,c)}};function r(i,a){let{gen:s,schema:c,data:l,keyword:d,it:p}=i;p.items=!0;let h=s.const("len",(0,t._)`${l}.length`);if(c===!1)i.setParams({len:a.length}),i.pass((0,t._)`${h} <= ${a.length}`);else if(typeof c=="object"&&!(0,n.alwaysValidSchema)(p,c)){let v=s.var("valid",(0,t._)`${h} <= ${a.length}`);s.if((0,t.not)(v),()=>S(v)),i.ok(v)}function S(v){s.forRange("i",a.length,h,$=>{i.subschema({keyword:d,dataProp:$,dataPropType:n.Type.Num},v),p.allErrors||s.if((0,t.not)(v),()=>s.break())})}}e.validateAdditionalItems=r,e.default=o})),GS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=_e(),n=ke(),o=Tt(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){let{schema:s,it:c}=a;if(Array.isArray(s))return i(a,"additionalItems",s);c.items=!0,!(0,n.alwaysValidSchema)(c,s)&&a.ok((0,o.validateArray)(a))}};function i(a,s,c=a.schema){let{gen:l,parentSchema:d,data:p,keyword:h,it:S}=a;y(d),S.opts.unevaluated&&c.length&&S.items!==!0&&(S.items=n.mergeEvaluated.items(l,c.length,S.items));let v=l.name("valid"),$=l.const("len",(0,t._)`${p}.length`);c.forEach((f,w)=>{(0,n.alwaysValidSchema)(S,f)||(l.if((0,t._)`${$} > ${w}`,()=>a.subschema({keyword:h,schemaProp:w,dataProp:w},v)),a.ok(v))});function y(f){let{opts:w,errSchemaPath:g}=S,b=c.length,k=b===f.minItems&&(b===f.maxItems||f[s]===!1);if(w.strictTuples&&!k){let z=`"${h}" is ${b}-tuple, but minItems or maxItems/${s} are not specified or different at path "${g}"`;(0,n.checkStrictMode)(S,z,w.strictTuples)}}}e.validateTuple=i,e.default=r})),N0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=GS(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0,t.validateTuple)(o,"items")};e.default=n})),O0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o=Tt(),r=JS(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){let{schema:s,parentSchema:c,it:l}=a,{prefixItems:d}=c;l.items=!0,!(0,n.alwaysValidSchema)(l,s)&&(d?(0,r.validateAdditionalItems)(a,d):a.ok((0,o.validateArray)(a)))}};e.default=i})),A0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:r,max:i}})=>i===void 0?(0,t.str)`must contain at least ${r} valid item(s)`:(0,t.str)`must contain at least ${r} and no more than ${i} valid item(s)`,params:({params:{min:r,max:i}})=>i===void 0?(0,t._)`{minContains: ${r}}`:(0,t._)`{minContains: ${r}, maxContains: ${i}}`},code(r){let{gen:i,schema:a,parentSchema:s,data:c,it:l}=r,d,p,{minContains:h,maxContains:S}=s;l.opts.next?(d=h===void 0?1:h,p=S):d=1;let v=i.const("len",(0,t._)`${c}.length`);if(r.setParams({min:d,max:p}),p===void 0&&d===0){(0,n.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&d>p){(0,n.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,n.alwaysValidSchema)(l,a)){let g=(0,t._)`${v} >= ${d}`;p!==void 0&&(g=(0,t._)`${g} && ${v} <= ${p}`),r.pass(g);return}l.items=!0;let $=i.name("valid");p===void 0&&d===1?f($,()=>i.if($,()=>i.break())):d===0?(i.let($,!0),p!==void 0&&i.if((0,t._)`${c}.length > 0`,y)):(i.let($,!1),y()),r.result($,()=>r.reset());function y(){let g=i.name("_valid"),b=i.let("count",0);f(g,()=>i.if(g,()=>w(b)))}function f(g,b){i.forRange("i",0,v,k=>{r.subschema({keyword:"contains",dataProp:k,dataPropType:n.Type.Num,compositeRule:!0},g),b()})}function w(g){i.code((0,t._)`${g}++`),p===void 0?i.if((0,t._)`${g} >= ${d}`,()=>i.assign($,!0).break()):(i.if((0,t._)`${g} > ${p}`,()=>i.assign($,!1).break()),d===1?i.assign($,!0):i.if((0,t._)`${g} >= ${d}`,()=>i.assign($,!0)))}}};e.default=o})),jg=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=_e(),n=ke(),o=Tt();e.error={message:({params:{property:c,depsCount:l,deps:d}})=>{let p=l===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:d,missingProperty:p}})=>(0,t._)`{property: ${c},
73
73
  missingProperty: ${p},
74
- depsCount: ${u},
75
- deps: ${d}}`};let r={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){let[u,d]=i(c);a(c,u),s(c,d)}};function i({schema:c}){let u={},d={};for(let p in c){if(p==="__proto__")continue;let h=Array.isArray(c[p])?u:d;h[p]=c[p]}return[u,d]}function a(c,u=c.schema){let{gen:d,data:p,it:h}=c;if(Object.keys(u).length===0)return;let S=d.let("missing");for(let v in u){let $=u[v];if($.length===0)continue;let y=(0,o.propertyInData)(d,p,v,h.opts.ownProperties);c.setParams({property:v,depsCount:$.length,deps:$.join(", ")}),h.allErrors?d.if(y,()=>{for(let f of $)(0,o.checkReportMissingProp)(c,f)}):(d.if((0,t._)`${y} && (${(0,o.checkMissingProp)(c,$,S)})`),(0,o.reportMissingProp)(c,S),d.else())}}e.validatePropertyDeps=a;function s(c,u=c.schema){let{gen:d,data:p,keyword:h,it:S}=c,v=d.name("valid");for(let $ in u)(0,n.alwaysValidSchema)(S,u[$])||(d.if((0,o.propertyInData)(d,p,$,S.opts.ownProperties),()=>{let y=c.subschema({keyword:h,schemaProp:$},v);c.mergeValidEvaluated(y,v)},()=>d.var(v,!0)),c.ok(v))}e.validateSchemaDeps=s,e.default=r})),AI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:r})=>(0,t._)`{propertyName: ${r.propertyName}}`},code(r){let{gen:i,schema:a,data:s,it:c}=r;if((0,n.alwaysValidSchema)(c,a))return;let u=i.name("valid");i.forIn("key",s,d=>{r.setParams({propertyName:d}),r.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},u),i.if((0,t.not)(u),()=>{r.error(!0),c.allErrors||i.break()})}),r.ok(u)}};e.default=o})),GS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=kt(),n=_e(),o=It(),r=Ie(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,n._)`{additionalProperty: ${a.additionalProperty}}`},code(a){let{gen:s,schema:c,parentSchema:u,data:d,errsCount:p,it:h}=a;if(!p)throw new Error("ajv implementation error");let{allErrors:S,opts:v}=h;if(h.props=!0,v.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(h,c))return;let $=(0,t.allSchemaProperties)(u.properties),y=(0,t.allSchemaProperties)(u.patternProperties);f(),a.ok((0,n._)`${p} === ${o.default.errors}`);function f(){s.forIn("key",d,z=>{!$.length&&!y.length?b(z):s.if(w(z),()=>b(z))})}function w(z){let _;if($.length>8){let R=(0,r.schemaRefOrVal)(h,u.properties,"properties");_=(0,t.isOwnProperty)(s,R,z)}else $.length?_=(0,n.or)(...$.map(R=>(0,n._)`${z} === ${R}`)):_=n.nil;return y.length&&(_=(0,n.or)(_,...y.map(R=>(0,n._)`${(0,t.usePattern)(a,R)}.test(${z})`))),(0,n.not)(_)}function g(z){s.code((0,n._)`delete ${d}[${z}]`)}function b(z){if(v.removeAdditional==="all"||v.removeAdditional&&c===!1){g(z);return}if(c===!1){a.setParams({additionalProperty:z}),a.error(),S||s.break();return}if(typeof c=="object"&&!(0,r.alwaysValidSchema)(h,c)){let _=s.name("valid");v.removeAdditional==="failing"?(k(z,_,!1),s.if((0,n.not)(_),()=>{a.reset(),g(z)})):(k(z,_),S||s.if((0,n.not)(_),()=>s.break()))}}function k(z,_,R){let j={keyword:"additionalProperties",dataProp:z,dataPropType:r.Type.Str};R===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(j,_)}}};e.default=i})),CI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ki(),n=kt(),o=Ie(),r=GS(),i={keyword:"properties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,parentSchema:u,data:d,it:p}=a;p.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&r.default.code(new t.KeywordCxt(p,r.default,"additionalProperties"));let h=(0,n.allSchemaProperties)(c);for(let f of h)p.definedProperties.add(f);p.opts.unevaluated&&h.length&&p.props!==!0&&(p.props=o.mergeEvaluated.props(s,(0,o.toHash)(h),p.props));let S=h.filter(f=>!(0,o.alwaysValidSchema)(p,c[f]));if(S.length===0)return;let v=s.name("valid");for(let f of S)$(f)?y(f):(s.if((0,n.propertyInData)(s,d,f,p.opts.ownProperties)),y(f),p.allErrors||s.else().var(v,!0),s.endIf()),a.it.definedProperties.add(f),a.ok(v);function $(f){return p.opts.useDefaults&&!p.compositeRule&&c[f].default!==void 0}function y(f){a.subschema({keyword:"properties",schemaProp:f,dataProp:f},v)}}};e.default=i})),qI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=kt(),n=_e(),o=Ie(),r=Ie(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,data:u,parentSchema:d,it:p}=a,{opts:h}=p,S=(0,t.allSchemaProperties)(c),v=S.filter(k=>(0,o.alwaysValidSchema)(p,c[k]));if(S.length===0||v.length===S.length&&(!p.opts.unevaluated||p.props===!0))return;let $=h.strictSchema&&!h.allowMatchingProperties&&d.properties,y=s.name("valid");p.props!==!0&&!(p.props instanceof n.Name)&&(p.props=(0,r.evaluatedPropsToName)(s,p.props));let{props:f}=p;w();function w(){for(let k of S)$&&g(k),p.allErrors?b(k):(s.var(y,!0),b(k),s.if(y))}function g(k){for(let z in $)new RegExp(k).test(z)&&(0,o.checkStrictMode)(p,`property ${z} matches pattern ${k} (use allowMatchingProperties)`)}function b(k){s.forIn("key",u,z=>{s.if((0,n._)`${(0,t.usePattern)(a,k)}.test(${z})`,()=>{let _=v.includes(k);_||a.subschema({keyword:"patternProperties",schemaProp:k,dataProp:z,dataPropType:r.Type.Str},y),p.opts.unevaluated&&f!==!0?s.assign((0,n._)`${f}[${z}]`,!0):!_&&!p.allErrors&&s.if((0,n.not)(y),()=>s.break())})})}}};e.default=i})),LI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ie(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){let{gen:r,schema:i,it:a}=o;if((0,t.alwaysValidSchema)(a,i)){o.fail();return}let s=r.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),o.failResult(s,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};e.default=n})),MI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:kt().validateUnion,error:{message:"must match a schema in anyOf"}};e.default=t})),DI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:r})=>(0,t._)`{passingSchemas: ${r.passing}}`},code(r){let{gen:i,schema:a,parentSchema:s,it:c}=r;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&s.discriminator)return;let u=a,d=i.let("valid",!1),p=i.let("passing",null),h=i.name("_valid");r.setParams({passing:p}),i.block(S),r.result(d,()=>r.reset(),()=>r.error(!0));function S(){u.forEach((v,$)=>{let y;(0,n.alwaysValidSchema)(c,v)?i.var(h,!0):y=r.subschema({keyword:"oneOf",schemaProp:$,compositeRule:!0},h),$>0&&i.if((0,t._)`${h} && ${d}`).assign(d,!1).assign(p,(0,t._)`[${p}, ${$}]`).else(),i.if(h,()=>{i.assign(d,!0),i.assign(p,$),y&&r.mergeEvaluated(y,t.Name)})})}}};e.default=o})),UI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ie(),n={keyword:"allOf",schemaType:"array",code(o){let{gen:r,schema:i,it:a}=o;if(!Array.isArray(i))throw new Error("ajv implementation error");let s=r.name("valid");i.forEach((c,u)=>{if((0,t.alwaysValidSchema)(a,c))return;let d=o.subschema({keyword:"allOf",schemaProp:u},s);o.ok(s),o.mergeEvaluated(d)})}};e.default=n})),VI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,t._)`{failingKeyword: ${i.ifClause}}`},code(i){let{gen:a,parentSchema:s,it:c}=i;s.then===void 0&&s.else===void 0&&(0,n.checkStrictMode)(c,'"if" without "then" and "else" is ignored');let u=r(c,"then"),d=r(c,"else");if(!u&&!d)return;let p=a.let("valid",!0),h=a.name("_valid");if(S(),i.reset(),u&&d){let $=a.let("ifClause");i.setParams({ifClause:$}),a.if(h,v("then",$),v("else",$))}else u?a.if(h,v("then")):a.if((0,t.not)(h),v("else"));i.pass(p,()=>i.error(!0));function S(){let $=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);i.mergeEvaluated($)}function v($,y){return()=>{let f=i.subschema({keyword:$},h);a.assign(p,h),i.mergeValidEvaluated(f,p),y?a.assign(y,(0,t._)`${$}`):i.setParams({ifClause:$})}}}};function r(i,a){let s=i.schema[a];return s!==void 0&&!(0,n.alwaysValidSchema)(i,s)}e.default=o})),ZI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ie(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:r,it:i}){r.if===void 0&&(0,t.checkStrictMode)(i,`"${o}" without "if" is ignored`)}};e.default=n})),BS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=HS(),n=jI(),o=JS(),r=NI(),i=OI(),a=xg(),s=AI(),c=GS(),u=CI(),d=qI(),p=LI(),h=MI(),S=DI(),v=UI(),$=VI(),y=ZI();function f(w=!1){let g=[p.default,h.default,S.default,v.default,$.default,y.default,s.default,c.default,a.default,u.default,d.default];return w?g.push(n.default,r.default):g.push(t.default,o.default),g.push(i.default),g}e.default=f})),FI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must match format "${o}"`,params:({schemaCode:o})=>(0,t._)`{format: ${o}}`},code(o,r){let{gen:i,data:a,$data:s,schema:c,schemaCode:u,it:d}=o,{opts:p,errSchemaPath:h,schemaEnv:S,self:v}=d;if(!p.validateFormats)return;s?$():y();function $(){let f=i.scopeValue("formats",{ref:v.formats,code:p.code.formats}),w=i.const("fDef",(0,t._)`${f}[${u}]`),g=i.let("fType"),b=i.let("format");i.if((0,t._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>i.assign(g,(0,t._)`${w}.type || "string"`).assign(b,(0,t._)`${w}.validate`),()=>i.assign(g,(0,t._)`"string"`).assign(b,w)),o.fail$data((0,t.or)(k(),z()));function k(){return p.strictSchema===!1?t.nil:(0,t._)`${u} && !${b}`}function z(){let _=S.$async?(0,t._)`(${w}.async ? await ${b}(${a}) : ${b}(${a}))`:(0,t._)`${b}(${a})`,R=(0,t._)`(typeof ${b} == "function" ? ${_} : ${b}.test(${a}))`;return(0,t._)`${b} && ${b} !== true && ${g} === ${r} && !${R}`}}function y(){let f=v.formats[c];if(!f){k();return}if(f===!0)return;let[w,g,b]=z(f);w===r&&o.pass(_());function k(){if(p.strictSchema===!1){v.logger.warn(R());return}throw new Error(R());function R(){return`unknown format "${c}" ignored in schema at path "${h}"`}}function z(R){let j=R instanceof RegExp?(0,t.regexpCode)(R):p.code.formats?(0,t._)`${p.code.formats}${(0,t.getProperty)(c)}`:void 0,U=i.scopeValue("formats",{key:c,ref:R,code:j});return typeof R=="object"&&!(R instanceof RegExp)?[R.type||"string",R.validate,(0,t._)`${U}.validate`]:["string",R,U]}function _(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!S.$async)throw new Error("async format in sync schema");return(0,t._)`await ${b}(${a})`}return typeof g=="function"?(0,t._)`${b}(${a})`:(0,t._)`${b}.test(${a})`}}}};e.default=n})),KS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=[FI().default];e.default=t})),WS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]})),HI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ZS(),n=FS(),o=BS(),r=KS(),i=WS(),a=[t.default,n.default,(0,o.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];e.default=a})),JI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(n){n.Tag="tag",n.Mapping="mapping"})(t||(e.DiscrError=t={}))})),YS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=JI(),o=hu(),r=Wi(),i=Ie(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:c}})=>s===n.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:s,tag:c,tagName:u}})=>(0,t._)`{error: ${s}, tag: ${u}, tagValue: ${c}}`},code(s){let{gen:c,data:u,schema:d,parentSchema:p,it:h}=s,{oneOf:S}=p;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");let v=d.propertyName;if(typeof v!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!S)throw new Error("discriminator: requires oneOf keyword");let $=c.let("valid",!1),y=c.const("tag",(0,t._)`${u}${(0,t.getProperty)(v)}`);c.if((0,t._)`typeof ${y} == "string"`,()=>f(),()=>s.error(!1,{discrError:n.DiscrError.Tag,tag:y,tagName:v})),s.ok($);function f(){let b=g();c.if(!1);for(let k in b)c.elseIf((0,t._)`${y} === ${k}`),c.assign($,w(b[k]));c.else(),s.error(!1,{discrError:n.DiscrError.Mapping,tag:y,tagName:v}),c.endIf()}function w(b){let k=c.name("valid"),z=s.subschema({keyword:"oneOf",schemaProp:b},k);return s.mergeEvaluated(z,t.Name),k}function g(){var b;let k={},z=R(p),_=!0;for(let C=0;C<S.length;C++){let V=S[C];if(V?.$ref&&!(0,i.schemaHasRulesButRef)(V,h.self.RULES)){let ne=V.$ref;if(V=o.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,ne),V instanceof o.SchemaEnv&&(V=V.schema),V===void 0)throw new r.default(h.opts.uriResolver,h.baseId,ne)}let ee=(b=V?.properties)===null||b===void 0?void 0:b[v];if(typeof ee!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);_=_&&(z||R(V)),j(ee,C)}if(!_)throw new Error(`discriminator: "${v}" must be required`);return k;function R({required:C}){return Array.isArray(C)&&C.includes(v)}function j(C,V){if(C.const)U(C.const,V);else if(C.enum)for(let ee of C.enum)U(ee,V);else throw new Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function U(C,V){if(typeof C!="string"||C in k)throw new Error(`discriminator: "${v}" values must be unique strings`);k[C]=V}}}};e.default=a})),GI=K(((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}})),XS=K(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let n=VS(),o=HI(),r=YS(),i=GI(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var c=class extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(S=>this.addVocabulary(S)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let S=this.opts.$data?this.$dataMetaSchema(i,a):i;this.addMetaSchema(S,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=Ki();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=fu();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var h=Wi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})),QS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=_e(),n=It(),o=hu(),r=Pg(),i={keyword:"$dynamicAnchor",schemaType:"string",code:c=>a(c,c.schema)};function a(c,u){let{gen:d,it:p}=c;p.schemaEnv.root.dynamicAnchors[u]=!0;let h=(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(u)}`,S=p.errSchemaPath==="#"?p.validateName:s(c);d.if((0,t._)`!${h}`,()=>d.assign(h,S))}e.dynamicAnchor=a;function s(c){let{schemaEnv:u,schema:d,self:p}=c.it,{root:h,baseId:S,localRefs:v,meta:$}=u.root,{schemaId:y}=p.opts,f=new o.SchemaEnv({schema:d,schemaId:y,root:h,baseId:S,localRefs:v,meta:$});return o.compileSchema.call(p,f),(0,r.getValidate)(c,f)}e.default=i})),eb=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=_e(),n=It(),o=Pg(),r={keyword:"$dynamicRef",schemaType:"string",code:a=>i(a,a.schema)};function i(a,s){let{gen:c,keyword:u,it:d}=a;if(s[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);let p=s.slice(1);if(d.allErrors)h();else{let v=c.let("valid",!1);h(v),a.ok(v)}function h(v){if(d.schemaEnv.root.dynamicAnchors[p]){let $=c.let("_v",(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(p)}`);c.if($,S($,v),S(d.validateName,v))}else S(d.validateName,v)()}function S(v,$){return $?()=>c.block(()=>{(0,o.callRef)(a,v),c.let($,!0)}):()=>(0,o.callRef)(a,v)}}e.dynamicRef=i,e.default=r})),BI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=QS(),n=Ie(),o={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,t.dynamicAnchor)(r,""):(0,n.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};e.default=o})),KI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=eb(),n={keyword:"$recursiveRef",schemaType:"string",code:o=>(0,t.dynamicRef)(o,o.schema)};e.default=n})),WI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=QS(),n=eb(),o=BI(),r=KI(),i=[t.default,n.default,o.default,r.default];e.default=i})),YI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xg(),n={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:o=>(0,t.validatePropertyDeps)(o)};e.default=n})),XI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xg(),n={keyword:"dependentSchemas",type:"object",schemaType:"object",code:o=>(0,t.validateSchemaDeps)(o)};e.default=n})),QI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ie(),n={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:o,parentSchema:r,it:i}){r.contains===void 0&&(0,t.checkStrictMode)(i,`"${o}" without "contains" is ignored`)}};e.default=n})),ek=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=YI(),n=XI(),o=QI(),r=[t.default,n.default,o.default];e.default=r})),tk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o=It(),r={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:i})=>(0,t._)`{unevaluatedProperty: ${i.unevaluatedProperty}}`},code(i){let{gen:a,schema:s,data:c,errsCount:u,it:d}=i;if(!u)throw new Error("ajv implementation error");let{allErrors:p,props:h}=d;h instanceof t.Name?a.if((0,t._)`${h} !== true`,()=>a.forIn("key",c,y=>a.if(v(h,y),()=>S(y)))):h!==!0&&a.forIn("key",c,y=>h===void 0?S(y):a.if($(h,y),()=>S(y))),d.props=!0,i.ok((0,t._)`${u} === ${o.default.errors}`);function S(y){if(s===!1){i.setParams({unevaluatedProperty:y}),i.error(),p||a.break();return}if(!(0,n.alwaysValidSchema)(d,s)){let f=a.name("valid");i.subschema({keyword:"unevaluatedProperties",dataProp:y,dataPropType:n.Type.Str},f),p||a.if((0,t.not)(f),()=>a.break())}}function v(y,f){return(0,t._)`!${y} || !${y}[${f}]`}function $(y,f){let w=[];for(let g in y)y[g]===!0&&w.push((0,t._)`${f} !== ${g}`);return(0,t.and)(...w)}}};e.default=r})),rk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Ie(),o={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:r}})=>(0,t.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,t._)`{limit: ${r}}`},code(r){let{gen:i,schema:a,data:s,it:c}=r,u=c.items||0;if(u===!0)return;let d=i.const("len",(0,t._)`${s}.length`);if(a===!1)r.setParams({len:u}),r.fail((0,t._)`${d} > ${u}`);else if(typeof a=="object"&&!(0,n.alwaysValidSchema)(c,a)){let h=i.var("valid",(0,t._)`${d} <= ${u}`);i.if((0,t.not)(h),()=>p(h,u)),r.ok(h)}c.items=!0;function p(h,S){i.forRange("i",S,d,v=>{r.subschema({keyword:"unevaluatedItems",dataProp:v,dataPropType:n.Type.Num},h),c.allErrors||i.if((0,t.not)(h),()=>i.break())})}}};e.default=o})),nk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=tk(),n=rk(),o=[t.default,n.default];e.default=o})),ok=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ZS(),n=FS(),o=BS(),r=WI(),i=ek(),a=nk(),s=KS(),c=WS(),u=[r.default,t.default,n.default,(0,o.default)(!0),s.default,c.metadataVocabulary,c.contentVocabulary,i.default,a.default];e.default=u})),ik=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}})),ak=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}})),sk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}})),ck=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}})),lk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}})),uk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}})),dk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}})),mk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}})),pk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ik(),n=ak(),o=sk(),r=ck(),i=lk(),a=uk(),s=dk(),c=mk(),u=["/properties"];function d(p){return[t,n,o,r,i,h(this,a),s,h(this,c)].forEach(S=>this.addMetaSchema(S,void 0,!1)),this;function h(S,v){return p?S.$dataMetaSchema(v,u):v}}e.default=d})),fk=K(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let n=VS(),o=ok(),r=YS(),i=pk(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends n.default{constructor(h={}){super({...h,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),o.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:h,meta:S}=this.opts;S&&(i.default.call(this,h),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var c=Ki();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=fu();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=Wi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),hk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(C,V){return{validate:C,compare:V}}e.fullFormats={date:t(i,a),time:t(c(!0),u),"date-time":t(h(!0),S),"iso-time":t(c(),d),"iso-date-time":t(h(),v),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:f,"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:U,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:g,int32:{type:"number",validate:z},int64:{type:"number",validate:_},float:{type:"number",validate:R},double:{type:"number",validate:R},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,S),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"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,v),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 n(C){return C%4===0&&(C%100!==0||C%400===0)}let o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(C){let V=o.exec(C);if(!V)return!1;let ee=+V[1],ne=+V[2],$e=+V[3];return ne>=1&&ne<=12&&$e>=1&&$e<=(ne===2&&n(ee)?29:r[ne])}function a(C,V){if(C&&V)return C>V?1:C<V?-1:0}let s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(C){return function(ee){let ne=s.exec(ee);if(!ne)return!1;let $e=+ne[1],Oe=+ne[2],je=+ne[3],Ve=ne[4],Re=ne[5]==="-"?-1:1,x=+(ne[6]||0),M=+(ne[7]||0);if(x>23||M>59||C&&!Ve)return!1;if($e<=23&&Oe<=59&&je<60)return!0;let H=Oe-M*Re,I=$e-x*Re-(H<0?1:0);return(I===23||I===-1)&&(H===59||H===-1)&&je<61}}function u(C,V){if(!(C&&V))return;let ee=new Date("2020-01-01T"+C).valueOf(),ne=new Date("2020-01-01T"+V).valueOf();if(ee&&ne)return ee-ne}function d(C,V){if(!(C&&V))return;let ee=s.exec(C),ne=s.exec(V);if(ee&&ne)return C=ee[1]+ee[2]+ee[3],V=ne[1]+ne[2]+ne[3],C>V?1:C<V?-1:0}let p=/t|\s/i;function h(C){let V=c(C);return function(ne){let $e=ne.split(p);return $e.length===2&&i($e[0])&&V($e[1])}}function S(C,V){if(!(C&&V))return;let ee=new Date(C).valueOf(),ne=new Date(V).valueOf();if(ee&&ne)return ee-ne}function v(C,V){if(!(C&&V))return;let[ee,ne]=C.split(p),[$e,Oe]=V.split(p),je=a(ee,$e);if(je!==void 0)return je||u(ne,Oe)}let $=/\/|:/,y=/^(?:[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 f(C){return $.test(C)&&y.test(C)}let w=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function g(C){return w.lastIndex=0,w.test(C)}let b=-(2**31),k=2**31-1;function z(C){return Number.isInteger(C)&&C<=k&&C>=b}function _(C){return Number.isInteger(C)}function R(){return!0}let j=/[^\\]\\Z/;function U(C){if(j.test(C))return!1;try{return new RegExp(C),!0}catch{return!1}}})),gk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=XS(),n=_e(),o=n.operators,r={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},i={message:({keyword:s,schemaCode:c})=>(0,n.str)`should be ${r[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>(0,n._)`{comparison: ${r[s].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(r),type:"string",schemaType:"string",$data:!0,error:i,code(s){let{gen:c,data:u,schemaCode:d,keyword:p,it:h}=s,{opts:S,self:v}=h;if(!S.validateFormats)return;let $=new t.KeywordCxt(h,v.RULES.all.format.definition,"format");$.$data?y():f();function y(){let g=c.scopeValue("formats",{ref:v.formats,code:S.code.formats}),b=c.const("fmt",(0,n._)`${g}[${$.schemaCode}]`);s.fail$data((0,n.or)((0,n._)`typeof ${b} != "object"`,(0,n._)`${b} instanceof RegExp`,(0,n._)`typeof ${b}.compare != "function"`,w(b)))}function f(){let g=$.schema,b=v.formats[g];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${p}": format "${g}" does not define "compare" function`);let k=c.scopeValue("formats",{key:g,ref:b,code:S.code.formats?(0,n._)`${S.code.formats}${(0,n.getProperty)(g)}`:void 0});s.fail$data(w(k))}function w(g){return(0,n._)`${g}.compare(${u}, ${d}) ${r[p].fail} 0`}},dependencies:["format"]};let a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})),vk=K(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let n=hk(),o=gk(),r=_e(),i=new r.Name("fullFormats"),a=new r.Name("fastFormats"),s=(u,d={keywords:!0})=>{if(Array.isArray(d))return c(u,d,n.fullFormats,i),u;let[p,h]=d.mode==="fast"?[n.fastFormats,a]:[n.fullFormats,i];return c(u,d.formats||n.formatNames,p,h),d.keywords&&(0,o.default)(u),u};s.get=(u,d="full")=>{let p=(d==="fast"?n.fastFormats:n.fullFormats)[u];if(!p)throw new Error(`Unknown format "${u}"`);return p};function c(u,d,p,h){var S,v;(S=(v=u.opts.code).formats)!==null&&S!==void 0||(v.formats=(0,r._)`require("ajv-formats/dist/formats").${h}`);for(let $ of d)u.addFormat($,p[$])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),yk=XS(),_k=fk(),Sk=ba(vk(),1),bk=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),$k=Sk.default;function zk(){let e=new _k.Ajv2020({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return $k(e),e}var gu=class{_ajv;_userAjv;constructor(e){this._userAjv=e!==void 0,this._ajv=e}get ajv(){return this._ajv??=zk()}getValidator(e){if(!this._userAjv&&"$schema"in e&&typeof e.$schema=="string"&&!bk.has(e.$schema.replace(/#$/,""))){let o=e.$schema.slice(0,200);throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${o}"). The default validator supports JSON Schema 2020-12 only; pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.`)}let t=this.ajv,n="$id"in e&&typeof e.$id=="string"?t.getSchema(e.$id)??t.compile(e):t.compile(e);return o=>n(o)?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(n.errors)}}},Ij=yk.Ajv;import jg from"process";var lb=Symbol.for("mcp.completable");function Og(e){return!!e&&typeof e=="object"&&lb in e}function Rk(e){return e[lb]?.complete}function Ik(e,t){switch(t.kind){case"tools_list_changed":return e.toolsListChanged===!0;case"prompts_list_changed":return e.promptsListChanged===!0;case"resources_list_changed":return e.resourcesListChanged===!0;case"resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function kk(e,t){let n={},o=r=>t===void 0||r===!0;return e.toolsListChanged===!0&&o(t?.tools?.listChanged)&&(n.toolsListChanged=!0),e.promptsListChanged===!0&&o(t?.prompts?.listChanged)&&(n.promptsListChanged=!0),e.resourcesListChanged===!0&&o(t?.resources?.listChanged)&&(n.resourcesListChanged=!0),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&o(t?.resources?.subscribe)&&(n.resourceSubscriptions=[...e.resourceSubscriptions]),n}var vu=1024;function tb(e,t){return{method:e.method,params:{...e.params,_meta:{...e.params?._meta,[Zr]:t}}}}function Tk(e){let t=yr(Gi).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var Pk=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),ub=class{_subs=new Map;_serverCapabilities;constructor(e=vu,t){this._maxSubscriptions=e,this._serverCapabilities=t}setServerCapabilities(e){this._serverCapabilities=e}has(e){return this._subs.has(e)}serve(e){if(this._serverCapabilities===void 0)throw new Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return{jsonrpc:"2.0",id:e.id,error:{code:-32603,message:"Subscription limit reached"}};let t=Tk(e);if(t===void 0)return{jsonrpc:"2.0",id:e.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let n=kk(t,this._serverCapabilities);return this._subs.set(e.id,n),tb({method:"notifications/subscriptions/acknowledged",params:{notifications:n}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!Pk.has(e.method))return"passthrough";let t=e.params?.uri,n=typeof t=="string"?t:void 0,o=Ek(e.method,n),r=[];for(let[i,a]of this._subs)Ik(a,o)&&r.push(tb({method:e.method,params:e.params??{}},i));return r}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[Zr]:t}}});return this._subs.clear(),e}};function Ek(e,t){switch(e){case"notifications/tools/list_changed":return{kind:"tools_list_changed"};case"notifications/prompts/list_changed":return{kind:"prompts_list_changed"};case"notifications/resources/list_changed":return{kind:"resources_list_changed"};default:return{kind:"resource_updated",uri:t??""}}}var xk=8,jk=6e5;function Nk(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??xk,roundTimeoutMs:e?.roundTimeoutMs??jk,legacyShim:e?.legacyShim??!0}}function db(e,t,n){if(n===null||typeof n!="object"||typeof n.method!="string")throw new le(X.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let o=n,r=nS(o);if(r===void 0)throw new le(X.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${o.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:o,required:r}}function Ok(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=[...t].map(o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function Ng(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new le(X.InternalError,t)}var Ak=class{constructor(e){this._host=e}async fulfill(e,t,n,o,r){let{maxRounds:i,roundTimeoutMs:a}=this._host,s=o.mcpReq.signal,c=r,u=0;for(;;){if(u+=1,u>i)return Ng(e,RS(e,i));let d=c.inputRequests,p=d!=null&&Object.keys(d).length>0,h=typeof c.requestState=="string"?c.requestState:void 0;if(!p&&h===void 0)throw new le(X.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let S;if(p){let y=this._host.resolvedClientCapabilities(o),f=[];for(let[g,b]of Object.entries(d)){let{embedded:k,required:z}=db(e,g,b);if(k.method!=="roots/list"&&k.params===void 0)throw new le(X.InternalError,`Handler for ${e} returned an input request '${g}' of kind '${k.method}' without params`);if(Ql(z,y)!==void 0)return Ng(e,`Cannot request input '${g}' (${k.method}): the client on this 2025-era connection did not declare the required capability${y===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);f.push([g,k])}let w=kS(s);try{let g={relatedRequestId:o.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:w.signal},b=await Promise.all(f.map(async([k,z])=>{try{return[k,await this._dispatchLeg(z,g)]}catch(_){throw w.abort(_),_}}));S=Object.fromEntries(b)}catch(g){if(s.aborted)throw g;return Ng(e,`Fulfilling input required by '${e}' failed: ${g instanceof Error?g.message:String(g)}`)}finally{w.dispose()}}else await IS(wS,s);let v={...o,mcpReq:{...o.mcpReq,inputResponses:S,droppedInputResponseKeys:void 0,requestState:Bi(h)}};if(h!==void 0){let y=await this._host.verifyRequestState(h,v,e);y!==void 0&&(v=wg(v,y))}let $=await t(n,v);if(!Jt($))return $;c=$}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let n=e.params;return n.mode==="url"&&n.elicitationId===void 0&&(n={...n,elicitationId:Ok()}),await this._host.sendElicitation(n,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}},Ck=new Set(["tools/call","prompts/get","resources/read"]),qk,mb;function Ag(e,t){mb(e,t)}var pb=class extends NS{_clientCapabilities;_clientVersion;static{qk=(e,t)=>{t.clientCapabilities!==void 0&&(e._clientCapabilities=t.clientCapabilities),t.clientInfo!==void 0&&(e._clientVersion=t.clientInfo)},mb=(e,t)=>{let n=t.filter(o=>!e._supportedProtocolVersions.includes(o));n.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...n]),e.setRequestHandler("server/discover",()=>e._ondiscover())}}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new Ak({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,n)=>this._verifyRequestState(e,t,n),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new gu,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=Nk(t?.inputRequired),t?.cacheHints!==void 0){for(let[n,o]of Object.entries(t.cacheHints))o!==void 0&&hg(o,`cacheHints['${n}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",n=>this._oninitialize(n)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),lg(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let n=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:o}=e.params,r=su(gr,o);return r.success&&this._loggingLevels.set(n,r.data),{}})}buildContext(e,t){let n=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(o,r,i)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[ur],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return a!==void 0&&this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(a)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:o,data:r,logger:i}})},elicitInput:(o,r)=>this.elicitInput(o,r),requestSampling:(o,r)=>this.createMessage(o,r)},http:n?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(gr.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let n=this._loggingLevels.get(t);return n?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(n):!1};registerCapabilities(e){if(this.transport)throw new ve(ze.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=OS(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let n=this._cacheHints?.[e],o=Ck.has(e);return n===void 0&&!o?async(r,i)=>{let a=await t(r,i);if(Jt(a))throw new le(X.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}:async(r,i)=>{let a=o?await this._invokeInputRequiredCapableHandler(e,t,r,i):await t(r,i);if(Jt(a)){if(!o)throw new le(X.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return n===void 0?a:eu(a,n)}}return async(n,o)=>{let r=yr(this._negotiatedProtocolVersion),i=r.validateRequest("tools/call",n);if(!i.ok)throw new le(i.reason==="not-in-era"?X.InternalError:X.InvalidParams,i.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${i.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,n,o);if(Jt(a))return a;let s=ug(a),c=r.validateResult("tools/call",s);if(!c.ok)throw new le(c.reason==="not-in-era"?X.InternalError:X.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&eo(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,n,o){let r=this._servedModernEra(),i=o.mcpReq.requestState();if(i!==void 0&&typeof i!="string")throw new le(X.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=o;if(typeof i=="string"){let p=await this._verifyRequestState(i,o,e);p!==void 0&&(a=wg(o,p))}let s;try{s=await t(n,a)}catch(p){throw p instanceof le&&p.code===X.UrlElicitationRequired&&r?new le(X.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { \u2026: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`):p}if(!Jt(s))return s;if(!r){if(!this._inputRequiredServing.legacyShim)throw new le(X.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??Ur}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,n,a,s)}let c=s.inputRequests,u=c!=null&&Object.keys(c).length>0,d=typeof s.requestState=="string";if(!u&&!d)throw new le(X.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(u){let p=this._inputRequestCapabilityView(o);for(let[h,S]of Object.entries(c)){let{embedded:v,required:$}=db(e,h,S),y=Ql($,p);if(y!==void 0)throw new ru({requiredCapabilities:y},`Cannot request input '${h}' (${v.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,n){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(o){throw this.onerror?.(new Error(`requestState verification rejected ${n}: ${o instanceof Error?o.message:String(o)}`)),new le(X.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[Ft]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ve(ze.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead \u2014 the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new ve(ze.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ve(ze.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new ve(ze.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new ve(ze.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new ve(ze.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new ve(ze.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new ve(ze.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ze.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new ve(ze.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new ve(ze.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new ve(ze.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new ve(ze.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new ve(ze.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let n=iS(this._supportedProtocolVersions),o=n.includes(t)?t:n[0]??Ur;return this._negotiatedProtocolVersion=o,this.transport?.setProtocolVersion?.(o),{protocolVersion:o,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:lg(this._supportedProtocolVersions),capabilities:Lk(this.getCapabilities()),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new ve(ze.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages.at(-1),a=Array.isArray(i.content)?i.content:[i.content],s=a.some(p=>p.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,u=c?Array.isArray(c.content)?c.content:[c.content]:[],d=u.some(p=>p.type==="tool_use");if(s){if(a.some(p=>p.type!=="tool_result"))throw new le(X.InvalidParams,"The last message must contain only tool_result content if any is present");if(!d)throw new le(X.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(d){let p=new Set(u.filter(S=>S.type==="tool_use").map(S=>S.id)),h=new Set(a.filter(S=>S.type==="tool_result").map(S=>S.toolUseId));if(p.size!==h.size||![...p].every(S=>h.has(S)))throw new le(X.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let n=!!(e.tools||e.toolChoice),o=await this.request({method:"sampling/createMessage",params:e},t),r=this._wireCodec().samplingResultVariant(n,o);if(!r.ok)throw new ve(ze.InvalidResult,`Invalid sampling/createMessage result: ${r.reason==="invalid"?r.message:r.reason}`);return r.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ze.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new ve(ze.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,n){let o=e.mode??"form",r=n?.validateAcceptedContent??!0;switch(o){case"url":{let i=e;return this.request({method:"elicitation/create",params:i},t)}case"form":{let i=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:i},t);if(r&&a.action==="accept"&&a.content&&i.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(i.requestedSchema)(a.content);if(!s.valid)throw new le(X.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){throw s instanceof le?s:new le(X.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ve(ze.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function Lk(e){return{...e}}var Xi=class{server;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(!(t===void 0||!t.enabled)){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return nb;try{let n=br(t.inputSchema,"input");return this._toolInputSchemaJson[e]=n,n}catch{return}}}constructor(e,t){this.server=new pb(e,t),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?br(t.inputSchema,"input"):nb,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(n.outputSchema=br(t.outputSchema,"output")),n})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let n=this._registeredTools[e.params.name];if(!n)throw new le(X.InvalidParams,`Tool ${e.params.name} not found`);if(!n.enabled)throw new le(X.InvalidParams,`Tool ${e.params.name} disabled`);try{let o=await this.validateToolInput(n,e.params.arguments,e.params.name),r=await this.executeToolHandler(n,o,t);return await this.validateToolOutput(n,r,e.params.name),Jt(r)?r:this.server.projectCallToolResult(r,n.outputSchemaJson)}catch(o){if(o instanceof le&&o.code===X.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,n){if(!e.inputSchema)return;let o=await Jr(e.inputSchema,t??{});if(!o.success)throw new le(X.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${o.error}`);return o.data}async validateToolOutput(e,t,n){if(!e.outputSchema||Jt(t)||t.isError)return;if(t.structuredContent===void 0)throw new le(X.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=await Jr(e.outputSchema,t.structuredContent);if(!o.success)throw new le(X.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${o.error}`)}async executeToolHandler(e,t,n){return e.executor(t,n)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":return yg(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return _g(e),this.handleResourceCompletion(e,e.params.ref);default:throw new le(X.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let n=this._registeredPrompts[t.name];if(!n)throw new le(X.InvalidParams,`Prompt ${t.name} not found`);if(!n.enabled)throw new le(X.InvalidParams,`Prompt ${t.name} disabled`);if(!n.argsSchema)return Yi;let o=cb(sb(n.argsSchema)?.[e.params.argument.name]);if(!Og(o))return Yi;let r=Rk(o);return r?ab(await r(e.params.argument.value,e.params.context)):Yi}async handleResourceCompletion(e,t){let n=Object.values(this._registeredResourceTemplates).find(r=>r.resourceTemplate.uriTemplate.toString()===t.uri);if(!n){if(this._registeredResources[t.uri])return Yi;throw new le(X.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(e.params.argument.name);return o?ab(await o(e.params.argument.value,e.params.context)):Yi}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let n=Object.entries(this._registeredResources).filter(([r,i])=>i.enabled).map(([r,i])=>({uri:r,name:i.name,...i.metadata})),o=[];for(let r of Object.values(this._registeredResourceTemplates)){if(!r.resourceTemplate.listCallback)continue;let i=await r.resourceTemplate.listCallback(t);for(let a of i.resources)o.push({...r.metadata,...a})}return{resources:[...n,...o]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let n;try{n=new URL(e.params.uri)}catch{throw new le(X.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new le(X.InvalidParams,`Resource ${n} disabled`);return eu(await o.readCallback(n,t),o.cacheHint)}for(let r of Object.values(this._registeredResourceTemplates)){let i=r.resourceTemplate.uriTemplate.match(n.toString());if(i)return eu(await r.readCallback(n,i,t),r.cacheHint)}throw new tu(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?zS(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let n=this._registeredPrompts[e.params.name];if(!n)throw new le(X.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new le(X.InvalidParams,`Prompt ${e.params.name} disabled`);return n.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,n,o){let r=n.cacheHint,i=n;if(r!==void 0){hg(r,`resource ${e}`);let a={...n};delete a.cacheHint,i=a}if(typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let a=this._createRegisteredResource(e,n.title,t,i,o);return r!==void 0&&(a.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let a=this._createRegisteredResourceTemplate(e,n.title,t,i,o);return r!==void 0&&(a.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}_createRegisteredResource(e,t,n,o,r){let i={name:e,title:t,metadata:o,readCallback:r,enabled:!0,disable:()=>i.update({enabled:!1}),enable:()=>i.update({enabled:!0}),remove:()=>i.update({uri:null}),update:a=>{a.uri!==void 0&&a.uri!==n&&(delete this._registeredResources[n],a.uri&&(this._registeredResources[a.uri]=i)),a.name!==void 0&&(i.name=a.name),a.title!==void 0&&(i.title=a.title),a.metadata!==void 0&&(i.metadata=a.metadata),a.callback!==void 0&&(i.readCallback=a.callback),a.enabled!==void 0&&(i.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[n]=i,i}_createRegisteredResourceTemplate(e,t,n,o,r){let i={resourceTemplate:n,title:t,metadata:o,readCallback:r,enabled:!0,disable:()=>i.update({enabled:!1}),enable:()=>i.update({enabled:!0}),remove:()=>i.update({name:null}),update:s=>{s.name!==void 0&&s.name!==e&&(delete this._registeredResourceTemplates[e],s.name&&(this._registeredResourceTemplates[s.name]=i)),s.title!==void 0&&(i.title=s.title),s.template!==void 0&&(i.resourceTemplate=s.template),s.metadata!==void 0&&(i.metadata=s.metadata),s.callback!==void 0&&(i.readCallback=s.callback),s.enabled!==void 0&&(i.enabled=s.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=i;let a=n.uriTemplate.variableNames;return Array.isArray(a)&&a.some(s=>!!n.completeCallback(s))&&this.setCompletionRequestHandler(),i}_createRegisteredPrompt(e,t,n,o,r,i,a){let s=o,c=r,u={title:t,description:n,argsSchema:o,icons:i,_meta:a,handler:ib(e,o,r),enabled:!0,disable:()=>u.update({enabled:!1}),enable:()=>u.update({enabled:!0}),remove:()=>u.update({name:null}),update:d=>{d.name!==void 0&&d.name!==e&&(delete this._registeredPrompts[e],d.name&&(this._registeredPrompts[d.name]=u)),d.title!==void 0&&(u.title=d.title),d.description!==void 0&&(u.description=d.description),d.icons!==void 0&&(u.icons=d.icons),d._meta!==void 0&&(u._meta=d._meta);let p=!1;d.argsSchema!==void 0&&(u.argsSchema=d.argsSchema,s=d.argsSchema,p=!0),d.callback!==void 0&&(c=d.callback,p=!0),p&&(u.handler=ib(e,s,c)),d.enabled!==void 0&&(u.enabled=d.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=u,o){let d=sb(o);d&&Object.values(d).some(p=>Og(cb(p)))&&this.setCompletionRequestHandler()}return u}_createRegisteredTool(e,t,n,o,r,i,a,s,c,u){if(Tg(e),o!==void 0)try{let h=br(o,"input");this._toolInputSchemaJson[e]=h;let S=Sg(h);S.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${S.reason}`)}catch{}let d=u,p={title:t,description:n,inputSchema:o,outputSchema:r,outputSchemaJson:ob(r),annotations:i,icons:a,execution:s,_meta:c,handler:u,executor:rb(o,u),enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:h=>{h.name!==void 0&&h.name!==e&&(typeof h.name=="string"&&Tg(h.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],h.name&&(delete this._toolInputSchemaJson[h.name],this._registeredTools[h.name]=p,e=h.name)),h.title!==void 0&&(p.title=h.title),h.description!==void 0&&(p.description=h.description);let S=!1;h.paramsSchema!==void 0&&(p.inputSchema=h.paramsSchema,delete this._toolInputSchemaJson[e],S=!0),h.callback!==void 0&&(p.handler=h.callback,d=h.callback,S=!0),S&&(p.executor=rb(p.inputSchema,d)),h.outputSchema!==void 0&&(p.outputSchema=h.outputSchema,p.outputSchemaJson=ob(h.outputSchema)),h.annotations!==void 0&&(p.annotations=h.annotations),h.icons!==void 0&&(p.icons=h.icons),h._meta!==void 0&&(p._meta=h._meta),h.enabled!==void 0&&(p.enabled=h.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}registerTool(e,t,n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:o,description:r,inputSchema:i,outputSchema:a,annotations:s,icons:c,_meta:u}=t;return this._createRegisteredTool(e,o,r,cu(i),cu(a),s,c,void 0,u,n)}registerPrompt(e,t,n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:o,description:r,argsSchema:i,icons:a,_meta:s}=t,c=this._createRegisteredPrompt(e,o,r,cu(i),n,a,s);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};function rb(e,t){if(e){let o=t;return async(r,i)=>o(r,i)}let n=t;return async(o,r)=>n(r)}var nb={type:"object",properties:{}};function ob(e){if(e!==void 0)try{return br(e,"output")}catch{return}}function ib(e,t,n){if(t){let o=n;return async(r,i)=>{let a=await Jr(t,r);if(!a.success)throw new le(X.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return o(a.data,i)}}else{let o=n;return async(r,i)=>o(i)}}function ab(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var Yi={completion:{values:[],hasMore:!1}};function sb(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function Mk(e){return e?.type==="optional"}function cb(e){return Mk(e)?e.def?.innerType??e:e}var Dk=class{_readBuffer;_started=!1;_closed=!1;constructor(e=jg.stdin,t=jg.stdout,n){this._stdin=e,this._stdout=t,this._readBuffer=new Ig({maxBufferSize:n?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(t){this.onerror?.(t),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this.onerror?.(e),this.close().catch(()=>{})};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),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdout.off("error",this._onstdouterror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(new Error("StdioServerTransport is closed")):new Promise((t,n)=>{let o=kg(e),r=!1,i=s=>{r||(r=!0,this._stdout.off("error",i),this._stdout.off("drain",a),n(s))},a=()=>{r||(r=!0,this._stdout.off("error",i),this._stdout.off("drain",a),t())};if(this._stdout.once("error",i),this._stdout.write(o)){if(r)return;r=!0,this._stdout.off("error",i),t()}else r||this._stdout.once("drain",a)})}},fb=3e3,Uk=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,n){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=n}async start(){}async send(e,t){if(Hi(e)||au(e)){let{id:n}=e;n!==void 0&&this._settle(n)}if(!this._closed&&this._outboundIntercept?.(e)!=="handled")return this._wire.send(e,t)}setProtocolVersion=e=>{this._wire.setProtocolVersion?.(e)};deliver(e,t){if(!this._closed){if(St(e))this._pendingRequests.add(e.id);else if(Sr(e)&&e.method==="notifications/cancelled"){let n=e.params?.requestId;n!==void 0&&this._settle(n)}this.onmessage?.(e,t)}}async whenRequestsAnswered(e){return this._closed||this._pendingRequests.size===0?!0:await new Promise(t=>{let n=()=>{clearTimeout(o),t(!0)},o=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(r=>r!==n),t(!1)},e);this._drainWaiters.push(n)})}async close(){if(!this._closed){this._closed=!0,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose()}finally{this.onclose?.()}}}_settle(e){this._pendingRequests.delete(e),this._pendingRequests.size===0&&this._releaseDrainWaiters()}_releaseDrainWaiters(){let e=this._drainWaiters;this._drainWaiters=[];for(let t of e)t()}};function Vk(e){let t=e.params;if(e.method==="initialize"&&!bg(t)){let i=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...i!==void 0&&{requestedVersion:i}}}if(!nu(t))return{kind:"legacy",reason:"no-claim"};let n=Br(t),o=(n===void 0?[]:iu(n))[0];if(o!==void 0)return{kind:"invalid-envelope",issue:o};let r=ou(t);return r===void 0||!_r.includes(r)?{kind:"unsupported-revision",requested:r??"unknown"}:{kind:"modern",revision:r,classification:{era:"modern",revision:r}}}function hb(e,t={}){let n=t.legacy??"serve",o=t.transport??new Dk,r={phase:"opening"},i,a=!1,s=()=>a||r.phase==="closed",c=R=>{try{t.onerror?.(R)}catch{}},u=(R,j,U,C)=>o.send({jsonrpc:"2.0",id:R,error:{code:j,message:U,...C!==void 0&&{data:C}}}).catch(V=>c(Tt(V))),d=new ub(t.maxSubscriptions??vu),p=R=>{if(!Sr(R))return;let j=d.routeOutbound(R);if(j!=="passthrough"){for(let U of j)o.send({jsonrpc:"2.0",...U}).catch(C=>c(Tt(C)));return"handled"}},h=async R=>{if(St(R)&&R.method==="subscriptions/listen"){let j=Br(R.params),U=nu(R.params)?(j===void 0?[]:iu(j))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},C=ou(R.params),V;if(U!==void 0)V={jsonrpc:"2.0",id:R.id,error:{code:-32602,message:`Invalid _meta envelope: ${U.key}: ${U.problem}`}};else if(C===void 0||!_r.includes(C)){let ee=new to({supported:[..._r],requested:C??"unknown"});V={jsonrpc:"2.0",id:R.id,error:{code:ee.code,message:ee.message,data:ee.data}}}else V=d.serve(R);return await o.send("error"in V?V:{jsonrpc:"2.0",method:V.method,params:V.params}).catch(ee=>c(Tt(ee))),!0}if(Sr(R)&&R.method==="notifications/cancelled"){let j=R.params?.requestId;if(j!==void 0&&d.cancel(j))return!0}return!1},S=(R,j,U)=>{let C=$g({kind:"legacy",reason:j,...U!==void 0&&{requestedVersion:U}},_r);return C===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${C.cell}): ${C.message}`)),u(R.id,C.code,C.message,C.data))},v=R=>{a||R===i||z()},$=async(R,j)=>{let U=await e({era:R}),C=U instanceof Xi?U.server:U;R==="modern"&&(Rg(C,j),Ag(C,_r),d.setServerCapabilities(C.getCapabilities()));let V=new Uk(o,()=>v(V),R==="modern"?p:void 0);return await U.connect(V),{product:U,channel:V}},y=R=>R.product.close().catch(j=>c(Tt(j))),f=async R=>{i=R.channel;try{await R.channel.whenRequestsAnswered(fb)||c(new Error(`Discarded the probe instance with requests still unanswered after ${fb}ms; continuing with the fallback`)),await R.product.close()}catch(j){c(Tt(j))}finally{i=void 0}},w=async R=>{if(r.phase==="closed")return;if(r.phase==="pinned"){if(r.era==="modern"&&St(R)&&R.method==="initialize"&&!bg(R.params)){await S(R,"initialize",R.params!==null&&typeof R.params=="object"&&typeof R.params.protocolVersion=="string"?R.params.protocolVersion:void 0);return}if(r.era==="modern"&&await h(R))return;r.instance.channel.deliver(R);return}if(!St(R)&&!Sr(R)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let j=Vk(R);switch(j.kind){case"invalid-envelope":{let U=`Invalid _meta envelope for protocol revision 2026-07-28: ${j.issue.key}: ${j.issue.problem}`;St(R)?await u(R.id,X.InvalidParams,U,{envelope:j.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${U}`));return}case"unsupported-revision":if(St(R)){let U=new to({supported:[..._r],requested:j.requested});c(U),await u(R.id,U.code,U.message,U.data)}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${j.requested}`));return;case"modern":if(St(R)&&R.method==="server/discover"){if(r.phase==="probe"){r.instance.channel.deliver(R,{classification:j.classification});return}let U=await $("modern",j.revision);if(s()){await y(U);return}r={phase:"probe",instance:U},U.channel.deliver(R,{classification:j.classification});return}if(r.phase==="probe"){if(Sr(R)){r.instance.channel.deliver(R,{classification:j.classification});return}r={phase:"pinned",era:"modern",instance:r.instance}}else{let U=await $("modern",j.revision);if(s()){await y(U);return}r={phase:"pinned",era:"modern",instance:U}}if(await h(R))return;r.instance.channel.deliver(R,{classification:j.classification});return;case"legacy":{if(n==="reject"){St(R)&&await S(R,j.reason,j.requestedVersion);return}if(r.phase==="probe"){if(await f(r.instance),s())return;r={phase:"opening"}}let U=await $("legacy");if(s()){await y(U);return}r={phase:"pinned",era:"legacy",instance:U},r.instance.channel.deliver(R);return}}},g=[],b=!1,k=async()=>{if(!b){b=!0;try{for(;g.length>0;){let R=g.shift();try{await w(R)}catch(j){St(R)&&await u(R.id,X.InternalError,"Internal server error"),c(Tt(j))}}}finally{b=!1}}},z=async()=>{if(a||r.phase==="closed")return;a=!0;let R=r;r={phase:"closed"};for(let j of d.teardownAll())await o.send(j).catch(U=>c(Tt(U)));(R.phase==="probe"||R.phase==="pinned")&&await R.instance.product.close().catch(j=>c(Tt(j))),await o.close().catch(j=>c(Tt(j)))};o.onmessage=R=>{g.push(R),k()},o.onerror=R=>{c(R),(r.phase==="probe"||r.phase==="pinned")&&r.instance.channel.onerror?.(R)},o.onclose=()=>{if(a||r.phase==="closed")return;a=!0;let R=r;r={phase:"closed"},(R.phase==="probe"||R.phase==="pinned")&&R.instance.product.close().catch(j=>c(Tt(j)))};let _=o.start().catch(R=>{throw c(Tt(R)),R});return _.catch(()=>{}),{close:async()=>{await _.catch(()=>{}),await z()}}}function Tt(e){return e instanceof Error?e:new Error(String(e))}var Zk=l.object({ANILIST_ACCESS_TOKEN:l.string().min(1).optional(),ANILIST_CLIENT_ID:l.string().min(1).optional(),ANILIST_CLIENT_SECRET:l.string().min(1).optional(),ANILIST_TOKEN_STORE:l.string().min(1).optional(),ANILIST_GRAPHQL_URL:l.string().url().default("https://graphql.anilist.co"),ANILIST_OAUTH_BASE_URL:l.string().url().default("https://anilist.co/api/v2/oauth"),HTTP_TIMEOUT_MS:l.coerce.number().int().positive().default(15e3),HTTP_RETRIES:l.coerce.number().int().nonnegative().default(2),ANILIST_MIN_INTERVAL_MS:l.coerce.number().int().nonnegative().default(2100),CACHE_TTL_MS:l.coerce.number().int().nonnegative().default(3e5),ANILIST_OAUTH_PORT:l.coerce.number().int().positive().default(8082),LOG_LEVEL:l.enum(["debug","info","warn","error","silent"]).default("info")}),Fk=Zk.transform(e=>({graphqlUrl:e.ANILIST_GRAPHQL_URL,oauthBaseUrl:e.ANILIST_OAUTH_BASE_URL,httpTimeoutMs:e.HTTP_TIMEOUT_MS,httpRetries:e.HTTP_RETRIES,minIntervalMs:e.ANILIST_MIN_INTERVAL_MS,cacheTtlMs:e.CACHE_TTL_MS,logLevel:e.LOG_LEVEL,oauthPort:e.ANILIST_OAUTH_PORT,auth:{accessToken:e.ANILIST_ACCESS_TOKEN,clientId:e.ANILIST_CLIENT_ID,clientSecret:e.ANILIST_CLIENT_SECRET,tokenStorePath:e.ANILIST_TOKEN_STORE,canLogin:!!(e.ANILIST_CLIENT_ID&&e.ANILIST_CLIENT_SECRET),configured:!!e.ANILIST_ACCESS_TOKEN}})),Hk=/^\$\{[^}]*\}$/;function gb(e=process.env){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0&&n!==""&&!Hk.test(n)));return Fk.parse(t)}var ke=class extends Error{code;status;retryable;constructor(t){super(t.message,t.cause===void 0?void 0:{cause:t.cause}),this.name="ApiError",this.code=t.code,this.status=t.status,this.retryable=t.retryable??!1}};function vb(e){return e===304?{code:"not_modified",retryable:!1}:e===401?{code:"unauthorized",retryable:!1}:e===403?{code:"forbidden",retryable:!1}:e===404?{code:"not_found",retryable:!1}:e===429?{code:"rate_limited",retryable:!0}:e===400||e===405||e===422?{code:"bad_request",retryable:!1}:e>=500?{code:"server_error",retryable:!0}:{code:"unknown",retryable:!1}}function Cg(e){return e.replace(/Bearer\s+[A-Za-z0-9._~+/-]+=*/gi,"Bearer ***").replace(/\b(access_token|refresh_token|client_secret|client_id)=([^&\s"]+)/gi,"$1=***")}var yb={debug:10,info:20,warn:30,error:40,silent:100};function _b(e,t){let n=yb[e];function o(r,i,a){if(yb[r]<n)return;let s=a.length?" "+Cg(a.map(u=>Jk(u)).join(" ")):"",c=`${Cg(i)}${s}`;if(console.error(`[anilist-mcp-server] ${r}: ${c}`),t)try{t(r,c)}catch{}}return{debug:(r,...i)=>o("debug",r,i),info:(r,...i)=>o("info",r,i),warn:(r,...i)=>o("warn",r,i),error:(r,...i)=>o("error",r,i)}}function Jk(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}var yu="0.1.3",Sb=`anilist-mcp-server/${yu} (+https://github.com/Grinv/anilist-mcp-server)`;var bb=8e3,ro=class{#e;constructor(t){this.#e=t}async getJson(t,n={}){return this.requestJson(t,{...n,method:n.method??"GET"})}async requestJson(t,n={}){let o=this.#r(t,n.query),r=n.retries??this.#e.retries??2,i=n.timeoutMs??this.#e.timeoutMs??15e3,a=0;for(;;){this.#e.beforeRequest&&await this.#e.beforeRequest();try{return await this.#t(o,n,i)}catch(s){let c=s instanceof ke?s:$b(s);if(!c.retryable||a>=r)throw c;let u=Kk(a,c);this.#e.logger.debug(`retrying ${o} after ${u}ms (attempt ${a+1}/${r}, ${c.code})`),await Qk(u),a+=1}}}async#t(t,n,o){let r=new AbortController,i=setTimeout(()=>r.abort(),o),a=()=>r.abort();n.signal?.addEventListener("abort",a,{once:!0});let s;try{s=await fetch(t,{method:n.method??"GET",headers:{"User-Agent":Sb,Accept:"application/json",...this.#e.defaultHeaders,...n.headers},...n.body===void 0?{}:{body:n.body},signal:r.signal})}catch(u){throw n.signal?.aborted?new ke({code:"network",message:"Request aborted by caller",cause:u}):r.signal.aborted?new ke({code:"timeout",message:`Request timed out after ${o}ms`,retryable:!0,cause:u}):$b(u)}finally{clearTimeout(i),n.signal?.removeEventListener("abort",a)}if(!s.ok)throw await Gk(s);if(s.status===204)return;let c=await s.text();if(c.length!==0)try{return JSON.parse(c)}catch(u){throw new ke({code:"unknown",message:"Upstream returned invalid JSON",cause:u})}}#r(t,n){let o=new URL(t.replace(/^\//,""),Xk(this.#e.baseUrl));if(n)for(let[r,i]of Object.entries(n))i!==void 0&&o.searchParams.set(r,String(i));return o.toString()}};async function Gk(e){let{code:t,retryable:n}=vb(e.status),o="";try{o=await e.text()}catch{}let r=Bk(o)??o.slice(0,500),i=Yk(e.headers.get("retry-after"));return new ke({code:t,status:e.status,retryable:n,message:`HTTP ${e.status} ${e.statusText}${r?`: ${r}`:""}`,...i===void 0?{}:{cause:{retryAfterMs:i}}})}function Bk(e){if(e)try{let t=JSON.parse(e);if(t===null||typeof t!="object")return;let n=t;if(typeof n.message=="string")return n.message;if(typeof n.error=="string")return n.error;if(Array.isArray(n.errors)&&n.errors.length>0){let o=n.errors[0],r=typeof o.message=="string"?o.message:void 0,i=o.validation!==null&&typeof o.validation=="object"?Object.entries(o.validation).map(([a,s])=>`${a}: ${Array.isArray(s)?s.join(", "):String(s)}`).join("; "):void 0;return r&&i?`${r} (${i})`:r??i}return}catch{return}}function $b(e){return e instanceof ke?e:new ke({code:"network",message:e instanceof Error?`Network error: ${e.message}`:"Network error",retryable:!0,cause:e})}function Kk(e,t){let n=t.cause?.retryAfterMs;if(typeof n=="number"&&n>0)return Math.min(n,bb);let o=Math.min(bb,500*2**e);return o+Math.floor(o*.25*Wk(e))}function Wk(e){return e*2654435761%1e3/1e3}function Yk(e){if(!e)return;let t=Number(e);if(Number.isFinite(t))return t*1e3;let n=Date.parse(e);if(Number.isFinite(n))return Math.max(0,n-Date.now())}function Xk(e){return e.endsWith("/")?e:e+"/"}function Qk(e){return new Promise(t=>setTimeout(t,e))}var _u=class{#e;#t;constructor(t){this.#e=new ro({baseUrl:t.endpoint,logger:t.logger,timeoutMs:t.timeoutMs,retries:t.retries,beforeRequest:t.beforeRequest,defaultHeaders:{"Content-Type":"application/json"}}),this.#t=t.cache}async request(t,n={},o,r){if(this.#t&&!r?.skipCache&&!/^\s*mutation\b/i.test(t)){let i=JSON.stringify({query:t,variables:n,auth:o?.Authorization??null});return this.#t.wrap(i,()=>this.#r(t,n,o))}return this.#r(t,n,o)}async#r(t,n,o){let r=JSON.stringify({query:t,variables:zb(n)}),i=await this.#e.requestJson("",{method:"POST",body:r,...o?{headers:o}:{}});if(i.errors?.length)throw new ke({code:"bad_request",message:i.errors.map(eT).join("; ")});if(i.data===null||i.data===void 0)throw new ke({code:"unknown",message:"AniList returned no data for this query"});return i.data}};function eT(e){if(!e.validation||Object.keys(e.validation).length===0)return e.message;let t=Object.entries(e.validation).map(([n,o])=>`${n}: ${o.join(", ")}`).join("; ");return`${e.message} (${t})`}function zb(e){let t={};for(let[n,o]of Object.entries(e))o!==void 0&&(t[n]=o!==null&&typeof o=="object"&&!Array.isArray(o)?zb(o):o);return t}var Su=class{#e;#t;#r;#n=[];#i=Promise.resolve();#o=null;constructor(t,n=[]){this.#e=Math.max(0,t),this.#t=n,this.#r=n.reduce((o,r)=>Math.max(o,r.windowMs),0)}acquire(){let t=this.#i,n;return this.#i=new Promise(o=>{n=o}),t.then(async()=>{let o=this.#a();o>0&&await tT(o);let r=Date.now();this.#o=r,this.#s(r),n()})}#a(){let t=Date.now(),n=this.#o!==null?this.#o+this.#e:0;for(let o of this.#t){if(this.#n.length<o.limit)continue;let r=this.#n[this.#n.length-o.limit];n=Math.max(n,r+o.windowMs)}return Math.max(0,n-t)}#s(t){this.#n.push(t);let n=t-this.#r,o=0;for(;o<this.#n.length&&this.#n[o]<=n;)o+=1;o>0&&this.#n.splice(0,o)}};function tT(e){return new Promise(t=>setTimeout(t,e))}var bu=class{#e;#t;#r=new Map;#n=new Map;constructor(t,n=500){this.#e=t,this.#t=n}get(t){let n=this.#r.get(t);if(n)return n.expires>Date.now()?n.value:void 0}getStale(t){return this.#r.get(t)?.value}set(t,n){if(!(this.#e<=0)){if(!this.#r.has(t)&&this.#r.size>=this.#t){let o=this.#r.keys().next().value;o!==void 0&&this.#r.delete(o)}this.#r.set(t,{value:n,expires:Date.now()+this.#e})}}async wrap(t,n){let o=this.get(t);return o!==void 0?o:this.#i(t,n)}async wrapStaleOnError(t,n){let o=this.get(t);if(o!==void 0)return o;try{return await this.#i(t,n)}catch(r){let i=this.getStale(t);if(i!==void 0)return i;throw r}}#i(t,n){let o=this.#n.get(t);if(o)return o;let r=n().then(i=>(this.set(t,i),i)).finally(()=>this.#n.delete(t));return this.#n.set(t,r),r}};import{mkdirSync as rT,readFileSync as nT,writeFileSync as oT}from"fs";import{homedir as wb,platform as iT}from"os";import{dirname as aT,join as qg}from"path";var Lg=l.object({accessToken:l.string(),expiresAt:l.number()}).passthrough(),$u=class{#e;#t;constructor(t,n){this.#e=t,this.#t=n}get path(){return this.#e}load(){let t;try{t=nT(this.#e,"utf8")}catch{return}let n;try{n=JSON.parse(t)}catch{this.#t.warn(`token store at ${this.#e} is not valid JSON; ignoring it`);return}let o=Lg.safeParse(n);if(!o.success){this.#t.warn(`token store at ${this.#e} is malformed; ignoring it`);return}return o.data}save(t){rT(aT(this.#e),{recursive:!0,mode:448}),oT(this.#e,JSON.stringify(t,null,2),{mode:384})}};function Rb(e=process.env){if(e.ANILIST_TOKEN_STORE)return e.ANILIST_TOKEN_STORE;let t=iT()==="win32"?e.APPDATA??qg(wb(),"AppData","Roaming"):e.XDG_CONFIG_HOME??qg(wb(),".config");return qg(t,"anilist-mcp-server","tokens.json")}import{createServer as sT}from"http";import{randomBytes as cT}from"crypto";import{spawn as lT}from"child_process";import{platform as Mg}from"os";function Ib(){return cT(16).toString("hex")}function kb(e){let t=new URLSearchParams({response_type:"code",client_id:e.clientId,redirect_uri:e.redirectUri});return e.state&&t.set("state",e.state),`${e.oauthBaseUrl.replace(/\/$/,"")}/authorize?${t.toString()}`}function Tb(e){let t=e.trim(),n;try{n=new URL(t).searchParams}catch{t.includes("=")&&(n=new URLSearchParams(t.replace(/^\?/,"")))}if(n){let o=n.get("error");if(o)throw new Error(`authorization denied: ${o}`);let r=n.get("code");if(r)return r;throw new Error("no `code` found in the pasted redirect URL")}if(!t)throw new Error("empty redirect/code");return t}function Pb(e){let t=e.trim();try{return new URL(t).searchParams.get("state")}catch{return t.includes("=")?new URLSearchParams(t.replace(/^\?/,"")).get("state"):null}}function Eb(e){let t=Mg()==="darwin"?"open":Mg()==="win32"?"cmd":"xdg-open",n=Mg()==="win32"?["/c","start","",e]:[e];try{let o=lT(t,n,{stdio:"ignore",detached:!0});o.on("error",()=>{}),o.unref()}catch{}}function xb(e){return new Promise((t,n)=>{let o=sT((r,i)=>{let a=null,s=null,c=null;try{let u=new URL(r.url??"/",`http://localhost:${e.port}`);if(!u.pathname.startsWith(e.path)){i.writeHead(404).end();return}a=u.searchParams.get("code"),s=u.searchParams.get("state"),c=u.searchParams.get("error")}catch{}i.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),i.end(c?"<h2>AniList login was denied. You can close this tab.</h2>":a?"<h2>Logged in to AniList \u2014 you can close this tab and return to your client.</h2>":"<h2>Waiting for the AniList redirect\u2026</h2>"),a&&e.onCode(a,s)});o.on("error",n),o.listen(e.port,"127.0.0.1",()=>{t({server:o,close:()=>o.close()})})})}function jb(e){let t=e.split(".");if(t.length===3)try{let n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"));return typeof n.exp=="number"?n.exp*1e3:void 0}catch{return}}var uT=365*24*60*60*1e3,zu=class{#e;#t;#r;#n;#i;#o;#a;#s;constructor(t,n){this.#e=t,this.#t=n;let o=new Su(t.minIntervalMs),r=new bu(t.cacheTtlMs);this.#r=new _u({endpoint:t.graphqlUrl,logger:n,timeoutMs:t.httpTimeoutMs,retries:t.httpRetries,beforeRequest:()=>o.acquire(),cache:r}),this.#n=new ro({baseUrl:t.oauthBaseUrl,logger:n,timeoutMs:t.httpTimeoutMs,retries:t.httpRetries}),this.#i=new $u(t.auth.tokenStorePath??Rb(),n),this.#o=t.auth.accessToken?{accessToken:t.auth.accessToken,expiresAt:1/0}:this.#i.load()}isConfigured(){return!!(this.#o&&this.#o.expiresAt>Date.now())}canLogin(){return this.#e.auth.canLogin}#c(){return this.isConfigured()?{Authorization:`Bearer ${this.#o.accessToken}`}:void 0}#u(){let t=this.#c();if(!t)throw new ke({code:"unauthorized",message:"Run login_anilist (or set ANILIST_ACCESS_TOKEN) before using this tool."});return t}ctx(){return{gql:this.#r,authHeader:()=>this.#c(),requireAuth:()=>this.#u()}}async startLogin(t={}){if(!this.#e.auth.clientId||!this.#e.auth.clientSecret)throw new ke({code:"bad_request",message:"ANILIST_CLIENT_ID and ANILIST_CLIENT_SECRET must both be set to log in."});let n=`http://localhost:${this.#e.oauthPort}/callback`,o=Ib();this.#s=o;let r=kb({oauthBaseUrl:this.#e.oauthBaseUrl,clientId:this.#e.auth.clientId,redirectUri:n,state:o});this.#a?.close(),this.#a=void 0;let i=!1;try{let{close:a}=await xb({port:this.#e.oauthPort,path:"/callback",onCode:(s,c)=>{this.#l(s,c).finally(()=>{this.#a?.close(),this.#a=void 0})}});this.#a={close:a},i=!0}catch(a){this.#t.warn(`could not bind localhost:${this.#e.oauthPort}, use manual paste`,a)}return(t.open??Eb)(r),{authorizeUrl:r,redirectUri:n,listening:i}}async submitRedirect(t){let n=Tb(t);try{await this.#l(n,Pb(t))}finally{this.#a?.close(),this.#a=void 0}}async#l(t,n){if(this.#s&&n!==this.#s)throw new ke({code:"unauthorized",message:"OAuth state mismatch \u2014 this redirect doesn't match the login attempt that started it. Run login_anilist again."});let o=`http://localhost:${this.#e.oauthPort}/callback`,r;try{r=await this.#n.requestJson("token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:this.#e.auth.clientId,client_secret:this.#e.auth.clientSecret,redirect_uri:o,code:t}),retries:0})}catch(s){throw s instanceof ke&&s.code==="bad_request"?new ke({code:"bad_request",message:`AniList rejected the authorization code (it may be expired, already used, or invalid) \u2014 run login_anilist again for a fresh one. (${s.message})`}):s}if(this.#s=void 0,!r.access_token)throw new ke({code:"unknown",message:"AniList's token response had no access_token"});let i=jb(r.access_token)??Date.now()+uT,a=Lg.safeParse({accessToken:r.access_token,expiresAt:i});if(!a.success)throw new ke({code:"unknown",message:"AniList's token response had a malformed access_token"});this.#o=a.data,this.#i?.save(this.#o)}};var Qi=`
74
+ depsCount: ${l},
75
+ deps: ${d}}`};let r={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){let[l,d]=i(c);a(c,l),s(c,d)}};function i({schema:c}){let l={},d={};for(let p in c){if(p==="__proto__")continue;let h=Array.isArray(c[p])?l:d;h[p]=c[p]}return[l,d]}function a(c,l=c.schema){let{gen:d,data:p,it:h}=c;if(Object.keys(l).length===0)return;let S=d.let("missing");for(let v in l){let $=l[v];if($.length===0)continue;let y=(0,o.propertyInData)(d,p,v,h.opts.ownProperties);c.setParams({property:v,depsCount:$.length,deps:$.join(", ")}),h.allErrors?d.if(y,()=>{for(let f of $)(0,o.checkReportMissingProp)(c,f)}):(d.if((0,t._)`${y} && (${(0,o.checkMissingProp)(c,$,S)})`),(0,o.reportMissingProp)(c,S),d.else())}}e.validatePropertyDeps=a;function s(c,l=c.schema){let{gen:d,data:p,keyword:h,it:S}=c,v=d.name("valid");for(let $ in l)(0,n.alwaysValidSchema)(S,l[$])||(d.if((0,o.propertyInData)(d,p,$,S.opts.ownProperties),()=>{let y=c.subschema({keyword:h,schemaProp:$},v);c.mergeValidEvaluated(y,v)},()=>d.var(v,!0)),c.ok(v))}e.validateSchemaDeps=s,e.default=r})),C0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:r})=>(0,t._)`{propertyName: ${r.propertyName}}`},code(r){let{gen:i,schema:a,data:s,it:c}=r;if((0,n.alwaysValidSchema)(c,a))return;let l=i.name("valid");i.forIn("key",s,d=>{r.setParams({propertyName:d}),r.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),i.if((0,t.not)(l),()=>{r.error(!0),c.allErrors||i.break()})}),r.ok(l)}};e.default=o})),BS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Tt(),n=_e(),o=kt(),r=ke(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,n._)`{additionalProperty: ${a.additionalProperty}}`},code(a){let{gen:s,schema:c,parentSchema:l,data:d,errsCount:p,it:h}=a;if(!p)throw new Error("ajv implementation error");let{allErrors:S,opts:v}=h;if(h.props=!0,v.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(h,c))return;let $=(0,t.allSchemaProperties)(l.properties),y=(0,t.allSchemaProperties)(l.patternProperties);f(),a.ok((0,n._)`${p} === ${o.default.errors}`);function f(){s.forIn("key",d,z=>{!$.length&&!y.length?b(z):s.if(w(z),()=>b(z))})}function w(z){let _;if($.length>8){let R=(0,r.schemaRefOrVal)(h,l.properties,"properties");_=(0,t.isOwnProperty)(s,R,z)}else $.length?_=(0,n.or)(...$.map(R=>(0,n._)`${z} === ${R}`)):_=n.nil;return y.length&&(_=(0,n.or)(_,...y.map(R=>(0,n._)`${(0,t.usePattern)(a,R)}.test(${z})`))),(0,n.not)(_)}function g(z){s.code((0,n._)`delete ${d}[${z}]`)}function b(z){if(v.removeAdditional==="all"||v.removeAdditional&&c===!1){g(z);return}if(c===!1){a.setParams({additionalProperty:z}),a.error(),S||s.break();return}if(typeof c=="object"&&!(0,r.alwaysValidSchema)(h,c)){let _=s.name("valid");v.removeAdditional==="failing"?(k(z,_,!1),s.if((0,n.not)(_),()=>{a.reset(),g(z)})):(k(z,_),S||s.if((0,n.not)(_),()=>s.break()))}}function k(z,_,R){let j={keyword:"additionalProperties",dataProp:z,dataPropType:r.Type.Str};R===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(j,_)}}};e.default=i})),q0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Wi(),n=Tt(),o=ke(),r=BS(),i={keyword:"properties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,parentSchema:l,data:d,it:p}=a;p.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&r.default.code(new t.KeywordCxt(p,r.default,"additionalProperties"));let h=(0,n.allSchemaProperties)(c);for(let f of h)p.definedProperties.add(f);p.opts.unevaluated&&h.length&&p.props!==!0&&(p.props=o.mergeEvaluated.props(s,(0,o.toHash)(h),p.props));let S=h.filter(f=>!(0,o.alwaysValidSchema)(p,c[f]));if(S.length===0)return;let v=s.name("valid");for(let f of S)$(f)?y(f):(s.if((0,n.propertyInData)(s,d,f,p.opts.ownProperties)),y(f),p.allErrors||s.else().var(v,!0),s.endIf()),a.it.definedProperties.add(f),a.ok(v);function $(f){return p.opts.useDefaults&&!p.compositeRule&&c[f].default!==void 0}function y(f){a.subschema({keyword:"properties",schemaProp:f,dataProp:f},v)}}};e.default=i})),L0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Tt(),n=_e(),o=ke(),r=ke(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,data:l,parentSchema:d,it:p}=a,{opts:h}=p,S=(0,t.allSchemaProperties)(c),v=S.filter(k=>(0,o.alwaysValidSchema)(p,c[k]));if(S.length===0||v.length===S.length&&(!p.opts.unevaluated||p.props===!0))return;let $=h.strictSchema&&!h.allowMatchingProperties&&d.properties,y=s.name("valid");p.props!==!0&&!(p.props instanceof n.Name)&&(p.props=(0,r.evaluatedPropsToName)(s,p.props));let{props:f}=p;w();function w(){for(let k of S)$&&g(k),p.allErrors?b(k):(s.var(y,!0),b(k),s.if(y))}function g(k){for(let z in $)new RegExp(k).test(z)&&(0,o.checkStrictMode)(p,`property ${z} matches pattern ${k} (use allowMatchingProperties)`)}function b(k){s.forIn("key",l,z=>{s.if((0,n._)`${(0,t.usePattern)(a,k)}.test(${z})`,()=>{let _=v.includes(k);_||a.subschema({keyword:"patternProperties",schemaProp:k,dataProp:z,dataPropType:r.Type.Str},y),p.opts.unevaluated&&f!==!0?s.assign((0,n._)`${f}[${z}]`,!0):!_&&!p.allErrors&&s.if((0,n.not)(y),()=>s.break())})})}}};e.default=i})),M0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ke(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){let{gen:r,schema:i,it:a}=o;if((0,t.alwaysValidSchema)(a,i)){o.fail();return}let s=r.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),o.failResult(s,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};e.default=n})),D0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Tt().validateUnion,error:{message:"must match a schema in anyOf"}};e.default=t})),U0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:r})=>(0,t._)`{passingSchemas: ${r.passing}}`},code(r){let{gen:i,schema:a,parentSchema:s,it:c}=r;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&s.discriminator)return;let l=a,d=i.let("valid",!1),p=i.let("passing",null),h=i.name("_valid");r.setParams({passing:p}),i.block(S),r.result(d,()=>r.reset(),()=>r.error(!0));function S(){l.forEach((v,$)=>{let y;(0,n.alwaysValidSchema)(c,v)?i.var(h,!0):y=r.subschema({keyword:"oneOf",schemaProp:$,compositeRule:!0},h),$>0&&i.if((0,t._)`${h} && ${d}`).assign(d,!1).assign(p,(0,t._)`[${p}, ${$}]`).else(),i.if(h,()=>{i.assign(d,!0),i.assign(p,$),y&&r.mergeEvaluated(y,t.Name)})})}}};e.default=o})),V0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ke(),n={keyword:"allOf",schemaType:"array",code(o){let{gen:r,schema:i,it:a}=o;if(!Array.isArray(i))throw new Error("ajv implementation error");let s=r.name("valid");i.forEach((c,l)=>{if((0,t.alwaysValidSchema)(a,c))return;let d=o.subschema({keyword:"allOf",schemaProp:l},s);o.ok(s),o.mergeEvaluated(d)})}};e.default=n})),Z0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,t._)`{failingKeyword: ${i.ifClause}}`},code(i){let{gen:a,parentSchema:s,it:c}=i;s.then===void 0&&s.else===void 0&&(0,n.checkStrictMode)(c,'"if" without "then" and "else" is ignored');let l=r(c,"then"),d=r(c,"else");if(!l&&!d)return;let p=a.let("valid",!0),h=a.name("_valid");if(S(),i.reset(),l&&d){let $=a.let("ifClause");i.setParams({ifClause:$}),a.if(h,v("then",$),v("else",$))}else l?a.if(h,v("then")):a.if((0,t.not)(h),v("else"));i.pass(p,()=>i.error(!0));function S(){let $=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);i.mergeEvaluated($)}function v($,y){return()=>{let f=i.subschema({keyword:$},h);a.assign(p,h),i.mergeValidEvaluated(f,p),y?a.assign(y,(0,t._)`${$}`):i.setParams({ifClause:$})}}}};function r(i,a){let s=i.schema[a];return s!==void 0&&!(0,n.alwaysValidSchema)(i,s)}e.default=o})),F0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ke(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:r,it:i}){r.if===void 0&&(0,t.checkStrictMode)(i,`"${o}" without "if" is ignored`)}};e.default=n})),KS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=JS(),n=N0(),o=GS(),r=O0(),i=A0(),a=jg(),s=C0(),c=BS(),l=q0(),d=L0(),p=M0(),h=D0(),S=U0(),v=V0(),$=Z0(),y=F0();function f(w=!1){let g=[p.default,h.default,S.default,v.default,$.default,y.default,s.default,c.default,a.default,l.default,d.default];return w?g.push(n.default,r.default):g.push(t.default,o.default),g.push(i.default),g}e.default=f})),H0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must match format "${o}"`,params:({schemaCode:o})=>(0,t._)`{format: ${o}}`},code(o,r){let{gen:i,data:a,$data:s,schema:c,schemaCode:l,it:d}=o,{opts:p,errSchemaPath:h,schemaEnv:S,self:v}=d;if(!p.validateFormats)return;s?$():y();function $(){let f=i.scopeValue("formats",{ref:v.formats,code:p.code.formats}),w=i.const("fDef",(0,t._)`${f}[${l}]`),g=i.let("fType"),b=i.let("format");i.if((0,t._)`typeof ${w} == "object" && !(${w} instanceof RegExp)`,()=>i.assign(g,(0,t._)`${w}.type || "string"`).assign(b,(0,t._)`${w}.validate`),()=>i.assign(g,(0,t._)`"string"`).assign(b,w)),o.fail$data((0,t.or)(k(),z()));function k(){return p.strictSchema===!1?t.nil:(0,t._)`${l} && !${b}`}function z(){let _=S.$async?(0,t._)`(${w}.async ? await ${b}(${a}) : ${b}(${a}))`:(0,t._)`${b}(${a})`,R=(0,t._)`(typeof ${b} == "function" ? ${_} : ${b}.test(${a}))`;return(0,t._)`${b} && ${b} !== true && ${g} === ${r} && !${R}`}}function y(){let f=v.formats[c];if(!f){k();return}if(f===!0)return;let[w,g,b]=z(f);w===r&&o.pass(_());function k(){if(p.strictSchema===!1){v.logger.warn(R());return}throw new Error(R());function R(){return`unknown format "${c}" ignored in schema at path "${h}"`}}function z(R){let j=R instanceof RegExp?(0,t.regexpCode)(R):p.code.formats?(0,t._)`${p.code.formats}${(0,t.getProperty)(c)}`:void 0,U=i.scopeValue("formats",{key:c,ref:R,code:j});return typeof R=="object"&&!(R instanceof RegExp)?[R.type||"string",R.validate,(0,t._)`${U}.validate`]:["string",R,U]}function _(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!S.$async)throw new Error("async format in sync schema");return(0,t._)`await ${b}(${a})`}return typeof g=="function"?(0,t._)`${b}(${a})`:(0,t._)`${b}.test(${a})`}}}};e.default=n})),WS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=[H0().default];e.default=t})),YS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]})),J0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=FS(),n=HS(),o=KS(),r=WS(),i=YS(),a=[t.default,n.default,(0,o.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];e.default=a})),G0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(n){n.Tag="tag",n.Mapping="mapping"})(t||(e.DiscrError=t={}))})),XS=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=G0(),o=gu(),r=Yi(),i=ke(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:c}})=>s===n.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:s,tag:c,tagName:l}})=>(0,t._)`{error: ${s}, tag: ${l}, tagValue: ${c}}`},code(s){let{gen:c,data:l,schema:d,parentSchema:p,it:h}=s,{oneOf:S}=p;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");let v=d.propertyName;if(typeof v!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!S)throw new Error("discriminator: requires oneOf keyword");let $=c.let("valid",!1),y=c.const("tag",(0,t._)`${l}${(0,t.getProperty)(v)}`);c.if((0,t._)`typeof ${y} == "string"`,()=>f(),()=>s.error(!1,{discrError:n.DiscrError.Tag,tag:y,tagName:v})),s.ok($);function f(){let b=g();c.if(!1);for(let k in b)c.elseIf((0,t._)`${y} === ${k}`),c.assign($,w(b[k]));c.else(),s.error(!1,{discrError:n.DiscrError.Mapping,tag:y,tagName:v}),c.endIf()}function w(b){let k=c.name("valid"),z=s.subschema({keyword:"oneOf",schemaProp:b},k);return s.mergeEvaluated(z,t.Name),k}function g(){var b;let k={},z=R(p),_=!0;for(let C=0;C<S.length;C++){let V=S[C];if(V?.$ref&&!(0,i.schemaHasRulesButRef)(V,h.self.RULES)){let ne=V.$ref;if(V=o.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,ne),V instanceof o.SchemaEnv&&(V=V.schema),V===void 0)throw new r.default(h.opts.uriResolver,h.baseId,ne)}let ee=(b=V?.properties)===null||b===void 0?void 0:b[v];if(typeof ee!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);_=_&&(z||R(V)),j(ee,C)}if(!_)throw new Error(`discriminator: "${v}" must be required`);return k;function R({required:C}){return Array.isArray(C)&&C.includes(v)}function j(C,V){if(C.const)U(C.const,V);else if(C.enum)for(let ee of C.enum)U(ee,V);else throw new Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function U(C,V){if(typeof C!="string"||C in k)throw new Error(`discriminator: "${v}" values must be unique strings`);k[C]=V}}}};e.default=a})),B0=K(((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}})),QS=K(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let n=ZS(),o=J0(),r=XS(),i=B0(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var c=class extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(S=>this.addVocabulary(S)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let S=this.opts.$data?this.$dataMetaSchema(i,a):i;this.addMetaSchema(S,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=Wi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var d=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=hu();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var h=Yi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})),eb=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=_e(),n=kt(),o=gu(),r=Eg(),i={keyword:"$dynamicAnchor",schemaType:"string",code:c=>a(c,c.schema)};function a(c,l){let{gen:d,it:p}=c;p.schemaEnv.root.dynamicAnchors[l]=!0;let h=(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(l)}`,S=p.errSchemaPath==="#"?p.validateName:s(c);d.if((0,t._)`!${h}`,()=>d.assign(h,S))}e.dynamicAnchor=a;function s(c){let{schemaEnv:l,schema:d,self:p}=c.it,{root:h,baseId:S,localRefs:v,meta:$}=l.root,{schemaId:y}=p.opts,f=new o.SchemaEnv({schema:d,schemaId:y,root:h,baseId:S,localRefs:v,meta:$});return o.compileSchema.call(p,f),(0,r.getValidate)(c,f)}e.default=i})),tb=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=_e(),n=kt(),o=Eg(),r={keyword:"$dynamicRef",schemaType:"string",code:a=>i(a,a.schema)};function i(a,s){let{gen:c,keyword:l,it:d}=a;if(s[0]!=="#")throw new Error(`"${l}" only supports hash fragment reference`);let p=s.slice(1);if(d.allErrors)h();else{let v=c.let("valid",!1);h(v),a.ok(v)}function h(v){if(d.schemaEnv.root.dynamicAnchors[p]){let $=c.let("_v",(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(p)}`);c.if($,S($,v),S(d.validateName,v))}else S(d.validateName,v)()}function S(v,$){return $?()=>c.block(()=>{(0,o.callRef)(a,v),c.let($,!0)}):()=>(0,o.callRef)(a,v)}}e.dynamicRef=i,e.default=r})),K0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=eb(),n=ke(),o={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,t.dynamicAnchor)(r,""):(0,n.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};e.default=o})),W0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=tb(),n={keyword:"$recursiveRef",schemaType:"string",code:o=>(0,t.dynamicRef)(o,o.schema)};e.default=n})),Y0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=eb(),n=tb(),o=K0(),r=W0(),i=[t.default,n.default,o.default,r.default];e.default=i})),X0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jg(),n={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:o=>(0,t.validatePropertyDeps)(o)};e.default=n})),Q0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jg(),n={keyword:"dependentSchemas",type:"object",schemaType:"object",code:o=>(0,t.validateSchemaDeps)(o)};e.default=n})),ek=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ke(),n={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:o,parentSchema:r,it:i}){r.contains===void 0&&(0,t.checkStrictMode)(i,`"${o}" without "contains" is ignored`)}};e.default=n})),tk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=X0(),n=Q0(),o=ek(),r=[t.default,n.default,o.default];e.default=r})),rk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o=kt(),r={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:i})=>(0,t._)`{unevaluatedProperty: ${i.unevaluatedProperty}}`},code(i){let{gen:a,schema:s,data:c,errsCount:l,it:d}=i;if(!l)throw new Error("ajv implementation error");let{allErrors:p,props:h}=d;h instanceof t.Name?a.if((0,t._)`${h} !== true`,()=>a.forIn("key",c,y=>a.if(v(h,y),()=>S(y)))):h!==!0&&a.forIn("key",c,y=>h===void 0?S(y):a.if($(h,y),()=>S(y))),d.props=!0,i.ok((0,t._)`${l} === ${o.default.errors}`);function S(y){if(s===!1){i.setParams({unevaluatedProperty:y}),i.error(),p||a.break();return}if(!(0,n.alwaysValidSchema)(d,s)){let f=a.name("valid");i.subschema({keyword:"unevaluatedProperties",dataProp:y,dataPropType:n.Type.Str},f),p||a.if((0,t.not)(f),()=>a.break())}}function v(y,f){return(0,t._)`!${y} || !${y}[${f}]`}function $(y,f){let w=[];for(let g in y)y[g]===!0&&w.push((0,t._)`${f} !== ${g}`);return(0,t.and)(...w)}}};e.default=r})),nk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=ke(),o={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:r}})=>(0,t.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,t._)`{limit: ${r}}`},code(r){let{gen:i,schema:a,data:s,it:c}=r,l=c.items||0;if(l===!0)return;let d=i.const("len",(0,t._)`${s}.length`);if(a===!1)r.setParams({len:l}),r.fail((0,t._)`${d} > ${l}`);else if(typeof a=="object"&&!(0,n.alwaysValidSchema)(c,a)){let h=i.var("valid",(0,t._)`${d} <= ${l}`);i.if((0,t.not)(h),()=>p(h,l)),r.ok(h)}c.items=!0;function p(h,S){i.forRange("i",S,d,v=>{r.subschema({keyword:"unevaluatedItems",dataProp:v,dataPropType:n.Type.Num},h),c.allErrors||i.if((0,t.not)(h),()=>i.break())})}}};e.default=o})),ok=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=rk(),n=nk(),o=[t.default,n.default];e.default=o})),ik=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=FS(),n=HS(),o=KS(),r=Y0(),i=tk(),a=ok(),s=WS(),c=YS(),l=[r.default,t.default,n.default,(0,o.default)(!0),s.default,c.metadataVocabulary,c.contentVocabulary,i.default,a.default];e.default=l})),ak=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}})),sk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}})),ck=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}})),lk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}})),uk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}})),dk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}})),mk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}})),pk=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}})),fk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ak(),n=sk(),o=ck(),r=lk(),i=uk(),a=dk(),s=mk(),c=pk(),l=["/properties"];function d(p){return[t,n,o,r,i,h(this,a),s,h(this,c)].forEach(S=>this.addMetaSchema(S,void 0,!1)),this;function h(S,v){return p?S.$dataMetaSchema(v,l):v}}e.default=d})),hk=K(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let n=ZS(),o=ik(),r=XS(),i=fk(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends n.default{constructor(h={}){super({...h,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),o.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:h,meta:S}=this.opts;S&&(i.default.call(this,h),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var c=Wi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=hu();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=Yi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),gk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(C,V){return{validate:C,compare:V}}e.fullFormats={date:t(i,a),time:t(c(!0),l),"date-time":t(h(!0),S),"iso-time":t(c(),d),"iso-date-time":t(h(),v),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:f,"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:U,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:g,int32:{type:"number",validate:z},int64:{type:"number",validate:_},float:{type:"number",validate:R},double:{type:"number",validate:R},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,l),"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,S),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"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,v),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 n(C){return C%4===0&&(C%100!==0||C%400===0)}let o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(C){let V=o.exec(C);if(!V)return!1;let ee=+V[1],ne=+V[2],$e=+V[3];return ne>=1&&ne<=12&&$e>=1&&$e<=(ne===2&&n(ee)?29:r[ne])}function a(C,V){if(C&&V)return C>V?1:C<V?-1:0}let s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(C){return function(ee){let ne=s.exec(ee);if(!ne)return!1;let $e=+ne[1],Ae=+ne[2],Ne=+ne[3],Fe=ne[4],Ie=ne[5]==="-"?-1:1,x=+(ne[6]||0),M=+(ne[7]||0);if(x>23||M>59||C&&!Fe)return!1;if($e<=23&&Ae<=59&&Ne<60)return!0;let H=Ae-M*Ie,I=$e-x*Ie-(H<0?1:0);return(I===23||I===-1)&&(H===59||H===-1)&&Ne<61}}function l(C,V){if(!(C&&V))return;let ee=new Date("2020-01-01T"+C).valueOf(),ne=new Date("2020-01-01T"+V).valueOf();if(ee&&ne)return ee-ne}function d(C,V){if(!(C&&V))return;let ee=s.exec(C),ne=s.exec(V);if(ee&&ne)return C=ee[1]+ee[2]+ee[3],V=ne[1]+ne[2]+ne[3],C>V?1:C<V?-1:0}let p=/t|\s/i;function h(C){let V=c(C);return function(ne){let $e=ne.split(p);return $e.length===2&&i($e[0])&&V($e[1])}}function S(C,V){if(!(C&&V))return;let ee=new Date(C).valueOf(),ne=new Date(V).valueOf();if(ee&&ne)return ee-ne}function v(C,V){if(!(C&&V))return;let[ee,ne]=C.split(p),[$e,Ae]=V.split(p),Ne=a(ee,$e);if(Ne!==void 0)return Ne||l(ne,Ae)}let $=/\/|:/,y=/^(?:[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 f(C){return $.test(C)&&y.test(C)}let w=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function g(C){return w.lastIndex=0,w.test(C)}let b=-(2**31),k=2**31-1;function z(C){return Number.isInteger(C)&&C<=k&&C>=b}function _(C){return Number.isInteger(C)}function R(){return!0}let j=/[^\\]\\Z/;function U(C){if(j.test(C))return!1;try{return new RegExp(C),!0}catch{return!1}}})),vk=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=QS(),n=_e(),o=n.operators,r={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},i={message:({keyword:s,schemaCode:c})=>(0,n.str)`should be ${r[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>(0,n._)`{comparison: ${r[s].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(r),type:"string",schemaType:"string",$data:!0,error:i,code(s){let{gen:c,data:l,schemaCode:d,keyword:p,it:h}=s,{opts:S,self:v}=h;if(!S.validateFormats)return;let $=new t.KeywordCxt(h,v.RULES.all.format.definition,"format");$.$data?y():f();function y(){let g=c.scopeValue("formats",{ref:v.formats,code:S.code.formats}),b=c.const("fmt",(0,n._)`${g}[${$.schemaCode}]`);s.fail$data((0,n.or)((0,n._)`typeof ${b} != "object"`,(0,n._)`${b} instanceof RegExp`,(0,n._)`typeof ${b}.compare != "function"`,w(b)))}function f(){let g=$.schema,b=v.formats[g];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${p}": format "${g}" does not define "compare" function`);let k=c.scopeValue("formats",{key:g,ref:b,code:S.code.formats?(0,n._)`${S.code.formats}${(0,n.getProperty)(g)}`:void 0});s.fail$data(w(k))}function w(g){return(0,n._)`${g}.compare(${l}, ${d}) ${r[p].fail} 0`}},dependencies:["format"]};let a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})),yk=K(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let n=gk(),o=vk(),r=_e(),i=new r.Name("fullFormats"),a=new r.Name("fastFormats"),s=(l,d={keywords:!0})=>{if(Array.isArray(d))return c(l,d,n.fullFormats,i),l;let[p,h]=d.mode==="fast"?[n.fastFormats,a]:[n.fullFormats,i];return c(l,d.formats||n.formatNames,p,h),d.keywords&&(0,o.default)(l),l};s.get=(l,d="full")=>{let p=(d==="fast"?n.fastFormats:n.fullFormats)[l];if(!p)throw new Error(`Unknown format "${l}"`);return p};function c(l,d,p,h){var S,v;(S=(v=l.opts.code).formats)!==null&&S!==void 0||(v.formats=(0,r._)`require("ajv-formats/dist/formats").${h}`);for(let $ of d)l.addFormat($,p[$])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),_k=QS(),Sk=hk(),bk=$a(yk(),1),$k=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),zk=bk.default;function wk(){let e=new Sk.Ajv2020({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return zk(e),e}var vu=class{_ajv;_userAjv;constructor(e){this._userAjv=e!==void 0,this._ajv=e}get ajv(){return this._ajv??=wk()}getValidator(e){if(!this._userAjv&&"$schema"in e&&typeof e.$schema=="string"&&!$k.has(e.$schema.replace(/#$/,""))){let o=e.$schema.slice(0,200);throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${o}"). The default validator supports JSON Schema 2020-12 only; pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.`)}let t=this.ajv,n="$id"in e&&typeof e.$id=="string"?t.getSchema(e.$id)??t.compile(e):t.compile(e);return o=>n(o)?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(n.errors)}}},kj=_k.Ajv;import Ng from"process";var ub=Symbol.for("mcp.completable");function Ag(e){return!!e&&typeof e=="object"&&ub in e}function Ik(e){return e[ub]?.complete}function kk(e,t){switch(t.kind){case"tools_list_changed":return e.toolsListChanged===!0;case"prompts_list_changed":return e.promptsListChanged===!0;case"resources_list_changed":return e.resourcesListChanged===!0;case"resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function Tk(e,t){let n={},o=r=>t===void 0||r===!0;return e.toolsListChanged===!0&&o(t?.tools?.listChanged)&&(n.toolsListChanged=!0),e.promptsListChanged===!0&&o(t?.prompts?.listChanged)&&(n.promptsListChanged=!0),e.resourcesListChanged===!0&&o(t?.resources?.listChanged)&&(n.resourcesListChanged=!0),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&o(t?.resources?.subscribe)&&(n.resourceSubscriptions=[...e.resourceSubscriptions]),n}var yu=1024;function rb(e,t){return{method:e.method,params:{...e.params,_meta:{...e.params?._meta,[Fr]:t}}}}function Pk(e){let t=_r(Bi).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var Ek=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),db=class{_subs=new Map;_serverCapabilities;constructor(e=yu,t){this._maxSubscriptions=e,this._serverCapabilities=t}setServerCapabilities(e){this._serverCapabilities=e}has(e){return this._subs.has(e)}serve(e){if(this._serverCapabilities===void 0)throw new Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return{jsonrpc:"2.0",id:e.id,error:{code:-32603,message:"Subscription limit reached"}};let t=Pk(e);if(t===void 0)return{jsonrpc:"2.0",id:e.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let n=Tk(t,this._serverCapabilities);return this._subs.set(e.id,n),rb({method:"notifications/subscriptions/acknowledged",params:{notifications:n}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!Ek.has(e.method))return"passthrough";let t=e.params?.uri,n=typeof t=="string"?t:void 0,o=xk(e.method,n),r=[];for(let[i,a]of this._subs)kk(a,o)&&r.push(rb({method:e.method,params:e.params??{}},i));return r}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[Fr]:t}}});return this._subs.clear(),e}};function xk(e,t){switch(e){case"notifications/tools/list_changed":return{kind:"tools_list_changed"};case"notifications/prompts/list_changed":return{kind:"prompts_list_changed"};case"notifications/resources/list_changed":return{kind:"resources_list_changed"};default:return{kind:"resource_updated",uri:t??""}}}var jk=8,Nk=6e5;function Ok(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??jk,roundTimeoutMs:e?.roundTimeoutMs??Nk,legacyShim:e?.legacyShim??!0}}function mb(e,t,n){if(n===null||typeof n!="object"||typeof n.method!="string")throw new le(X.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let o=n,r=oS(o);if(r===void 0)throw new le(X.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${o.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:o,required:r}}function Ak(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=[...t].map(o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function Og(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new le(X.InternalError,t)}var Ck=class{constructor(e){this._host=e}async fulfill(e,t,n,o,r){let{maxRounds:i,roundTimeoutMs:a}=this._host,s=o.mcpReq.signal,c=r,l=0;for(;;){if(l+=1,l>i)return Og(e,IS(e,i));let d=c.inputRequests,p=d!=null&&Object.keys(d).length>0,h=typeof c.requestState=="string"?c.requestState:void 0;if(!p&&h===void 0)throw new le(X.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let S;if(p){let y=this._host.resolvedClientCapabilities(o),f=[];for(let[g,b]of Object.entries(d)){let{embedded:k,required:z}=mb(e,g,b);if(k.method!=="roots/list"&&k.params===void 0)throw new le(X.InternalError,`Handler for ${e} returned an input request '${g}' of kind '${k.method}' without params`);if(eu(z,y)!==void 0)return Og(e,`Cannot request input '${g}' (${k.method}): the client on this 2025-era connection did not declare the required capability${y===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);f.push([g,k])}let w=TS(s);try{let g={relatedRequestId:o.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:w.signal},b=await Promise.all(f.map(async([k,z])=>{try{return[k,await this._dispatchLeg(z,g)]}catch(_){throw w.abort(_),_}}));S=Object.fromEntries(b)}catch(g){if(s.aborted)throw g;return Og(e,`Fulfilling input required by '${e}' failed: ${g instanceof Error?g.message:String(g)}`)}finally{w.dispose()}}else await kS(RS,s);let v={...o,mcpReq:{...o.mcpReq,inputResponses:S,droppedInputResponseKeys:void 0,requestState:Ki(h)}};if(h!==void 0){let y=await this._host.verifyRequestState(h,v,e);y!==void 0&&(v=Rg(v,y))}let $=await t(n,v);if(!Gt($))return $;c=$}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let n=e.params;return n.mode==="url"&&n.elicitationId===void 0&&(n={...n,elicitationId:Ak()}),await this._host.sendElicitation(n,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}},qk=new Set(["tools/call","prompts/get","resources/read"]),Lk,pb;function Cg(e,t){pb(e,t)}var fb=class extends OS{_clientCapabilities;_clientVersion;static{Lk=(e,t)=>{t.clientCapabilities!==void 0&&(e._clientCapabilities=t.clientCapabilities),t.clientInfo!==void 0&&(e._clientVersion=t.clientInfo)},pb=(e,t)=>{let n=t.filter(o=>!e._supportedProtocolVersions.includes(o));n.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...n]),e.setRequestHandler("server/discover",()=>e._ondiscover())}}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new Ck({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,n)=>this._verifyRequestState(e,t,n),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new vu,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=Ok(t?.inputRequired),t?.cacheHints!==void 0){for(let[n,o]of Object.entries(t.cacheHints))o!==void 0&&gg(o,`cacheHints['${n}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",n=>this._oninitialize(n)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),ug(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let n=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:o}=e.params,r=cu(vr,o);return r.success&&this._loggingLevels.set(n,r.data),{}})}buildContext(e,t){let n=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(o,r,i)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[dr],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return a!==void 0&&this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(a)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:o,data:r,logger:i}})},elicitInput:(o,r)=>this.elicitInput(o,r),requestSampling:(o,r)=>this.createMessage(o,r)},http:n?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(vr.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let n=this._loggingLevels.get(t);return n?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(n):!1};registerCapabilities(e){if(this.transport)throw new ve(ze.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=AS(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let n=this._cacheHints?.[e],o=qk.has(e);return n===void 0&&!o?async(r,i)=>{let a=await t(r,i);if(Gt(a))throw new le(X.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}:async(r,i)=>{let a=o?await this._invokeInputRequiredCapableHandler(e,t,r,i):await t(r,i);if(Gt(a)){if(!o)throw new le(X.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return n===void 0?a:tu(a,n)}}return async(n,o)=>{let r=_r(this._negotiatedProtocolVersion),i=r.validateRequest("tools/call",n);if(!i.ok)throw new le(i.reason==="not-in-era"?X.InternalError:X.InvalidParams,i.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${i.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,n,o);if(Gt(a))return a;let s=dg(a),c=r.validateResult("tools/call",s);if(!c.ok)throw new le(c.reason==="not-in-era"?X.InternalError:X.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&to(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,n,o){let r=this._servedModernEra(),i=o.mcpReq.requestState();if(i!==void 0&&typeof i!="string")throw new le(X.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=o;if(typeof i=="string"){let p=await this._verifyRequestState(i,o,e);p!==void 0&&(a=Rg(o,p))}let s;try{s=await t(n,a)}catch(p){throw p instanceof le&&p.code===X.UrlElicitationRequired&&r?new le(X.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { \u2026: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`):p}if(!Gt(s))return s;if(!r){if(!this._inputRequiredServing.legacyShim)throw new le(X.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??Vr}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,n,a,s)}let c=s.inputRequests,l=c!=null&&Object.keys(c).length>0,d=typeof s.requestState=="string";if(!l&&!d)throw new le(X.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(l){let p=this._inputRequestCapabilityView(o);for(let[h,S]of Object.entries(c)){let{embedded:v,required:$}=mb(e,h,S),y=eu($,p);if(y!==void 0)throw new nu({requiredCapabilities:y},`Cannot request input '${h}' (${v.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,n){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(o){throw this.onerror?.(new Error(`requestState verification rejected ${n}: ${o instanceof Error?o.message:String(o)}`)),new le(X.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[Ht]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ve(ze.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead \u2014 the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new ve(ze.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ve(ze.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new ve(ze.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new ve(ze.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new ve(ze.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new ve(ze.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new ve(ze.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ze.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new ve(ze.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new ve(ze.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new ve(ze.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new ve(ze.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new ve(ze.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let n=aS(this._supportedProtocolVersions),o=n.includes(t)?t:n[0]??Vr;return this._negotiatedProtocolVersion=o,this.transport?.setProtocolVersion?.(o),{protocolVersion:o,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:ug(this._supportedProtocolVersions),capabilities:Mk(this.getCapabilities()),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new ve(ze.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages.at(-1),a=Array.isArray(i.content)?i.content:[i.content],s=a.some(p=>p.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],d=l.some(p=>p.type==="tool_use");if(s){if(a.some(p=>p.type!=="tool_result"))throw new le(X.InvalidParams,"The last message must contain only tool_result content if any is present");if(!d)throw new le(X.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(d){let p=new Set(l.filter(S=>S.type==="tool_use").map(S=>S.id)),h=new Set(a.filter(S=>S.type==="tool_result").map(S=>S.toolUseId));if(p.size!==h.size||![...p].every(S=>h.has(S)))throw new le(X.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let n=!!(e.tools||e.toolChoice),o=await this.request({method:"sampling/createMessage",params:e},t),r=this._wireCodec().samplingResultVariant(n,o);if(!r.ok)throw new ve(ze.InvalidResult,`Invalid sampling/createMessage result: ${r.reason==="invalid"?r.message:r.reason}`);return r.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ze.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new ve(ze.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,n){let o=e.mode??"form",r=n?.validateAcceptedContent??!0;switch(o){case"url":{let i=e;return this.request({method:"elicitation/create",params:i},t)}case"form":{let i=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:i},t);if(r&&a.action==="accept"&&a.content&&i.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(i.requestedSchema)(a.content);if(!s.valid)throw new le(X.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){throw s instanceof le?s:new le(X.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ve(ze.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function Mk(e){return{...e}}var Qi=class{server;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(!(t===void 0||!t.enabled)){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return ob;try{let n=$r(t.inputSchema,"input");return this._toolInputSchemaJson[e]=n,n}catch{return}}}constructor(e,t){this.server=new fb(e,t),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?$r(t.inputSchema,"input"):ob,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(n.outputSchema=$r(t.outputSchema,"output")),n})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let n=this._registeredTools[e.params.name];if(!n)throw new le(X.InvalidParams,`Tool ${e.params.name} not found`);if(!n.enabled)throw new le(X.InvalidParams,`Tool ${e.params.name} disabled`);try{let o=await this.validateToolInput(n,e.params.arguments,e.params.name),r=await this.executeToolHandler(n,o,t);return await this.validateToolOutput(n,r,e.params.name),Gt(r)?r:this.server.projectCallToolResult(r,n.outputSchemaJson)}catch(o){if(o instanceof le&&o.code===X.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,n){if(!e.inputSchema)return;let o=await Gr(e.inputSchema,t??{});if(!o.success)throw new le(X.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${o.error}`);return o.data}async validateToolOutput(e,t,n){if(!e.outputSchema||Gt(t)||t.isError)return;if(t.structuredContent===void 0)throw new le(X.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=await Gr(e.outputSchema,t.structuredContent);if(!o.success)throw new le(X.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${o.error}`)}async executeToolHandler(e,t,n){return e.executor(t,n)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":return _g(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Sg(e),this.handleResourceCompletion(e,e.params.ref);default:throw new le(X.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let n=this._registeredPrompts[t.name];if(!n)throw new le(X.InvalidParams,`Prompt ${t.name} not found`);if(!n.enabled)throw new le(X.InvalidParams,`Prompt ${t.name} disabled`);if(!n.argsSchema)return Xi;let o=lb(cb(n.argsSchema)?.[e.params.argument.name]);if(!Ag(o))return Xi;let r=Ik(o);return r?sb(await r(e.params.argument.value,e.params.context)):Xi}async handleResourceCompletion(e,t){let n=Object.values(this._registeredResourceTemplates).find(r=>r.resourceTemplate.uriTemplate.toString()===t.uri);if(!n){if(this._registeredResources[t.uri])return Xi;throw new le(X.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(e.params.argument.name);return o?sb(await o(e.params.argument.value,e.params.context)):Xi}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let n=Object.entries(this._registeredResources).filter(([r,i])=>i.enabled).map(([r,i])=>({uri:r,name:i.name,...i.metadata})),o=[];for(let r of Object.values(this._registeredResourceTemplates)){if(!r.resourceTemplate.listCallback)continue;let i=await r.resourceTemplate.listCallback(t);for(let a of i.resources)o.push({...r.metadata,...a})}return{resources:[...n,...o]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let n;try{n=new URL(e.params.uri)}catch{throw new le(X.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new le(X.InvalidParams,`Resource ${n} disabled`);return tu(await o.readCallback(n,t),o.cacheHint)}for(let r of Object.values(this._registeredResourceTemplates)){let i=r.resourceTemplate.uriTemplate.match(n.toString());if(i)return tu(await r.readCallback(n,i,t),r.cacheHint)}throw new ru(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?wS(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let n=this._registeredPrompts[e.params.name];if(!n)throw new le(X.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new le(X.InvalidParams,`Prompt ${e.params.name} disabled`);return n.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,n,o){let r=n.cacheHint,i=n;if(r!==void 0){gg(r,`resource ${e}`);let a={...n};delete a.cacheHint,i=a}if(typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let a=this._createRegisteredResource(e,n.title,t,i,o);return r!==void 0&&(a.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let a=this._createRegisteredResourceTemplate(e,n.title,t,i,o);return r!==void 0&&(a.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}_createRegisteredResource(e,t,n,o,r){let i={name:e,title:t,metadata:o,readCallback:r,enabled:!0,disable:()=>i.update({enabled:!1}),enable:()=>i.update({enabled:!0}),remove:()=>i.update({uri:null}),update:a=>{a.uri!==void 0&&a.uri!==n&&(delete this._registeredResources[n],a.uri&&(this._registeredResources[a.uri]=i)),a.name!==void 0&&(i.name=a.name),a.title!==void 0&&(i.title=a.title),a.metadata!==void 0&&(i.metadata=a.metadata),a.callback!==void 0&&(i.readCallback=a.callback),a.enabled!==void 0&&(i.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[n]=i,i}_createRegisteredResourceTemplate(e,t,n,o,r){let i={resourceTemplate:n,title:t,metadata:o,readCallback:r,enabled:!0,disable:()=>i.update({enabled:!1}),enable:()=>i.update({enabled:!0}),remove:()=>i.update({name:null}),update:s=>{s.name!==void 0&&s.name!==e&&(delete this._registeredResourceTemplates[e],s.name&&(this._registeredResourceTemplates[s.name]=i)),s.title!==void 0&&(i.title=s.title),s.template!==void 0&&(i.resourceTemplate=s.template),s.metadata!==void 0&&(i.metadata=s.metadata),s.callback!==void 0&&(i.readCallback=s.callback),s.enabled!==void 0&&(i.enabled=s.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=i;let a=n.uriTemplate.variableNames;return Array.isArray(a)&&a.some(s=>!!n.completeCallback(s))&&this.setCompletionRequestHandler(),i}_createRegisteredPrompt(e,t,n,o,r,i,a){let s=o,c=r,l={title:t,description:n,argsSchema:o,icons:i,_meta:a,handler:ab(e,o,r),enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:d=>{d.name!==void 0&&d.name!==e&&(delete this._registeredPrompts[e],d.name&&(this._registeredPrompts[d.name]=l)),d.title!==void 0&&(l.title=d.title),d.description!==void 0&&(l.description=d.description),d.icons!==void 0&&(l.icons=d.icons),d._meta!==void 0&&(l._meta=d._meta);let p=!1;d.argsSchema!==void 0&&(l.argsSchema=d.argsSchema,s=d.argsSchema,p=!0),d.callback!==void 0&&(c=d.callback,p=!0),p&&(l.handler=ab(e,s,c)),d.enabled!==void 0&&(l.enabled=d.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=l,o){let d=cb(o);d&&Object.values(d).some(p=>Ag(lb(p)))&&this.setCompletionRequestHandler()}return l}_createRegisteredTool(e,t,n,o,r,i,a,s,c,l){if(Pg(e),o!==void 0)try{let h=$r(o,"input");this._toolInputSchemaJson[e]=h;let S=bg(h);S.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${S.reason}`)}catch{}let d=l,p={title:t,description:n,inputSchema:o,outputSchema:r,outputSchemaJson:ib(r),annotations:i,icons:a,execution:s,_meta:c,handler:l,executor:nb(o,l),enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:h=>{h.name!==void 0&&h.name!==e&&(typeof h.name=="string"&&Pg(h.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],h.name&&(delete this._toolInputSchemaJson[h.name],this._registeredTools[h.name]=p,e=h.name)),h.title!==void 0&&(p.title=h.title),h.description!==void 0&&(p.description=h.description);let S=!1;h.paramsSchema!==void 0&&(p.inputSchema=h.paramsSchema,delete this._toolInputSchemaJson[e],S=!0),h.callback!==void 0&&(p.handler=h.callback,d=h.callback,S=!0),S&&(p.executor=nb(p.inputSchema,d)),h.outputSchema!==void 0&&(p.outputSchema=h.outputSchema,p.outputSchemaJson=ib(h.outputSchema)),h.annotations!==void 0&&(p.annotations=h.annotations),h.icons!==void 0&&(p.icons=h.icons),h._meta!==void 0&&(p._meta=h._meta),h.enabled!==void 0&&(p.enabled=h.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}registerTool(e,t,n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:o,description:r,inputSchema:i,outputSchema:a,annotations:s,icons:c,_meta:l}=t;return this._createRegisteredTool(e,o,r,lu(i),lu(a),s,c,void 0,l,n)}registerPrompt(e,t,n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:o,description:r,argsSchema:i,icons:a,_meta:s}=t,c=this._createRegisteredPrompt(e,o,r,lu(i),n,a,s);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};function nb(e,t){if(e){let o=t;return async(r,i)=>o(r,i)}let n=t;return async(o,r)=>n(r)}var ob={type:"object",properties:{}};function ib(e){if(e!==void 0)try{return $r(e,"output")}catch{return}}function ab(e,t,n){if(t){let o=n;return async(r,i)=>{let a=await Gr(t,r);if(!a.success)throw new le(X.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return o(a.data,i)}}else{let o=n;return async(r,i)=>o(i)}}function sb(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var Xi={completion:{values:[],hasMore:!1}};function cb(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function Dk(e){return e?.type==="optional"}function lb(e){return Dk(e)?e.def?.innerType??e:e}var Uk=class{_readBuffer;_started=!1;_closed=!1;constructor(e=Ng.stdin,t=Ng.stdout,n){this._stdin=e,this._stdout=t,this._readBuffer=new kg({maxBufferSize:n?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(t){this.onerror?.(t),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this.onerror?.(e),this.close().catch(()=>{})};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),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdout.off("error",this._onstdouterror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(new Error("StdioServerTransport is closed")):new Promise((t,n)=>{let o=Tg(e),r=!1,i=s=>{r||(r=!0,this._stdout.off("error",i),this._stdout.off("drain",a),n(s))},a=()=>{r||(r=!0,this._stdout.off("error",i),this._stdout.off("drain",a),t())};if(this._stdout.once("error",i),this._stdout.write(o)){if(r)return;r=!0,this._stdout.off("error",i),t()}else r||this._stdout.once("drain",a)})}},hb=3e3,Vk=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,n){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=n}async start(){}async send(e,t){if(Ji(e)||su(e)){let{id:n}=e;n!==void 0&&this._settle(n)}if(!this._closed&&this._outboundIntercept?.(e)!=="handled")return this._wire.send(e,t)}setProtocolVersion=e=>{this._wire.setProtocolVersion?.(e)};deliver(e,t){if(!this._closed){if(bt(e))this._pendingRequests.add(e.id);else if(br(e)&&e.method==="notifications/cancelled"){let n=e.params?.requestId;n!==void 0&&this._settle(n)}this.onmessage?.(e,t)}}async whenRequestsAnswered(e){return this._closed||this._pendingRequests.size===0?!0:await new Promise(t=>{let n=()=>{clearTimeout(o),t(!0)},o=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(r=>r!==n),t(!1)},e);this._drainWaiters.push(n)})}async close(){if(!this._closed){this._closed=!0,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose()}finally{this.onclose?.()}}}_settle(e){this._pendingRequests.delete(e),this._pendingRequests.size===0&&this._releaseDrainWaiters()}_releaseDrainWaiters(){let e=this._drainWaiters;this._drainWaiters=[];for(let t of e)t()}};function Zk(e){let t=e.params;if(e.method==="initialize"&&!$g(t)){let i=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...i!==void 0&&{requestedVersion:i}}}if(!ou(t))return{kind:"legacy",reason:"no-claim"};let n=Kr(t),o=(n===void 0?[]:au(n))[0];if(o!==void 0)return{kind:"invalid-envelope",issue:o};let r=iu(t);return r===void 0||!Sr.includes(r)?{kind:"unsupported-revision",requested:r??"unknown"}:{kind:"modern",revision:r,classification:{era:"modern",revision:r}}}function gb(e,t={}){let n=t.legacy??"serve",o=t.transport??new Uk,r={phase:"opening"},i,a=!1,s=()=>a||r.phase==="closed",c=R=>{try{t.onerror?.(R)}catch{}},l=(R,j,U,C)=>o.send({jsonrpc:"2.0",id:R,error:{code:j,message:U,...C!==void 0&&{data:C}}}).catch(V=>c(Pt(V))),d=new db(t.maxSubscriptions??yu),p=R=>{if(!br(R))return;let j=d.routeOutbound(R);if(j!=="passthrough"){for(let U of j)o.send({jsonrpc:"2.0",...U}).catch(C=>c(Pt(C)));return"handled"}},h=async R=>{if(bt(R)&&R.method==="subscriptions/listen"){let j=Kr(R.params),U=ou(R.params)?(j===void 0?[]:au(j))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},C=iu(R.params),V;if(U!==void 0)V={jsonrpc:"2.0",id:R.id,error:{code:-32602,message:`Invalid _meta envelope: ${U.key}: ${U.problem}`}};else if(C===void 0||!Sr.includes(C)){let ee=new ro({supported:[...Sr],requested:C??"unknown"});V={jsonrpc:"2.0",id:R.id,error:{code:ee.code,message:ee.message,data:ee.data}}}else V=d.serve(R);return await o.send("error"in V?V:{jsonrpc:"2.0",method:V.method,params:V.params}).catch(ee=>c(Pt(ee))),!0}if(br(R)&&R.method==="notifications/cancelled"){let j=R.params?.requestId;if(j!==void 0&&d.cancel(j))return!0}return!1},S=(R,j,U)=>{let C=zg({kind:"legacy",reason:j,...U!==void 0&&{requestedVersion:U}},Sr);return C===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${C.cell}): ${C.message}`)),l(R.id,C.code,C.message,C.data))},v=R=>{a||R===i||z()},$=async(R,j)=>{let U=await e({era:R}),C=U instanceof Qi?U.server:U;R==="modern"&&(Ig(C,j),Cg(C,Sr),d.setServerCapabilities(C.getCapabilities()));let V=new Vk(o,()=>v(V),R==="modern"?p:void 0);return await U.connect(V),{product:U,channel:V}},y=R=>R.product.close().catch(j=>c(Pt(j))),f=async R=>{i=R.channel;try{await R.channel.whenRequestsAnswered(hb)||c(new Error(`Discarded the probe instance with requests still unanswered after ${hb}ms; continuing with the fallback`)),await R.product.close()}catch(j){c(Pt(j))}finally{i=void 0}},w=async R=>{if(r.phase==="closed")return;if(r.phase==="pinned"){if(r.era==="modern"&&bt(R)&&R.method==="initialize"&&!$g(R.params)){await S(R,"initialize",R.params!==null&&typeof R.params=="object"&&typeof R.params.protocolVersion=="string"?R.params.protocolVersion:void 0);return}if(r.era==="modern"&&await h(R))return;r.instance.channel.deliver(R);return}if(!bt(R)&&!br(R)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let j=Zk(R);switch(j.kind){case"invalid-envelope":{let U=`Invalid _meta envelope for protocol revision 2026-07-28: ${j.issue.key}: ${j.issue.problem}`;bt(R)?await l(R.id,X.InvalidParams,U,{envelope:j.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${U}`));return}case"unsupported-revision":if(bt(R)){let U=new ro({supported:[...Sr],requested:j.requested});c(U),await l(R.id,U.code,U.message,U.data)}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${j.requested}`));return;case"modern":if(bt(R)&&R.method==="server/discover"){if(r.phase==="probe"){r.instance.channel.deliver(R,{classification:j.classification});return}let U=await $("modern",j.revision);if(s()){await y(U);return}r={phase:"probe",instance:U},U.channel.deliver(R,{classification:j.classification});return}if(r.phase==="probe"){if(br(R)){r.instance.channel.deliver(R,{classification:j.classification});return}r={phase:"pinned",era:"modern",instance:r.instance}}else{let U=await $("modern",j.revision);if(s()){await y(U);return}r={phase:"pinned",era:"modern",instance:U}}if(await h(R))return;r.instance.channel.deliver(R,{classification:j.classification});return;case"legacy":{if(n==="reject"){bt(R)&&await S(R,j.reason,j.requestedVersion);return}if(r.phase==="probe"){if(await f(r.instance),s())return;r={phase:"opening"}}let U=await $("legacy");if(s()){await y(U);return}r={phase:"pinned",era:"legacy",instance:U},r.instance.channel.deliver(R);return}}},g=[],b=!1,k=async()=>{if(!b){b=!0;try{for(;g.length>0;){let R=g.shift();try{await w(R)}catch(j){bt(R)&&await l(R.id,X.InternalError,"Internal server error"),c(Pt(j))}}}finally{b=!1}}},z=async()=>{if(a||r.phase==="closed")return;a=!0;let R=r;r={phase:"closed"};for(let j of d.teardownAll())await o.send(j).catch(U=>c(Pt(U)));(R.phase==="probe"||R.phase==="pinned")&&await R.instance.product.close().catch(j=>c(Pt(j))),await o.close().catch(j=>c(Pt(j)))};o.onmessage=R=>{g.push(R),k()},o.onerror=R=>{c(R),(r.phase==="probe"||r.phase==="pinned")&&r.instance.channel.onerror?.(R)},o.onclose=()=>{if(a||r.phase==="closed")return;a=!0;let R=r;r={phase:"closed"},(R.phase==="probe"||R.phase==="pinned")&&R.instance.product.close().catch(j=>c(Pt(j)))};let _=o.start().catch(R=>{throw c(Pt(R)),R});return _.catch(()=>{}),{close:async()=>{await _.catch(()=>{}),await z()}}}function Pt(e){return e instanceof Error?e:new Error(String(e))}var Fk=u.object({ANILIST_ACCESS_TOKEN:u.string().min(1).optional(),ANILIST_CLIENT_ID:u.string().min(1).optional(),ANILIST_CLIENT_SECRET:u.string().min(1).optional(),ANILIST_TOKEN_STORE:u.string().min(1).optional(),ANILIST_GRAPHQL_URL:u.string().url().default("https://graphql.anilist.co"),ANILIST_OAUTH_BASE_URL:u.string().url().default("https://anilist.co/api/v2/oauth"),HTTP_TIMEOUT_MS:u.coerce.number().int().positive().default(15e3),HTTP_RETRIES:u.coerce.number().int().nonnegative().default(2),ANILIST_MIN_INTERVAL_MS:u.coerce.number().int().nonnegative().default(2100),CACHE_TTL_MS:u.coerce.number().int().nonnegative().default(3e5),ANILIST_OAUTH_PORT:u.coerce.number().int().positive().default(8082),LOG_LEVEL:u.enum(["debug","info","warn","error","silent"]).default("info")}),Hk=Fk.transform(e=>({graphqlUrl:e.ANILIST_GRAPHQL_URL,oauthBaseUrl:e.ANILIST_OAUTH_BASE_URL,httpTimeoutMs:e.HTTP_TIMEOUT_MS,httpRetries:e.HTTP_RETRIES,minIntervalMs:e.ANILIST_MIN_INTERVAL_MS,cacheTtlMs:e.CACHE_TTL_MS,logLevel:e.LOG_LEVEL,oauthPort:e.ANILIST_OAUTH_PORT,auth:{accessToken:e.ANILIST_ACCESS_TOKEN,clientId:e.ANILIST_CLIENT_ID,clientSecret:e.ANILIST_CLIENT_SECRET,tokenStorePath:e.ANILIST_TOKEN_STORE,canLogin:!!(e.ANILIST_CLIENT_ID&&e.ANILIST_CLIENT_SECRET),configured:!!e.ANILIST_ACCESS_TOKEN}})),Jk=/^\$\{[^}]*\}$/;function vb(e=process.env){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0&&n!==""&&!Jk.test(n)));return Hk.parse(t)}var Te=class extends Error{code;status;retryable;authenticated;constructor(t){super(t.message,t.cause===void 0?void 0:{cause:t.cause}),this.name="ApiError",this.code=t.code,this.status=t.status,this.retryable=t.retryable??!1,this.authenticated=t.authenticated}};function yb(e){return e===304?{code:"not_modified",retryable:!1}:e===401?{code:"unauthorized",retryable:!1}:e===403?{code:"forbidden",retryable:!1}:e===404?{code:"not_found",retryable:!1}:e===429?{code:"rate_limited",retryable:!0}:e===400||e===405||e===422?{code:"bad_request",retryable:!1}:e>=500?{code:"server_error",retryable:!0}:{code:"unknown",retryable:!1}}function qg(e){return e.replace(/Bearer\s+[A-Za-z0-9._~+/-]+=*/gi,"Bearer ***").replace(/\b(access_token|refresh_token|client_secret|client_id)=([^&\s"]+)/gi,"$1=***")}var _b={debug:10,info:20,warn:30,error:40,silent:100};function Sb(e,t){let n=_b[e];function o(r,i,a){if(_b[r]<n)return;let s=a.length?" "+qg(a.map(l=>Gk(l)).join(" ")):"",c=`${qg(i)}${s}`;if(console.error(`[anilist-mcp-server] ${r}: ${c}`),t)try{t(r,c)}catch{}}return{debug:(r,...i)=>o("debug",r,i),info:(r,...i)=>o("info",r,i),warn:(r,...i)=>o("warn",r,i),error:(r,...i)=>o("error",r,i)}}function Gk(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}var _u="0.1.4",bb=`anilist-mcp-server/${_u} (+https://github.com/Grinv/anilist-mcp-server)`;var $b=8e3,no=class{#e;constructor(t){this.#e=t}async getJson(t,n={}){return this.requestJson(t,{...n,method:n.method??"GET"})}async requestJson(t,n={}){let o=this.#r(t,n.query),r=n.retries??this.#e.retries??2,i=n.timeoutMs??this.#e.timeoutMs??15e3,a=0;for(;;){this.#e.beforeRequest&&await this.#e.beforeRequest();try{return await this.#t(o,n,i)}catch(s){let c=s instanceof Te?s:zb(s);if(!c.retryable||a>=r)throw c;let l=Wk(a,c);this.#e.logger.debug(`retrying ${o} after ${l}ms (attempt ${a+1}/${r}, ${c.code})`),await eT(l),a+=1}}}async#t(t,n,o){let r=new AbortController,i=setTimeout(()=>r.abort(),o),a=()=>r.abort();n.signal?.addEventListener("abort",a,{once:!0});let s={"User-Agent":bb,Accept:"application/json",...this.#e.defaultHeaders,...n.headers},c;try{c=await fetch(t,{method:n.method??"GET",headers:s,...n.body===void 0?{}:{body:n.body},signal:r.signal})}catch(d){throw n.signal?.aborted?new Te({code:"network",message:"Request aborted by caller",cause:d}):r.signal.aborted?new Te({code:"timeout",message:`Request timed out after ${o}ms`,retryable:!0,cause:d}):zb(d)}finally{clearTimeout(i),n.signal?.removeEventListener("abort",a)}if(!c.ok)throw await Bk(c,"Authorization"in s);if(c.status===204)return;let l=await c.text();if(l.length!==0)try{return JSON.parse(l)}catch(d){throw new Te({code:"unknown",message:"Upstream returned invalid JSON",cause:d})}}#r(t,n){let o=new URL(t.replace(/^\//,""),Qk(this.#e.baseUrl));if(n)for(let[r,i]of Object.entries(n))i!==void 0&&o.searchParams.set(r,String(i));return o.toString()}};async function Bk(e,t){let{code:n,retryable:o}=yb(e.status),r="";try{r=await e.text()}catch{}let i=Kk(r)??r.slice(0,500),a=Xk(e.headers.get("retry-after"));return new Te({code:n,status:e.status,retryable:o,authenticated:t,message:`HTTP ${e.status} ${e.statusText}${i?`: ${i}`:""}`,...a===void 0?{}:{cause:{retryAfterMs:a}}})}function Kk(e){if(e)try{let t=JSON.parse(e);if(t===null||typeof t!="object")return;let n=t;if(typeof n.message=="string")return n.message;if(typeof n.error=="string")return n.error;if(Array.isArray(n.errors)&&n.errors.length>0){let o=n.errors[0],r=typeof o.message=="string"?o.message:void 0,i=o.validation!==null&&typeof o.validation=="object"?Object.entries(o.validation).map(([a,s])=>`${a}: ${Array.isArray(s)?s.join(", "):String(s)}`).join("; "):void 0;return r&&i?`${r} (${i})`:r??i}return}catch{return}}function zb(e){return e instanceof Te?e:new Te({code:"network",message:e instanceof Error?`Network error: ${e.message}`:"Network error",retryable:!0,cause:e})}function Wk(e,t){let n=t.cause?.retryAfterMs;if(typeof n=="number"&&n>0)return Math.min(n,$b);let o=Math.min($b,500*2**e);return o+Math.floor(o*.25*Yk(e))}function Yk(e){return e*2654435761%1e3/1e3}function Xk(e){if(!e)return;let t=Number(e);if(Number.isFinite(t))return t*1e3;let n=Date.parse(e);if(Number.isFinite(n))return Math.max(0,n-Date.now())}function Qk(e){return e.endsWith("/")?e:e+"/"}function eT(e){return new Promise(t=>setTimeout(t,e))}var Su=class{#e;#t;constructor(t){this.#e=new no({baseUrl:t.endpoint,logger:t.logger,timeoutMs:t.timeoutMs,retries:t.retries,beforeRequest:t.beforeRequest,defaultHeaders:{"Content-Type":"application/json"}}),this.#t=t.cache}async request(t,n={},o,r){if(this.#t&&!r?.skipCache&&!/^\s*mutation\b/i.test(t)){let i=JSON.stringify({query:t,variables:n,auth:o?.Authorization??null});return this.#t.wrap(i,()=>this.#r(t,n,o))}return this.#r(t,n,o)}async#r(t,n,o){let r=JSON.stringify({query:t,variables:wb(n)}),i=await this.#e.requestJson("",{method:"POST",body:r,...o?{headers:o}:{}});if(i.errors?.length)throw new Te({code:"bad_request",message:i.errors.map(tT).join("; ")});if(i.data===null||i.data===void 0)throw new Te({code:"unknown",message:"AniList returned no data for this query"});return i.data}};function tT(e){if(!e.validation||Object.keys(e.validation).length===0)return e.message;let t=Object.entries(e.validation).map(([n,o])=>`${n}: ${o.join(", ")}`).join("; ");return`${e.message} (${t})`}function wb(e){let t={};for(let[n,o]of Object.entries(e))o!==void 0&&(t[n]=o!==null&&typeof o=="object"&&!Array.isArray(o)?wb(o):o);return t}var bu=class{#e;#t;#r;#n=[];#i=Promise.resolve();#o=null;constructor(t,n=[]){this.#e=Math.max(0,t),this.#t=n,this.#r=n.reduce((o,r)=>Math.max(o,r.windowMs),0)}acquire(){let t=this.#i,n;return this.#i=new Promise(o=>{n=o}),t.then(async()=>{let o=this.#a();o>0&&await rT(o);let r=Date.now();this.#o=r,this.#s(r),n()})}#a(){let t=Date.now(),n=this.#o!==null?this.#o+this.#e:0;for(let o of this.#t){if(this.#n.length<o.limit)continue;let r=this.#n[this.#n.length-o.limit];n=Math.max(n,r+o.windowMs)}return Math.max(0,n-t)}#s(t){this.#n.push(t);let n=t-this.#r,o=0;for(;o<this.#n.length&&this.#n[o]<=n;)o+=1;o>0&&this.#n.splice(0,o)}};function rT(e){return new Promise(t=>setTimeout(t,e))}var $u=class{#e;#t;#r=new Map;#n=new Map;constructor(t,n=500){this.#e=t,this.#t=n}get(t){let n=this.#r.get(t);if(n)return n.expires>Date.now()?n.value:void 0}getStale(t){return this.#r.get(t)?.value}set(t,n){if(!(this.#e<=0)){if(!this.#r.has(t)&&this.#r.size>=this.#t){let o=this.#r.keys().next().value;o!==void 0&&this.#r.delete(o)}this.#r.set(t,{value:n,expires:Date.now()+this.#e})}}async wrap(t,n){let o=this.get(t);return o!==void 0?o:this.#i(t,n)}async wrapStaleOnError(t,n){let o=this.get(t);if(o!==void 0)return o;try{return await this.#i(t,n)}catch(r){let i=this.getStale(t);if(i!==void 0)return i;throw r}}#i(t,n){let o=this.#n.get(t);if(o)return o;let r=n().then(i=>(this.set(t,i),i)).finally(()=>this.#n.delete(t));return this.#n.set(t,r),r}};import{mkdirSync as nT,readFileSync as oT,writeFileSync as iT}from"fs";import{homedir as Rb,platform as aT}from"os";import{dirname as sT,join as Lg}from"path";var Mg=u.object({accessToken:u.string(),expiresAt:u.number()}).passthrough(),zu=class{#e;#t;constructor(t,n){this.#e=t,this.#t=n}get path(){return this.#e}load(){let t;try{t=oT(this.#e,"utf8")}catch{return}let n;try{n=JSON.parse(t)}catch{this.#t.warn(`token store at ${this.#e} is not valid JSON; ignoring it`);return}let o=Mg.safeParse(n);if(!o.success){this.#t.warn(`token store at ${this.#e} is malformed; ignoring it`);return}return o.data}save(t){nT(sT(this.#e),{recursive:!0,mode:448}),iT(this.#e,JSON.stringify(t,null,2),{mode:384})}};function Ib(e=process.env){if(e.ANILIST_TOKEN_STORE)return e.ANILIST_TOKEN_STORE;let t=aT()==="win32"?e.APPDATA??Lg(Rb(),"AppData","Roaming"):e.XDG_CONFIG_HOME??Lg(Rb(),".config");return Lg(t,"anilist-mcp-server","tokens.json")}import{createServer as cT}from"http";import{randomBytes as lT}from"crypto";import{spawn as uT}from"child_process";import{platform as Dg}from"os";function kb(){return lT(16).toString("hex")}function Tb(e){let t=new URLSearchParams({response_type:"code",client_id:e.clientId,redirect_uri:e.redirectUri});return e.state&&t.set("state",e.state),`${e.oauthBaseUrl.replace(/\/$/,"")}/authorize?${t.toString()}`}function Pb(e){let t=e.trim(),n;try{n=new URL(t).searchParams}catch{t.includes("=")&&(n=new URLSearchParams(t.replace(/^\?/,"")))}if(n){let o=n.get("error");if(o)throw new Error(`authorization denied: ${o}`);let r=n.get("code");if(r)return r;throw new Error("no `code` found in the pasted redirect URL")}if(!t)throw new Error("empty redirect/code");return t}function Eb(e){let t=e.trim();try{return new URL(t).searchParams.get("state")}catch{return t.includes("=")?new URLSearchParams(t.replace(/^\?/,"")).get("state"):null}}function xb(e){let t=Dg()==="darwin"?"open":Dg()==="win32"?"cmd":"xdg-open",n=Dg()==="win32"?["/c","start","",e]:[e];try{let o=uT(t,n,{stdio:"ignore",detached:!0});o.on("error",()=>{}),o.unref()}catch{}}function jb(e){return new Promise((t,n)=>{let o=cT((r,i)=>{let a=null,s=null,c=null;try{let l=new URL(r.url??"/",`http://localhost:${e.port}`);if(!l.pathname.startsWith(e.path)){i.writeHead(404).end();return}a=l.searchParams.get("code"),s=l.searchParams.get("state"),c=l.searchParams.get("error")}catch{}i.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),i.end(c?"<h2>AniList login was denied. You can close this tab.</h2>":a?"<h2>Logged in to AniList \u2014 you can close this tab and return to your client.</h2>":"<h2>Waiting for the AniList redirect\u2026</h2>"),a&&e.onCode(a,s)});o.on("error",n),o.listen(e.port,"127.0.0.1",()=>{t({server:o,close:()=>o.close()})})})}function Nb(e){let t=e.split(".");if(t.length===3)try{let n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"));return typeof n.exp=="number"?n.exp*1e3:void 0}catch{return}}var dT=365*24*60*60*1e3,wu=class{#e;#t;#r;#n;#i;#o;#a;#s;constructor(t,n){this.#e=t,this.#t=n;let o=new bu(t.minIntervalMs),r=new $u(t.cacheTtlMs);this.#r=new Su({endpoint:t.graphqlUrl,logger:n,timeoutMs:t.httpTimeoutMs,retries:t.httpRetries,beforeRequest:()=>o.acquire(),cache:r}),this.#n=new no({baseUrl:t.oauthBaseUrl,logger:n,timeoutMs:t.httpTimeoutMs,retries:t.httpRetries}),this.#i=new zu(t.auth.tokenStorePath??Ib(),n),this.#o=t.auth.accessToken?{accessToken:t.auth.accessToken,expiresAt:1/0}:this.#i.load()}isConfigured(){return!!(this.#o&&this.#o.expiresAt>Date.now())}canLogin(){return this.#e.auth.canLogin}#c(){return this.isConfigured()?{Authorization:`Bearer ${this.#o.accessToken}`}:void 0}#u(){let t=this.#c();if(!t)throw new Te({code:"unauthorized",message:"Run login_anilist (or set ANILIST_ACCESS_TOKEN) before using this tool."});return t}ctx(){return{gql:this.#r,authHeader:()=>this.#c(),requireAuth:()=>this.#u()}}async startLogin(t={}){if(!this.#e.auth.clientId||!this.#e.auth.clientSecret)throw new Te({code:"bad_request",message:"ANILIST_CLIENT_ID and ANILIST_CLIENT_SECRET must both be set to log in."});let n=`http://localhost:${this.#e.oauthPort}/callback`,o=kb();this.#s=o;let r=Tb({oauthBaseUrl:this.#e.oauthBaseUrl,clientId:this.#e.auth.clientId,redirectUri:n,state:o});this.#a?.close(),this.#a=void 0;let i=!1;try{let{close:a}=await jb({port:this.#e.oauthPort,path:"/callback",onCode:(s,c)=>{this.#l(s,c).finally(()=>{this.#a?.close(),this.#a=void 0})}});this.#a={close:a},i=!0}catch(a){this.#t.warn(`could not bind localhost:${this.#e.oauthPort}, use manual paste`,a)}return(t.open??xb)(r),{authorizeUrl:r,redirectUri:n,listening:i}}async submitRedirect(t){let n=Pb(t);try{await this.#l(n,Eb(t))}finally{this.#a?.close(),this.#a=void 0}}async#l(t,n){if(this.#s&&n!==this.#s)throw new Te({code:"unauthorized",message:"OAuth state mismatch \u2014 this redirect doesn't match the login attempt that started it. Run login_anilist again."});let o=`http://localhost:${this.#e.oauthPort}/callback`,r;try{r=await this.#n.requestJson("token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:this.#e.auth.clientId,client_secret:this.#e.auth.clientSecret,redirect_uri:o,code:t}),retries:0})}catch(s){throw s instanceof Te&&s.code==="bad_request"?new Te({code:"bad_request",message:`AniList rejected the authorization code (it may be expired, already used, or invalid) \u2014 run login_anilist again for a fresh one. (${s.message})`}):s}if(this.#s=void 0,!r.access_token)throw new Te({code:"unknown",message:"AniList's token response had no access_token"});let i=Nb(r.access_token)??Date.now()+dT,a=Mg.safeParse({accessToken:r.access_token,expiresAt:i});if(!a.success)throw new Te({code:"unknown",message:"AniList's token response had a malformed access_token"});this.#o=a.data,this.#i?.save(this.#o)}};var ea=`
76
76
  id
77
77
  idMal
78
78
  type
@@ -97,9 +97,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
97
97
  endDate { year month day }
98
98
  description(asHtml: false)
99
99
  trailer { id site thumbnail }
100
- `,Dg=`
100
+ `,Ug=`
101
101
  tags { name rank isMediaSpoiler }
102
- `,ea=`
102
+ rankings { rank type format year season allTime context }
103
+ `,ta=`
103
104
  id
104
105
  name { full native }
105
106
  image { large }
@@ -107,7 +108,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
107
108
  favourites
108
109
  isFavourite
109
110
  siteUrl
110
- `,ta=`
111
+ `,ra=`
111
112
  id
112
113
  name { full native }
113
114
  image { large }
@@ -116,7 +117,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
116
117
  favourites
117
118
  isFavourite
118
119
  siteUrl
119
- `,Ug=`
120
+ `,Vg=`
120
121
  id
121
122
  name
122
123
  isAnimationStudio
@@ -125,7 +126,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
125
126
  media(sort: POPULARITY_DESC, perPage: 10) {
126
127
  nodes { id title { romaji english } }
127
128
  }
128
- `,Kr=`
129
+ `,Wr=`
129
130
  id
130
131
  name
131
132
  about(asHtml: false)
@@ -136,11 +137,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
136
137
  donatorBadge
137
138
  isFollowing
138
139
  isFollower
139
- `,ra=`
140
+ `,na=`
140
141
  ... on TextActivity { id type text(asHtml: false) siteUrl createdAt user { id name } }
141
142
  ... on ListActivity { id type status progress createdAt siteUrl user { id name } media { id title { romaji english } } }
142
143
  ... on MessageActivity { id type message(asHtml: false) createdAt siteUrl recipient { id name } messenger { id name } }
143
- `,Nb=`
144
+ `,Ob=`
144
145
  ... on AiringNotification { id type createdAt animeId episode contexts media { id title { romaji english } } }
145
146
  ... on FollowingNotification { id type createdAt userId context user { id name } }
146
147
  ... on ActivityMessageNotification { id type createdAt userId activityId context user { id name } }
@@ -161,27 +162,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
161
162
  ... on MediaSubmissionUpdateNotification { id type createdAt contexts status notes submittedTitle media { id title { romaji english } } }
162
163
  ... on StaffSubmissionUpdateNotification { id type createdAt contexts status notes staff { id name { full } } }
163
164
  ... on CharacterSubmissionUpdateNotification { id type createdAt contexts status notes character { id name { full } } }
164
- `;async function Ob(e,t){let n=typeof t=="number",o=n?`query($id:Int){Studio(id:$id){${Ug}}}`:`query($search:String){Studio(search:$search){${Ug}}}`;return(await e.gql.request(o,n?{id:t}:{search:t},e.authHeader())).Studio}async function Ab(e){return(await e.gql.request("query{GenreCollection}",{},e.authHeader())).GenreCollection}async function Cb(e){return(await e.gql.request("query{MediaTagCollection{id name description category isAdult}}",{},e.authHeader())).MediaTagCollection}async function qb(e){return(await e.gql.request(`query{SiteStatistics{
165
+ `;async function Ab(e,t){let n=typeof t=="number",o=n?`query($id:Int){Studio(id:$id){${Vg}}}`:`query($search:String){Studio(search:$search){${Vg}}}`;return(await e.gql.request(o,n?{id:t}:{search:t},e.authHeader())).Studio}async function Cb(e){return(await e.gql.request("query{GenreCollection}",{},e.authHeader())).GenreCollection}async function qb(e,t=1,n=25){let i=(await e.gql.request("query{MediaTagCollection{id name description category isAdult}}",{},e.authHeader())).MediaTagCollection??[],a=(t-1)*n;return{tags:i.slice(a,a+n),pageInfo:{total:i.length,currentPage:t,perPage:n,hasNextPage:a+n<i.length}}}async function Lb(e){return(await e.gql.request(`query{SiteStatistics{
165
166
  users(sort:DATE_DESC,perPage:7){nodes{date count change}}
166
167
  anime(sort:DATE_DESC,perPage:7){nodes{date count change}}
167
168
  manga(sort:DATE_DESC,perPage:7){nodes{date count change}}
168
- }}`,{},e.authHeader())).SiteStatistics}function ue(e){return{content:[{type:"text",text:JSON.stringify(e)}],structuredContent:e}}function Wr(e){return{content:[{type:"text",text:e}],isError:!0}}function Lb(e){return Wr(mT(e))}function mT(e){switch(e.code){case"unauthorized":return e.status===void 0?e.message:"The upstream service rejected the credentials (401). They may be missing or expired \u2014 check the configured API key / token.";case"forbidden":return"The upstream service denied access (403). The credentials may lack permission.";case"not_found":return"No matching resource was found (404).";case"not_modified":return"The content has not changed since the last request (304).";case"rate_limited":return"Upstream rate limit hit (429). Please retry in a few seconds.";case"server_error":return"The upstream service returned an error (5xx). Please retry later.";case"network":return"Could not reach the upstream service (network error). Check connectivity and retry.";case"timeout":return"The upstream request timed out. Please retry.";case"bad_request":return`The request was rejected as invalid: ${e.message}`;default:return`Unexpected error talking to the upstream service: ${e.message}`}}async function de(e){try{return await e()}catch(t){return t instanceof ke?Lb(t):Wr(`Unexpected error: ${t instanceof Error?t.message:String(t)}`)}}var pT=l.object({id:l.number().int().optional(),name:l.string().optional(),description:l.string().nullish(),category:l.string().nullish(),isAdult:l.boolean().nullish()}).passthrough(),Vg=l.object({nodes:l.array(l.object({date:l.number().nullish(),count:l.number().int().nullish(),change:l.number().int().nullish()}).passthrough()).nullish()}).passthrough(),fT=l.object({users:Vg.nullish(),anime:Vg.nullish(),manga:Vg.nullish()}).passthrough(),hT=l.object({id:l.number().int().optional(),name:l.string().optional(),isAnimationStudio:l.boolean().nullish(),isFavourite:l.boolean().nullish(),siteUrl:l.string().nullish(),media:l.object({nodes:l.array(l.object({id:l.number().int().optional(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish()}).passthrough()).nullish()}).passthrough().nullish()}).passthrough();function Mb(e,t){e.registerTool("get_genres",{title:"Get genres",description:"List every genre name AniList uses to tag anime/manga (e.g. Action, Comedy, Slice of Life). Call this before filtering search_media by genre, so you pass a name AniList actually recognizes.",inputSchema:l.object({}),outputSchema:l.object({genres:l.array(l.string())}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>de(async()=>ue({genres:await Ab(t.ctx())}))),e.registerTool("get_media_tags",{title:"Get media tags",description:"List every descriptive tag AniList uses on anime/manga (finer-grained than genres, e.g. 'Time Skip', 'Tragedy', 'Reincarnation'), with category and adult-content flag. Informational only \u2014 search_media has no tag filter, so this can't narrow a search; use it to look up a tag's exact name/category or to label media you already have.",inputSchema:l.object({}),outputSchema:l.object({tags:l.array(pT)}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>de(async()=>ue({tags:await Cb(t.ctx())}))),e.registerTool("get_site_statistics",{title:"Get AniList site statistics",description:"Get AniList's own site-wide statistics (new users/anime/manga counts) for the last several days. Useful for questions about AniList's growth/activity, not for anime data.",inputSchema:l.object({}),outputSchema:l.object({statistics:fT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>de(async()=>ue({statistics:await qb(t.ctx())}))),e.registerTool("get_studio",{title:"Get studio",description:"Get a studio's profile (name, whether it's an animation studio) and its most popular produced titles, by AniList studio ID or by name. Use search_studio first if you only have a partial name and need to resolve it to an ID. If both `id` and `name` are given, `id` takes precedence and `name` is ignored.",inputSchema:l.object({id:l.number().int().optional().describe("AniList studio ID. Provide this or `name`."),name:l.string().min(1).optional().describe("Studio name to look up. Provide this or `id`.")}),outputSchema:l.object({studio:hT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n,name:o})=>de(async()=>n===void 0&&o===void 0?Wr("Provide either `id` or `name`."):ue({studio:await Ob(t.ctx(),n??o)})))}async function Db(e,t){let n=`query($id:Int){Activity(id:$id){${ra}}}`;return(await e.gql.request(n,{id:t},e.authHeader())).Activity}async function wu(e,t,n=1,o=10){let r=e.authHeader(),i;if(typeof t=="number")i=t;else{let c=await e.gql.request("query($name:String){User(name:$name){id}}",{name:t},r);if(!c.User)throw new ke({code:"not_found",message:`No AniList user named "${t}" was found.`});i=c.User.id}let a=`query($userId:Int,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
169
+ }}`,{},e.authHeader())).SiteStatistics}function ue(e){return{content:[{type:"text",text:JSON.stringify(e)}],structuredContent:e}}function Yr(e){return{content:[{type:"text",text:e}],isError:!0}}function Mb(e){return Yr(pT(e))}function pT(e){switch(e.code){case"unauthorized":return e.status===void 0?e.message:e.authenticated?"The upstream service rejected this request (401) even though a token was sent. This can mean the token is invalid or expired, but it can also mean the authenticated account isn't allowed to perform this specific action (e.g. it doesn't own the resource being changed). Try login_anilist for a fresh token; if the same request still fails, the action itself is likely not permitted here.":"The upstream service rejected this request (401): it requires an authenticated AniList account. Run login_anilist (or set ANILIST_ACCESS_TOKEN) first.";case"forbidden":return e.authenticated?"The upstream service denied access (403). The authenticated account may lack permission for this specific action.":"The upstream service denied access (403) to this anonymous request. Since no credentials were involved, this isn't a permissions issue \u2014 it's more likely a security block or a temporary upstream outage. Try simplifying the request or retrying shortly.";case"not_found":return"No matching resource was found (404).";case"not_modified":return"The content has not changed since the last request (304).";case"rate_limited":return"Upstream rate limit hit (429). Please retry in a few seconds.";case"server_error":return"The upstream service returned an error (5xx). Please retry later.";case"network":return"Could not reach the upstream service (network error). Check connectivity and retry.";case"timeout":return"The upstream request timed out. Please retry.";case"bad_request":return`The request was rejected as invalid: ${e.message}`;default:return`Unexpected error talking to the upstream service: ${e.message}`}}async function de(e){try{return await e()}catch(t){return t instanceof Te?Mb(t):Yr(`Unexpected error: ${t instanceof Error?t.message:String(t)}`)}}var Re=u.number().int().min(-2147483648).max(2147483647),Ze=u.object({total:u.number().int().optional().describe("Not currently accurate (a known AniList performance limitation) \u2014 don't rely on it to decide whether to fetch more pages."),perPage:u.number().int().optional(),currentPage:u.number().int().optional(),lastPage:u.number().int().optional().describe("Not currently accurate (a known AniList performance limitation) \u2014 use `hasNextPage` instead to decide whether to fetch another page."),hasNextPage:u.boolean().optional()}).passthrough(),oo=u.object({deleted:u.boolean().nullish()}).passthrough(),Et=u.object({id:u.number().int()}).passthrough(),io=u.object({year:u.number().int().nullish(),month:u.number().int().nullish(),day:u.number().int().nullish()}).passthrough(),oa=u.object({nodes:u.array(u.object({id:u.number().int()}).passthrough()).nullish()}).passthrough(),Db=u.object({anime:oa.nullish(),manga:oa.nullish(),characters:oa.nullish(),staff:oa.nullish(),studios:oa.nullish()}).passthrough(),ao=["ANIME","MANGA"];var fT=u.object({id:u.number().int().optional(),name:u.string().optional(),description:u.string().nullish(),category:u.string().nullish(),isAdult:u.boolean().nullish()}).passthrough(),Zg=u.object({nodes:u.array(u.object({date:u.number().nullish(),count:u.number().int().nullish(),change:u.number().int().nullish()}).passthrough()).nullish()}).passthrough(),hT=u.object({users:Zg.nullish(),anime:Zg.nullish(),manga:Zg.nullish()}).passthrough(),gT=u.object({id:u.number().int().optional(),name:u.string().optional(),isAnimationStudio:u.boolean().nullish(),isFavourite:u.boolean().nullish(),siteUrl:u.string().nullish(),media:u.object({nodes:u.array(u.object({id:u.number().int().optional(),title:u.object({romaji:u.string().nullish(),english:u.string().nullish()}).nullish()}).passthrough()).nullish()}).passthrough().nullish()}).passthrough();function Ub(e,t){e.registerTool("get_genres",{title:"Get genres",description:"List every genre name AniList uses to tag anime/manga (e.g. Action, Comedy, Slice of Life). Call this before filtering search_media by genre, so you pass a name AniList actually recognizes.",inputSchema:u.object({}),outputSchema:u.object({genres:u.array(u.string())}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>de(async()=>ue({genres:await Cb(t.ctx())}))),e.registerTool("get_media_tags",{title:"Get media tags",description:"List every descriptive tag AniList uses on anime/manga (finer-grained than genres, e.g. 'Time Skip', 'Tragedy', 'Reincarnation'), with category and adult-content flag. There are ~425 tags total, so results are paginated \u2014 use `page`/`perPage` rather than expecting them all in one response. Informational only \u2014 search_media has no tag filter, so this can't narrow a search; use it to look up a tag's exact name/category or to label media you already have.",inputSchema:u.object({page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:u.object({tags:u.array(fT),pageInfo:Ze.optional()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({page:n,perPage:o})=>de(async()=>ue(await qb(t.ctx(),n,o)))),e.registerTool("get_site_statistics",{title:"Get AniList site statistics",description:"Get AniList's own site-wide statistics (new users/anime/manga counts) for the last several days. Useful for questions about AniList's growth/activity, not for anime data.",inputSchema:u.object({}),outputSchema:u.object({statistics:hT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>de(async()=>ue({statistics:await Lb(t.ctx())}))),e.registerTool("get_studio",{title:"Get studio",description:"Get a studio's profile (name, whether it's an animation studio) and its most popular produced titles, by AniList studio ID or by name. Use search_studio first if you only have a partial name and need to resolve it to an ID. If both `id` and `name` are given, `id` takes precedence and `name` is ignored.",inputSchema:u.object({id:Re.optional().describe("AniList studio ID. Provide this or `name`."),name:u.string().min(1).optional().describe("Studio name to look up. Provide this or `id`.")}),outputSchema:u.object({studio:gT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n,name:o})=>de(async()=>n===void 0&&o===void 0?Yr("Provide either `id` or `name`."):ue({studio:await Ab(t.ctx(),n??o)})))}async function Vb(e,t){let n=`query($id:Int){Activity(id:$id){${na}}}`;return(await e.gql.request(n,{id:t},e.authHeader())).Activity}async function Ru(e,t,n=1,o=10){let r=e.authHeader(),i;if(typeof t=="number")i=t;else{let c=await e.gql.request("query($name:String){User(name:$name){id}}",{name:t},r);if(!c.User)throw new Te({code:"not_found",message:`No AniList user named "${t}" was found.`});i=c.User.id}let a=`query($userId:Int,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
169
170
  pageInfo{total currentPage lastPage hasNextPage}
170
- activities(userId:$userId,sort:ID_DESC){${ra}}
171
- }}`;return(await e.gql.request(a,{userId:i,page:n,perPage:o},r)).Page}async function Ub(e,t,n){let o=e.requireAuth();return(await e.gql.request(`mutation($id:Int,$text:String){SaveTextActivity(id:$id,text:$text){
171
+ activities(userId:$userId,sort:ID_DESC){${na}}
172
+ }}`;return(await e.gql.request(a,{userId:i,page:n,perPage:o},r)).Page}async function Zb(e,t,n){let o=e.requireAuth();return(await e.gql.request(`mutation($id:Int,$text:String){SaveTextActivity(id:$id,text:$text){
172
173
  ... on TextActivity { id text(asHtml:false) siteUrl }
173
- }}`,{id:n,text:t},o)).SaveTextActivity}async function Vb(e,t,n,o){let r=e.requireAuth();return(await e.gql.request(`mutation($id:Int,$recipientId:Int,$message:String){SaveMessageActivity(id:$id,recipientId:$recipientId,message:$message){
174
+ }}`,{id:n,text:t},o)).SaveTextActivity}async function Fb(e,t,n,o){let r=e.requireAuth();return(await e.gql.request(`mutation($id:Int,$recipientId:Int,$message:String){SaveMessageActivity(id:$id,recipientId:$recipientId,message:$message){
174
175
  ... on MessageActivity { id message(asHtml:false) siteUrl }
175
- }}`,{id:o,recipientId:t,message:n},r)).SaveMessageActivity}async function Zb(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteActivity(id:$id){deleted}}",{id:t},n);if(!r.DeleteActivity?.deleted)throw new ke({code:"not_found",message:"AniList reported this activity as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteActivity}var He=l.object({total:l.number().int().optional().describe("Not currently accurate (a known AniList performance limitation) \u2014 don't rely on it to decide whether to fetch more pages."),perPage:l.number().int().optional(),currentPage:l.number().int().optional(),lastPage:l.number().int().optional().describe("Not currently accurate (a known AniList performance limitation) \u2014 use `hasNextPage` instead to decide whether to fetch another page."),hasNextPage:l.boolean().optional()}).passthrough(),no=l.object({deleted:l.boolean().nullish()}).passthrough(),Pt=l.object({id:l.number().int()}).passthrough(),oo=l.object({year:l.number().int().nullish(),month:l.number().int().nullish(),day:l.number().int().nullish()}).passthrough(),na=l.object({nodes:l.array(l.object({id:l.number().int()}).passthrough()).nullish()}).passthrough(),Hb=l.object({anime:na.nullish(),manga:na.nullish(),characters:na.nullish(),staff:na.nullish(),studios:na.nullish()}).passthrough(),io=["ANIME","MANGA"];var gT=l.union([l.number().int(),l.string().min(1)]).describe("AniList user ID, or username."),Jb=l.object({id:l.number().int(),type:l.string().nullish(),createdAt:l.number().nullish(),siteUrl:l.string().nullish(),text:l.string().nullish(),status:l.string().nullish(),progress:l.string().nullish(),message:l.string().nullish(),user:l.object({id:l.number().int(),name:l.string().nullish()}).passthrough().nullish(),media:l.object({id:l.number().int(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish()}).passthrough().nullish(),recipient:l.object({id:l.number().int(),name:l.string().nullish()}).passthrough().nullish(),messenger:l.object({id:l.number().int(),name:l.string().nullish()}).passthrough().nullish()}).passthrough(),vT=l.object({id:l.number().int(),text:l.string().nullish(),siteUrl:l.string().nullish()}).passthrough(),yT=l.object({id:l.number().int(),message:l.string().nullish(),siteUrl:l.string().nullish()}).passthrough();function Gb(e,t){e.registerTool("get_activity",{title:"Get an activity post",description:"Get a single AniList activity post (list update, text post, or message) by its ID.",inputSchema:l.object({id:l.number().int().describe("AniList activity ID \u2014 from get_user_activity, get_user_recent_activity, search_activity, or the id returned by post_text_activity/post_message_activity.")}),outputSchema:l.object({activity:Jb}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({activity:await Db(t.ctx(),n)}))),e.registerTool("get_user_activity",{title:"Get a user's activity feed",description:"List recent AniList activity posts from a specific user (list updates, text posts). Accepts an exact AniList username directly (it's resolved to an id with one extra internal lookup) \u2014 no need to call search_user first unless you only have a partial/fuzzy name.",inputSchema:l.object({user:gT,page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),activities:l.array(Jb).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n,page:o,perPage:r})=>de(async()=>ue({results:await wu(t.ctx(),n,o,r)}))),e.registerTool("post_text_activity",{title:"Post a text activity",description:"[Requires login] Post a new text-status update to the authenticated user's own AniList profile, or update an existing one by passing its `id`.",inputSchema:l.object({text:l.string().min(1).describe("The text to post."),id:l.number().int().optional().describe("Activity ID to update instead of creating a new post.")}),outputSchema:l.object({activity:vT}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({text:n,id:o})=>de(async()=>ue({activity:await Ub(t.ctx(),n,o)}))),e.registerTool("post_message_activity",{title:"Post a message activity",description:"[Requires login] Post a new direct message-style activity to another AniList user's profile, or update an existing one by passing its `id`.",inputSchema:l.object({recipientId:l.number().int().describe("AniList numeric user ID of the message recipient (resolve a username via search_user first)."),message:l.string().min(1).describe("The message text to post."),id:l.number().int().optional().describe("Activity ID to update instead of creating a new post.")}),outputSchema:l.object({activity:yT}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({recipientId:n,message:o,id:r})=>de(async()=>ue({activity:await Vb(t.ctx(),n,o,r)}))),e.registerTool("delete_activity",{title:"Delete an activity post",description:"[Requires login] Delete an activity post the authenticated user owns. This cannot be undone.",inputSchema:l.object({id:l.number().int().describe("AniList activity ID to delete \u2014 from get_user_activity, search_activity, or the id returned by a previous post_text_activity/post_message_activity call.")}),outputSchema:l.object({result:no}),annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0}},({id:n})=>de(async()=>ue({result:await Zb(t.ctx(),n)})))}async function Bb(e,t,n){let o=typeof n=="number";return(await e.gql.request(`query($userId:Int,$userName:String,$type:MediaType){MediaListCollection(userId:$userId,userName:$userName,type:$type){
176
+ }}`,{id:o,recipientId:t,message:n},r)).SaveMessageActivity}async function Hb(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteActivity(id:$id){deleted}}",{id:t},n);if(!r.DeleteActivity?.deleted)throw new Te({code:"not_found",message:"AniList reported this activity as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteActivity}var vT=u.union([Re,u.string().min(1)]).describe("AniList user ID, or username."),Gb=u.object({id:u.number().int(),type:u.string().nullish(),createdAt:u.number().nullish(),siteUrl:u.string().nullish(),text:u.string().nullish(),status:u.string().nullish(),progress:u.string().nullish(),message:u.string().nullish(),user:u.object({id:u.number().int(),name:u.string().nullish()}).passthrough().nullish(),media:u.object({id:u.number().int(),title:u.object({romaji:u.string().nullish(),english:u.string().nullish()}).nullish()}).passthrough().nullish(),recipient:u.object({id:u.number().int(),name:u.string().nullish()}).passthrough().nullish(),messenger:u.object({id:u.number().int(),name:u.string().nullish()}).passthrough().nullish()}).passthrough(),yT=u.object({id:u.number().int(),text:u.string().nullish(),siteUrl:u.string().nullish()}).passthrough(),_T=u.object({id:u.number().int(),message:u.string().nullish(),siteUrl:u.string().nullish()}).passthrough();function Bb(e,t){e.registerTool("get_activity",{title:"Get an activity post",description:"Get a single AniList activity post (list update, text post, or message) by its ID.",inputSchema:u.object({id:Re.describe("AniList activity ID \u2014 from get_user_activity, get_user_recent_activity, search_activity, or the id returned by post_text_activity/post_message_activity.")}),outputSchema:u.object({activity:Gb}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({activity:await Vb(t.ctx(),n)}))),e.registerTool("get_user_activity",{title:"Get a user's activity feed",description:"List recent AniList activity posts from a specific user (list updates, text posts). Accepts an exact AniList username directly (it's resolved to an id with one extra internal lookup) \u2014 no need to call search_user first unless you only have a partial/fuzzy name.",inputSchema:u.object({user:vT,page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:u.object({results:u.object({pageInfo:Ze.optional(),activities:u.array(Gb).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n,page:o,perPage:r})=>de(async()=>ue({results:await Ru(t.ctx(),n,o,r)}))),e.registerTool("post_text_activity",{title:"Post a text activity",description:"[Requires login] Post a new text-status update to the authenticated user's own AniList profile, or update an existing one by passing its `id`.",inputSchema:u.object({text:u.string().min(1).describe("The text to post."),id:Re.optional().describe("Activity ID to update instead of creating a new post.")}),outputSchema:u.object({activity:yT}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({text:n,id:o})=>de(async()=>ue({activity:await Zb(t.ctx(),n,o)}))),e.registerTool("post_message_activity",{title:"Post a message activity",description:"[Requires login] Post a new direct message-style activity to another AniList user's profile, or update an existing one by passing its `id`.",inputSchema:u.object({recipientId:Re.describe("AniList numeric user ID of the message recipient (resolve a username via search_user first)."),message:u.string().min(1).describe("The message text to post."),id:Re.optional().describe("Activity ID to update instead of creating a new post.")}),outputSchema:u.object({activity:_T}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({recipientId:n,message:o,id:r})=>de(async()=>ue({activity:await Fb(t.ctx(),n,o,r)}))),e.registerTool("delete_activity",{title:"Delete an activity post",description:"[Requires login] Delete an activity post the authenticated user owns. This cannot be undone.",inputSchema:u.object({id:Re.describe("AniList activity ID to delete \u2014 from get_user_activity, search_activity, or the id returned by a previous post_text_activity/post_message_activity call.")}),outputSchema:u.object({result:oo}),annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0}},({id:n})=>de(async()=>ue({result:await Hb(t.ctx(),n)})))}async function Kb(e,t,n,o=1,r=25){let i=typeof n=="number";return(await e.gql.request(`query($userId:Int,$userName:String,$type:MediaType,$chunk:Int,$perChunk:Int){MediaListCollection(userId:$userId,userName:$userName,type:$type,chunk:$chunk,perChunk:$perChunk){
177
+ hasNextChunk
176
178
  lists{name isCustomList isSplitCompletedList status entries{
177
179
  id status score(format:POINT_10_DECIMAL) progress progressVolumes repeat priority private notes
178
180
  startedAt{year month day} completedAt{year month day} updatedAt createdAt
179
181
  media{id idMal title{romaji english} episodes chapters siteUrl}
180
182
  }}
181
- }}`,o?{userId:n,type:t}:{userName:n,type:t},e.authHeader())).MediaListCollection.lists}async function _T(e,t){let o=await e.gql.request(`query{Viewer{mediaListOptions{
183
+ }}`,i?{userId:n,type:t,chunk:o,perChunk:r}:{userName:n,type:t,chunk:o,perChunk:r},e.authHeader())).MediaListCollection}async function ST(e,t){let o=await e.gql.request(`query{Viewer{mediaListOptions{
182
184
  animeList{advancedScoring}
183
185
  mangaList{advancedScoring}
184
- }}}`,{},t,{skipCache:!0});return{anime:o.Viewer.mediaListOptions.animeList.advancedScoring??[],manga:o.Viewer.mediaListOptions.mangaList.advancedScoring??[]}}async function ST(e,t,n){return n.mediaId!==void 0?(await e.gql.request("query($id:Int){Media(id:$id){type}}",{id:n.mediaId},t,{skipCache:!0})).Media?.type:(await e.gql.request("query($id:Int){MediaList(id:$id){media{type}}}",{id:n.listEntryId},t,{skipCache:!0})).MediaList?.media?.type}function bT(e,t,n){let o=t==="MANGA"?n.manga:n.anime,i=Object.keys(e).filter(a=>!o.includes(a));if(i.length)throw new ke({code:"bad_request",message:`advancedScores keys (${i.join(", ")}) don't match this account's configured advanced scoring categories for ${t==="MANGA"?"manga":"anime"}${o.length?`: ${o.join(", ")}`:" (advanced scoring isn't enabled for this list)"}.`});return o.map(a=>Math.round((e[a]??0)*10))}async function Zg(e,t){let n=e.requireAuth(),o;if(t.advancedScores){let[a,s]=await Promise.all([_T(e,n),ST(e,n,t)]);if(!s)throw new ke({code:"bad_request",message:"Could not determine whether this entry is anime or manga, needed to order advancedScores against the right category list."});o=bT(t.advancedScores,s,a)}return(await e.gql.request(`mutation(
186
+ }}}`,{},t,{skipCache:!0});return{anime:o.Viewer.mediaListOptions.animeList.advancedScoring??[],manga:o.Viewer.mediaListOptions.mangaList.advancedScoring??[]}}async function bT(e,t,n){return n.mediaId!==void 0?(await e.gql.request("query($id:Int){Media(id:$id){type}}",{id:n.mediaId},t,{skipCache:!0})).Media?.type:(await e.gql.request("query($id:Int){MediaList(id:$id){media{type}}}",{id:n.listEntryId},t,{skipCache:!0})).MediaList?.media?.type}function $T(e,t,n){let o=t==="MANGA"?n.manga:n.anime,i=Object.keys(e).filter(a=>!o.includes(a));if(i.length)throw new Te({code:"bad_request",message:`advancedScores keys (${i.join(", ")}) don't match this account's configured advanced scoring categories for ${t==="MANGA"?"manga":"anime"}${o.length?`: ${o.join(", ")}`:" (advanced scoring isn't enabled for this list)"}.`});return o.map(a=>Math.round((e[a]??0)*10))}async function Fg(e,t){let n=e.requireAuth(),o;if(t.advancedScores){let[a,s]=await Promise.all([ST(e,n),bT(e,n,t)]);if(!s)throw new Te({code:"bad_request",message:"Could not determine whether this entry is anime or manga, needed to order advancedScores against the right category list."});o=$T(t.advancedScores,s,a)}return(await e.gql.request(`mutation(
185
187
  $id:Int,$mediaId:Int,$status:MediaListStatus,$scoreRaw:Int,$progress:Int,$progressVolumes:Int,
186
188
  $repeat:Int,$priority:Int,$private:Boolean,$notes:String,
187
189
  $startedAt:FuzzyDateInput,$completedAt:FuzzyDateInput,
@@ -190,12 +192,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
190
192
  id:$id,mediaId:$mediaId,status:$status,scoreRaw:$scoreRaw,progress:$progress,progressVolumes:$progressVolumes,
191
193
  repeat:$repeat,priority:$priority,private:$private,notes:$notes,
192
194
  startedAt:$startedAt,completedAt:$completedAt,customLists:$customLists,advancedScores:$advancedScores
193
- ){id status score(format:POINT_10_DECIMAL) progress mediaId}}`,{id:t.listEntryId,mediaId:t.mediaId,status:t.status,scoreRaw:t.score===void 0?void 0:Math.round(t.score*10),progress:t.progress,progressVolumes:t.progressVolumes,repeat:t.repeat,priority:t.priority,private:t.private,notes:t.notes,startedAt:t.startedAt,completedAt:t.completedAt,customLists:t.customLists,advancedScores:o},n)).SaveMediaListEntry}async function Kb(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteMediaListEntry(id:$id){deleted}}",{id:t},n);if(!r.DeleteMediaListEntry?.deleted)throw new ke({code:"not_found",message:"AniList reported this list entry as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteMediaListEntry}var Wb=["CURRENT","PLANNING","COMPLETED","DROPPED","PAUSED","REPEATING"],Ru=l.object({year:l.number().int().optional(),month:l.number().int().min(1).max(12).optional(),day:l.number().int().min(1).max(31).optional()}).describe("A partial date; omit fields you don't know (e.g. just {year: 2026})."),zT=l.union([l.number().int(),l.string().min(1)]).describe("AniList user ID, or username."),wT=l.object({id:l.number().int(),idMal:l.number().int().nullish(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish(),episodes:l.number().int().nullish(),chapters:l.number().int().nullish(),siteUrl:l.string().nullish()}).passthrough(),RT=l.object({id:l.number().int(),status:l.string().nullish(),score:l.number().nullish(),progress:l.number().int().nullish(),progressVolumes:l.number().int().nullish(),repeat:l.number().int().nullish(),priority:l.number().int().nullish(),private:l.boolean().nullish(),notes:l.string().nullish(),startedAt:oo.nullish(),completedAt:oo.nullish(),updatedAt:l.number().nullish(),createdAt:l.number().nullish(),media:wT.nullish()}).passthrough(),IT=l.object({name:l.string().nullish(),isCustomList:l.boolean().nullish(),isSplitCompletedList:l.boolean().nullish(),status:l.string().nullish(),entries:l.array(RT).nullish()}).passthrough(),Yb=l.object({id:l.number().int(),status:l.string().nullish(),score:l.number().nullish(),progress:l.number().int().nullish(),mediaId:l.number().int().nullish()}).passthrough();function Xb(e,t){e.registerTool("get_user_list",{title:"Get a user's anime or manga list",description:"Get a user's full AniList anime or manga list, grouped by status/custom list, with each entry's status, score, progress and dates. Works for any public/unlisted user. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name.",inputSchema:l.object({type:l.enum(io).describe("Whether to get the anime or manga list."),user:zT}),outputSchema:l.object({lists:l.array(IT).nullish()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,user:o})=>de(async()=>ue({lists:await Bb(t.ctx(),n,o)}))),e.registerTool("add_list_entry",{title:"Add an entry to your AniList list",description:"[Requires login] Add an anime/manga to the authenticated user's own AniList list. Use search_media first to resolve the title to its AniList media ID. Only set the fields you care about \u2014 everything else is left at AniList's defaults.",inputSchema:l.object({mediaId:l.number().int().describe("AniList anime/manga ID to add (from search_media)."),status:l.enum(Wb).optional().describe("List status. Defaults to PLANNING if omitted."),score:l.number().min(0).max(10).optional().describe("Score out of 10 (decimals allowed, e.g. 8.5), always on this scale regardless of the account's configured scoreFormat (set via update_user) \u2014 no conversion needed."),progress:l.number().int().min(0).optional().describe("Episodes watched / chapters read."),progressVolumes:l.number().int().min(0).optional().describe("Volumes read (manga only)."),repeat:l.number().int().min(0).optional().describe("Number of times rewatched/reread."),priority:l.number().int().min(0).optional().describe("List priority (higher = more important)."),private:l.boolean().optional().describe("Hide this entry from your public list."),notes:l.string().optional().describe("Free-text notes for this entry."),startedAt:Ru.optional().describe("Date you started."),completedAt:Ru.optional().describe("Date you completed."),customLists:l.array(l.string()).optional().describe("Names of custom lists to file this entry under."),advancedScores:l.record(l.string(),l.number()).optional().describe("Per-category scores, 0-10 scale (e.g. {Story: 8, Characters: 9}) \u2014 only meaningful if the account has advanced scoring enabled for this media's type. Anime and manga have SEPARATELY configured category lists, so keys must match whichever list applies to this entry. Any of that list's categories you omit here is set to 0, not left unchanged \u2014 include every category if you don't want the others zeroed.")}),outputSchema:l.object({entry:Yb}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1}},n=>de(async()=>ue({entry:await Zg(t.ctx(),n)}))),e.registerTool("update_list_entry",{title:"Update an entry on your AniList list",description:"[Requires login] Update an existing entry on the authenticated user's own AniList list by its list-entry ID (NOT the media ID \u2014 get it from get_user_list, or from add_list_entry's response). Only set the fields you want to change.",inputSchema:l.object({listEntryId:l.number().int().describe("The list ENTRY id to update (not the media id)."),status:l.enum(Wb).optional().describe("New list status."),score:l.number().min(0).max(10).optional().describe("New score out of 10 (decimals allowed), always on this scale regardless of the account's configured scoreFormat (set via update_user) \u2014 no conversion needed."),progress:l.number().int().min(0).optional().describe("New episodes watched / chapters read."),progressVolumes:l.number().int().min(0).optional().describe("New volumes read (manga only)."),repeat:l.number().int().min(0).optional().describe("New rewatch/reread count."),priority:l.number().int().min(0).optional().describe("New list priority."),private:l.boolean().optional().describe("Hide/unhide this entry from your public list."),notes:l.string().optional().describe("New free-text notes."),startedAt:Ru.optional().describe("New start date."),completedAt:Ru.optional().describe("New completion date."),customLists:l.array(l.string()).optional().describe("New set of custom lists for this entry."),advancedScores:l.record(l.string(),l.number()).optional().describe("New per-category scores, keyed the same way as add_list_entry. Unlike this tool's other fields, this one is NOT a true partial update: any configured category you omit is set to 0, not left at its previous value \u2014 pass every category if you're only changing one.")}),outputSchema:l.object({entry:Yb}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}},({listEntryId:n,...o})=>de(async()=>ue({entry:await Zg(t.ctx(),{listEntryId:n,...o})}))),e.registerTool("remove_list_entry",{title:"Remove an entry from your AniList list",description:"[Requires login] Delete an entry from the authenticated user's own AniList list by its list-entry ID (NOT the media id) \u2014 get it from get_user_list. This cannot be undone.",inputSchema:l.object({listEntryId:l.number().int().describe("The list ENTRY id to delete (not the media id).")}),outputSchema:l.object({result:no}),annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0}},({listEntryId:n})=>de(async()=>ue({result:await Kb(t.ctx(),n)})))}async function Qb(e,t,n){if(Array.isArray(n)){let i=`query($ids:[Int],$type:MediaType){Page(perPage:${n.length}){media(id_in:$ids,type:$type){${Qi}${Dg}}}}`;return(await e.gql.request(i,{ids:n,type:t},e.authHeader())).Page.media}let o=`query($id:Int,$type:MediaType){Media(id:$id,type:$type){${Qi}${Dg}}}`;return(await e.gql.request(o,{id:n,type:t},e.authHeader())).Media}async function e$(e,t,n){return(await e.gql.request(`query($id:Int,$type:MediaType){Media(id:$id,type:$type){
195
+ ){id status score(format:POINT_10_DECIMAL) progress mediaId}}`,{id:t.listEntryId,mediaId:t.mediaId,status:t.status,scoreRaw:t.score===void 0?void 0:Math.round(t.score*10),progress:t.progress,progressVolumes:t.progressVolumes,repeat:t.repeat,priority:t.priority,private:t.private,notes:t.notes,startedAt:t.startedAt,completedAt:t.completedAt,customLists:t.customLists,advancedScores:o},n)).SaveMediaListEntry}async function Wb(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteMediaListEntry(id:$id){deleted}}",{id:t},n);if(!r.DeleteMediaListEntry?.deleted)throw new Te({code:"not_found",message:"AniList reported this list entry as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteMediaListEntry}var Yb=["CURRENT","PLANNING","COMPLETED","DROPPED","PAUSED","REPEATING"],Iu=u.object({year:u.number().int().optional(),month:u.number().int().min(1).max(12).optional(),day:u.number().int().min(1).max(31).optional()}).describe("A partial date; omit fields you don't know (e.g. just {year: 2026})."),wT=u.union([Re,u.string().min(1)]).describe("AniList user ID, or username."),RT=u.object({id:u.number().int(),idMal:u.number().int().nullish(),title:u.object({romaji:u.string().nullish(),english:u.string().nullish()}).nullish(),episodes:u.number().int().nullish(),chapters:u.number().int().nullish(),siteUrl:u.string().nullish()}).passthrough(),IT=u.object({id:u.number().int(),status:u.string().nullish(),score:u.number().nullish(),progress:u.number().int().nullish(),progressVolumes:u.number().int().nullish(),repeat:u.number().int().nullish(),priority:u.number().int().nullish(),private:u.boolean().nullish(),notes:u.string().nullish(),startedAt:io.nullish(),completedAt:io.nullish(),updatedAt:u.number().nullish(),createdAt:u.number().nullish(),media:RT.nullish()}).passthrough(),kT=u.object({name:u.string().nullish(),isCustomList:u.boolean().nullish(),isSplitCompletedList:u.boolean().nullish(),status:u.string().nullish(),entries:u.array(IT).nullish()}).passthrough(),Xb=u.object({id:u.number().int(),status:u.string().nullish(),score:u.number().nullish(),progress:u.number().int().nullish(),mediaId:u.number().int().nullish()}).passthrough();function Qb(e,t){e.registerTool("get_user_list",{title:"Get a user's anime or manga list",description:"Get a user's AniList anime or manga list, grouped by status/custom list, with each entry's status, score, progress and dates. Works for any public/unlisted user. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name. Paginated by `chunk`/`perChunk` (AniList's own mechanism for this \u2014 counted across entries of ALL statuses combined, not per status), since a large list can otherwise return thousands of entries in one response; check `hasNextChunk` and increment `chunk` to keep paging.",inputSchema:u.object({type:u.enum(ao).describe("Whether to get the anime or manga list."),user:wT,chunk:u.number().int().positive().default(1).describe("Chunk number for pagination (AniList paginates this list by chunk, not page)."),perChunk:u.number().int().min(1).max(25).default(25).describe("Entries per chunk, counted across all statuses combined (max 25).")}),outputSchema:u.object({lists:u.array(kT).nullish(),hasNextChunk:u.boolean().nullish()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,user:o,chunk:r,perChunk:i})=>de(async()=>ue(await Kb(t.ctx(),n,o,r,i)))),e.registerTool("add_list_entry",{title:"Add an entry to your AniList list",description:"[Requires login] Add an anime/manga to the authenticated user's own AniList list. Use search_media first to resolve the title to its AniList media ID. Only set the fields you care about \u2014 everything else is left at AniList's defaults.",inputSchema:u.object({mediaId:Re.describe("AniList anime/manga ID to add (from search_media)."),status:u.enum(Yb).optional().describe("List status. Defaults to PLANNING if omitted."),score:u.number().min(0).max(10).optional().describe("Score out of 10 (decimals allowed, e.g. 8.5), always on this scale regardless of the account's configured scoreFormat (set via update_user) \u2014 no conversion needed."),progress:u.number().int().min(0).optional().describe("Episodes watched / chapters read."),progressVolumes:u.number().int().min(0).optional().describe("Volumes read (manga only)."),repeat:u.number().int().min(0).optional().describe("Number of times rewatched/reread."),priority:u.number().int().min(0).optional().describe("List priority (higher = more important)."),private:u.boolean().optional().describe("Hide this entry from your public list."),notes:u.string().optional().describe("Free-text notes for this entry."),startedAt:Iu.optional().describe("Date you started."),completedAt:Iu.optional().describe("Date you completed."),customLists:u.array(u.string()).optional().describe("Names of custom lists to file this entry under."),advancedScores:u.record(u.string(),u.number()).optional().describe("Per-category scores, 0-10 scale (e.g. {Story: 8, Characters: 9}) \u2014 only meaningful if the account has advanced scoring enabled for this media's type. Anime and manga have SEPARATELY configured category lists, so keys must match whichever list applies to this entry. Any of that list's categories you omit here is set to 0, not left unchanged \u2014 include every category if you don't want the others zeroed.")}),outputSchema:u.object({entry:Xb}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1}},n=>de(async()=>ue({entry:await Fg(t.ctx(),n)}))),e.registerTool("update_list_entry",{title:"Update an entry on your AniList list",description:"[Requires login] Update an existing entry on the authenticated user's own AniList list by its list-entry ID (NOT the media ID \u2014 get it from get_user_list, or from add_list_entry's response). Only set the fields you want to change.",inputSchema:u.object({listEntryId:Re.describe("The list ENTRY id to update (not the media id)."),status:u.enum(Yb).optional().describe("New list status."),score:u.number().min(0).max(10).optional().describe("New score out of 10 (decimals allowed), always on this scale regardless of the account's configured scoreFormat (set via update_user) \u2014 no conversion needed."),progress:u.number().int().min(0).optional().describe("New episodes watched / chapters read."),progressVolumes:u.number().int().min(0).optional().describe("New volumes read (manga only)."),repeat:u.number().int().min(0).optional().describe("New rewatch/reread count."),priority:u.number().int().min(0).optional().describe("New list priority."),private:u.boolean().optional().describe("Hide/unhide this entry from your public list."),notes:u.string().optional().describe("New free-text notes."),startedAt:Iu.optional().describe("New start date."),completedAt:Iu.optional().describe("New completion date."),customLists:u.array(u.string()).optional().describe("New set of custom lists for this entry."),advancedScores:u.record(u.string(),u.number()).optional().describe("New per-category scores, keyed the same way as add_list_entry. Unlike this tool's other fields, this one is NOT a true partial update: any configured category you omit is set to 0, not left at its previous value \u2014 pass every category if you're only changing one.")}),outputSchema:u.object({entry:Xb}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}},({listEntryId:n,...o})=>de(async()=>ue({entry:await Fg(t.ctx(),{listEntryId:n,...o})}))),e.registerTool("remove_list_entry",{title:"Remove an entry from your AniList list",description:"[Requires login] Delete an entry from the authenticated user's own AniList list by its list-entry ID (NOT the media id) \u2014 get it from get_user_list. This cannot be undone.",inputSchema:u.object({listEntryId:Re.describe("The list ENTRY id to delete (not the media id).")}),outputSchema:u.object({result:oo}),annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0}},({listEntryId:n})=>de(async()=>ue({result:await Wb(t.ctx(),n)})))}async function e$(e,t,n){if(Array.isArray(n)){let i=`query($ids:[Int],$type:MediaType){Page(perPage:${n.length}){media(id_in:$ids,type:$type){${ea}${Ug}}}}`;return(await e.gql.request(i,{ids:n,type:t},e.authHeader())).Page.media}let o=`query($id:Int,$type:MediaType){Media(id:$id,type:$type){${ea}${Ug}}}`;return(await e.gql.request(o,{id:n,type:t},e.authHeader())).Media}async function t$(e,t,n){return(await e.gql.request(`query($id:Int,$type:MediaType){Media(id:$id,type:$type){
194
196
  stats {
195
197
  scoreDistribution { score amount }
196
198
  statusDistribution { status amount }
197
199
  }
198
- }}`,{id:n,type:t},e.authHeader())).Media.stats}async function t$(e,t,n,o=1,r=25){return(await e.gql.request(`query($id:Int,$type:MediaType,$page:Int,$perPage:Int){Media(id:$id,type:$type){
200
+ }}`,{id:n,type:t},e.authHeader())).Media.stats}async function r$(e,t,n,o=1,r=25){return(await e.gql.request(`query($id:Int,$type:MediaType,$page:Int,$perPage:Int){Media(id:$id,type:$type){
199
201
  characters(page:$page,perPage:$perPage){
200
202
  pageInfo{hasNextPage}
201
203
  edges{
@@ -204,30 +206,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
204
206
  node{id name{full native} siteUrl}
205
207
  }
206
208
  }
207
- }}`,{id:n,type:t,page:o,perPage:r},e.authHeader())).Media.characters}async function r$(e,t,n,o=1,r=25){return(await e.gql.request(`query($id:Int,$type:MediaType,$page:Int,$perPage:Int){Media(id:$id,type:$type){
209
+ }}`,{id:n,type:t,page:o,perPage:r},e.authHeader())).Media.characters}async function n$(e,t,n,o=1,r=25){return(await e.gql.request(`query($id:Int,$type:MediaType,$page:Int,$perPage:Int){Media(id:$id,type:$type){
208
210
  staff(page:$page,perPage:$perPage){
209
211
  pageInfo{hasNextPage}
210
212
  edges{ role node{id name{full}} }
211
213
  }
212
- }}`,{id:n,type:t,page:o,perPage:r},e.authHeader())).Media.staff}async function n$(e,t,n,o=1,r=10){return(await e.gql.request(`query($id:Int,$type:MediaType,$page:Int,$perPage:Int){Media(id:$id,type:$type){
214
+ }}`,{id:n,type:t,page:o,perPage:r},e.authHeader())).Media.staff}async function o$(e,t,n,o=1,r=10){return(await e.gql.request(`query($id:Int,$type:MediaType,$page:Int,$perPage:Int){Media(id:$id,type:$type){
213
215
  reviews(page:$page,perPage:$perPage,sort:RATING_DESC){
214
216
  pageInfo{hasNextPage}
215
217
  nodes{id summary rating ratingAmount score siteUrl user{id name}}
216
218
  }
217
- }}`,{id:n,type:t,page:o,perPage:r},e.authHeader())).Media.reviews}async function o$(e,t,n){return(await e.gql.request(`query($id:Int,$type:MediaType){Media(id:$id,type:$type){
219
+ }}`,{id:n,type:t,page:o,perPage:r},e.authHeader())).Media.reviews}async function i$(e,t,n){return(await e.gql.request(`query($id:Int,$type:MediaType){Media(id:$id,type:$type){
218
220
  relations{
219
221
  edges{relationType node{id type format title{romaji english} siteUrl}}
220
222
  }
221
- }}`,{id:n,type:t},e.authHeader())).Media.relations}async function i$(e,t,n=!0,o=1,r=25){return(await e.gql.request(`query($mediaId:Int,$notYetAired:Boolean,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
223
+ }}`,{id:n,type:t},e.authHeader())).Media.relations}async function a$(e,t,n=!0,o=1,r=25){return(await e.gql.request(`query($mediaId:Int,$notYetAired:Boolean,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
222
224
  pageInfo{hasNextPage}
223
225
  airingSchedules(mediaId:$mediaId,notYetAired:$notYetAired,sort:TIME){
224
226
  airingAt timeUntilAiring episode media{id title{romaji english} siteUrl}
225
227
  }
226
- }}`,{mediaId:t,notYetAired:n,page:o,perPage:r},e.authHeader())).Page.airingSchedules}var TT={ANIME:"animeId",MANGA:"mangaId",CHARACTER:"characterId",STAFF:"staffId",STUDIO:"studioId"};async function a$(e,t,n){let r=`mutation($id:Int){ToggleFavourite(${TT[t]}:$id){anime{nodes{id}}manga{nodes{id}}characters{nodes{id}}staff{nodes{id}}studios{nodes{id}}}}`;return(await e.gql.request(r,{id:n},e.requireAuth())).ToggleFavourite}var oa=l.enum(io).describe("Whether `id`/`ids` refers to anime or manga."),ET=l.union([l.number().int(),l.array(l.number().int()).min(1)]).describe("A single AniList anime/manga ID, or an array of IDs to fetch in one call."),s$=l.object({id:l.number().int(),idMal:l.number().int().nullish(),type:l.string().nullish(),format:l.string().nullish(),status:l.string().nullish(),episodes:l.number().int().nullish(),chapters:l.number().int().nullish(),volumes:l.number().int().nullish(),duration:l.number().int().nullish(),genres:l.array(l.string()).nullish(),averageScore:l.number().nullish(),popularity:l.number().nullish(),isAdult:l.boolean().nullish(),isFavourite:l.boolean().nullish(),siteUrl:l.string().nullish(),season:l.string().nullish(),seasonYear:l.number().int().nullish(),countryOfOrigin:l.string().nullish(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish(),native:l.string().nullish()}).nullish(),coverImage:l.object({large:l.string().nullish()}).nullish(),startDate:oo.nullish(),endDate:oo.nullish(),description:l.string().nullish(),trailer:l.object({id:l.string().nullish(),site:l.string().nullish(),thumbnail:l.string().nullish()}).nullish(),tags:l.array(l.object({name:l.string().optional(),rank:l.number().int().nullish(),isMediaSpoiler:l.boolean().nullish()}).passthrough()).nullish()}).passthrough(),xT=l.object({scoreDistribution:l.array(l.object({score:l.number().nullish(),amount:l.number().int().nullish()}).passthrough()).nullish(),statusDistribution:l.array(l.object({status:l.string().nullish(),amount:l.number().int().nullish()}).passthrough()).nullish()}).passthrough(),jT=l.object({pageInfo:He.optional(),edges:l.array(l.object({role:l.string().nullish(),voiceActors:l.array(l.object({id:l.number().int(),name:l.object({full:l.string().nullish()}).nullish(),languageV2:l.string().nullish()}).passthrough()).nullish(),node:l.object({id:l.number().int(),name:l.object({full:l.string().nullish(),native:l.string().nullish()}).nullish(),siteUrl:l.string().nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),NT=l.object({pageInfo:He.optional(),edges:l.array(l.object({role:l.string().nullish(),node:l.object({id:l.number().int(),name:l.object({full:l.string().nullish()}).nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),OT=l.object({pageInfo:He.optional(),nodes:l.array(l.object({id:l.number().int(),summary:l.string().nullish(),rating:l.number().nullish(),ratingAmount:l.number().nullish(),score:l.number().nullish(),siteUrl:l.string().nullish(),user:l.object({id:l.number().int(),name:l.string().nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),AT=l.object({edges:l.array(l.object({relationType:l.string().nullish(),node:l.object({id:l.number().int(),type:l.string().nullish(),format:l.string().nullish(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish(),siteUrl:l.string().nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),CT=l.object({airingAt:l.number().nullish(),timeUntilAiring:l.number().nullish(),episode:l.number().int().nullish(),media:l.object({id:l.number().int(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish(),siteUrl:l.string().nullish()}).passthrough().nullish()}).passthrough(),qT=["ANIME","MANGA","CHARACTER","STAFF","STUDIO"];function c$(e,t){e.registerTool("get_media",{title:"Get anime/manga details",description:"Get detailed information about one or more anime or manga by their AniList ID(s): title, format, status, episode/chapter/volume count, genres, score, synopsis, and dates. Use search_media first to resolve a title to its AniList ID. Returns a single object if `ids` is a single ID, or an array (same order as `ids`) if `ids` is an array.",inputSchema:l.object({type:oa,ids:ET}),outputSchema:l.object({media:l.union([s$,l.array(s$)])}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,ids:o})=>de(async()=>ue({media:await Qb(t.ctx(),n,o)}))),e.registerTool("get_media_statistics",{title:"Get an anime/manga's score/status distribution",description:"Get an anime/manga's watch/read-status counts (watching/completed/planning/etc.) and score distribution histogram across all AniList users. Use search_media first to resolve a title to its AniList ID.",inputSchema:l.object({type:oa,id:l.number().int().describe("AniList ID.")}),outputSchema:l.object({statistics:xT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:o})=>de(async()=>ue({statistics:await e$(t.ctx(),n,o)}))),e.registerTool("get_media_characters",{title:"Get an anime/manga's characters",description:"List an anime/manga's characters with their role (Main/Supporting/Background) and, for anime, Japanese voice actors. Use search_media first to resolve a title to its AniList ID.",inputSchema:l.object({type:oa,id:l.number().int().describe("AniList ID."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:l.object({characters:jT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:o,page:r,perPage:i})=>de(async()=>ue({characters:await t$(t.ctx(),n,o,r,i)}))),e.registerTool("get_media_staff",{title:"Get an anime/manga's production staff",description:"List an anime/manga's staff (director, writer, character designer, author, illustrator, etc.) with their role. Use search_media first to resolve a title to its AniList ID.",inputSchema:l.object({type:oa,id:l.number().int().describe("AniList ID."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:l.object({staff:NT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:o,page:r,perPage:i})=>de(async()=>ue({staff:await r$(t.ctx(),n,o,r,i)}))),e.registerTool("get_media_reviews",{title:"Get an anime/manga's reviews",description:"List user-written reviews for an anime or manga, highest-rated first. Use search_media first to resolve a title to its AniList ID.",inputSchema:l.object({type:oa,id:l.number().int().describe("AniList ID."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:l.object({reviews:OT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:o,page:r,perPage:i})=>de(async()=>ue({reviews:await n$(t.ctx(),n,o,r,i)}))),e.registerTool("get_media_relations",{title:"Get a title's related media",description:"Get the anime/manga related to a given title (prequels, sequels, side stories, adaptations, spin-offs) with the relation type. Use search_media first to resolve a title to its AniList ID.",inputSchema:l.object({id:l.number().int().describe("AniList anime/manga ID."),type:l.enum(["ANIME","MANGA"]).describe("Whether `id` refers to an anime or a manga.")}),outputSchema:l.object({relations:AT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n,type:o})=>de(async()=>ue({relations:await o$(t.ctx(),o,n)}))),e.registerTool("get_anime_schedule",{title:"Get the anime airing schedule",description:"Get upcoming (or a specific title's) episode air times. Omit `mediaId` for the site-wide upcoming schedule, or pass it (from search_media/get_media) to get one title's next-episode air time. Anime only \u2014 manga has no airing schedule.",inputSchema:l.object({mediaId:l.number().int().optional().describe("Restrict to this AniList anime ID."),notYetAired:l.boolean().default(!0).describe("Set false to include already-aired episodes too."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:l.object({schedule:l.array(CT)}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({mediaId:n,notYetAired:o,page:r,perPage:i})=>de(async()=>ue({schedule:await i$(t.ctx(),n,o,r,i)}))),e.registerTool("favourite",{title:"Favourite/unfavourite an anime, manga, character, staff member, or studio",description:"[Requires login] Toggle an anime, manga, character, staff member, or studio in the authenticated user's AniList favourites. Calling it again on the same `kind`+`id` un-favourites it. Resolve `id` first via search_media/get_media (kind: ANIME/MANGA), search_character/get_character, search_staff/get_staff, or search_studio/get_studio, matching `kind`.",inputSchema:l.object({kind:l.enum(qT).describe("Which kind of entity `id` refers to."),id:l.number().int().describe("AniList ID of that anime/manga/character/staff/studio.")}),outputSchema:l.object({favourites:Hb}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1}},({kind:n,id:o})=>de(async()=>ue({favourites:await a$(t.ctx(),n,o)})))}async function l$(e,t){let n=`query($id:Int){Character(id:$id){${ea}}}`;return(await e.gql.request(n,{id:t},e.authHeader())).Character}async function u$(e,t){let n=`query($id:Int){Staff(id:$id){${ta}}}`;return(await e.gql.request(n,{id:t},e.authHeader())).Staff}async function d$(e,t){let n=t==="CHARACTER"?"characters":"staff",r=`query{Page(perPage:50){${n}(isBirthday:true){${t==="CHARACTER"?ea:ta}}}}`;return(await e.gql.request(r,{},e.authHeader())).Page[n]}var m$=l.object({id:l.number().int(),name:l.object({full:l.string().nullish(),native:l.string().nullish()}).nullish(),image:l.object({large:l.string().nullish()}).nullish(),description:l.string().nullish(),favourites:l.number().int().nullish(),isFavourite:l.boolean().nullish(),siteUrl:l.string().nullish()}).passthrough(),p$=l.object({id:l.number().int(),name:l.object({full:l.string().nullish(),native:l.string().nullish()}).nullish(),image:l.object({large:l.string().nullish()}).nullish(),description:l.string().nullish(),primaryOccupations:l.array(l.string()).nullish(),favourites:l.number().int().nullish(),isFavourite:l.boolean().nullish(),siteUrl:l.string().nullish()}).passthrough(),MT=["CHARACTER","STAFF"];function f$(e,t){e.registerTool("get_character",{title:"Get character details",description:"Get a character's profile by AniList character ID: name, image, description. Use search_character first to resolve a name to its ID.",inputSchema:l.object({id:l.number().int().describe("AniList character ID.")}),outputSchema:l.object({character:m$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({character:await l$(t.ctx(),n)}))),e.registerTool("get_staff",{title:"Get staff member details",description:"Get a staff member's profile by AniList staff ID: name, image, occupations, description. Use search_staff first to resolve a name to its ID.",inputSchema:l.object({id:l.number().int().describe("AniList staff ID.")}),outputSchema:l.object({staff:p$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({staff:await u$(t.ctx(),n)}))),e.registerTool("get_todays_birthdays",{title:"Get today's birthday characters or staff",description:"List all AniList characters or staff members whose birthday (month/day) is today. Returns character-shaped objects for kind: CHARACTER, or staff-shaped objects (same fields plus `primaryOccupations`) for kind: STAFF.",inputSchema:l.object({kind:l.enum(MT).describe("Whether to list characters or staff members.")}),outputSchema:l.object({results:l.union([l.array(m$),l.array(p$)])}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({kind:n})=>de(async()=>ue({results:await d$(t.ctx(),n)})))}async function h$(e,t){return(await e.gql.request(`query($id:Int){Recommendation(id:$id){id rating userRating
227
- media{id title{romaji english}} mediaRecommendation{id title{romaji english}}}}`,{id:t},e.authHeader())).Recommendation}async function g$(e,t,n=1,o=10,r=!1){let a=await e.gql.request(`query($id:Int,$page:Int,$perPage:Int){Media(id:$id){recommendations(page:$page,perPage:$perPage,sort:RATING_DESC){
228
+ }}`,{mediaId:t,notYetAired:n,page:o,perPage:r},e.authHeader())).Page.airingSchedules}var PT={ANIME:"animeId",MANGA:"mangaId",CHARACTER:"characterId",STAFF:"staffId",STUDIO:"studioId"};async function s$(e,t,n){let r=`mutation($id:Int){ToggleFavourite(${PT[t]}:$id){anime{nodes{id}}manga{nodes{id}}characters{nodes{id}}staff{nodes{id}}studios{nodes{id}}}}`;return(await e.gql.request(r,{id:n},e.requireAuth())).ToggleFavourite}var ia=u.enum(ao).describe("Whether `id`/`ids` refers to anime or manga."),xT=u.union([Re,u.array(Re).min(1)]).describe("A single AniList anime/manga ID, or an array of IDs to fetch in one call."),c$=u.object({id:u.number().int(),idMal:u.number().int().nullish(),type:u.string().nullish(),format:u.string().nullish(),status:u.string().nullish(),episodes:u.number().int().nullish(),chapters:u.number().int().nullish(),volumes:u.number().int().nullish(),duration:u.number().int().nullish(),genres:u.array(u.string()).nullish(),averageScore:u.number().nullish(),popularity:u.number().nullish(),isAdult:u.boolean().nullish(),isFavourite:u.boolean().nullish(),siteUrl:u.string().nullish(),season:u.string().nullish(),seasonYear:u.number().int().nullish(),countryOfOrigin:u.string().nullish(),title:u.object({romaji:u.string().nullish(),english:u.string().nullish(),native:u.string().nullish()}).nullish(),coverImage:u.object({large:u.string().nullish()}).nullish(),startDate:io.nullish(),endDate:io.nullish(),description:u.string().nullish(),trailer:u.object({id:u.string().nullish(),site:u.string().nullish(),thumbnail:u.string().nullish()}).nullish(),tags:u.array(u.object({name:u.string().optional(),rank:u.number().int().nullish(),isMediaSpoiler:u.boolean().nullish()}).passthrough()).nullish(),rankings:u.array(u.object({rank:u.number().int().nullish(),type:u.string().nullish(),format:u.string().nullish(),year:u.number().int().nullish(),season:u.string().nullish(),allTime:u.boolean().nullish(),context:u.string().nullish()}).passthrough()).nullish()}).passthrough(),jT=u.object({scoreDistribution:u.array(u.object({score:u.number().nullish(),amount:u.number().int().nullish()}).passthrough()).nullish(),statusDistribution:u.array(u.object({status:u.string().nullish(),amount:u.number().int().nullish()}).passthrough()).nullish()}).passthrough(),NT=u.object({pageInfo:Ze.optional(),edges:u.array(u.object({role:u.string().nullish(),voiceActors:u.array(u.object({id:u.number().int(),name:u.object({full:u.string().nullish()}).nullish(),languageV2:u.string().nullish()}).passthrough()).nullish(),node:u.object({id:u.number().int(),name:u.object({full:u.string().nullish(),native:u.string().nullish()}).nullish(),siteUrl:u.string().nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),OT=u.object({pageInfo:Ze.optional(),edges:u.array(u.object({role:u.string().nullish(),node:u.object({id:u.number().int(),name:u.object({full:u.string().nullish()}).nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),AT=u.object({pageInfo:Ze.optional(),nodes:u.array(u.object({id:u.number().int(),summary:u.string().nullish(),rating:u.number().nullish(),ratingAmount:u.number().nullish(),score:u.number().nullish(),siteUrl:u.string().nullish(),user:u.object({id:u.number().int(),name:u.string().nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),CT=u.object({edges:u.array(u.object({relationType:u.string().nullish(),node:u.object({id:u.number().int(),type:u.string().nullish(),format:u.string().nullish(),title:u.object({romaji:u.string().nullish(),english:u.string().nullish()}).nullish(),siteUrl:u.string().nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),qT=u.object({airingAt:u.number().nullish(),timeUntilAiring:u.number().nullish(),episode:u.number().int().nullish(),media:u.object({id:u.number().int(),title:u.object({romaji:u.string().nullish(),english:u.string().nullish()}).nullish(),siteUrl:u.string().nullish()}).passthrough().nullish()}).passthrough(),LT=["ANIME","MANGA","CHARACTER","STAFF","STUDIO"];function l$(e,t){e.registerTool("get_media",{title:"Get anime/manga details",description:'Get detailed information about one or more anime or manga by their AniList ID(s): title, format, status, episode/chapter/volume count, genres, score, synopsis, dates, and `rankings` \u2014 AniList\'s own ranking badges (e.g. "#134 highest rated all time", "#11 highest rated 2024"), one entry per rated/popular ranking window the title currently appears in. Use search_media first to resolve a title to its AniList ID. Returns a single object if `ids` is a single ID, or an array (same order as `ids`) if `ids` is an array.',inputSchema:u.object({type:ia,ids:xT}),outputSchema:u.object({media:u.union([c$,u.array(c$)])}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,ids:o})=>de(async()=>ue({media:await e$(t.ctx(),n,o)}))),e.registerTool("get_media_statistics",{title:"Get an anime/manga's score/status distribution",description:"Get an anime/manga's watch/read-status counts (watching/completed/planning/etc.) and score distribution histogram across all AniList users. Use search_media first to resolve a title to its AniList ID.",inputSchema:u.object({type:ia,id:Re.describe("AniList ID.")}),outputSchema:u.object({statistics:jT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:o})=>de(async()=>ue({statistics:await t$(t.ctx(),n,o)}))),e.registerTool("get_media_characters",{title:"Get an anime/manga's characters",description:"List an anime/manga's characters with their role (Main/Supporting/Background) and, for anime, Japanese voice actors. Use search_media first to resolve a title to its AniList ID.",inputSchema:u.object({type:ia,id:Re.describe("AniList ID."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:u.object({characters:NT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:o,page:r,perPage:i})=>de(async()=>ue({characters:await r$(t.ctx(),n,o,r,i)}))),e.registerTool("get_media_staff",{title:"Get an anime/manga's production staff",description:"List an anime/manga's staff (director, writer, character designer, author, illustrator, etc.) with their role. Use search_media first to resolve a title to its AniList ID.",inputSchema:u.object({type:ia,id:Re.describe("AniList ID."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:u.object({staff:OT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:o,page:r,perPage:i})=>de(async()=>ue({staff:await n$(t.ctx(),n,o,r,i)}))),e.registerTool("get_media_reviews",{title:"Get an anime/manga's reviews",description:"List user-written reviews for an anime or manga, highest-rated first. Use search_media first to resolve a title to its AniList ID.",inputSchema:u.object({type:ia,id:Re.describe("AniList ID."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:u.object({reviews:AT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:o,page:r,perPage:i})=>de(async()=>ue({reviews:await o$(t.ctx(),n,o,r,i)}))),e.registerTool("get_media_relations",{title:"Get a title's related media",description:"Get the anime/manga related to a given title (prequels, sequels, side stories, adaptations, spin-offs) with the relation type. Use search_media first to resolve a title to its AniList ID.",inputSchema:u.object({id:Re.describe("AniList anime/manga ID."),type:u.enum(["ANIME","MANGA"]).describe("Whether `id` refers to an anime or a manga.")}),outputSchema:u.object({relations:CT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n,type:o})=>de(async()=>ue({relations:await i$(t.ctx(),o,n)}))),e.registerTool("get_anime_schedule",{title:"Get the anime airing schedule",description:"Get upcoming (or a specific title's) episode air times. Omit `mediaId` for the site-wide upcoming schedule, or pass it (from search_media/get_media) to get one title's next-episode air time. Anime only \u2014 manga has no airing schedule.",inputSchema:u.object({mediaId:Re.optional().describe("Restrict to this AniList anime ID."),notYetAired:u.boolean().default(!0).describe("Set false to include already-aired episodes too."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:u.object({schedule:u.array(qT)}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({mediaId:n,notYetAired:o,page:r,perPage:i})=>de(async()=>ue({schedule:await a$(t.ctx(),n,o,r,i)}))),e.registerTool("favourite",{title:"Favourite/unfavourite an anime, manga, character, staff member, or studio",description:"[Requires login] Toggle an anime, manga, character, staff member, or studio in the authenticated user's AniList favourites. Calling it again on the same `kind`+`id` un-favourites it. Resolve `id` first via search_media/get_media (kind: ANIME/MANGA), search_character/get_character, search_staff/get_staff, or search_studio/get_studio, matching `kind`.",inputSchema:u.object({kind:u.enum(LT).describe("Which kind of entity `id` refers to."),id:Re.describe("AniList ID of that anime/manga/character/staff/studio.")}),outputSchema:u.object({favourites:Db}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1}},({kind:n,id:o})=>de(async()=>ue({favourites:await s$(t.ctx(),n,o)})))}async function u$(e,t){let n=`query($id:Int){Character(id:$id){${ta}}}`;return(await e.gql.request(n,{id:t},e.authHeader())).Character}async function d$(e,t){let n=`query($id:Int){Staff(id:$id){${ra}}}`;return(await e.gql.request(n,{id:t},e.authHeader())).Staff}async function m$(e,t){let n=t==="CHARACTER"?"characters":"staff",r=`query{Page(perPage:50){${n}(isBirthday:true){${t==="CHARACTER"?ta:ra}}}}`;return(await e.gql.request(r,{},e.authHeader())).Page[n]}var p$=u.object({id:u.number().int(),name:u.object({full:u.string().nullish(),native:u.string().nullish()}).nullish(),image:u.object({large:u.string().nullish()}).nullish(),description:u.string().nullish(),favourites:u.number().int().nullish(),isFavourite:u.boolean().nullish(),siteUrl:u.string().nullish()}).passthrough(),f$=u.object({id:u.number().int(),name:u.object({full:u.string().nullish(),native:u.string().nullish()}).nullish(),image:u.object({large:u.string().nullish()}).nullish(),description:u.string().nullish(),primaryOccupations:u.array(u.string()).nullish(),favourites:u.number().int().nullish(),isFavourite:u.boolean().nullish(),siteUrl:u.string().nullish()}).passthrough(),DT=["CHARACTER","STAFF"];function h$(e,t){e.registerTool("get_character",{title:"Get character details",description:"Get a character's profile by AniList character ID: name, image, description. Use search_character first to resolve a name to its ID.",inputSchema:u.object({id:Re.describe("AniList character ID.")}),outputSchema:u.object({character:p$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({character:await u$(t.ctx(),n)}))),e.registerTool("get_staff",{title:"Get staff member details",description:"Get a staff member's profile by AniList staff ID: name, image, occupations, description. Use search_staff first to resolve a name to its ID.",inputSchema:u.object({id:Re.describe("AniList staff ID.")}),outputSchema:u.object({staff:f$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({staff:await d$(t.ctx(),n)}))),e.registerTool("get_todays_birthdays",{title:"Get today's birthday characters or staff",description:"List all AniList characters or staff members whose birthday (month/day) is today. Returns character-shaped objects for kind: CHARACTER, or staff-shaped objects (same fields plus `primaryOccupations`) for kind: STAFF.",inputSchema:u.object({kind:u.enum(DT).describe("Whether to list characters or staff members.")}),outputSchema:u.object({results:u.union([u.array(p$),u.array(f$)])}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({kind:n})=>de(async()=>ue({results:await m$(t.ctx(),n)})))}async function g$(e,t){return(await e.gql.request(`query($id:Int){Recommendation(id:$id){id rating userRating
229
+ media{id title{romaji english}} mediaRecommendation{id title{romaji english}}}}`,{id:t},e.authHeader())).Recommendation}async function v$(e,t,n=1,o=10,r=!1){let a=await e.gql.request(`query($id:Int,$page:Int,$perPage:Int){Media(id:$id){recommendations(page:$page,perPage:$perPage,sort:RATING_DESC){
228
230
  pageInfo{hasNextPage}
229
231
  nodes{id rating userRating mediaRecommendation{id title{romaji english} siteUrl mediaListEntry{id status}}}
230
- }}}`,{id:t,page:n,perPage:o},e.authHeader()),{recommendations:s}=a.Media;return r?{...s,nodes:s.nodes.filter(c=>!c.mediaRecommendation?.mediaListEntry)}:s}var v$=l.object({id:l.number().int(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish()}).passthrough(),UT=l.object({id:l.number().int(),rating:l.number().nullish(),userRating:l.string().nullish(),media:v$.nullish(),mediaRecommendation:v$.nullish()}).passthrough(),VT=l.object({id:l.number().int(),rating:l.number().nullish(),userRating:l.string().nullish(),mediaRecommendation:l.object({id:l.number().int(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish(),siteUrl:l.string().nullish(),mediaListEntry:l.object({id:l.number().int(),status:l.string().nullish()}).passthrough().nullish()}).passthrough().nullish()}).passthrough();function y$(e,t){e.registerTool("get_recommendation",{title:"Get a recommendation by ID",description:"Get a single AniList recommendation pairing (media + the media users recommend alongside it) by its AniList recommendation ID. Use get_recommendations_for_media first to discover recommendation IDs for a title.",inputSchema:l.object({id:l.number().int().describe("AniList recommendation ID.")}),outputSchema:l.object({recommendation:UT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({recommendation:await h$(t.ctx(),n)}))),e.registerTool("get_recommendations_for_media",{title:"Get recommendations for a title",description:"List anime/manga AniList users recommend as similar to a given title, ranked by rating. Use search_media first to resolve the title to its AniList ID. Each recommendation's `mediaListEntry` (requires login) shows whether it's already on your own list \u2014 set `excludeInList: true` to filter those out server-side instead of checking each one yourself.",inputSchema:l.object({mediaId:l.number().int().describe("AniList ID of the anime/manga to get recommendations for."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(10).describe("Results per page (max 25)."),excludeInList:l.boolean().default(!1).describe("[Requires login] Omit recommendations already on your own list. Filtered after fetching this page, so a page can come back with fewer than `perPage` results \u2014 not an error, just fewer new ones on that page. No-ops (nothing filtered) if not logged in, since there's no list to check against.")}),outputSchema:l.object({recommendations:l.object({nodes:l.array(VT).nullish()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({mediaId:n,page:o,perPage:r,excludeInList:i})=>de(async()=>ue({recommendations:await g$(t.ctx(),n,o,r,i)})))}async function _$(e,t,n){let o=`query(
232
+ }}}`,{id:t,page:n,perPage:o},e.authHeader()),{recommendations:s}=a.Media;return r?{...s,nodes:s.nodes.filter(c=>!c.mediaRecommendation?.mediaListEntry)}:s}var y$=u.object({id:u.number().int(),title:u.object({romaji:u.string().nullish(),english:u.string().nullish()}).nullish()}).passthrough(),VT=u.object({id:u.number().int(),rating:u.number().nullish(),userRating:u.string().nullish(),media:y$.nullish(),mediaRecommendation:y$.nullish()}).passthrough(),ZT=u.object({id:u.number().int(),rating:u.number().nullish(),userRating:u.string().nullish(),mediaRecommendation:u.object({id:u.number().int(),title:u.object({romaji:u.string().nullish(),english:u.string().nullish()}).nullish(),siteUrl:u.string().nullish(),mediaListEntry:u.object({id:u.number().int(),status:u.string().nullish()}).passthrough().nullish()}).passthrough().nullish()}).passthrough();function _$(e,t){e.registerTool("get_recommendation",{title:"Get a recommendation by ID",description:"Get a single AniList recommendation pairing (media + the media users recommend alongside it) by its AniList recommendation ID. Use get_recommendations_for_media first to discover recommendation IDs for a title.",inputSchema:u.object({id:Re.describe("AniList recommendation ID.")}),outputSchema:u.object({recommendation:VT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({recommendation:await g$(t.ctx(),n)}))),e.registerTool("get_recommendations_for_media",{title:"Get recommendations for a title",description:"List anime/manga AniList users recommend as similar to a given title, ranked by rating. Use search_media first to resolve the title to its AniList ID. Each recommendation's `mediaListEntry` (requires login) shows whether it's already on your own list \u2014 set `excludeInList: true` to filter those out server-side instead of checking each one yourself.",inputSchema:u.object({mediaId:Re.describe("AniList ID of the anime/manga to get recommendations for."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(10).describe("Results per page (max 25)."),excludeInList:u.boolean().default(!1).describe("[Requires login] Omit recommendations already on your own list. Filtered after fetching this page, so a page can come back with fewer than `perPage` results \u2014 not an error, just fewer new ones on that page. No-ops (nothing filtered) if not logged in, since there's no list to check against.")}),outputSchema:u.object({recommendations:u.object({nodes:u.array(ZT).nullish()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({mediaId:n,page:o,perPage:r,excludeInList:i})=>de(async()=>ue({recommendations:await v$(t.ctx(),n,o,r,i)})))}async function S$(e,t,n){let o=`query(
231
233
  $search:String,$type:MediaType,$page:Int,$perPage:Int,$sort:[MediaSort],
232
234
  $isAdult:Boolean,$genre_in:[String],$format_in:[MediaFormat],$status_in:[MediaStatus],
233
235
  $seasonYear:Int,$season:MediaSeason
@@ -237,40 +239,40 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
237
239
  media(
238
240
  search:$search,type:$type,sort:$sort,isAdult:$isAdult,genre_in:$genre_in,
239
241
  format_in:$format_in,status_in:$status_in,seasonYear:$seasonYear,season:$season
240
- ){${Qi}}
242
+ ){${ea}}
241
243
  }
242
- }`,r=n.filter??{};return(await e.gql.request(o,{search:n.term,type:t,page:n.page??1,perPage:n.perPage??10,sort:n.sort??["SEARCH_MATCH"],isAdult:r.isAdult,genre_in:r.genre_in,format_in:r.format_in,status_in:r.status_in,seasonYear:r.seasonYear,season:r.season},e.authHeader())).Page}async function S$(e,t,n=1,o=10){let r=`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
244
+ }`,r=n.filter??{},i=n.term?.trim()?n.term:void 0;return(await e.gql.request(o,{search:i,type:t,page:n.page??1,perPage:n.perPage??10,sort:n.sort??["SEARCH_MATCH"],isAdult:r.isAdult,genre_in:r.genre_in,format_in:r.format_in,status_in:r.status_in,seasonYear:r.seasonYear,season:r.season},e.authHeader())).Page}async function b$(e,t,n=1,o=10){let r=`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
243
245
  pageInfo{total currentPage lastPage hasNextPage}
244
- characters(search:$search){${ea}}
245
- }}`;return(await e.gql.request(r,{search:t,page:n,perPage:o},e.authHeader())).Page}async function b$(e,t,n=1,o=10){let r=`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
246
+ characters(search:$search){${ta}}
247
+ }}`;return(await e.gql.request(r,{search:t,page:n,perPage:o},e.authHeader())).Page}async function $$(e,t,n=1,o=10){let r=`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
246
248
  pageInfo{total currentPage lastPage hasNextPage}
247
- staff(search:$search){${ta}}
248
- }}`;return(await e.gql.request(r,{search:t,page:n,perPage:o},e.authHeader())).Page}async function $$(e,t,n=1,o=10){return(await e.gql.request(`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
249
+ staff(search:$search){${ra}}
250
+ }}`;return(await e.gql.request(r,{search:t,page:n,perPage:o},e.authHeader())).Page}async function z$(e,t,n=1,o=10){return(await e.gql.request(`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
249
251
  pageInfo{total currentPage lastPage hasNextPage}
250
252
  studios(search:$search){id name isAnimationStudio siteUrl}
251
- }}`,{search:t,page:n,perPage:o},e.authHeader())).Page}async function z$(e,t,n=1,o=10){let r=`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
253
+ }}`,{search:t,page:n,perPage:o},e.authHeader())).Page}async function w$(e,t,n=1,o=10){let r=`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
252
254
  pageInfo{total currentPage lastPage hasNextPage}
253
- users(search:$search){${Kr}}
254
- }}`;return(await e.gql.request(r,{search:t,page:n,perPage:o},e.authHeader())).Page}async function w$(e,t,n,o=1,r=10){let i=`query($userId:Int,$type:ActivityType,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
255
+ users(search:$search){${Wr}}
256
+ }}`;return(await e.gql.request(r,{search:t,page:n,perPage:o},e.authHeader())).Page}async function R$(e,t,n,o=1,r=10){let i=`query($userId:Int,$type:ActivityType,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
255
257
  pageInfo{total currentPage lastPage hasNextPage}
256
- activities(userId:$userId,type:$type,sort:ID_DESC){${ra}}
257
- }}`;return(await e.gql.request(i,{userId:t,type:n,page:o,perPage:r},e.authHeader())).Page}var FT=["TV","TV_SHORT","MOVIE","SPECIAL","OVA","ONA","MUSIC","MANGA","NOVEL","ONE_SHOT"],HT=["FINISHED","RELEASING","NOT_YET_RELEASED","CANCELLED","HIATUS"],JT=["WINTER","SPRING","SUMMER","FALL"],GT=["TEXT","ANIME_LIST","MANGA_LIST","MESSAGE","MEDIA_LIST"],BT=["ID","ID_DESC","TITLE_ROMAJI","TITLE_ROMAJI_DESC","TITLE_ENGLISH","TITLE_ENGLISH_DESC","TITLE_NATIVE","TITLE_NATIVE_DESC","TYPE","TYPE_DESC","FORMAT","FORMAT_DESC","START_DATE","START_DATE_DESC","END_DATE","END_DATE_DESC","SCORE","SCORE_DESC","POPULARITY","POPULARITY_DESC","TRENDING","TRENDING_DESC","EPISODES","EPISODES_DESC","DURATION","DURATION_DESC","STATUS","STATUS_DESC","CHAPTERS","CHAPTERS_DESC","VOLUMES","VOLUMES_DESC","UPDATED_AT","UPDATED_AT_DESC","SEARCH_MATCH","FAVOURITES","FAVOURITES_DESC"],KT=l.object({type:l.enum(io).describe("Whether to search anime or manga."),term:l.string().optional().describe("Free-text search term (matches title). Omit to only filter."),genres:l.array(l.string()).optional().describe("Restrict to entries matching ALL of these genre names (see get_genres)."),format_in:l.array(l.enum(FT)).optional().describe("Restrict to these formats. Only formats valid for the `type` you're searching match anything \u2014 e.g. NOVEL/ONE_SHOT with type: ANIME, or TV/OVA/ONA with type: MANGA, will just filter out all results, not error."),status_in:l.array(l.enum(HT)).optional().describe("Restrict to these release statuses."),season:l.enum(JT).optional().describe("Restrict to this airing season (pair with seasonYear)."),seasonYear:l.number().int().optional().describe("Restrict to this airing/release year (pair with season)."),sfw:l.boolean().default(!1).describe("Set true to exclude adult (isAdult) entries. Adult results are NOT filtered by default."),sort:l.array(l.enum(BT)).optional().describe('Sort order, most-significant key first (e.g. ["SCORE_DESC"] for highest-rated first, ["POPULARITY_DESC"] for most popular, ["TRENDING_DESC"] for what\'s hot right now). Defaults to relevance-ranked SEARCH_MATCH, which only makes sense when `term` is also given \u2014 set an explicit sort for a term-less browse/ranking query.'),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")});function R$(e,t){e.registerTool("search_media",{title:"Search anime/manga",description:"Search AniList for anime or manga by title and/or filters (genre, format, status, season/year), or browse term-less by ranking (top-rated, most popular, trending \u2014 see the `sort` parameter) when you don't have a title to search for. Adult (NSFW) results are included unless you set `sfw: true` \u2014 see the `sfw` parameter. Returns AniList IDs to use with get_media and other ID-based tools.",inputSchema:KT,outputSchema:l.object({results:l.object({pageInfo:He.optional(),media:l.array(Pt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},n=>de(async()=>ue({results:await _$(t.ctx(),n.type,{term:n.term,page:n.page,perPage:n.perPage,sort:n.sort,filter:{isAdult:n.sfw?!1:void 0,genre_in:n.genres,format_in:n.format_in,status_in:n.status_in,season:n.season,seasonYear:n.seasonYear}})}))),e.registerTool("search_character",{title:"Search characters",description:"Search AniList for characters by name. Returns AniList IDs to use with get_character.",inputSchema:l.object({term:l.string().min(1).describe("Character name (or part of it) to search for."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),characters:l.array(Pt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:o,perPage:r})=>de(async()=>ue({results:await S$(t.ctx(),n,o,r)}))),e.registerTool("search_staff",{title:"Search staff",description:"Search AniList for staff members by name. Returns AniList IDs to use with get_staff.",inputSchema:l.object({term:l.string().min(1).describe("Staff member name (or part of it) to search for."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),staff:l.array(Pt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:o,perPage:r})=>de(async()=>ue({results:await b$(t.ctx(),n,o,r)}))),e.registerTool("search_studio",{title:"Search studios",description:"Search AniList for animation/production studios by name. Returns AniList IDs to use with get_studio.",inputSchema:l.object({term:l.string().min(1).describe("Studio name (or part of it) to search for."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),studios:l.array(Pt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:o,perPage:r})=>de(async()=>ue({results:await $$(t.ctx(),n,o,r)}))),e.registerTool("search_user",{title:"Search users",description:"Search AniList for users by username. Returns AniList user IDs to use with profile/list tools.",inputSchema:l.object({term:l.string().min(1).describe("Username (or part of it) to search for."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),users:l.array(Pt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:o,perPage:r})=>de(async()=>ue({results:await z$(t.ctx(),n,o,r)}))),e.registerTool("search_activity",{title:"Search activity feed",description:"Search/browse AniList's activity feed (list updates, text posts, messages), optionally filtered to one user and/or one activity type. Returns AniList activity IDs to use with get_activity.",inputSchema:l.object({userId:l.number().int().optional().describe("Restrict results to this AniList user ID \u2014 numeric only; resolve one via search_user first, or use get_user_activity instead if you already have an exact username."),type:l.enum(GT).optional().describe("Restrict to this activity type. MEDIA_LIST matches both ANIME_LIST and MANGA_LIST activities; use ANIME_LIST/MANGA_LIST to restrict to just one."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),activities:l.array(Pt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({userId:n,type:o,page:r,perPage:i})=>de(async()=>ue({results:await w$(t.ctx(),n,o,r,i)})))}async function I$(e,t){return(await e.gql.request(`query($id:Int){Thread(id:$id){id title body(asHtml:false) siteUrl replyCommentId
258
- user{id name} categories{id name}}}`,{id:t},e.authHeader())).Thread}async function k$(e,t,n=1,o=25){return(await e.gql.request(`query($threadId:Int,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
258
+ activities(userId:$userId,type:$type,sort:ID_DESC){${na}}
259
+ }}`;return(await e.gql.request(i,{userId:t,type:n,page:o,perPage:r},e.authHeader())).Page}var HT=["TV","TV_SHORT","MOVIE","SPECIAL","OVA","ONA","MUSIC","MANGA","NOVEL","ONE_SHOT"],JT=["FINISHED","RELEASING","NOT_YET_RELEASED","CANCELLED","HIATUS"],GT=["WINTER","SPRING","SUMMER","FALL"],BT=["TEXT","ANIME_LIST","MANGA_LIST","MESSAGE","MEDIA_LIST"],KT=["ID","ID_DESC","TITLE_ROMAJI","TITLE_ROMAJI_DESC","TITLE_ENGLISH","TITLE_ENGLISH_DESC","TITLE_NATIVE","TITLE_NATIVE_DESC","TYPE","TYPE_DESC","FORMAT","FORMAT_DESC","START_DATE","START_DATE_DESC","END_DATE","END_DATE_DESC","SCORE","SCORE_DESC","POPULARITY","POPULARITY_DESC","TRENDING","TRENDING_DESC","EPISODES","EPISODES_DESC","DURATION","DURATION_DESC","STATUS","STATUS_DESC","CHAPTERS","CHAPTERS_DESC","VOLUMES","VOLUMES_DESC","UPDATED_AT","UPDATED_AT_DESC","SEARCH_MATCH","FAVOURITES","FAVOURITES_DESC"],WT=u.object({type:u.enum(ao).describe("Whether to search anime or manga."),term:u.string().optional().describe("Free-text search term (matches title). Omit to only filter."),genres:u.array(u.string()).optional().describe("Restrict to entries matching ALL of these genre names (see get_genres)."),format_in:u.array(u.enum(HT)).optional().describe("Restrict to these formats. Only formats valid for the `type` you're searching match anything \u2014 e.g. NOVEL/ONE_SHOT with type: ANIME, or TV/OVA/ONA with type: MANGA, will just filter out all results, not error."),status_in:u.array(u.enum(JT)).optional().describe("Restrict to these release statuses."),season:u.enum(GT).optional().describe("Restrict to this airing season (pair with seasonYear)."),seasonYear:u.number().int().optional().describe("Restrict to this airing/release year (pair with season)."),sfw:u.boolean().default(!1).describe("Set true to exclude adult (isAdult) entries. Adult results are NOT filtered by default."),sort:u.array(u.enum(KT)).optional().describe('Sort order, most-significant key first (e.g. ["SCORE_DESC"] for highest-rated first, ["POPULARITY_DESC"] for most popular, ["TRENDING_DESC"] for what\'s hot right now). Defaults to relevance-ranked SEARCH_MATCH, which only makes sense when `term` is also given \u2014 set an explicit sort for a term-less browse/ranking query.'),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")});function I$(e,t){e.registerTool("search_media",{title:"Search anime/manga",description:"Search AniList for anime or manga by title and/or filters (genre, format, status, season/year), or browse term-less by ranking (top-rated, most popular, trending \u2014 see the `sort` parameter) when you don't have a title to search for. Adult (NSFW) results are included unless you set `sfw: true` \u2014 see the `sfw` parameter. Returns AniList IDs to use with get_media and other ID-based tools.",inputSchema:WT,outputSchema:u.object({results:u.object({pageInfo:Ze.optional(),media:u.array(Et).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},n=>de(async()=>ue({results:await S$(t.ctx(),n.type,{term:n.term,page:n.page,perPage:n.perPage,sort:n.sort,filter:{isAdult:n.sfw?!1:void 0,genre_in:n.genres,format_in:n.format_in,status_in:n.status_in,season:n.season,seasonYear:n.seasonYear}})}))),e.registerTool("search_character",{title:"Search characters",description:"Search AniList for characters by name. Returns AniList IDs to use with get_character.",inputSchema:u.object({term:u.string().min(1).describe("Character name (or part of it) to search for."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:u.object({results:u.object({pageInfo:Ze.optional(),characters:u.array(Et).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:o,perPage:r})=>de(async()=>ue({results:await b$(t.ctx(),n,o,r)}))),e.registerTool("search_staff",{title:"Search staff",description:"Search AniList for staff members by name. Returns AniList IDs to use with get_staff.",inputSchema:u.object({term:u.string().min(1).describe("Staff member name (or part of it) to search for."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:u.object({results:u.object({pageInfo:Ze.optional(),staff:u.array(Et).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:o,perPage:r})=>de(async()=>ue({results:await $$(t.ctx(),n,o,r)}))),e.registerTool("search_studio",{title:"Search studios",description:"Search AniList for animation/production studios by name. Returns AniList IDs to use with get_studio.",inputSchema:u.object({term:u.string().min(1).describe("Studio name (or part of it) to search for."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:u.object({results:u.object({pageInfo:Ze.optional(),studios:u.array(Et).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:o,perPage:r})=>de(async()=>ue({results:await z$(t.ctx(),n,o,r)}))),e.registerTool("search_user",{title:"Search users",description:"Search AniList for users by username. Returns AniList user IDs to use with profile/list tools.",inputSchema:u.object({term:u.string().min(1).describe("Username (or part of it) to search for."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:u.object({results:u.object({pageInfo:Ze.optional(),users:u.array(Et).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:o,perPage:r})=>de(async()=>ue({results:await w$(t.ctx(),n,o,r)}))),e.registerTool("search_activity",{title:"Search activity feed",description:"Search/browse AniList's activity feed (list updates, text posts, messages), optionally filtered to one user and/or one activity type. Returns AniList activity IDs to use with get_activity.",inputSchema:u.object({userId:Re.optional().describe("Restrict results to this AniList user ID \u2014 numeric only; resolve one via search_user first, or use get_user_activity instead if you already have an exact username."),type:u.enum(BT).optional().describe("Restrict to this activity type. MEDIA_LIST matches both ANIME_LIST and MANGA_LIST activities; use ANIME_LIST/MANGA_LIST to restrict to just one."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(10).describe("Results per page (max 25).")}),outputSchema:u.object({results:u.object({pageInfo:Ze.optional(),activities:u.array(Et).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({userId:n,type:o,page:r,perPage:i})=>de(async()=>ue({results:await R$(t.ctx(),n,o,r,i)})))}async function k$(e,t){return(await e.gql.request(`query($id:Int){Thread(id:$id){id title body(asHtml:false) siteUrl replyCommentId
260
+ user{id name} categories{id name}}}`,{id:t},e.authHeader())).Thread}async function T$(e,t,n=1,o=25){return(await e.gql.request(`query($threadId:Int,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
259
261
  pageInfo{total currentPage lastPage hasNextPage}
260
262
  threadComments(threadId:$threadId){id comment(asHtml:false) siteUrl user{id name}}
261
- }}`,{threadId:t,page:n,perPage:o},e.authHeader())).Page}async function T$(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteThread(id:$id){deleted}}",{id:t},n);if(!r.DeleteThread?.deleted)throw new ke({code:"not_found",message:"AniList reported this thread as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteThread}var YT=l.object({id:l.number().int(),title:l.string().nullish(),body:l.string().nullish(),siteUrl:l.string().nullish(),replyCommentId:l.number().int().nullish(),user:l.object({id:l.number().int(),name:l.string().nullish()}).passthrough().nullish(),categories:l.array(l.object({id:l.number().int(),name:l.string().nullish()}).passthrough()).nullish()}).passthrough(),XT=l.object({id:l.number().int(),comment:l.string().nullish(),siteUrl:l.string().nullish(),user:l.object({id:l.number().int(),name:l.string().nullish()}).passthrough().nullish()}).passthrough();function P$(e,t){e.registerTool("get_thread",{title:"Get a forum thread",description:"Get an AniList forum thread's title, body and metadata by its ID.",inputSchema:l.object({id:l.number().int().describe("AniList thread ID \u2014 there's no search_thread tool, so this typically comes from an AniList forum URL (anilist.co/forum/thread/<id>) the caller already has.")}),outputSchema:l.object({thread:YT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({thread:await I$(t.ctx(),n)}))),e.registerTool("get_thread_comments",{title:"Get comments on a forum thread",description:"List comments posted on an AniList forum thread, by the thread's ID.",inputSchema:l.object({threadId:l.number().int().describe("AniList thread ID \u2014 there's no search_thread tool, so this typically comes from an AniList forum URL (anilist.co/forum/thread/<id>) or from get_thread."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:l.object({comments:l.object({pageInfo:He.optional(),threadComments:l.array(XT).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({threadId:n,page:o,perPage:r})=>de(async()=>ue({comments:await k$(t.ctx(),n,o,r)}))),e.registerTool("delete_thread",{title:"Delete a forum thread",description:"[Requires login] Delete a forum thread the authenticated user owns, by its ID. This cannot be undone.",inputSchema:l.object({id:l.number().int().describe("AniList thread ID to delete.")}),outputSchema:l.object({result:no}),annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0}},({id:n})=>de(async()=>ue({result:await T$(t.ctx(),n)})))}async function E$(e,t){let n=typeof t=="number",o=n?`query($id:Int){User(id:$id){${Kr}}}`:`query($name:String){User(name:$name){${Kr}}}`;return(await e.gql.request(o,n?{id:t}:{name:t},e.authHeader())).User}async function x$(e,t){let n=typeof t=="number",o="statistics{anime{count meanScore minutesWatched episodesWatched}manga{count meanScore chaptersRead volumesRead}}",r=n?`query($id:Int){User(id:$id){${o}}}`:`query($name:String){User(name:$name){${o}}}`;return(await e.gql.request(r,n?{id:t}:{name:t},e.authHeader())).User}async function j$(e,t){let n=typeof t=="number",o=`${Kr} statistics{anime{count meanScore minutesWatched episodesWatched}manga{count meanScore chaptersRead volumesRead}}`,r=n?`query($id:Int){User(id:$id){${o}}}`:`query($name:String){User(name:$name){${o}}}`;return(await e.gql.request(r,n?{id:t}:{name:t},e.authHeader())).User}async function N$(e){let t=e.requireAuth(),n=`query{Viewer{${Kr}}}`;return(await e.gql.request(n,{},t)).Viewer}async function O$(e,t){let n=e.requireAuth();return(await e.gql.request("mutation($id:Int){ToggleFollow(userId:$id){id name isFollowing}}",{id:t},n)).ToggleFollow}async function A$(e,t){let n=e.requireAuth();return(await e.gql.request(`mutation($about:String,$titleLanguage:UserTitleLanguage,$displayAdultContent:Boolean,$scoreFormat:ScoreFormat){
263
+ }}`,{threadId:t,page:n,perPage:o},e.authHeader())).Page}async function P$(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteThread(id:$id){deleted}}",{id:t},n);if(!r.DeleteThread?.deleted)throw new Te({code:"not_found",message:"AniList reported this thread as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteThread}var XT=u.object({id:u.number().int(),title:u.string().nullish(),body:u.string().nullish(),siteUrl:u.string().nullish(),replyCommentId:u.number().int().nullish(),user:u.object({id:u.number().int(),name:u.string().nullish()}).passthrough().nullish(),categories:u.array(u.object({id:u.number().int(),name:u.string().nullish()}).passthrough()).nullish()}).passthrough(),QT=u.object({id:u.number().int(),comment:u.string().nullish(),siteUrl:u.string().nullish(),user:u.object({id:u.number().int(),name:u.string().nullish()}).passthrough().nullish()}).passthrough();function E$(e,t){e.registerTool("get_thread",{title:"Get a forum thread",description:"Get an AniList forum thread's title, body and metadata by its ID.",inputSchema:u.object({id:Re.describe("AniList thread ID \u2014 there's no search_thread tool, so this typically comes from an AniList forum URL (anilist.co/forum/thread/<id>) the caller already has.")}),outputSchema:u.object({thread:XT}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>de(async()=>ue({thread:await k$(t.ctx(),n)}))),e.registerTool("get_thread_comments",{title:"Get comments on a forum thread",description:"List comments posted on an AniList forum thread, by the thread's ID.",inputSchema:u.object({threadId:Re.describe("AniList thread ID \u2014 there's no search_thread tool, so this typically comes from an AniList forum URL (anilist.co/forum/thread/<id>) or from get_thread."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:u.object({comments:u.object({pageInfo:Ze.optional(),threadComments:u.array(QT).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({threadId:n,page:o,perPage:r})=>de(async()=>ue({comments:await T$(t.ctx(),n,o,r)}))),e.registerTool("delete_thread",{title:"Delete a forum thread",description:"[Requires login] Delete a forum thread the authenticated user owns, by its ID. This cannot be undone.",inputSchema:u.object({id:Re.describe("AniList thread ID to delete.")}),outputSchema:u.object({result:oo}),annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0}},({id:n})=>de(async()=>ue({result:await P$(t.ctx(),n)})))}async function x$(e,t){let n=typeof t=="number",o=n?`query($id:Int){User(id:$id){${Wr}}}`:`query($name:String){User(name:$name){${Wr}}}`;return(await e.gql.request(o,n?{id:t}:{name:t},e.authHeader())).User}async function j$(e,t){let n=typeof t=="number",o="statistics{anime{count meanScore minutesWatched episodesWatched}manga{count meanScore chaptersRead volumesRead}}",r=n?`query($id:Int){User(id:$id){${o}}}`:`query($name:String){User(name:$name){${o}}}`;return(await e.gql.request(r,n?{id:t}:{name:t},e.authHeader())).User}async function N$(e,t){let n=typeof t=="number",o=`${Wr} statistics{anime{count meanScore minutesWatched episodesWatched}manga{count meanScore chaptersRead volumesRead}}`,r=n?`query($id:Int){User(id:$id){${o}}}`:`query($name:String){User(name:$name){${o}}}`;return(await e.gql.request(r,n?{id:t}:{name:t},e.authHeader())).User}async function O$(e){let t=e.requireAuth(),n=`query{Viewer{${Wr}}}`;return(await e.gql.request(n,{},t)).Viewer}async function A$(e,t){let n=e.requireAuth();return(await e.gql.request("mutation($id:Int){ToggleFollow(userId:$id){id name isFollowing}}",{id:t},n)).ToggleFollow}async function C$(e,t){let n=e.requireAuth();return(await e.gql.request(`mutation($about:String,$titleLanguage:UserTitleLanguage,$displayAdultContent:Boolean,$scoreFormat:ScoreFormat){
262
264
  UpdateUser(about:$about,titleLanguage:$titleLanguage,displayAdultContent:$displayAdultContent,scoreFormat:$scoreFormat){id name}
263
- }`,{...t},n)).UpdateUser}var Iu=l.union([l.number().int(),l.string().min(1)]).describe("AniList user ID, or username."),eP=["ROMAJI","ENGLISH","NATIVE"],tP=["POINT_100","POINT_10_DECIMAL","POINT_10","POINT_5","POINT_3"],C$=l.object({id:l.number().int(),name:l.string().nullish(),about:l.string().nullish(),avatar:l.object({large:l.string().nullish()}).nullish(),bannerImage:l.string().nullish(),siteUrl:l.string().nullish(),donatorTier:l.number().int().nullish(),donatorBadge:l.string().nullish(),isFollowing:l.boolean().nullish(),isFollower:l.boolean().nullish()}).passthrough(),q$=l.object({count:l.number().int().nullish(),meanScore:l.number().nullish(),minutesWatched:l.number().int().nullish(),episodesWatched:l.number().int().nullish()}).passthrough(),L$=l.object({count:l.number().int().nullish(),meanScore:l.number().nullish(),chaptersRead:l.number().int().nullish(),volumesRead:l.number().int().nullish()}).passthrough(),rP=l.object({statistics:l.object({anime:q$.nullish(),manga:L$.nullish()}).passthrough().nullish()}).passthrough(),nP=l.object({id:l.number().int(),name:l.string().nullish(),about:l.string().nullish(),avatar:l.object({large:l.string().nullish()}).nullish(),bannerImage:l.string().nullish(),siteUrl:l.string().nullish(),donatorTier:l.number().int().nullish(),donatorBadge:l.string().nullish(),isFollowing:l.boolean().nullish(),isFollower:l.boolean().nullish(),statistics:l.object({anime:q$.nullish(),manga:L$.nullish()}).passthrough().nullish()}).passthrough(),oP=l.object({id:l.number().int(),name:l.string().nullish(),isFollowing:l.boolean().nullish()}).passthrough(),iP=l.object({id:l.number().int(),name:l.string().nullish()}).passthrough();function M$(e,t){e.registerTool("get_user_profile",{title:"Get a user's profile",description:"Get an AniList user's public profile: name, about text, avatar, donator status. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name and need to look up the exact one.",inputSchema:l.object({user:Iu}),outputSchema:l.object({profile:C$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>de(async()=>ue({profile:await E$(t.ctx(),n)}))),e.registerTool("get_user_stats",{title:"Get a user's statistics",description:"Get an AniList user's anime/manga statistics: counts, mean score, time watched, episodes/chapters/volumes consumed. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name.",inputSchema:l.object({user:Iu}),outputSchema:l.object({stats:rP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>de(async()=>ue({stats:await x$(t.ctx(),n)}))),e.registerTool("get_full_user_info",{title:"Get a user's complete profile and stats",description:"Get an AniList user's profile AND statistics in a single call \u2014 use this instead of calling get_user_profile and get_user_stats separately. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name.",inputSchema:l.object({user:Iu}),outputSchema:l.object({user:nP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>de(async()=>ue({user:await j$(t.ctx(),n)}))),e.registerTool("get_user_recent_activity",{title:"Get a user's most recent activity",description:"Get an AniList user's 5 most recent activity posts (a fixed count, not configurable; use get_user_activity for a paginated full feed instead). Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name (username resolution costs one extra internal lookup either way).",inputSchema:l.object({user:Iu}),outputSchema:l.object({activity:l.object({pageInfo:He.optional(),activities:l.array(Pt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>de(async()=>ue({activity:await wu(t.ctx(),n,1,5)}))),e.registerTool("get_authorized_user",{title:"Get the logged-in user's profile",description:"[Requires login] Get the profile of the AniList account currently authorized via login_anilist/ANILIST_ACCESS_TOKEN \u2014 use this to confirm which account is connected.",inputSchema:l.object({}),outputSchema:l.object({user:C$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>de(async()=>ue({user:await N$(t.ctx())}))),e.registerTool("follow_user",{title:"Follow/unfollow a user",description:"[Requires login] Toggle following another AniList user from the authenticated user's account. Calling it again on the same user unfollows them.",inputSchema:l.object({id:l.number().int().describe("AniList numeric user ID to follow/unfollow \u2014 this mutation has no username form; resolve one via search_user or get_user_profile first.")}),outputSchema:l.object({user:oP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({id:n})=>de(async()=>ue({user:await O$(t.ctx(),n)}))),e.registerTool("update_user",{title:"Update your AniList account settings",description:"[Requires login] Update settings on the authenticated user's own AniList account (about text, preferred title language, adult-content visibility, score format). Only set the fields you want to change.",inputSchema:l.object({about:l.string().optional().describe("New profile 'about' text."),titleLanguage:l.enum(eP).optional().describe("Preferred title display language."),displayAdultContent:l.boolean().optional().describe("Whether to show adult content in search/browse."),scoreFormat:l.enum(tP).optional().describe("Preferred list score format (affects how scores DISPLAY on anilist.co only \u2014 add_list_entry/update_list_entry's `score` parameter always stays on a 0-10 scale regardless of this setting, so no conversion is needed on your end).")}),outputSchema:l.object({user:iP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}},n=>de(async()=>ue({user:await A$(t.ctx(),n)})))}async function D$(e,{typeIn:t,resetNotificationCount:n,page:o=1,perPage:r=25}){let i=e.requireAuth(),a=`query($page:Int,$perPage:Int,$type_in:[NotificationType],$resetNotificationCount:Boolean){
265
+ }`,{...t},n)).UpdateUser}var ku=u.union([Re,u.string().min(1)]).describe("AniList user ID, or username."),tP=["ROMAJI","ENGLISH","NATIVE"],rP=["POINT_100","POINT_10_DECIMAL","POINT_10","POINT_5","POINT_3"],q$=u.object({id:u.number().int(),name:u.string().nullish(),about:u.string().nullish(),avatar:u.object({large:u.string().nullish()}).nullish(),bannerImage:u.string().nullish(),siteUrl:u.string().nullish(),donatorTier:u.number().int().nullish(),donatorBadge:u.string().nullish(),isFollowing:u.boolean().nullish(),isFollower:u.boolean().nullish()}).passthrough(),L$=u.object({count:u.number().int().nullish(),meanScore:u.number().nullish(),minutesWatched:u.number().int().nullish(),episodesWatched:u.number().int().nullish()}).passthrough(),M$=u.object({count:u.number().int().nullish(),meanScore:u.number().nullish(),chaptersRead:u.number().int().nullish(),volumesRead:u.number().int().nullish()}).passthrough(),nP=u.object({statistics:u.object({anime:L$.nullish(),manga:M$.nullish()}).passthrough().nullish()}).passthrough(),oP=u.object({id:u.number().int(),name:u.string().nullish(),about:u.string().nullish(),avatar:u.object({large:u.string().nullish()}).nullish(),bannerImage:u.string().nullish(),siteUrl:u.string().nullish(),donatorTier:u.number().int().nullish(),donatorBadge:u.string().nullish(),isFollowing:u.boolean().nullish(),isFollower:u.boolean().nullish(),statistics:u.object({anime:L$.nullish(),manga:M$.nullish()}).passthrough().nullish()}).passthrough(),iP=u.object({id:u.number().int(),name:u.string().nullish(),isFollowing:u.boolean().nullish()}).passthrough(),aP=u.object({id:u.number().int(),name:u.string().nullish()}).passthrough();function D$(e,t){e.registerTool("get_user_profile",{title:"Get a user's profile",description:"Get an AniList user's public profile: name, about text, avatar, donator status. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name and need to look up the exact one.",inputSchema:u.object({user:ku}),outputSchema:u.object({profile:q$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>de(async()=>ue({profile:await x$(t.ctx(),n)}))),e.registerTool("get_user_stats",{title:"Get a user's statistics",description:"Get an AniList user's anime/manga statistics: counts, mean score, time watched, episodes/chapters/volumes consumed. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name.",inputSchema:u.object({user:ku}),outputSchema:u.object({stats:nP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>de(async()=>ue({stats:await j$(t.ctx(),n)}))),e.registerTool("get_full_user_info",{title:"Get a user's complete profile and stats",description:"Get an AniList user's profile AND statistics in a single call \u2014 use this instead of calling get_user_profile and get_user_stats separately. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name.",inputSchema:u.object({user:ku}),outputSchema:u.object({user:oP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>de(async()=>ue({user:await N$(t.ctx(),n)}))),e.registerTool("get_user_recent_activity",{title:"Get a user's most recent activity",description:"Get an AniList user's 5 most recent activity posts (a fixed count, not configurable; use get_user_activity for a paginated full feed instead). Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name (username resolution costs one extra internal lookup either way).",inputSchema:u.object({user:ku}),outputSchema:u.object({activity:u.object({pageInfo:Ze.optional(),activities:u.array(Et).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>de(async()=>ue({activity:await Ru(t.ctx(),n,1,5)}))),e.registerTool("get_authorized_user",{title:"Get the logged-in user's profile",description:"[Requires login] Get the profile of the AniList account currently authorized via login_anilist/ANILIST_ACCESS_TOKEN \u2014 use this to confirm which account is connected.",inputSchema:u.object({}),outputSchema:u.object({user:q$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>de(async()=>ue({user:await O$(t.ctx())}))),e.registerTool("follow_user",{title:"Follow/unfollow a user",description:"[Requires login] Toggle following another AniList user from the authenticated user's account. Calling it again on the same user unfollows them.",inputSchema:u.object({id:Re.describe("AniList numeric user ID to follow/unfollow \u2014 this mutation has no username form; resolve one via search_user or get_user_profile first.")}),outputSchema:u.object({user:iP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({id:n})=>de(async()=>ue({user:await A$(t.ctx(),n)}))),e.registerTool("update_user",{title:"Update your AniList account settings",description:"[Requires login] Update settings on the authenticated user's own AniList account (about text, preferred title language, adult-content visibility, score format). Only set the fields you want to change.",inputSchema:u.object({about:u.string().optional().describe("New profile 'about' text."),titleLanguage:u.enum(tP).optional().describe("Preferred title display language."),displayAdultContent:u.boolean().optional().describe("Whether to show adult content in search/browse."),scoreFormat:u.enum(rP).optional().describe("Preferred list score format (affects how scores DISPLAY on anilist.co only \u2014 add_list_entry/update_list_entry's `score` parameter always stays on a 0-10 scale regardless of this setting, so no conversion is needed on your end).")}),outputSchema:u.object({user:aP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0}},n=>de(async()=>ue({user:await C$(t.ctx(),n)})))}async function U$(e,{typeIn:t,resetNotificationCount:n,page:o=1,perPage:r=25}){let i=e.requireAuth(),a=`query($page:Int,$perPage:Int,$type_in:[NotificationType],$resetNotificationCount:Boolean){
264
266
  Page(page:$page,perPage:$perPage){
265
267
  pageInfo { hasNextPage }
266
- notifications(type_in:$type_in,resetNotificationCount:$resetNotificationCount){${Nb}}
268
+ notifications(type_in:$type_in,resetNotificationCount:$resetNotificationCount){${Ob}}
267
269
  }
268
- }`;return(await e.gql.request(a,{page:o,perPage:r,type_in:t,resetNotificationCount:n},i,{skipCache:!0})).Page}var sP=["ACTIVITY_MESSAGE","ACTIVITY_REPLY","FOLLOWING","ACTIVITY_MENTION","THREAD_COMMENT_MENTION","THREAD_SUBSCRIBED","THREAD_COMMENT_REPLY","AIRING","ACTIVITY_LIKE","ACTIVITY_REPLY_LIKE","THREAD_LIKE","THREAD_COMMENT_LIKE","ACTIVITY_REPLY_SUBSCRIBED","RELATED_MEDIA_ADDITION","MEDIA_DATA_CHANGE","MEDIA_MERGE","MEDIA_DELETION","MEDIA_SUBMISSION_UPDATE","STAFF_SUBMISSION_UPDATE","CHARACTER_SUBMISSION_UPDATE"];function U$(e,t){e.registerTool("get_notifications",{title:"Get your AniList notifications",description:"[Requires login] Get the authenticated user's AniList notifications: new episodes airing, activity likes/replies/mentions, new followers, thread replies/likes, and media/staff/character data-submission updates. Every item has `id`, `type` and a human-readable `context`/`contexts` string; the rest of the fields depend on `type` (e.g. an AIRING item includes `media`/`episode`, a FOLLOWING item includes `user`).",inputSchema:l.object({type_in:l.array(l.enum(sP)).optional().describe("Restrict to these notification types. Omit to get every type."),markAsRead:l.boolean().default(!1).describe("Set true to also reset AniList's unread-notification badge count to 0, as a side effect of this call (the same effect as opening the notifications page on the site). Defaults to false so a routine check doesn't clear the badge."),page:l.number().int().positive().default(1).describe("Page number for pagination."),perPage:l.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),notifications:l.array(Pt).optional()}).passthrough()}),annotations:{readOnlyHint:!1,idempotentHint:!1,openWorldHint:!0}},({type_in:n,markAsRead:o,page:r,perPage:i})=>de(async()=>ue({results:await D$(t.ctx(),{typeIn:n,resetNotificationCount:o,page:r,perPage:i})})))}function V$(e,t){e.registerTool("login_anilist",{title:"Log in to AniList",description:"Authorize the personal-list and social tools with your AniList account (one-time). Prerequisite: register an app at anilist.co/settings/developer with Redirect URL set to this server's localhost callback, and set ANILIST_CLIENT_ID + ANILIST_CLIENT_SECRET in the server env. Calling this returns an authorization URL: open it, log in, and click Approve. If your browser is on the same machine as the server, login completes automatically; if it's remote (SSH/headless), copy the URL you land on and pass it to submit_anilist_redirect.",inputSchema:l.object({}),outputSchema:l.object({authorize_url:l.string(),redirect_uri:l.string(),auto_capture:l.boolean(),instructions:l.string()}),annotations:{readOnlyHint:!1,openWorldHint:!0}},()=>de(async()=>{if(!t.canLogin())return Wr("ANILIST_CLIENT_ID and ANILIST_CLIENT_SECRET must both be set to log in. Register an app at anilist.co/settings/developer first.");let{authorizeUrl:n,redirectUri:o,listening:r}=await t.startLogin();return ue({authorize_url:n,redirect_uri:o,auto_capture:r,instructions:r?"Open authorize_url, log in and click Approve. Login then completes automatically \u2014 call get_authorized_user to confirm.":"Open authorize_url, log in and click Approve, then copy the URL you're redirected to and pass it to submit_anilist_redirect."})})),e.registerTool("submit_anilist_redirect",{title:"Complete AniList login with a pasted redirect URL",description:"Complete a login started with login_anilist by submitting the URL your browser was redirected to after clicking Approve (the one containing ?code=...). Use this when login didn't complete automatically \u2014 e.g. the server runs on a remote/headless host. A bare code string is also accepted.",inputSchema:l.object({redirect_url:l.string().min(1).describe("The full redirected URL (contains ?code=...), or just the code value.")}),outputSchema:l.object({success:l.boolean()}),annotations:{readOnlyHint:!1,openWorldHint:!0}},({redirect_url:n})=>de(async()=>(await t.submitRedirect(n),ue({success:!0}))))}function Z$(e){e.registerPrompt("recommend_similar",{title:"Recommend similar anime/manga",description:"Plan a recommendation search for anime or manga similar to a given title, using AniList's own recommendation data rather than the model's own knowledge.",argsSchema:{title:l.string().min(1).describe("An anime or manga title the user liked."),type:l.enum(["ANIME","MANGA"]).describe("Whether the title is anime or manga. Defaults to ANIME.").optional()}},({title:t,type:n})=>{let o=n??"ANIME";return{messages:[{role:"user",content:{type:"text",text:`Recommend ${o==="ANIME"?"anime":"manga"} similar to "${t}".
269
- Steps: call search_media with type: "${o}" to resolve it to an AniList id, then get_recommendations_for_media with that id as \`mediaId\` (not \`id\` \u2014 that's the param name for the different get_recommendation tool). Present 5-8 recommendations with a one-line reason each, noting AniList's average score and genres.`}}]}}),e.registerPrompt("seasonal_overview",{title:"Seasonal anime overview",description:"Summarize the notable anime airing in a given season (or the current one).",argsSchema:{season:l.enum(["WINTER","SPRING","SUMMER","FALL"]).describe("Season name.").optional(),year:l.string().regex(/^\d{4}$/,"year must be four digits, e.g. '2026'.").describe("Four-digit year.").optional()}},({season:t,year:n})=>{let o=t&&n?`the ${t} ${n} season`:"the current season",r=t&&n?`season: "${t}", seasonYear: ${n}`:'status_in: ["RELEASING"]';return{messages:[{role:"user",content:{type:"text",text:`Give an overview of ${o} in anime.
270
- Call search_media with type: "ANIME", ${r}, then group the results into highlights (highest average score / most popular) and notable genres. Keep it concise.`}}]}}),e.registerPrompt("hidden_gems",{title:"Find hidden gems",description:"Surface highly-rated anime or manga that aren't widely known \u2014 high average score, low popularity.",argsSchema:{type:l.enum(["ANIME","MANGA"]).describe("Look for anime or manga. Defaults to ANIME.").optional(),genre:l.string().describe("Restrict to this genre (see get_genres for valid names).").optional()}},({type:t,genre:n})=>{let o=t??"ANIME";return{messages:[{role:"user",content:{type:"text",text:`Find hidden-gem ${o==="ANIME"?"anime":"manga"}: high AniList average score but not widely known.
271
- Call search_media with type: "${o}"`+(n?`, genres: ["${n}"]`:"")+" and perPage: 25, then pick the entries whose averageScore is high but whose popularity is much lower than that score would suggest \u2014 those are the underseen ones. Present 5-8 picks with title, averageScore, popularity, and a one-line reason each noting why it's underrated."}}]}}),e.registerPrompt("catch_up_activity",{title:"Catch up on a user's AniList activity",description:"Summarize a user's recent AniList activity feed alongside their current in-progress anime AND manga lists.",argsSchema:{user:l.string().min(1).describe("AniList username (or numeric user ID as a string).")}},({user:t})=>({messages:[{role:"user",content:{type:"text",text:`Summarize what AniList user "${t}" has been up to lately.
272
- Call get_user_activity for their recent activity posts (list updates, text posts), and get_user_list with type: "ANIME" and again with type: "MANGA" for their CURRENT (watching/reading) status groups. Combine all of that into a short digest: what they've recently updated, what they're currently watching/reading and how far along, and any notable text posts. Omit a list from the digest if it has no CURRENT entries.`}}]})),e.registerPrompt("check_notifications",{title:"Check your AniList notifications",description:"[Requires login] Summarize the authenticated user's recent AniList notifications (airing episodes, activity likes/replies/mentions, new followers, thread activity).",argsSchema:{markAsRead:l.enum(["true","false"]).describe('Set "true" to also clear the AniList unread badge. Defaults to "false".').optional()}},({markAsRead:t})=>({messages:[{role:"user",content:{type:"text",text:`Summarize my recent AniList notifications.
273
- Call get_notifications`+(t==="true"?" with markAsRead: true":"")+". Group the results by what they're about (airing episodes, activity likes/replies/mentions, new followers, thread activity, etc.) and present a short digest, most recent first. If get_notifications reports no token is configured, tell the user to run login_anilist first instead of guessing."}}]}))}var cP="AniList tools for anime, manga, characters, staff and studios. Reads (search/details/genres/tags/recommendations/threads/activity/public user data) call the public AniList GraphQL API and need no credentials. Personal-list and social tools (get/add/update/remove list entries, favourites, follow, posting/deleting activity or threads, update_user, get_notifications) act on the authenticated user's own AniList account and require a user token; without one they return an actionable error. Resolve a title to its AniList id with search_media before calling id-based tools.";function lP(e,t){let n=new zu(e,t),o=new Xi({name:"anilist-mcp-server",title:"AniList MCP Server",version:yu},{instructions:cP});return Mb(o,n),Gb(o,n),Xb(o,n),c$(o,n),f$(o,n),y$(o,n),R$(o,n),P$(o,n),M$(o,n),U$(o,n),V$(o,n),Z$(o),o}async function F$(){let e=gb(),t=_b(e.logLevel),n,o=r=>{t.info(`received ${r}, shutting down`),(n?.close()??Promise.resolve()).finally(()=>process.exit(0))};process.on("SIGINT",()=>o("SIGINT")),process.on("SIGTERM",()=>o("SIGTERM")),process.on("unhandledRejection",r=>t.error("unhandled rejection",r)),process.on("uncaughtException",r=>{t.error("uncaught exception",r),process.exit(1)}),n=hb(()=>lP(e,t),{onerror:r=>t.error("stdio transport error",r)}),t.info(`anilist-mcp-server ${yu} ready`)}F$().catch(e=>{process.stderr.write(`[anilist-mcp-server] fatal: ${e instanceof Error?e.message:String(e)}
270
+ }`;return(await e.gql.request(a,{page:o,perPage:r,type_in:t,resetNotificationCount:n},i,{skipCache:!0})).Page}var cP=["ACTIVITY_MESSAGE","ACTIVITY_REPLY","FOLLOWING","ACTIVITY_MENTION","THREAD_COMMENT_MENTION","THREAD_SUBSCRIBED","THREAD_COMMENT_REPLY","AIRING","ACTIVITY_LIKE","ACTIVITY_REPLY_LIKE","THREAD_LIKE","THREAD_COMMENT_LIKE","ACTIVITY_REPLY_SUBSCRIBED","RELATED_MEDIA_ADDITION","MEDIA_DATA_CHANGE","MEDIA_MERGE","MEDIA_DELETION","MEDIA_SUBMISSION_UPDATE","STAFF_SUBMISSION_UPDATE","CHARACTER_SUBMISSION_UPDATE"];function V$(e,t){e.registerTool("get_notifications",{title:"Get your AniList notifications",description:"[Requires login] Get the authenticated user's AniList notifications: new episodes airing, activity likes/replies/mentions, new followers, thread replies/likes, and media/staff/character data-submission updates. Every item has `id`, `type` and a human-readable `context`/`contexts` string; the rest of the fields depend on `type` (e.g. an AIRING item includes `media`/`episode`, a FOLLOWING item includes `user`).",inputSchema:u.object({type_in:u.array(u.enum(cP)).optional().describe("Restrict to these notification types. Omit to get every type."),markAsRead:u.boolean().default(!1).describe("Set true to also reset AniList's unread-notification badge count to 0, as a side effect of this call (the same effect as opening the notifications page on the site). Defaults to false so a routine check doesn't clear the badge."),page:u.number().int().positive().default(1).describe("Page number for pagination."),perPage:u.number().int().min(1).max(25).default(25).describe("Results per page (max 25).")}),outputSchema:u.object({results:u.object({pageInfo:Ze.optional(),notifications:u.array(Et).optional()}).passthrough()}),annotations:{readOnlyHint:!1,idempotentHint:!1,openWorldHint:!0}},({type_in:n,markAsRead:o,page:r,perPage:i})=>de(async()=>ue({results:await U$(t.ctx(),{typeIn:n,resetNotificationCount:o,page:r,perPage:i})})))}function Z$(e,t){e.registerTool("login_anilist",{title:"Log in to AniList",description:"Authorize the personal-list and social tools with your AniList account (one-time). Prerequisite: register an app at anilist.co/settings/developer with Redirect URL set to this server's localhost callback, and set ANILIST_CLIENT_ID + ANILIST_CLIENT_SECRET in the server env. Calling this returns an authorization URL: open it, log in, and click Approve. If your browser is on the same machine as the server, login completes automatically; if it's remote (SSH/headless), copy the URL you land on and pass it to submit_anilist_redirect.",inputSchema:u.object({}),outputSchema:u.object({authorize_url:u.string(),redirect_uri:u.string(),auto_capture:u.boolean(),instructions:u.string()}),annotations:{readOnlyHint:!1,openWorldHint:!0}},()=>de(async()=>{if(!t.canLogin())return Yr("ANILIST_CLIENT_ID and ANILIST_CLIENT_SECRET must both be set to log in. Register an app at anilist.co/settings/developer first.");let{authorizeUrl:n,redirectUri:o,listening:r}=await t.startLogin();return ue({authorize_url:n,redirect_uri:o,auto_capture:r,instructions:r?"Open authorize_url, log in and click Approve. Login then completes automatically \u2014 call get_authorized_user to confirm.":"Open authorize_url, log in and click Approve, then copy the URL you're redirected to and pass it to submit_anilist_redirect."})})),e.registerTool("submit_anilist_redirect",{title:"Complete AniList login with a pasted redirect URL",description:"Complete a login started with login_anilist by submitting the URL your browser was redirected to after clicking Approve (the one containing ?code=...). Use this when login didn't complete automatically \u2014 e.g. the server runs on a remote/headless host. A bare code string is also accepted.",inputSchema:u.object({redirect_url:u.string().min(1).describe("The full redirected URL (contains ?code=...), or just the code value.")}),outputSchema:u.object({success:u.boolean()}),annotations:{readOnlyHint:!1,openWorldHint:!0}},({redirect_url:n})=>de(async()=>(await t.submitRedirect(n),ue({success:!0}))))}function F$(e){e.registerPrompt("recommend_similar",{title:"Recommend similar anime/manga",description:"Plan a recommendation search for anime or manga similar to a given title, using AniList's own recommendation data rather than the model's own knowledge.",argsSchema:{title:u.string().min(1).describe("An anime or manga title the user liked."),type:u.enum(["ANIME","MANGA"]).describe("Whether the title is anime or manga. Defaults to ANIME.").optional()}},({title:t,type:n})=>{let o=n??"ANIME";return{messages:[{role:"user",content:{type:"text",text:`Recommend ${o==="ANIME"?"anime":"manga"} similar to "${t}".
271
+ Steps: call search_media with type: "${o}" to resolve it to an AniList id, then get_recommendations_for_media with that id as \`mediaId\` (not \`id\` \u2014 that's the param name for the different get_recommendation tool). Present 5-8 recommendations with a one-line reason each, noting AniList's average score and genres.`}}]}}),e.registerPrompt("seasonal_overview",{title:"Seasonal anime overview",description:"Summarize the notable anime airing in a given season (or the current one).",argsSchema:{season:u.enum(["WINTER","SPRING","SUMMER","FALL"]).describe("Season name.").optional(),year:u.string().regex(/^\d{4}$/,"year must be four digits, e.g. '2026'.").describe("Four-digit year.").optional()}},({season:t,year:n})=>{let o=t&&n?`the ${t} ${n} season`:"the current season",r=t&&n?`season: "${t}", seasonYear: ${n}`:'status_in: ["RELEASING"]';return{messages:[{role:"user",content:{type:"text",text:`Give an overview of ${o} in anime.
272
+ Call search_media with type: "ANIME", ${r}, then group the results into highlights (highest average score / most popular) and notable genres. Keep it concise.`}}]}}),e.registerPrompt("hidden_gems",{title:"Find hidden gems",description:"Surface highly-rated anime or manga that aren't widely known \u2014 high average score, low popularity.",argsSchema:{type:u.enum(["ANIME","MANGA"]).describe("Look for anime or manga. Defaults to ANIME.").optional(),genre:u.string().describe("Restrict to this genre (see get_genres for valid names).").optional()}},({type:t,genre:n})=>{let o=t??"ANIME";return{messages:[{role:"user",content:{type:"text",text:`Find hidden-gem ${o==="ANIME"?"anime":"manga"}: high AniList average score but not widely known.
273
+ Call search_media with type: "${o}"`+(n?`, genres: ["${n}"]`:"")+" and perPage: 25, then pick the entries whose averageScore is high but whose popularity is much lower than that score would suggest \u2014 those are the underseen ones. Present 5-8 picks with title, averageScore, popularity, and a one-line reason each noting why it's underrated."}}]}}),e.registerPrompt("catch_up_activity",{title:"Catch up on a user's AniList activity",description:"Summarize a user's recent AniList activity feed alongside their current in-progress anime AND manga lists.",argsSchema:{user:u.string().min(1).describe("AniList username (or numeric user ID as a string).")}},({user:t})=>({messages:[{role:"user",content:{type:"text",text:`Summarize what AniList user "${t}" has been up to lately.
274
+ Call get_user_activity for their recent activity posts (list updates, text posts), and get_user_list with type: "ANIME" and again with type: "MANGA" for their CURRENT (watching/reading) status groups. Combine all of that into a short digest: what they've recently updated, what they're currently watching/reading and how far along, and any notable text posts. Omit a list from the digest if it has no CURRENT entries.`}}]})),e.registerPrompt("check_notifications",{title:"Check your AniList notifications",description:"[Requires login] Summarize the authenticated user's recent AniList notifications (airing episodes, activity likes/replies/mentions, new followers, thread activity).",argsSchema:{markAsRead:u.enum(["true","false"]).describe('Set "true" to also clear the AniList unread badge. Defaults to "false".').optional()}},({markAsRead:t})=>({messages:[{role:"user",content:{type:"text",text:`Summarize my recent AniList notifications.
275
+ Call get_notifications`+(t==="true"?" with markAsRead: true":"")+". Group the results by what they're about (airing episodes, activity likes/replies/mentions, new followers, thread activity, etc.) and present a short digest, most recent first. If get_notifications reports no token is configured, tell the user to run login_anilist first instead of guessing."}}]}))}var lP="AniList tools for anime, manga, characters, staff and studios. Reads (search/details/genres/tags/recommendations/threads/activity/public user data) call the public AniList GraphQL API and need no credentials. Personal-list and social tools (get/add/update/remove list entries, favourites, follow, posting/deleting activity or threads, update_user, get_notifications) act on the authenticated user's own AniList account and require a user token; without one they return an actionable error. Resolve a title to its AniList id with search_media before calling id-based tools.";function uP(e,t){let n=new wu(e,t),o=new Qi({name:"anilist-mcp-server",title:"AniList MCP Server",version:_u},{instructions:lP});return Ub(o,n),Bb(o,n),Qb(o,n),l$(o,n),h$(o,n),_$(o,n),I$(o,n),E$(o,n),D$(o,n),V$(o,n),Z$(o,n),F$(o),o}async function H$(){let e=vb(),t=Sb(e.logLevel),n,o=r=>{t.info(`received ${r}, shutting down`),(n?.close()??Promise.resolve()).finally(()=>process.exit(0))};process.on("SIGINT",()=>o("SIGINT")),process.on("SIGTERM",()=>o("SIGTERM")),process.on("unhandledRejection",r=>t.error("unhandled rejection",r)),process.on("uncaughtException",r=>{t.error("uncaught exception",r),process.exit(1)}),n=gb(()=>uP(e,t),{onerror:r=>t.error("stdio transport error",r)}),t.info(`anilist-mcp-server ${_u} ready`)}H$().catch(e=>{process.stderr.write(`[anilist-mcp-server] fatal: ${e instanceof Error?e.message:String(e)}
274
276
  `),process.exit(1)});
275
277
  /*! Bundled license information:
276
278